diff --git a/flake.nix b/flake.nix index 9dbe0d5..ebfd1c8 100755 --- a/flake.nix +++ b/flake.nix @@ -177,6 +177,7 @@ in { formatter = eachDefaultSystemMap (system: inputs.nixpkgs.legacyPackages.${system}.alejandra); packages = eachDefaultSystemMap (system: import ./pkgs inputs.nixpkgs.legacyPackages.${system}); + overlays = import ./overlays; nixosModules.default = ./nixos/modules; darwinModules.default = ./darwin/modules; diff --git a/nixos/profiles/common/core/packages/anti-feature.nix b/nixos/profiles/common/core/anti-feature.nix similarity index 100% rename from nixos/profiles/common/core/packages/anti-feature.nix rename to nixos/profiles/common/core/anti-feature.nix diff --git a/nixos/profiles/common/core/default.nix b/nixos/profiles/common/core/default.nix index e91808e..4f2ad07 100644 --- a/nixos/profiles/common/core/default.nix +++ b/nixos/profiles/common/core/default.nix @@ -9,7 +9,7 @@ ./hardening ./networking ./nix - ./packages + ./anti-feature.nix # Flake modules inputs.self.nixosModules.default @@ -21,6 +21,12 @@ inputs.nix-gaming.nixosModules.pipewireLowLatency ]; + nixpkgs.overlays = [ + inputs.self.overlays.sway + inputs.self.overlays.prismlauncher + inputs.self.overlays.nautilus + ]; + ### home-manager home-manager.users.guanranwang = import ./home; diff --git a/nixos/profiles/common/core/packages/default.nix b/nixos/profiles/common/core/packages/default.nix deleted file mode 100755 index b8922fe..0000000 --- a/nixos/profiles/common/core/packages/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - imports = [ - ./overlays - ./anti-feature.nix - ]; -} diff --git a/nixos/profiles/common/core/packages/overlays/default.nix b/nixos/profiles/common/core/packages/overlays/default.nix deleted file mode 100644 index 04be88d..0000000 --- a/nixos/profiles/common/core/packages/overlays/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -let - addPatches = pkg: patches: - pkg.overrideAttrs (old: { - patches = (old.patches or []) ++ patches; - }); -in { - nixpkgs.overlays = [ - (import ./nautilus.nix {inherit addPatches;}) - (import ./prismlauncher.nix {inherit addPatches;}) - (import ./sway.nix {inherit addPatches;}) - ]; -} diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..6d39ff6 --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,10 @@ +let + addPatches = pkg: patches: + pkg.overrideAttrs (old: { + patches = (old.patches or []) ++ patches; + }); +in { + nautilus = import ./nautilus.nix {inherit addPatches;}; + prismlauncher = import ./prismlauncher.nix {inherit addPatches;}; + sway = import ./sway.nix {inherit addPatches;}; +} diff --git a/nixos/profiles/common/core/packages/overlays/nautilus.nix b/overlays/nautilus.nix similarity index 100% rename from nixos/profiles/common/core/packages/overlays/nautilus.nix rename to overlays/nautilus.nix diff --git a/nixos/profiles/common/core/packages/overlays/prismlauncher.nix b/overlays/prismlauncher.nix similarity index 100% rename from nixos/profiles/common/core/packages/overlays/prismlauncher.nix rename to overlays/prismlauncher.nix diff --git a/nixos/profiles/common/core/packages/overlays/sway.nix b/overlays/sway.nix similarity index 100% rename from nixos/profiles/common/core/packages/overlays/sway.nix rename to overlays/sway.nix