2022-09-17 16:50:50 +02:00
|
|
|
#
|
|
|
|
# These are the different profiles that can be used when building NixOS.
|
|
|
|
#
|
|
|
|
# flake.nix
|
|
|
|
# └─ ./hosts
|
|
|
|
# ├─ default.nix *
|
|
|
|
# ├─ configuration.nix
|
|
|
|
# ├─ home.nix
|
|
|
|
# └─ ./desktop OR ./laptop OR ./vm
|
|
|
|
# ├─ ./default.nix
|
|
|
|
# └─ ./home.nix
|
|
|
|
#
|
|
|
|
|
2024-12-19 13:16:40 +01:00
|
|
|
{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, ... }:
|
2022-09-17 16:50:50 +02:00
|
|
|
|
|
|
|
let
|
2024-05-20 10:29:52 +02:00
|
|
|
user = "kabbone";
|
|
|
|
userdmz = "diablo";
|
|
|
|
userserver = "mephisto";
|
|
|
|
location = "$HOME/.setup";
|
|
|
|
|
2022-09-17 16:50:50 +02:00
|
|
|
system = "x86_64-linux"; # System architecture
|
|
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true; # Allow proprietary software
|
|
|
|
};
|
|
|
|
|
|
|
|
lib = nixpkgs.lib;
|
2023-09-23 21:19:53 +02:00
|
|
|
users.defaultShell = "pkgs.zsh";
|
2022-11-01 21:31:56 +01:00
|
|
|
|
2022-09-17 16:50:50 +02:00
|
|
|
in
|
|
|
|
{
|
2024-06-17 17:56:41 +02:00
|
|
|
hades = lib.nixosSystem { # Desktop profile
|
2022-09-17 16:50:50 +02:00
|
|
|
inherit system;
|
2024-12-19 13:16:40 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix microvm nixpkgs lanzaboote; };
|
2022-11-05 10:25:12 +01:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2023-10-06 21:54:08 +02:00
|
|
|
microvm.nixosModules.host
|
2024-02-25 08:09:17 +01:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2022-09-17 16:50:50 +02:00
|
|
|
./desktop
|
2022-11-19 21:38:55 +01:00
|
|
|
./configuration_desktop.nix
|
2024-06-03 20:24:22 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2023-09-23 21:19:53 +02:00
|
|
|
../modules/hardware/remoteBuilder.nix
|
2022-11-05 10:25:12 +01:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
2022-09-17 16:50:50 +02:00
|
|
|
|
2022-11-05 10:25:12 +01:00
|
|
|
home-manager.nixosModules.home-manager {
|
2022-09-17 16:50:50 +02:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2024-12-19 13:16:40 +01:00
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
2022-09-17 16:50:50 +02:00
|
|
|
home-manager.users.${user} = {
|
2022-11-05 10:25:12 +01:00
|
|
|
imports = [(import ./home.nix)] ++ [(import ./desktop/home.nix)];
|
2022-09-17 16:50:50 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-07-15 21:24:50 +02:00
|
|
|
lifebook = lib.nixosSystem { # Laptop profile
|
|
|
|
inherit system;
|
2024-12-19 13:16:40 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix lanzaboote; };
|
2024-07-15 21:24:50 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
2024-08-10 06:16:47 +02:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2024-07-15 21:24:50 +02:00
|
|
|
./lifebook
|
|
|
|
./configuration_desktop.nix
|
|
|
|
../modules/hardware/hydraCache.nix
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2024-12-19 13:16:40 +01:00
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
2024-07-15 21:24:50 +02:00
|
|
|
home-manager.users.${user} = {
|
|
|
|
imports = [(import ./home.nix)] ++ [(import ./lifebook/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nbf5 = lib.nixosSystem { # Laptop profile
|
2022-09-17 16:50:50 +02:00
|
|
|
inherit system;
|
2024-12-19 13:16:40 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix; };
|
2022-09-17 16:50:50 +02:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2024-07-15 21:24:50 +02:00
|
|
|
./nbf5
|
2022-11-19 21:38:55 +01:00
|
|
|
./configuration_desktop.nix
|
2024-06-09 11:01:05 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2022-10-01 14:01:15 +02:00
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
2022-11-05 10:25:12 +01:00
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
2022-09-17 16:50:50 +02:00
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2024-12-19 13:16:40 +01:00
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
2022-09-17 16:50:50 +02:00
|
|
|
home-manager.users.${user} = {
|
2024-07-15 21:24:50 +02:00
|
|
|
imports = [(import ./home.nix)] ++ [(import ./nbf5/home.nix)];
|
2022-09-17 16:50:50 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-12-20 17:04:17 +01:00
|
|
|
steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile
|
2023-07-21 22:07:21 +02:00
|
|
|
inherit system;
|
2024-12-19 13:16:40 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix jovian-nixos lanzaboote; };
|
2023-07-21 22:07:21 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
2023-12-15 22:08:12 +01:00
|
|
|
jovian-nixos.nixosModules.default
|
2024-02-25 08:09:17 +01:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2023-07-21 22:07:21 +02:00
|
|
|
./steamdeck
|
|
|
|
./configuration_desktop.nix
|
2024-05-26 09:14:01 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2023-07-21 22:07:21 +02:00
|
|
|
|
2023-12-16 11:58:44 +01:00
|
|
|
home-manager-unstable.nixosModules.home-manager {
|
2023-07-21 22:07:21 +02:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2024-12-19 13:16:40 +01:00
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
2023-07-21 22:07:21 +02:00
|
|
|
home-manager.users.${user} = {
|
|
|
|
imports = [(import ./home.nix)] ++ [(import ./steamdeck/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-10-16 10:33:47 +02:00
|
|
|
server = lib.nixosSystem { # Desktop profile
|
2022-11-19 21:38:55 +01:00
|
|
|
inherit system;
|
2024-05-19 17:57:35 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; };
|
2022-11-19 21:38:55 +01:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2024-01-20 17:09:55 +01:00
|
|
|
microvm.nixosModules.host
|
2022-11-19 21:38:55 +01:00
|
|
|
./server
|
|
|
|
./configuration_server.nix
|
2024-06-17 20:47:42 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2022-12-06 22:24:15 +01:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
2022-11-19 21:38:55 +01:00
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./server/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-04-21 15:06:42 +02:00
|
|
|
kabtop = lib.nixosSystem { # Desktop profile
|
2024-04-01 15:45:28 +02:00
|
|
|
inherit system;
|
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; };
|
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
microvm.nixosModules.host
|
2024-04-21 15:06:42 +02:00
|
|
|
./kabtop
|
2024-04-01 15:45:28 +02:00
|
|
|
./configuration_server.nix
|
2024-06-17 20:47:42 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2024-04-01 15:45:28 +02:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./server/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-05-01 16:16:33 +02:00
|
|
|
nasbak = lib.nixosSystem { # Desktop profile
|
2023-10-16 10:33:47 +02:00
|
|
|
inherit system;
|
2024-05-19 17:57:35 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix; };
|
2023-10-16 10:33:47 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
2023-12-19 16:03:43 +01:00
|
|
|
./nasbackup
|
2024-07-14 12:06:47 +02:00
|
|
|
./configuration_server.nix
|
2024-06-09 11:01:05 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2023-12-19 16:03:43 +01:00
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
2023-10-16 10:33:47 +02:00
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
2023-12-19 16:03:43 +01:00
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./nasbackup/home.nix)];
|
2023-10-16 10:33:47 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-12-19 16:03:43 +01:00
|
|
|
jupiter = lib.nixosSystem { # Desktop profile
|
2023-01-07 16:13:39 +01:00
|
|
|
inherit system;
|
2024-05-19 17:57:35 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix; };
|
2023-01-07 16:13:39 +01:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2023-12-19 16:03:43 +01:00
|
|
|
./jupiter
|
2024-07-14 12:06:47 +02:00
|
|
|
./configuration_server.nix
|
2024-06-09 11:01:05 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2023-01-07 16:13:39 +01:00
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
2023-12-19 16:03:43 +01:00
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./jupiter/home.nix)];
|
2023-01-07 16:13:39 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-06-09 11:01:05 +02:00
|
|
|
kabtopci = lib.nixosSystem { # Desktop profile
|
|
|
|
inherit system;
|
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; };
|
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
microvm.nixosModules.host
|
2024-06-11 17:14:24 +02:00
|
|
|
./kabtopci
|
2024-06-09 11:01:05 +02:00
|
|
|
./configuration_server.nix
|
2024-06-17 20:47:42 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2024-06-09 11:01:05 +02:00
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./kabtopci/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-12-19 16:03:43 +01:00
|
|
|
dmz = lib.nixosSystem { # Desktop profile
|
2023-09-03 10:18:04 +02:00
|
|
|
inherit system;
|
2024-05-19 17:57:35 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; };
|
2023-09-03 10:18:04 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
2023-12-19 16:03:43 +01:00
|
|
|
microvm.nixosModules.host
|
|
|
|
./dmz
|
|
|
|
./configuration_server.nix
|
2024-06-17 20:47:42 +02:00
|
|
|
../modules/hardware/hydraCache.nix
|
2023-09-03 10:18:04 +02:00
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
2023-12-19 16:03:43 +01:00
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./dmz/home.nix)];
|
2023-09-03 10:18:04 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-11-19 21:38:55 +01:00
|
|
|
|
2024-01-17 17:36:43 +01:00
|
|
|
# vm = lib.nixosSystem { # VM profile
|
|
|
|
# inherit system;
|
|
|
|
# specialArgs = { inherit inputs user location; };
|
|
|
|
# modules = [
|
|
|
|
# ./vm
|
|
|
|
# ./configuration.nix
|
|
|
|
#
|
|
|
|
# home-manager.nixosModules.home-manager {
|
|
|
|
# home-manager.useGlobalPkgs = true;
|
|
|
|
# home-manager.useUserPackages = true;
|
|
|
|
# home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
# home-manager.users.${user} = {
|
|
|
|
# imports = [(import ./home.nix)] ++ [(import ./vm/home.nix)];
|
|
|
|
# };
|
|
|
|
# }
|
|
|
|
# ];
|
|
|
|
# };
|
2022-09-17 16:50:50 +02:00
|
|
|
}
|