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
|
|
|
|
#
|
|
|
|
|
2023-10-16 10:33:47 +02:00
|
|
|
{ lib, inputs, nixpkgs, nixos-hardware, home-manager, nur, user, userdmz, userserver, location, agenix, jovian-nixos, microvm, ... }:
|
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;
|
2023-10-06 21:54:08 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix microvm nixpkgs; };
|
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
|
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-09-23 21:19:53 +02: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-07-21 22:07:21 +02:00
|
|
|
steamdeck = lib.nixosSystem { # Laptop profile
|
|
|
|
inherit system;
|
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix jovian-nixos; };
|
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
nur.nixosModules.nur
|
2023-12-09 15:03:27 +01:00
|
|
|
jovian-nixos.default
|
2023-07-21 22:07:21 +02:00
|
|
|
./steamdeck
|
|
|
|
./configuration_desktop.nix
|
2023-09-23 21:19:53 +02: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
|
|
|
|
|
|
|
|
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.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;
|
2023-10-22 10:59:34 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix; };
|
2022-11-19 21:38:55 +01:00
|
|
|
modules = [
|
2023-02-04 08:50:56 +01:00
|
|
|
agenix.nixosModules.default
|
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)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-10-16 10:33:47 +02:00
|
|
|
dmz = lib.nixosSystem { # Desktop profile
|
|
|
|
inherit system;
|
2023-10-20 20:10:17 +02:00
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix nixpkgs; };
|
2023-10-16 10:33:47 +02:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
nur.nixosModules.nur
|
2023-10-20 20:10:17 +02:00
|
|
|
microvm.nixosModules.host
|
2023-10-16 10:33:47 +02:00
|
|
|
./dmz
|
|
|
|
./configuration_server.nix
|
|
|
|
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 ./dmz/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-10-28 11:39:27 +02:00
|
|
|
nasbackup = lib.nixosSystem { # Desktop profile
|
2023-01-07 16:13:39 +01:00
|
|
|
inherit system;
|
|
|
|
#user = "dmz-user";
|
|
|
|
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-10-28 11:39:27 +02:00
|
|
|
./nasbackup
|
2023-01-07 16:13:39 +01:00
|
|
|
./configuration_desktop.nix
|
2023-09-23 21:19:53 +02: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-10-28 11:39:27 +02:00
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./nasbackup/home.nix)];
|
2023-01-07 16:13:39 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-09-03 10:18:04 +02:00
|
|
|
jupiter = lib.nixosSystem { # Desktop profile
|
|
|
|
inherit system;
|
|
|
|
specialArgs = { inherit inputs user location nixos-hardware nur agenix; };
|
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.default
|
|
|
|
nur.nixosModules.nur
|
|
|
|
./jupiter
|
|
|
|
./configuration_desktop.nix
|
2023-09-23 21:19:53 +02:00
|
|
|
../modules/hardware/remoteClient.nix
|
2023-09-03 10:18:04 +02: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} = {
|
|
|
|
imports = [(import ./home_server.nix)] ++ [(import ./jupiter/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-11-19 21:38:55 +01:00
|
|
|
|
2022-09-18 17:11:13 +02:00
|
|
|
q920 = lib.nixosSystem { # Laptop profile
|
|
|
|
inherit system;
|
2023-07-21 21:27:26 +02:00
|
|
|
specialArgs = { inherit inputs user location ; };
|
2022-09-18 17:11:13 +02:00
|
|
|
modules = [
|
|
|
|
./q920
|
|
|
|
./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 ./q920/home.nix)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-09-17 16:50:50 +02: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)];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|