Flake abstraction
This commit is contained in:
parent
29b7bd2ffd
commit
d80dde45af
1 changed files with 48 additions and 79 deletions
127
flake.nix
127
flake.nix
|
|
@ -69,6 +69,13 @@
|
||||||
pkgs = import nixpkgs nixpkgsSettings;
|
pkgs = import nixpkgs nixpkgsSettings;
|
||||||
unstablePkgs = import nixpkgs nixpkgsSettings;
|
unstablePkgs = import nixpkgs nixpkgsSettings;
|
||||||
|
|
||||||
|
homeManagerSettings = {
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
odinBaseModules = [
|
odinBaseModules = [
|
||||||
{ nixpkgs = nixpkgsSettings; }
|
{ nixpkgs = nixpkgsSettings; }
|
||||||
./odin/hardware-configuration.nix
|
./odin/hardware-configuration.nix
|
||||||
|
|
@ -76,45 +83,51 @@
|
||||||
nixos-hardware.nixosModules.common-pc-laptop
|
nixos-hardware.nixosModules.common-pc-laptop
|
||||||
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||||
./odin/base.nix
|
./odin/base.nix
|
||||||
home-manager-unstable.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
# home-manager.nixpkgs.overlays = overlays;
|
|
||||||
home-manager.users.bertof = import ./odin.nix;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
odinStableBaseModules = odinBaseModules ++ [
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
];
|
|
||||||
|
|
||||||
odinUnstableBaseModules = odinBaseModules ++ [
|
|
||||||
home-manager-unstable.nixosModules.home-manager
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
thorBaseModules = [
|
thorBaseModules = [
|
||||||
{ nixpkgs = nixpkgsSettings; }
|
{ nixpkgs = nixpkgsSettings; }
|
||||||
./thor/hardware-configuration.nix
|
./thor/hardware-configuration.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
# home-manager.nixpkgs.overlays = overlays;
|
|
||||||
home-manager.users.bertof = import ./thor.nix;
|
|
||||||
}
|
|
||||||
./thor/configuration.nix
|
./thor/configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
thorStableBaseModules = thorBaseModules ++ [
|
odinStable = extraModules: nixpkgs.lib.nixosSystem {
|
||||||
home-manager.nixosModules.home-manager
|
inherit system;
|
||||||
];
|
modules = odinBaseModules ++ [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./odin.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
thorUnstableBaseModules = thorBaseModules ++ [
|
odinUnstable = extraModules: unstable.lib.nixosSystem {
|
||||||
home-manager-unstable.nixosModules.home-manager
|
inherit system;
|
||||||
];
|
modules = odinBaseModules ++ [
|
||||||
|
home-manager-unstable.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./odin.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
thorStable = extraModules: nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = odinBaseModules ++ [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./thor.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
thorUnstable = extraModules: unstable.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = odinBaseModules ++ [
|
||||||
|
home-manager-unstable.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./thor.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -126,60 +139,16 @@
|
||||||
|
|
||||||
thor = thor-unstable;
|
thor = thor-unstable;
|
||||||
|
|
||||||
thor-stable = nixpkgs.lib.nixosSystem {
|
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ];
|
||||||
inherit system;
|
thor-unstable = thorUnstable [ ./nixos_modules/pro_audio.nix ];
|
||||||
modules = thorStableBaseModules ++ [ ./nixos_modules/pro_audio.nix ];
|
thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ];
|
||||||
};
|
|
||||||
|
|
||||||
thor-unstable = unstable.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = thorUnstableBaseModules ++ [ ./nixos_modules/pro_audio.nix ];
|
|
||||||
};
|
|
||||||
|
|
||||||
thor-big-data = unstable.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = thorUnstableBaseModules ++ [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ];
|
|
||||||
};
|
|
||||||
|
|
||||||
odin = odin-intel-unstable;
|
odin = odin-intel-unstable;
|
||||||
|
|
||||||
odin-intel = nixpkgs.lib.nixosSystem {
|
odin-intel-unstable = odinUnstable [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
||||||
inherit system;
|
odin-nvidia-unstable = odinUnstable [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
||||||
modules = odinStableBaseModules ++ [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
odin-intel-stable = odinStable [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
||||||
};
|
odin-nvidia-stable = odinStable [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
||||||
|
|
||||||
odin-nvidia = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = odinStableBaseModules ++ [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
};
|
|
||||||
|
|
||||||
odin-intel-unstable = unstable.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = odinUnstableBaseModules ++ [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
};
|
|
||||||
|
|
||||||
odin-nvidia-unstable = unstable.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = odinUnstableBaseModules ++ [ ./odin/odin-nvidia.nix ./nixos_modules/pro_audio.nix ];
|
|
||||||
};
|
|
||||||
|
|
||||||
odin-intel-big-data-unstable = unstable.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = odinUnstableBaseModules ++ [
|
|
||||||
./odin/odin-intel.nix
|
|
||||||
./nixos_modules/pro_audio.nix
|
|
||||||
./nixos_modules/big_data.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
odin-nvidia-big-data-unstable = unstable.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = odinUnstableBaseModules ++ [
|
|
||||||
./odin/odin-nvidia.nix
|
|
||||||
./nixos_modules/pro_audio.nix
|
|
||||||
./nixos_modules/big_data.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue