nhms works again

This commit is contained in:
John Lancaster
2026-03-11 22:06:46 -05:00
parent b4d74f8a8d
commit cd14a37c8c
5 changed files with 34 additions and 43 deletions

View File

@@ -1,5 +1,6 @@
{ inputs, ... }: { inputs, ... }:
let let
username = "john";
hostname = "john-pc-ubuntu"; hostname = "john-pc-ubuntu";
in in
{ {
@@ -20,6 +21,9 @@ in
shell.program = "zsh"; shell.program = "zsh";
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.packages = with pkgs; [ home.packages = with pkgs; [
nixos-rebuild nixos-rebuild
(writeShellScriptBin "test-push" '' (writeShellScriptBin "test-push" ''

View File

@@ -17,20 +17,12 @@
}; };
# https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect # https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect
home-manager.users."${username}" = { home-manager.users."${username}" = {
home.username = "${username}";
home.homeDirectory = "/home/${username}";
imports = [ imports = [
self.modules.homeManager."${username}" self.modules.homeManager."${username}"
# self.modules.homeManager.shell-tools
]; ];
}; };
}; };
homeManager."${username}" = {
home.username = "${username}";
home.homeDirectory = "/home/${username}";
# TODO: This doesn't get merged properly when the factory gets used
# imports = with self.modules.homeManager; [
# shell-tools
# ];
};
}; };
} }

View File

@@ -3,7 +3,6 @@
flake.modules.nixos.lxc = { pkgs, lib, ...}: { flake.modules.nixos.lxc = { pkgs, lib, ...}: {
imports = with inputs.self.modules.nixos; [ imports = with inputs.self.modules.nixos; [
({ modulesPath, ... }: { imports = [ "${modulesPath}/virtualisation/proxmox-lxc.nix" ]; }) ({ modulesPath, ... }: { imports = [ "${modulesPath}/virtualisation/proxmox-lxc.nix" ]; })
ssh
]; ];
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux"; nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
system.stateVersion = "25.11"; system.stateVersion = "25.11";

View File

@@ -7,9 +7,10 @@ in
nixos.zsh = { pkgs, ... }: { nixos.zsh = { pkgs, ... }: {
users.users."${username}".shell = pkgs.zsh; users.users."${username}".shell = pkgs.zsh;
programs.zsh.enable = true; programs.zsh.enable = true;
home-manager.sharedModules = [ # Already being imported by the john.nix module
inputs.self.modules.homeManager.zsh # home-manager.sharedModules = [
]; # inputs.self.modules.homeManager.zsh
# ];
}; };
homeManager.zsh = { pkgs, config, ... }: { homeManager.zsh = { pkgs, config, ... }: {

View File

@@ -1,4 +1,4 @@
{ inputs, lib, ... }: { inputs, ... }:
let let
username = "john"; username = "john";
in in
@@ -17,35 +17,30 @@ in
]; ];
}; };
modules = lib.recursiveUpdate modules = {
(inputs.self.factory.user username true) nixos."${username}" = {
{ imports = [
# (inputs.self.factory.user username true).nixos."${username}"
# NixOS ];
# users.users."${username}" = {
nixos."${username}" = { openssh.authorizedKeys.keys = inputs.self.meta.users."${username}".authorizedKeys;
users.users."${username}" = { extraGroups = [ "docker" ];
openssh.authorizedKeys.keys = inputs.self.meta.users."${username}".authorizedKeys;
extraGroups = [ "docker" ];
};
};
#
# Home Manager
#
homeManager."${username}" = with inputs.self.meta.users."${username}"; {
home.stateVersion = "25.11";
xdg.enable = true;
programs.git.settings.user.name = name;
programs.git.settings.user.email = email;
imports = with inputs.self.modules.homeManager; [
ssh
shell-tools
git
];
}; };
}; };
homeManager."${username}" = with inputs.self.meta.users."${username}"; {
home.stateVersion = "25.11";
xdg.enable = true;
programs.git.settings.user.name = name;
programs.git.settings.user.email = email;
imports = with inputs.self.modules.homeManager; [
ssh
shell-tools
git
];
};
};
}; };
} }