50 lines
1.4 KiB
Nix
50 lines
1.4 KiB
Nix
{ self, inputs, lib, ... }:
|
|
let
|
|
username = "john";
|
|
baseUserModules = self.factory.user {
|
|
username = username;
|
|
isAdmin = true;
|
|
};
|
|
in
|
|
{
|
|
flake.meta.users."${username}" = {
|
|
email = "32917998+jsl12@users.noreply.github.com";
|
|
name = "John Lancaster";
|
|
inherit username;
|
|
key = "";
|
|
keygrip = [ ];
|
|
authorizedKeys = [
|
|
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAUa4dcg1TWc4pW++uodyhX4eOqrX/QYIxFWtEP7HFJ john@john-pc-ubuntu"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMOkGLo4N/L3RYvaIZ1FmePlxa1HK0fMciZxKtRhN58F root@janus"
|
|
];
|
|
};
|
|
|
|
flake.modules = {
|
|
nixos."${username}" = { ... }: {
|
|
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
|
|
];
|
|
# home.packages = [
|
|
# inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.shell-tools
|
|
# ];
|
|
xdg.enable = true;
|
|
programs.git.settings.user.name = name;
|
|
programs.git.settings.user.email = email;
|
|
};
|
|
};
|
|
}
|