blob: d9f60818915ace064621d91989ea179292c24b55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{ pkgs, lib, config, ... }:
let
cfg = config.xnet.users;
inherit (lib) mkOption mkIf types;
in
{
options.xnet.users = {
enable = mkOption {
type = types.listOf (types.enum [ "kle" ]);
default = [ ];
description = "Users to enable.";
};
};
config = {
users.mutableUsers = false;
users.users.kle = mkIf (builtins.elem "kle" cfg.enable) {
hashedPassword = "$6$R4dDhaftX.vapGMd$.An36hlp3DXfkIC7bPZ0MDPo6Zvpk8JRrhy2LES.lZZj6JDa74oJkcMW3DCsIySvLJxOPXSShos0TpgJ/w0fH/";
isNormalUser = true;
createHome = true;
extraGroups = [ "wheel" "users" "networkmanager" "video" ];
packages = with pkgs; [
btop
curl
fzf
git
jq
lynx
neovim
ranger
rsync
sshfs
tree
zip
];
};
programs.ssh.extraConfig = ''
Host github
HostName github.com
User git
PreferredAuthentications publickey
'';
programs.git = {
config = {
init = {
defaultBranch = "master";
};
push = {
default = "upstream";
autoSetupRemote = true;
};
fetch = {
prune = true;
};
};
};
};
}
|