Added Users
This commit is contained in:
parent
5a44f3c499
commit
53d5ac23a0
5 changed files with 137 additions and 119 deletions
|
@ -23,6 +23,9 @@ let
|
|||
modules = [
|
||||
./systems/${name}
|
||||
self.outputs.nixosModules.default
|
||||
./users/jopejoe1
|
||||
./users/root
|
||||
./users/fp
|
||||
{
|
||||
system.stateVersion = "24.05";
|
||||
nixpkgs.hostPlatform = {
|
||||
|
@ -90,9 +93,6 @@ let
|
|||
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000;
|
||||
|
||||
networking.hosts = {
|
||||
"192.168.191.46" = [ "zap" ];
|
||||
"192.168.191.142" = [ "kuraokami" ];
|
||||
"2a01:4f8:1c1e:7f93::1" = [ "bloomshine.de" ];
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
|
63
users/default.nix
Normal file
63
users/default.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ pkgs, config, user, home }:
|
||||
{
|
||||
home = {
|
||||
username = user.name;
|
||||
homeDirectory = user.home;
|
||||
stateVersion = config.system.stateVersion;
|
||||
sessionVariables = {
|
||||
XCOMPOSECACHE = "${home.xdg.cacheHome}/X11/xcompos";
|
||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||
ANDROID_HOME = "${home.xdg.dataHome}/android";
|
||||
CUDA_CACHE_PATH = "${home.xdg.cacheHome}/nv";
|
||||
GRADLE_USER_HOME = "${home.xdg.dataHome}/gradle";
|
||||
KODI_DATA = "${home.xdg.dataHome}/kodi";
|
||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${home.xdg.configHome}/java";
|
||||
WINEPREFIX = "${home.xdg.dataHome}/wine";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
lazygit.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = [
|
||||
"blank-at-eol"
|
||||
"blank-at-eof"
|
||||
"space-before-tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
gpg = {
|
||||
enable = true;
|
||||
homedir = "${home.xdg.dataHome}/gnupg";
|
||||
};
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
18
users/fp/default.nix
Normal file
18
users/fp/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.fp = {
|
||||
description = "felix";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh.ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMBFp5TEsP0rdhkDpMfuMkCuLrDPoXBVu8EpRyLwuAMs fp@IAP-597"
|
||||
"ssh-ed25519 AAAAC3NzaC11ZDI1NTE5AAAAIMBFp5TEsPOrdhkDpMfuMkCuLrDP0XBVu8EpRyLWUAMs Fp@IAP-597"
|
||||
];
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
home-manager.users.fp = import ../. {
|
||||
inherit pkgs config;
|
||||
user = config.users.users.fp;
|
||||
home = config.home-manager.users.fp;
|
||||
};
|
||||
}
|
|
@ -1,71 +1,65 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.jopejoe1 = {
|
||||
hashedPassword = "$2b$05$Uk84TY/RHlH8DIigUlFYjeorjTlCMEY9wN2pAcw5BLaPoc7dKiSsC";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP3pKtvhOOjG1pGJq7cVHS5uWy5IP8y1Ra/ENpmJcqOe root@zap"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFEcNAVRN66mfKmaCpxs++0094Eh4mqXkUwDPZPkIIBB johannes@joens.email"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami"
|
||||
];
|
||||
isNormalUser = true;
|
||||
shell = pkgs.nushell;
|
||||
description = "Johannes Jöns";
|
||||
extraGroups = [ "wheel" "networkmanager" "pipewire" "audio" "adbusers" ];
|
||||
uid = 1000;
|
||||
};
|
||||
home-manager.users.jopejoe1 = {
|
||||
home = {
|
||||
username = config.users.users.jopejoe1.name;
|
||||
homeDirectory = config.users.users.jopejoe1.home;
|
||||
stateVersion = config.system.stateVersion;
|
||||
sessionVariables = {
|
||||
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompos";
|
||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||
ANDROID_HOME = "${config.xdg.dataHome}/android";
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
|
||||
KODI_DATA = "${config.xdg.dataHome}/kodi";
|
||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
|
||||
WINEPREFIX = "${config.xdg.dataHome}/wine";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.jopejoe1 = import ../. {
|
||||
inherit pkgs config;
|
||||
user = config.users.users.jopejoe1;
|
||||
home = config.home-manager.users.jopejoe1;
|
||||
} // {
|
||||
programs = {
|
||||
lazygit.enable = true;
|
||||
git = {
|
||||
nushell = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = [
|
||||
"blank-at-eol"
|
||||
"blank-at-eof"
|
||||
"space-before-tab"
|
||||
];
|
||||
};
|
||||
extraConfig = ''
|
||||
let carapace_completer = {|spans|
|
||||
carapace $spans.0 nushell $spans | from json
|
||||
}
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
completions: {
|
||||
case_sensitive: false
|
||||
quick: true
|
||||
partial: true
|
||||
algorithm: "fuzzy"
|
||||
external: {
|
||||
enable: true
|
||||
max_results: 100
|
||||
completer: $carapace_completer
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
shellAliases = {
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
};
|
||||
};
|
||||
direnv = {
|
||||
carapace.enable = true;
|
||||
carapace.enableNushellIntegration = true;
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.xdg.dataHome}/gnupg";
|
||||
};
|
||||
};
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||
stateHome = "${config.home.homeDirectory}/.local/state";
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${config.home.homeDirectory}/Desktop";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
music = "${config.home.homeDirectory}/Music";
|
||||
pictures = "${config.home.homeDirectory}/Pictures";
|
||||
publicShare = "${config.home.homeDirectory}/Public";
|
||||
templates = "${config.home.homeDirectory}/Templates";
|
||||
videos = "${config.home.homeDirectory}/Videos";
|
||||
settings = {
|
||||
add_newline = true;
|
||||
character = {
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[➜](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,66 +7,9 @@
|
|||
"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;
|
||||
sessionVariables = {
|
||||
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompos";
|
||||
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||
ANDROID_HOME = "${config.xdg.dataHome}/android";
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
|
||||
KODI_DATA = "${config.xdg.dataHome}/kodi";
|
||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java";
|
||||
WINEPREFIX = "${config.xdg.dataHome}/wine";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
lazygit.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = [
|
||||
"blank-at-eol"
|
||||
"blank-at-eof"
|
||||
"space-before-tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.xdg.dataHome}/gnupg";
|
||||
};
|
||||
};
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||
stateHome = "${config.home.homeDirectory}/.local/state";
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${config.home.homeDirectory}/Desktop";
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
music = "${config.home.homeDirectory}/Music";
|
||||
pictures = "${config.home.homeDirectory}/Pictures";
|
||||
publicShare = "${config.home.homeDirectory}/Public";
|
||||
templates = "${config.home.homeDirectory}/Templates";
|
||||
videos = "${config.home.homeDirectory}/Videos";
|
||||
};
|
||||
};
|
||||
home-manager.users.root = import ../. {
|
||||
inherit pkgs config;
|
||||
user = config.users.users.root;
|
||||
home = config.home-manager.users.root;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue