Profiles only for home manager.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
.tmp
|
.tmp
|
||||||
result
|
result
|
||||||
.aider*
|
.aider*
|
||||||
|
.claude
|
||||||
|
|||||||
17
flake.nix
17
flake.nix
@@ -66,13 +66,8 @@
|
|||||||
mkHost =
|
mkHost =
|
||||||
system: profile: modules:
|
system: profile: modules:
|
||||||
let
|
let
|
||||||
# Auto-import profile-specific module based on profile parameter
|
# Profile parameter is only used by home-manager for user environment
|
||||||
profileModule =
|
# NixOS system configuration is handled via explicit imports in host configs
|
||||||
if profile == "server" then ./common/server-node.nix
|
|
||||||
else if profile == "workstation" then ./common/workstation-node.nix
|
|
||||||
else if profile == "desktop" then ./common/desktop-node.nix
|
|
||||||
else if profile == "cloud" then ./common/cloud-node.nix
|
|
||||||
else null;
|
|
||||||
in
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
@@ -105,7 +100,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
] ++ nixpkgs.lib.optional (profileModule != null) profileModule ++ modules;
|
] ++ modules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs self;
|
inherit inputs self;
|
||||||
};
|
};
|
||||||
@@ -136,9 +131,9 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
c1 = mkHost "x86_64-linux" "server" [ ./hosts/c1 ];
|
c1 = mkHost "x86_64-linux" "minimal" [ ./hosts/c1 ];
|
||||||
c2 = mkHost "x86_64-linux" "server" [ ./hosts/c2 ];
|
c2 = mkHost "x86_64-linux" "minimal" [ ./hosts/c2 ];
|
||||||
c3 = mkHost "x86_64-linux" "server" [ ./hosts/c3 ];
|
c3 = mkHost "x86_64-linux" "minimal" [ ./hosts/c3 ];
|
||||||
alo-cloud-1 = mkHost "aarch64-linux" "cloud" [ ./hosts/alo-cloud-1 ];
|
alo-cloud-1 = mkHost "aarch64-linux" "cloud" [ ./hosts/alo-cloud-1 ];
|
||||||
zippy = mkHost "x86_64-linux" "minimal" [
|
zippy = mkHost "x86_64-linux" "minimal" [
|
||||||
ethereum-nix.nixosModules.default
|
ethereum-nix.nixosModules.default
|
||||||
|
|||||||
5
home/profiles/minimal.nix
Normal file
5
home/profiles/minimal.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
# Minimal profile: reuses server.nix for basic package list
|
||||||
|
packages = (import ./server.nix { inherit pkgs; }).packages;
|
||||||
|
}
|
||||||
5
home/programs/minimal.nix
Normal file
5
home/programs/minimal.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Minimal profile: reuses server.nix for basic CLI programs
|
||||||
|
imports = [ ./server.nix ];
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../common/global
|
../../common/global
|
||||||
|
../../common/cloud-node.nix # Minimal system with Consul
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./reverse-proxy.nix
|
./reverse-proxy.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../common/encrypted-btrfs-layout.nix
|
../../common/encrypted-btrfs-layout.nix
|
||||||
../../common/global
|
../../common/global
|
||||||
|
../../common/workstation-node.nix # Dev tools (deploy-rs, docker, nix-ld)
|
||||||
../../common/cluster-member.nix # Consul + storage clients
|
../../common/cluster-member.nix # Consul + storage clients
|
||||||
../../common/cluster-tools.nix # Nomad CLI (no service)
|
../../common/cluster-tools.nix # Nomad CLI (no service)
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../common/encrypted-btrfs-layout.nix
|
../../common/encrypted-btrfs-layout.nix
|
||||||
../../common/global
|
../../common/global
|
||||||
|
../../common/desktop-node.nix # Hyprland + GUI environment
|
||||||
../../common/cluster-member.nix # Consul + storage clients
|
../../common/cluster-member.nix # Consul + storage clients
|
||||||
../../common/cluster-tools.nix # Nomad CLI (no service)
|
../../common/cluster-tools.nix # Nomad CLI (no service)
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
|||||||
Reference in New Issue
Block a user