From 9da942ba47d34210e86a1a709e802eda5c3b95db Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 30 Aug 2025 12:31:28 -0500 Subject: refactor users activation. refactor home manager config to match nixos conf and move tjkeller archetypes to users/timmy. update many of the exising home manager configs to be nicer and better organized. profile archetypes now include homeconfigs which can be enabled per user, and are setup using a new mkProfileArchetype function. --- flake.nix | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 007bd8e..c9e7d41 100644 --- a/flake.nix +++ b/flake.nix @@ -18,49 +18,33 @@ rec { }; }; - outputs = { nixpkgs, home-manager, arkenfox, ... }@inputs : + outputs = { nixpkgs, ... }@inputs : let system = "x86_64-linux"; - #pkgs = nixpkgs.legacyPackages.${system}; - userDetails = { - username = "timmy"; - email = "tjk@tjkeller.xyz"; - fullname = "Tim Keller"; - home = "/home/${userDetails.username}"; - userDirs = with userDetails; { - desktop = "${home}"; - download = "${home}/dls"; - documents = "${home}/docs"; - pictures = "${home}/pics"; - }; - sshPublicKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDnsnAWcz46OVi1MWSxpOIUtUvwalijDwvW+oEvNjzep" ]; - }; - homeStateVersion = "24.05"; # Lowest of systems is fine + extLib = nixpkgs.lib.extend (final: prev: import ./lib); mkNixosConfiguration = hostname: nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; inherit hostname; - inherit userDetails; + lib = extLib; }; modules = [ ./hosts/${hostname}/configuration.nix - ./nixos + ./hosts/${hostname}/hardware-configuration.nix ./archetypes + ./nixos ./pkgs - home-manager.nixosModules.home-manager { + ./users + inputs.sops-nix.nixosModules.sops + inputs.home-manager.nixosModules.home-manager { home-manager = { backupFileExtension = "backup"; # In case file is overwritten useGlobalPkgs = true; useUserPackages = true; - users.${userDetails.username} = import ./home-manager; - extraSpecialArgs = { - inherit userDetails; - inherit homeStateVersion; - }; sharedModules = [ - arkenfox.hmModules.arkenfox - ./hosts/${hostname}/home.nix + inputs.arkenfox.hmModules.arkenfox + ./home-manager ]; }; } -- cgit v1.2.3