nix-conf/modules/users/root/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2023-12-30 23:39:33 +01:00
{ config, lib, ... }:
2023-08-21 18:40:42 +02:00
2024-01-13 18:01:23 +01:00
let cfg = config.jopejoe1.user.root;
2023-12-30 23:39:33 +01:00
in {
2024-01-13 18:01:23 +01:00
options.jopejoe1.user.root = { enable = lib.mkEnableOption "Enable root user"; };
2023-12-29 16:43:40 +01:00
config = lib.mkIf cfg.enable {
2023-12-31 22:10:20 +01:00
users.users.root = {
initialPassword = "password";
2023-12-31 21:28:43 +01:00
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email"
];
};
home-manager.users.root = {
home = {
username = config.users.users.root.name;
homeDirectory = config.users.users.root.home;
stateVersion = config.system.stateVersion;
};
jopejoe1 = {
common = {
enable = true;
fonts = {
serif = config.fonts.fontconfig.defaultFonts.serif;
sansSerif = config.fonts.fontconfig.defaultFonts.sansSerif;
monospace = config.fonts.fontconfig.defaultFonts.monospace;
emoji = config.fonts.fontconfig.defaultFonts.emoji;
};
};
git.enable = true;
direnv.enable = true;
2024-04-19 18:12:23 +02:00
gui.enable = config.jopejoe1.gui.enable;
};
};
2023-12-29 16:43:40 +01:00
};
2023-08-21 18:40:42 +02:00
}