infra: configure root user
This commit is contained in:
parent
8b41ded3a6
commit
78135382d5
2 changed files with 95 additions and 4 deletions
|
@ -1,12 +1,13 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
home = config.home-manager.users.jopejoe1;
|
||||
user = config.users.users.jopejoe1;
|
||||
name = "root";
|
||||
home = config.home-manager.users.${name};
|
||||
user = config.users.users.${name};
|
||||
in
|
||||
{
|
||||
users.users = {
|
||||
jopejoe1 = {
|
||||
${name} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.nushell;
|
||||
description = "Johannes Jöns";
|
||||
|
@ -19,7 +20,7 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
home-manager.users.jopejoe1 = {
|
||||
home-manager.users.${name} = {
|
||||
home = {
|
||||
username = user.name;
|
||||
homeDirectory = user.home;
|
||||
|
|
90
nix/infra/users/root.nix
Normal file
90
nix/infra/users/root.nix
Normal file
|
@ -0,0 +1,90 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
name = "root";
|
||||
home = config.home-manager.users.${name};
|
||||
user = config.users.users.${name};
|
||||
in
|
||||
{
|
||||
users.users = {
|
||||
${name} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.nushell;
|
||||
description = "Administartor";
|
||||
};
|
||||
};
|
||||
home-manager.users.${name} = {
|
||||
home = {
|
||||
username = user.name;
|
||||
homeDirectory = user.home;
|
||||
stateVersion = config.system.stateVersion;
|
||||
};
|
||||
|
||||
programs = {
|
||||
nushell = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
carapace.enable = true;
|
||||
carapace.enableNushellIntegration = true;
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
character = {
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[➜](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
userEmail = "root@alisa";
|
||||
userName = "root";
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = [
|
||||
"blank-at-eol"
|
||||
"blank-at-eof"
|
||||
"space-before-tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
cacheHome = "${home.home.homeDirectory}/.cache";
|
||||
configHome = "${home.home.homeDirectory}/.config";
|
||||
dataHome = "${home.home.homeDirectory}/.local/share";
|
||||
stateHome = "${home.home.homeDirectory}/.local/state";
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home.home.homeDirectory}/Desktop";
|
||||
documents = "${home.home.homeDirectory}/Documents";
|
||||
download = "${home.home.homeDirectory}/Downloads";
|
||||
music = "${home.home.homeDirectory}/Music";
|
||||
pictures = "${home.home.homeDirectory}/Pictures";
|
||||
publicShare = "${home.home.homeDirectory}/Public";
|
||||
templates = "${home.home.homeDirectory}/Templates";
|
||||
videos = "${home.home.homeDirectory}/Videos";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue