flake: merge shared overlay config

This commit is contained in:
Antoine Martin 2021-07-14 18:06:52 +02:00
parent a79d27ff22
commit ff673a0890

View file

@ -33,10 +33,24 @@
outputs = { self, nixpkgs, home-manager, ... } @inputs: { outputs = { self, nixpkgs, home-manager, ... } @inputs: {
nixosConfigurations = { nixosConfigurations =
let
system = "x86_64-linux";
shared_overlays = [
(self: super: {
packages = import ./pkgs { pkgs = super; };
# packages accessible through pkgs.unstable.package
unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
})
];
in {
poseidon = nixpkgs.lib.nixosSystem rec { poseidon = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system;
modules = [ modules = [
./poseidon.nix ./poseidon.nix
@ -51,14 +65,6 @@
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
packages = import ./pkgs { pkgs = super; };
# packages accessible through pkgs.unstable.package
unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
fastPython3 = self.python3.override { fastPython3 = self.python3.override {
enableOptimizations = true; enableOptimizations = true;
reproducibleBuild = false; reproducibleBuild = false;
@ -70,13 +76,13 @@
python3 = self.fastPython3; python3 = self.fastPython3;
}; };
}) })
]; ] ++ shared_overlays;
} }
]; ];
}; };
boreal = nixpkgs.lib.nixosSystem rec { boreal = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system;
modules = [ modules = [
./boreal.nix ./boreal.nix
@ -93,13 +99,6 @@
inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
(self: super: { (self: super: {
packages = import ./pkgs { pkgs = super; };
unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
steam = self.unstable.steam; steam = self.unstable.steam;
}) })
@ -109,7 +108,7 @@
# (self: super: { # (self: super: {
# stdenv = super.impureUseNativeOptimizations super.stdenv; # stdenv = super.impureUseNativeOptimizations super.stdenv;
# }) # })
]; ] ++ shared_overlays;
} }
]; ];
}; };