hosts/base/users.nix

34 lines
820 B
Nix
Raw Permalink Normal View History

2023-02-26 16:42:49 +01:00
{ pkgs, lib, ... }:
let
definedInPersonalDotNix = lib.mkDefault (throw "Configuration option missing from personal.nix");
in
{
programs.fish.enable = true;
2023-02-26 16:42:49 +01:00
users.users = {
fruchti = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
openssh.authorizedKeys.keys = definedInPersonalDotNix;
shell = pkgs.fish;
};
};
users.extraGroups = {
system = {
members = [ "fruchti" ];
};
};
security.sudo.extraRules = [
{
groups = [ "wheel" ];
commands = [
{
command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild *";
options = [ "NOPASSWD" ];
}
];
}
];
2023-02-26 16:42:49 +01:00
}