flake: group up nixosConfigurations

This commit is contained in:
Antoine Martin 2021-07-14 18:05:36 +02:00
parent 573a6ea0bc
commit a79d27ff22

136
flake.nix
View file

@ -32,82 +32,88 @@
}; };
outputs = { self, nixpkgs, home-manager, ... } @inputs: { outputs = { self, nixpkgs, home-manager, ... } @inputs: {
nixosConfigurations.poseidon = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./poseidon.nix
home-manager.nixosModules.home-manager nixosConfigurations = {
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.alarsyo = import ./home;
home-manager.verbose = true;
}
{ poseidon = nixpkgs.lib.nixosSystem rec {
nixpkgs.overlays = [ system = "x86_64-linux";
(self: super: { modules = [
packages = import ./pkgs { pkgs = super; }; ./poseidon.nix
# packages accessible through pkgs.unstable.package home-manager.nixosModules.home-manager
unstable = import inputs.nixpkgs-unstable { {
inherit system; home-manager.useGlobalPkgs = true;
config.allowUnfree = true; home-manager.useUserPackages = true;
}; home-manager.users.alarsyo = import ./home;
home-manager.verbose = true;
}
fastPython3 = self.python3.override { {
enableOptimizations = true; nixpkgs.overlays = [
reproducibleBuild = false; (self: super: {
self = self.fastPython3; packages = import ./pkgs { pkgs = super; };
pythonAttr = "fastPython3";
};
matrix-synapse = super.matrix-synapse.override { # packages accessible through pkgs.unstable.package
python3 = self.fastPython3; unstable = import inputs.nixpkgs-unstable {
}; inherit system;
}) config.allowUnfree = true;
]; };
}
];
};
nixosConfigurations.boreal = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./boreal.nix
home-manager.nixosModules.home-manager fastPython3 = self.python3.override {
{ enableOptimizations = true;
home-manager.useGlobalPkgs = true; reproducibleBuild = false;
home-manager.useUserPackages = true; self = self.fastPython3;
home-manager.users.alarsyo = import ./home; pythonAttr = "fastPython3";
home-manager.verbose = true; };
}
{ matrix-synapse = super.matrix-synapse.override {
nixpkgs.overlays = [ python3 = self.fastPython3;
inputs.emacs-overlay.overlay };
})
];
}
];
};
(self: super: { boreal = nixpkgs.lib.nixosSystem rec {
packages = import ./pkgs { pkgs = super; }; system = "x86_64-linux";
modules = [
./boreal.nix
unstable = import inputs.nixpkgs-unstable { home-manager.nixosModules.home-manager
inherit system; {
config.allowUnfree = true; home-manager.useGlobalPkgs = true;
}; home-manager.useUserPackages = true;
home-manager.users.alarsyo = import ./home;
home-manager.verbose = true;
}
steam = self.unstable.steam; {
}) nixpkgs.overlays = [
inputs.emacs-overlay.overlay
(self: super: {
packages = import ./pkgs { pkgs = super; };
unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
steam = self.unstable.steam;
})
# uncomment this to build everything from scratch, fun but takes a
# while
#
# (self: super: {
# stdenv = super.impureUseNativeOptimizations super.stdenv;
# })
];
}
];
};
# uncomment this to build everything from scratch, fun but takes a
# while
#
# (self: super: {
# stdenv = super.impureUseNativeOptimizations super.stdenv;
# })
];
}
];
}; };
}; };
} }