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-04-20 19:07:07 +02:00
|
|
|
{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, nur, user, userdmz, userserver, location, agenix, jovian-nixos, microvm, impermanence, lanzaboote, nixvim, ... }:
|
2022-09-17 16:50:50 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
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
|
|
|
|
{
|
2022-11-05 10:25:12 +01:00
|
|
|
desktop = lib.nixosSystem { # Desktop profile
|
2022-09-17 16:50:50 +02:00
|
|
|
inherit system;
|
2024-04-20 19:07:07 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix microvm nixpkgs lanzaboote nixvim; };
|
2022-11-05 10:25:12 +01:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2022-09-17 16:50:50 +02:00
|
|
|
nur.nixosModules.nur
|
2023-10-06 21:54:08 +02:00
|
|
|
microvm.nixosModules.host
|
2024-02-25 08:09:17 +01:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2024-04-20 19:07:07 +02:00
|
|
|
nixvim.nixosModules.nixvim
|
2022-09-17 16:50:50 +02:00
|
|
|
./desktop
|
2022-11-19 21:38:55 +01:00
|
|
|
./configuration_desktop.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 {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
];
|
2022-09-17 16:50:50 +02:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2022-11-05 10:25:12 +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
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
laptop = lib.nixosSystem { # Laptop profile
|
|
|
|
inherit system;
|
2023-07-21 21:27:26 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix; };
|
2022-09-17 16:50:50 +02:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2022-10-22 16:30:31 +02:00
|
|
|
nur.nixosModules.nur
|
2022-09-17 16:50:50 +02:00
|
|
|
./laptop
|
2022-11-19 21:38:55 +01:00
|
|
|
./configuration_desktop.nix
|
2023-12-15 22:08:12 +01:00
|
|
|
#../modules/hardware/remoteClient.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-gpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
2022-09-17 16:50:50 +02:00
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
2022-11-01 21:31:56 +01:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
];
|
2022-09-17 16:50:50 +02:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
home-manager.users.${user} = {
|
2022-10-01 14:01:15 +02:00
|
|
|
imports = [(import ./home.nix)] ++ [(import ./laptop/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-02-25 08:09:17 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix jovian-nixos lanzaboote; };
|
2023-07-21 22:07:21 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
nur.nixosModules.nur
|
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-03-24 09:51:10 +01:00
|
|
|
#../modules/hardware/remoteClient.nix
|
2023-07-21 22:07:21 +02:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
2023-12-16 11:58:44 +01:00
|
|
|
home-manager-unstable.nixosModules.home-manager {
|
2023-12-21 11:32:23 +01:00
|
|
|
nixpkgs.overlays = [
|
2023-07-21 22:07:21 +02:00
|
|
|
nur.overlay
|
|
|
|
];
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = { inherit user; };
|
|
|
|
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-01-20 17:28:56 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur 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
|
|
|
nur.nixosModules.nur
|
|
|
|
./server
|
|
|
|
./configuration_server.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 {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
];
|
|
|
|
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-01 15:45:28 +02:00
|
|
|
server_big = lib.nixosSystem { # Desktop profile
|
|
|
|
inherit system;
|
|
|
|
specialArgs = { inherit inputs user location nixos-hardware agenix nixpkgs impermanence; };
|
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
microvm.nixosModules.host
|
2024-04-02 11:49:46 +02:00
|
|
|
./server_big
|
2024-04-01 15:45:28 +02:00
|
|
|
./configuration_server.nix
|
|
|
|
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)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-12-19 16:03:43 +01:00
|
|
|
nasbackup = lib.nixosSystem { # Desktop profile
|
2023-10-16 10:33:47 +02:00
|
|
|
inherit system;
|
2023-12-19 16:03:43 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix; };
|
2023-10-16 10:33:47 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
nur.nixosModules.nur
|
2023-12-19 16:03:43 +01:00
|
|
|
./nasbackup
|
|
|
|
./configuration_desktop.nix
|
|
|
|
#../modules/hardware/remoteClient.nix
|
|
|
|
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 {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
];
|
|
|
|
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;
|
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix; };
|
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
2023-01-07 16:13:39 +01:00
|
|
|
nur.nixosModules.nur
|
2023-12-19 16:03:43 +01:00
|
|
|
./jupiter
|
2023-01-07 16:13:39 +01:00
|
|
|
./configuration_desktop.nix
|
2023-12-15 22:08:12 +01:00
|
|
|
#../modules/hardware/remoteClient.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 {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
];
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-12-19 16:03:43 +01:00
|
|
|
dmz = lib.nixosSystem { # Desktop profile
|
2023-09-03 10:18:04 +02:00
|
|
|
inherit system;
|
2024-01-20 12:02:32 +01:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix nixpkgs impermanence; };
|
2023-09-03 10:18:04 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
nur.nixosModules.nur
|
2023-12-19 16:03:43 +01:00
|
|
|
microvm.nixosModules.host
|
|
|
|
./dmz
|
|
|
|
./configuration_server.nix
|
2023-09-03 10:18:04 +02:00
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nur.overlay
|
|
|
|
];
|
|
|
|
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
|
|
|
}
|