2022-08-25 12:21:35 -06:00
|
|
|
{ config, lib, pkgs, isUnstable, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
userBase = {
|
|
|
|
shell = pkgs.zsh;
|
2022-11-07 07:22:51 -07:00
|
|
|
openssh.authorizedKeys.keys = config.myconf.hwPubKeys
|
|
|
|
++ config.myconf.managementPubKeys;
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
defaultUsers = {
|
|
|
|
enable = mkOption {
|
|
|
|
description = "Enable regular set of users";
|
|
|
|
default = true;
|
|
|
|
example = true;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.defaultUsers.enable {
|
|
|
|
users.users.root = userBase;
|
|
|
|
users.users.qbit = userBase // {
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Aaron Bieber";
|
|
|
|
home = "/home/qbit";
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
};
|
|
|
|
|
2022-10-04 09:36:47 -06:00
|
|
|
environment.systemPackages =
|
2022-11-15 05:42:36 -07:00
|
|
|
if isUnstable then [ pkgs.yash pkgs.go ] else [ pkgs.go ];
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
}
|