Files
dendritic/modules/users/john.nix
John Lancaster 24c6ac52a7 user factory
2026-03-10 23:12:09 -05:00

71 lines
2.1 KiB
Nix

{ inputs, lib, ... }:
let
username = "john";
in
{
flake = {
meta.users."${username}" = {
email = "32917998+jsl12@users.noreply.github.com";
name = "John Lancaster";
username = "${username}";
key = "";
keygrip = [
];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAUa4dcg1TWc4pW++uodyhX4eOqrX/QYIxFWtEP7HFJ john@john-pc-ubuntu"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMOkGLo4N/L3RYvaIZ1FmePlxa1HK0fMciZxKtRhN58F root@janus"
];
};
modules = lib.mkMerge [
(inputs.self.factory.user username true)
{
# https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect
nixos."${username}" = { pkgs, ... }: {
home-manager.users."${username}" = {
imports = [
inputs.self.modules.homeManager."${username}"
];
};
users.users."${username}" = {
isNormalUser = true;
openssh.authorizedKeys.keys = inputs.self.meta.users."${username}".authorizedKeys;
extraGroups = [ "docker" ];
};
};
homeManager."${username}" = {
home.stateVersion = "25.11";
xdg.enable = true;
programs.git.settings.user.name = "John Lancaster";
programs.git.settings.user.email = "32917998+jsl12@users.noreply.github.com";
imports = with inputs.self.modules.homeManager; [
# base
# docker
# resticprofile
];
};
}
];
};
# This is the base homeConfiguration for the john user that will be used if no other
flake.homeConfigurations."${username}" = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
modules = [
inputs.self.modules.homeManager."${username}"
# Include another inline module to set the options created through the jsl-home modules
{
docker.enable = false;
ssh.matchSets = {
certs = true;
homelab = true;
};
}
];
};
}