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;
|
||||
unstablePkgs = import nixpkgs nixpkgsSettings;
|
||||
|
||||
homeManagerSettings = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
};
|
||||
|
||||
odinBaseModules = [
|
||||
{ nixpkgs = nixpkgsSettings; }
|
||||
./odin/hardware-configuration.nix
|
||||
|
|
@ -76,45 +83,51 @@
|
|||
nixos-hardware.nixosModules.common-pc-laptop
|
||||
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
./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 = [
|
||||
{ nixpkgs = nixpkgsSettings; }
|
||||
./thor/hardware-configuration.nix
|
||||
nixos-hardware.nixosModules.common-cpu-amd
|
||||
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
|
||||
];
|
||||
|
||||
thorStableBaseModules = thorBaseModules ++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
odinStable = extraModules: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = odinBaseModules ++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
homeManagerSettings
|
||||
{ home-manager.users.bertof = import ./odin.nix; }
|
||||
] ++ extraModules;
|
||||
};
|
||||
|
||||
thorUnstableBaseModules = thorBaseModules ++ [
|
||||
home-manager-unstable.nixosModules.home-manager
|
||||
];
|
||||
odinUnstable = extraModules: unstable.lib.nixosSystem {
|
||||
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
|
||||
{
|
||||
|
|
@ -126,60 +139,16 @@
|
|||
|
||||
thor = thor-unstable;
|
||||
|
||||
thor-stable = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = thorStableBaseModules ++ [ ./nixos_modules/pro_audio.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 ];
|
||||
};
|
||||
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ];
|
||||
thor-unstable = thorUnstable [ ./nixos_modules/pro_audio.nix ];
|
||||
thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ];
|
||||
|
||||
odin = odin-intel-unstable;
|
||||
|
||||
odin-intel = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = odinStableBaseModules ++ [ ./odin/odin-intel.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
|
||||
];
|
||||
};
|
||||
odin-intel-unstable = odinUnstable [ ./odin/odin-intel.nix ./nixos_modules/pro_audio.nix ];
|
||||
odin-nvidia-unstable = odinUnstable [ ./odin/odin-nvidia.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 ];
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue