flake: expose overlays

This commit is contained in:
Guanran Wang 2024-02-06 18:05:14 +08:00
parent 15aee256dd
commit d2d4693e1c
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
9 changed files with 18 additions and 19 deletions

View file

@ -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;

View file

@ -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;

View file

@ -1,6 +0,0 @@
{...}: {
imports = [
./overlays
./anti-feature.nix
];
}

View file

@ -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;})
];
}

10
overlays/default.nix Normal file
View file

@ -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;};
}