Unnecessary fiddling

This commit is contained in:
2022-07-15 00:50:28 +01:00
parent c7c3cef173
commit 701e44a598
2 changed files with 18 additions and 13 deletions

View File

@@ -3,7 +3,17 @@
pkgs,
lib,
...
}: {
}: let
mkUser = userName: {
isNormalUser = true;
home = "/home/${userName}";
initialPassword = "password";
extraGroups = ["wheel" "networkmanager" "docker" "video" "syncthing"];
shell = pkgs.zsh;
};
defaultUser = "daniel";
in {
# Use the systemd-boot EFI boot loader.
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = lib.mkDefault true;
@@ -33,14 +43,7 @@
hardware.cpu.intel.updateMicrocode = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.daniel = {
isNormalUser = true;
home = "/home/daniel";
initialPassword = "password";
extraGroups = ["wheel" "networkmanager" "docker" "video" "syncthing"];
shell = pkgs.zsh;
};
users.users."${defaultUser}" = mkUser defaultUser;
# List packages installed in system profile. To search, run:
# $ nix search wget
@@ -71,8 +74,8 @@
syncthing = {
enable = true;
user = "daniel";
dataDir = "/home/daniel";
user = defaultUser;
dataDir = "/home/${defaultUser}";
};
tailscale = {