This commit is contained in:
iFargle 2023-08-23 17:04:54 +09:00
parent ba6080ffaf
commit 774c9d9dfe

View file

@ -1,11 +1,14 @@
{ config, desktop, lib, pkgs, ... }: { { config, desktop, lib, pkgs, ... }:
let
ifExists = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
# Define a user account. # Define a user account.
imports = [ ] ++ lib.optional (builtins.isString desktop) ./desktop.nix; imports = [ ] ++ lib.optional (builtins.isString desktop) ./desktop.nix;
users.users.albert = { users.users.albert = {
isNormalUser = true; isNormalUser = true;
description = "Albert J. Copeland"; description = "Albert J. Copeland";
# video is required for the "light" command to work # video is required for the "light" command to work
extraGroups = [ "networkmanager" "wheel" ] ++ ifExists [ "video" ]; extraGroups = [ "networkmanager" "wheel" ] ++ ifExists [ "video" ];
hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6"; hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6";
packages = [ pkgs.home-manager ]; packages = [ pkgs.home-manager ];
}; };