This commit is contained in:
ari committed 2026-01-02 10:55:27 -05:00
1 parent b7ec976381
commit 720f60a04c
3 files changed
+71 -74

No files matched your search

+1 -2
View File
@@ -175,7 +175,6 @@
./hosts/hl-terra1.hardware-configuration.nix ./hosts/hl-terra1.hardware-configuration.nix
]; ];
}; };
} };
;
}; };
} }
+65 -71
View File
@@ -11,6 +11,42 @@
}: }:
let let
skygUtils = import ./skyg-utils.nix; skygUtils = import ./skyg-utils.nix;
eachSystem = nixpkgs.lib.genAttrs (import systems);
allPkgs = eachSystem (
system:
import nixpkgs {
system = system;
config = {
allowUnfree = true;
};
}
);
# makeHomeManagerUsers =
# { modules ? [ ]
# , homeManagerVersion
# , user
# , system ? "x86_64-linux"
# ,
# }:
# let
# hm = (
# import ./home {
# stateVersion = homeManagerVersion;
# }makeHLServices
# );
# pkgs = allPkgs."${system}";
# in
# home-manager.lib.homeManagerConfiguration {
# inherit pkgs;
# modules = [
# (hm.makeCommonUser user)
# ]
# ++ modules;
# };
in
{
eachSystem = eachSystem;
pkgs = allPkgs;
makeNixOs = makeNixOs =
{ system ? "x86_64-linux" { system ? "x86_64-linux"
, hostName , hostName
@@ -38,77 +74,35 @@ let
}) })
] ++ configuration; ] ++ configuration;
}; };
eachSystem = nixpkgs.lib.genAttrs (import systems); makeDarwinModule =
allPkgs = eachSystem ( { system ? "x86_64-darwin"
system: , user
import nixpkgs { , homeManagerVersion ? "25.11"
, systemStateVersion ? "25.11"
, hostName
, configuration ? [ ]
}:
nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = specialArgs // {
inherit system skygUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
modules = [
determinate.darwinModules.default
home-manager.darwinModules.home-manager
stylix.darwinModules.stylix
(import ./macos.nix {
user = user;
system = system; system = system;
config = { })
allowUnfree = true; (import ./main.nix {
inherit
user
homeManagerVersion
hostName
systemStateVersion;
})
] ++ configuration;
}; };
} }
);
# makeDarwinModule =
# { system ? "x86_64-darwin"
# , user
# , ...
# }@attrs:
# nix-darwin.lib.darwinSystem {
# modules =
# (makeImports {
# attrs = attrs;
# extraConfiguration = [
# home-manager.darwinModules.home-manager
# stylix.darwinModules.stylix
# ];
# })
# ++ [
# (import ./macos.nix {
# user = user;
# system = system;
# })
# ];
# };
# makeHomeManagerUsers =
# { modules ? [ ]
# , homeManagerVersion
# , user
# , system ? "x86_64-linux"
# ,
# }:
# let
# hm = (
# import ./home {
# stateVersion = homeManagerVersion;
# }makeHLServices
# );
# pkgs = allPkgs."${system}";
# in
# home-manager.lib.homeManagerConfiguration {
# inherit pkgs;
# modules = [
# (hm.makeCommonUser user)
# ]
# ++ modules;
# };
in
{
eachSystem = eachSystem;
pkgs = allPkgs;
makeNixOs = makeNixOs;
makeNixosConfigurations =
nodes:
builtins.listToAttrs (
builtins.map
({ hostName
, ...
}@attrs: {
name = hostName;
value = makeNixOs
{
inherit hostName;
} // attrs;
})
nodes
);
}
+5 -1
View File
@@ -1,8 +1,12 @@
{ user, system }: { user, system }:
{ pkgs, ... }: { { ... }: {
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
security.pam.enableSudoTouchIdAuth = true; security.pam.enableSudoTouchIdAuth = true;
users.users.${user.name}.home = user.homepath; users.users.${user.name}.home = user.homepath;
users.users.root.home = "/var/root"; users.users.root.home = "/var/root";
nixpkgs.hostPlatform = system; nixpkgs.hostPlatform = system;
nix.enable = false;
determinate-nix.customSettings = {
flake-registry = "/etc/nix/flake-registry.json";
};
} }