dotfiles/nixos/users/main.nix

28 lines
612 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
let
nm-enable = config.networking.networkmanager.enable;
2021-01-10 20:05:04 +01:00
docker-enable = config.virtualisation.docker.enable;
mkIf = pkgs.lib.mkIf;
in {
users = {
mutableUsers = false;
users.main = {
isNormalUser = true;
home = "/home/main";
hashedPassword = "<redacted>";
description = "main";
uid = 1000;
2021-01-10 20:05:04 +01:00
extraGroups = [ "wheel" "audio" ]
++ (if nm-enable then [ "networkmanager" ] else [])
++ (if docker-enable then [ "docker" ] else []);
};
groups.main = {
gid = 1000;
};
};
}