-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfiguration.nix
131 lines (124 loc) · 2.26 KB
/
configuration.nix
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
pkgs,
config,
lib,
...
}: {
boot = {
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = [
"copytoram"
"console=ttyS0,115200"
"console=tty1"
"boot.shell_on_fail"
];
kernelModules = [];
loader.timeout = lib.mkForce 0;
binfmt.emulatedSystems = ["aarch64-linux"];
supportedFilesystems = [
# "apfs"
"btrfs"
"exfat"
"ext2"
"ext4"
"ntfs"
"vfat"
"xfs"
"zfs"
];
};
services = {
nscd.enableNsncd = true;
openssh.enable = true;
};
networking = {
hostName = "rescue";
domain = "home.arpa";
useDHCP = true;
wireless = {
enable = true;
userControlled.enable = true;
};
};
environment = {
# Many of these are unecessary (automatically imported due to
# supportedFilesystems), but this makes it explicit
systemPackages = with pkgs; [
arch-install-scripts
bashInteractive
coreutils
curl
ddrescue
diffutils
efibootmgr
efivar
fd
file
findutils
gawk
git
gnugrep
gnused
gnutar
gptfdisk
hdparm
inetutils
jq
less
lsof
mkpasswd
neovim
parted
pciutils
python311
ripgrep
rsync
screen
sdparm
shellcheck
shfmt
smartmontools
time
tmux
unzip
usbutils
wget
which
zip
zstd
];
variables = {
EDITOR = "nvim";
};
shells = [
pkgs.bashInteractive
];
};
users = {
defaultUserShell = pkgs.bashInteractive;
mutableUsers = false;
users = {
root = {
password = "rescue";
openssh.authorizedKeys.keyFiles = [
(builtins.fetchurl {
url = "https://github.com/n8henrie.keys";
sha256 = "1bhfxj9jlzqfvkz1j7bmqlzskcgali36ans7ajjgn0zc1998kqs9";
})
];
};
};
};
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
max-jobs = "auto";
auto-optimise-store = true;
cores = 0;
};
extraOptions = ''
experimental-features = nix-command flakes repl-flake
'';
};
system.stateVersion = lib.trivial.release;
}