diff --git a/flake/perSystem.nix b/flake/perSystem.nix index 5341411..e46b620 100644 --- a/flake/perSystem.nix +++ b/flake/perSystem.nix @@ -47,16 +47,14 @@ inherit inputs rootPath; srcs = self.callPackage (rootPath + "/_sources/generated.nix") { }; inherit (inputs'.nixvim.legacyPackages) makeNixvim makeNixvimWithModule; + inherit (self'.legacyPackages) nixvimPlugins editor-runtime; neovim_git = inputs'.neovim-nightly.packages.default; }); in - inputsScope.overrideScope ( - final: _prev: - lib.packagesFromDirectoryRecursive { - inherit (final) callPackage; - directory = rootPath + "/pkgs"; - } - ); + lib.packagesFromDirectoryRecursive { + inherit (inputsScope) callPackage; + directory = rootPath + "/pkgs"; + }; packages = let flattenPkgs = @@ -70,23 +68,7 @@ else { }; in - flattenPkgs [ ] ( - lib.removeAttrs self'.legacyPackages [ - "inputs" - - "srcs" - - "rootPath" - - "makeNixvim" - "makeNixvimWithModule" - - "newScope" - "overrideScope" - "packages" - "callPackage" - ] - ); + flattenPkgs [ ] self'.legacyPackages; checks = lib.concatMapAttrs (name: value: { "package-${name}" = value; }) self'.packages; diff --git a/pkgs/rime-all/default.custom.yaml b/home/modules/i18n/default.custom.yaml similarity index 100% rename from pkgs/rime-all/default.custom.yaml rename to home/modules/i18n/default.custom.yaml diff --git a/home/modules/i18n/default.nix b/home/modules/i18n/default.nix new file mode 100644 index 0000000..5dddd23 --- /dev/null +++ b/home/modules/i18n/default.nix @@ -0,0 +1,14 @@ +{ + osConfig ? null, + lib, + ... +}: +{ + config = lib.mkIf (osConfig != null) { + xdg.dataFile = { + "fcitx5/rime/default.custom.yaml".source = ./default.custom.yaml; + "fcitx5/rime/double_pinyin_flypy.custom.yaml".source = ./double_pinyin_flypy.custom.yaml; + "fcitx5/rime/yustar_sc.custom.yaml".source = ./yustar_sc.custom.yaml; + }; + }; +} diff --git a/pkgs/rime-all/double_pinyin_flypy.custom.yaml b/home/modules/i18n/double_pinyin_flypy.custom.yaml similarity index 100% rename from pkgs/rime-all/double_pinyin_flypy.custom.yaml rename to home/modules/i18n/double_pinyin_flypy.custom.yaml diff --git a/pkgs/rime-all/yustar_sc.custom.yaml b/home/modules/i18n/yustar_sc.custom.yaml similarity index 100% rename from pkgs/rime-all/yustar_sc.custom.yaml rename to home/modules/i18n/yustar_sc.custom.yaml diff --git a/nixos/modules/i18n.nix b/nixos/modules/i18n.nix index 22a9ff5..b71184f 100644 --- a/nixos/modules/i18n.nix +++ b/nixos/modules/i18n.nix @@ -37,7 +37,10 @@ in fcitx5-fluent (fcitx5-rime.override { rimeDataPkgs = [ - rime-all + rime-ice + rime-zhwiki + rime-moegirl + rime-yuhaostar ]; }) ]; diff --git a/overlays/additions/default.nix b/overlays/additions/default.nix index a73aec7..1ea4ffc 100644 --- a/overlays/additions/default.nix +++ b/overlays/additions/default.nix @@ -9,7 +9,6 @@ in ./editor-runtime.nix ./wallpapers.nix ./rime-yuhaostar.nix - ./rime-all.nix ./nixvim.nix ./doom-emacs.nix ./osu-lazer-bin.nix # typochecker: disable-line diff --git a/overlays/additions/rime-all.nix b/overlays/additions/rime-all.nix deleted file mode 100644 index 23675dc..0000000 --- a/overlays/additions/rime-all.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ outputs, ... }: -_final: prev: -let - inherit (prev.stdenv.hostPlatform) system; -in -{ - inherit (outputs.packages.${system}) rime-all; -} diff --git a/overlays/modifications/cliphist.nix b/overlays/modifications/cliphist.nix index 2aa546a..6ad9740 100644 --- a/overlays/modifications/cliphist.nix +++ b/overlays/modifications/cliphist.nix @@ -4,5 +4,5 @@ let inherit (prev.stdenv.hostPlatform) system; in { - inherit (outputs.packages."${system}") cliphist'; + inherit (outputs.packages."${system}") cliphist; } diff --git a/overlays/modifications/radicle-explorer.nix b/overlays/modifications/radicle-explorer.nix index 316b7a6..a001fde 100644 --- a/overlays/modifications/radicle-explorer.nix +++ b/overlays/modifications/radicle-explorer.nix @@ -4,5 +4,5 @@ let inherit (prev.stdenv.hostPlatform) system; in { - radicle-explorer = outputs.packages."${system}".radicle-explorer'; + radicle-explorer = outputs.packages."${system}".radicle-explorer; } diff --git a/overlays/modifications/spotifyd.nix b/overlays/modifications/spotifyd.nix index 2689a30..2d19fce 100644 --- a/overlays/modifications/spotifyd.nix +++ b/overlays/modifications/spotifyd.nix @@ -4,5 +4,5 @@ let inherit (prev.stdenv.hostPlatform) system; in { - spotifyd = outputs.packages.${system}.spotifyd'; + spotifyd = outputs.packages."${system}".spotifyd; } diff --git a/pkgs/cliphist'.nix b/pkgs/cliphist.nix similarity index 100% rename from pkgs/cliphist'.nix rename to pkgs/cliphist.nix diff --git a/pkgs/radicle-explorer'.nix b/pkgs/radicle-explorer.nix similarity index 100% rename from pkgs/radicle-explorer'.nix rename to pkgs/radicle-explorer.nix diff --git a/pkgs/rime-all/package.nix b/pkgs/rime-all/package.nix deleted file mode 100644 index 834d446..0000000 --- a/pkgs/rime-all/package.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - rime-ice, - rime-yuhaostar, - rime-moegirl, - rime-zhwiki, - buildEnv, -}: -buildEnv { - name = "rime-all"; - paths = [ - rime-ice - rime-yuhaostar - rime-zhwiki - rime-moegirl - ]; - postBuild = '' - ln -s ${./yustar_sc.custom.yaml} $out/share/rime-data/yustar_sc.custom.yaml - ln -s ${./double_pinyin_flypy.custom.yaml} $out/share/rime-data/double_pinyin_flypy.custom.yaml - ln -s ${./default.custom.yaml} $out/share/rime-data/default.custom.yaml - ''; -} diff --git a/pkgs/spotifyd'.nix b/pkgs/spotifyd.nix similarity index 92% rename from pkgs/spotifyd'.nix rename to pkgs/spotifyd.nix index f7f61f4..211ff3f 100644 --- a/pkgs/spotifyd'.nix +++ b/pkgs/spotifyd.nix @@ -8,7 +8,7 @@ let inherit (srcs.spotifyd) src date version; in spotifyd.overrideAttrs ( - _final: prev: { + final: prev: { inherit src; version = if prev.version != "0.4.1" then @@ -18,7 +18,7 @@ spotifyd.overrideAttrs ( else "0-unstable-${date}-git${version}"; cargoDeps = rustPlatform.fetchCargoVendor { - inherit (prev) + inherit (final) src ; hash = "sha256-WwShp1ebk89cBqRXqKDgbwGZraCDjQAOxoL4uEIq2aw=";