flake: factorize shared modules

This commit is contained in:
Antoine Martin 2021-08-25 21:56:42 +02:00
parent 9bb834587d
commit e4775f4611

View file

@ -74,6 +74,10 @@
};
})
];
sharedModules = [
home-manager.nixosModule
{ nixpkgs.overlays = shared_overlays; }
] ++ (nixpkgs.lib.attrValues self.nixosModules);
in {
poseidon = nixpkgs.lib.nixosSystem rec {
@ -81,11 +85,6 @@
modules = [
./poseidon.nix
self.nixosModules.nix-path
home-manager.nixosModule
self.nixosModules.home
{
nixpkgs.overlays = [
(self: super: {
@ -100,9 +99,9 @@
python3 = self.fastPython3;
};
})
] ++ shared_overlays;
];
}
];
] ++ sharedModules;
};
boreal = nixpkgs.lib.nixosSystem rec {
@ -110,11 +109,6 @@
modules = [
./boreal.nix
self.nixosModules.nix-path
home-manager.nixosModule
self.nixosModules.home
{
nixpkgs.overlays = [
inputs.emacs-overlay.overlay
@ -125,9 +119,9 @@
# (self: super: {
# stdenv = super.impureUseNativeOptimizations super.stdenv;
# })
] ++ shared_overlays;
];
}
];
] ++ sharedModules;
};
zephyrus = nixpkgs.lib.nixosSystem rec {
@ -139,17 +133,12 @@
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-ssd
self.nixosModules.nix-path
home-manager.nixosModule
self.nixosModules.home
{
nixpkgs.overlays = [
inputs.emacs-overlay.overlay
] ++ shared_overlays;
];
}
];
] ++ sharedModules;
};
};