Files
dendritic/modules/users/john.nix
T

47 lines
1.3 KiB
Nix

{ self, inputs, ... }:
let
username = "john";
baseUserModules = self.factory.user {
username = username;
isAdmin = true;
};
in
{
flake.meta.users."${username}" = {
email = "[email protected]";
name = "John Lancaster";
inherit username;
key = "";
keygrip = [ ];
authorizedKeys = [
# Shared keys for every host can go here.
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAUa4dcg1TWc4pW++uodyhX4eOqrX/QYIxFWtEP7HFJ john@john-pc-ubuntu"
];
};
flake.modules = {
nixos."${username}" = { config, pkgs, ... }: {
imports = [
baseUserModules.nixos."${username}"
];
users.users."${username}" = {
openssh.authorizedKeys.keys = inputs.self.meta.users."${username}".authorizedKeys;
};
};
# This module will be imported by the user factory
homeManager."${username}" = { pkgs, ... }:
with inputs.self.meta.users."${username}"; {
home.stateVersion = "25.11";
imports = [
inputs.self.modules.homeManager.shell-tools
inputs.self.modules.homeManager.ssh
inputs.self.modules.homeManager.git
];
xdg.enable = true;
programs.git.settings.user.name = name;
programs.git.settings.user.email = email;
};
};
}