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. # 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: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget

View File

@ -2,6 +2,8 @@
lib, lib,
config, config,
system, system,
pkgs,
inputs,
... ...
}: let }: let
cfg = config.myConfig; cfg = config.myConfig;
@ -21,6 +23,7 @@ in {
}; };
config.myConfig = lib.mkIf cfg.enable { config.myConfig = lib.mkIf cfg.enable {
myConfig = {
bootloader.enable = true; bootloader.enable = true;
locale.enable = true; locale.enable = true;
rebuild.enable = true; rebuild.enable = true;
@ -42,4 +45,17 @@ in {
touch.enable = lib.mkIf cfg.laptop true; touch.enable = lib.mkIf cfg.laptop true;
bluetooth.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; hostName = cfg.hostName;
firewall.enable = false; firewall.enable = false;
}; };
users.users.${cfg.user}.extraGroups = ["networkmanager"];
}; };
} }

View File

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