move user config

This commit is contained in:
Max Känner 2024-12-29 14:24:38 +01:00
parent 7f2def19e8
commit 44ac3ac799
4 changed files with 37 additions and 31 deletions

View File

@ -22,19 +22,6 @@
};
# Define a user account. Don't forget to set a password with passwd.
users.users.max = {
isNormalUser = true;
description = "Max Känner";
extraGroups = ["networkmanager" "wheel" "libvirtd" "dialout"];
shell = pkgs.zsh;
};
home-manager = {
extraSpecialArgs = {inherit inputs;};
users = {
"max" = import ./home.nix;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget

View File

@ -2,6 +2,8 @@
lib,
config,
system,
pkgs,
inputs,
...
}: let
cfg = config.myConfig;
@ -21,25 +23,39 @@ in {
};
config.myConfig = lib.mkIf cfg.enable {
bootloader.enable = true;
locale.enable = true;
rebuild.enable = true;
cache.enable = true;
autoUpdate.enable = true;
podman.enable = true;
qemu.enable = true;
qemu.kvm = lib.mkIf (system == "x86_64-linux") true;
network.enable = true;
myConfig = {
bootloader.enable = true;
locale.enable = true;
rebuild.enable = true;
cache.enable = true;
autoUpdate.enable = true;
podman.enable = true;
qemu.enable = true;
qemu.kvm = lib.mkIf (system == "x86_64-linux") true;
network.enable = true;
greetd.enable = lib.mkIf cfg.desktop true;
sway.enable = lib.mkIf cfg.desktop true;
music.enable = lib.mkIf cfg.desktop true;
cups.enable = lib.mkIf cfg.desktop true;
wifi.tray = lib.mkIf cfg.desktop true;
greetd.enable = lib.mkIf cfg.desktop true;
sway.enable = lib.mkIf cfg.desktop true;
music.enable = lib.mkIf cfg.desktop true;
cups.enable = lib.mkIf cfg.desktop true;
wifi.tray = lib.mkIf cfg.desktop true;
sway.laptop = lib.mkIf cfg.laptop true;
wifi.enable = lib.mkIf cfg.laptop true;
touch.enable = lib.mkIf cfg.laptop true;
bluetooth.enable = lib.mkIf cfg.laptop true;
sway.laptop = lib.mkIf cfg.laptop true;
wifi.enable = lib.mkIf cfg.laptop true;
touch.enable = lib.mkIf cfg.laptop true;
bluetooth.enable = lib.mkIf cfg.laptop true;
};
users.users.${cfg.user} = {
isNormalUser = true;
description = "Max Känner";
extraGroups = ["wheel" "dialout"];
shell = pkgs.zsh;
};
home-manager = {
extraSpecialArgs = {inherit inputs;};
users.${cfg.user} = import ./home.nix;
};
};
}

View File

@ -20,5 +20,7 @@ in {
hostName = cfg.hostName;
firewall.enable = false;
};
users.users.${cfg.user}.extraGroups = ["networkmanager"];
};
}

View File

@ -35,5 +35,6 @@ in {
};
};
boot.binfmt.emulatedSystems = ["aarch64-linux"];
users.users.${cfg.user}.extraGroups = ["libvirtd"];
};
}