blob: 0146b72feffc7f255ba8aaa4d197d26d63d9c87b (
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
{
config,
pkgs,
self,
...
}: {
imports = [
./hardware-configuration.nix
./cachix.nix
./miniflux.nix
./nginx.nix
./prometheus.nix
];
_module.args.nixinate = {
host = "atlas";
sshUser = "root";
buildOn = "remote";
substituteOnTarget = true;
hermetic = false;
};
age.secrets.authGH = {
file = "${self}/secrets/hosts/${config.networking.hostName}/authGH.age";
mode = "440";
owner = config.users.users.root.name;
group = config.users.groups.wheel.name;
};
boot = {
binfmt.emulatedSystems = ["x86_64-linux" "i686-linux"];
cleanTmpDir = true;
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
};
getchoo.server = {
secrets.enable = true;
};
networking = {
domain = "mydadleft.me";
hostName = "atlas";
};
nix = {
extraOptions = ''
!include ${config.age.secrets.authGH.path}
'';
settings.trusted-users = ["bob"];
};
system.stateVersion = "22.11";
users.users = let
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPV9wiDwXVyoVh347CAulkdGzG7+1m/rZ1aV5fk3BHM atlas [email protected]"
];
in {
root = {inherit openssh;};
atlas = {
extraGroups = ["wheel"];
isNormalUser = true;
shell = pkgs.bash;
passwordFile = config.age.secrets.userPassword.path;
inherit openssh;
};
bob = {
isNormalUser = true;
shell = pkgs.bash;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOtbxHjDADxqsG+AgCoiDq0uCsgcnJCIH+9rB6K5pIi9 p-body@p-body"
"ssh-ed25519 aaaac3nzac1lzdi1nte5aaaaimpv9widwxvyovh347caulkdgzg7+1m/rz1av5fk3bhm atlas [email protected]"
];
};
};
zramSwap.enable = true;
}
|