Skip to content
This repository was archived by the owner on Jun 16, 2024. It is now read-only.

Commit 3f7f9e4

Browse files
Merge branch 'main' into specialisations
2 parents dbbcb74 + cd1e968 commit 3f7f9e4

File tree

17 files changed

+1061
-109
lines changed

17 files changed

+1061
-109
lines changed

home/hosts/rescanix.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,11 @@
111111
sshfs
112112
steam-run
113113
superTuxKart
114+
sysbench
114115
tbw
115116
testdisk
116117
timg
118+
tor-browser
117119
unigine-heaven
118120
upx
119121
usbutils

home/programs/terminal/fish/functions.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
end
8888
8989
function glfzf -d "use fzf to preview git commits"
90+
set SHELL fish
9091
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" $argv | \
9192
fzf --ansi --no-sort --reverse --tiebreak=index --scroll-off=5 --preview-window=right:60% \
9293
--preview 'function preview; set commit (echo $argv | grep -o "[a-f0-9]\{7\}"); git show -m --color=always $commit | delta --width=(tput cols); end; preview {}' \

library/derivations/autotools.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rec {
2+
mkFlags = old: flags: {
3+
configureFlags = (old.cmakeFlags or []) ++ flags;
4+
};
5+
6+
optimizeLto = derivation:
7+
derivation.overrideAttrs (old: (mkFlags old [
8+
"--enable-lto"
9+
]));
10+
}

library/derivations/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
args: {
22
architectures = import ./architectures.nix args;
33

4+
autotools = import ./autotools.nix;
5+
46
c = import ./c.nix args;
57

68
cmake = import ./cmake.nix;

nixos/server/hosts/crix/disko.nix

Lines changed: 91 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,110 @@
11
{config, ...}: {
2-
disko.devices = {
3-
disk.primary = {
4-
type = "disk";
5-
device = "/dev/vda";
6-
content = {
7-
type = "gpt";
8-
partitions = {
9-
ESP = {
10-
size = "512M";
11-
type = "EF00";
12-
label = "BOOT";
13-
content = {
14-
type = "filesystem";
15-
format = "vfat";
16-
mountpoint = "/boot";
17-
};
2+
disko.devices.disk.primary = {
3+
type = "disk";
4+
device = "/dev/vda";
5+
6+
content = {
7+
type = "gpt";
8+
9+
partitions = {
10+
ESP = {
11+
size = "512M";
12+
type = "EF00";
13+
label = "boot";
14+
15+
content = {
16+
type = "filesystem";
17+
format = "vfat";
18+
mountpoint = "/boot";
1819
};
20+
};
1921

20-
root = {
21-
size = "100%";
22-
label = "root";
22+
root = {
23+
size = "100%";
24+
label = "root";
2325

24-
content = {
25-
type = "zfs";
26-
pool = config.host.name;
27-
};
26+
content = {
27+
type = "zfs";
28+
pool = config.host.name;
2829
};
2930
};
3031
};
3132
};
33+
};
3234

33-
zpool.${config.host.name} = {
34-
type = "zpool";
35+
disko.devices.zpool.${config.host.name} = {
36+
type = "zpool";
3537

36-
options = {
37-
ashift = "12";
38-
compatibility = "openzfs-2.2-linux";
39-
};
38+
options = {
39+
ashift = "12";
40+
compatibility = "openzfs-2.2-linux";
41+
};
4042

41-
rootFsOptions = {
42-
"com.sun:auto-snapshot" = "true";
43-
acltype = "posix";
44-
compression = "zstd";
45-
dnodesize = "auto";
46-
encryption = "aes-256-gcm";
47-
keyformat = "passphrase";
48-
keylocation = "prompt";
49-
mountpoint = "none";
50-
normalization = "formD";
51-
xattr = "sa";
52-
};
43+
rootFsOptions = {
44+
"com.sun:auto-snapshot" = "true";
45+
acltype = "posix";
46+
compression = "zstd";
47+
dnodesize = "auto";
48+
encryption = "aes-256-gcm";
49+
keyformat = "passphrase";
50+
keylocation = "prompt";
51+
mountpoint = "none";
52+
normalization = "formD";
53+
xattr = "sa";
54+
};
5355

54-
datasets = {
55-
root = {
56-
mountpoint = "/";
57-
type = "zfs_fs";
58-
options.mountpoint = "legacy";
59-
};
60-
"root/home" = {
61-
mountpoint = "/home";
62-
type = "zfs_fs";
63-
options = {
64-
mountpoint = "legacy";
65-
refreservation = "1G";
66-
};
67-
};
68-
"root/var" = {
69-
mountpoint = "/var";
70-
type = "zfs_fs";
71-
options.mountpoint = "legacy";
56+
datasets = {
57+
root = {
58+
mountpoint = "/";
59+
type = "zfs_fs";
60+
options.mountpoint = "legacy";
61+
};
62+
"root/home" = {
63+
mountpoint = "/home";
64+
type = "zfs_fs";
65+
options = {
66+
mountpoint = "legacy";
67+
refreservation = "1G";
7268
};
73-
"root/var/coredump" = {
74-
mountpoint = "/var/lib/systemd/coredump";
75-
type = "zfs_fs";
76-
options = {
77-
atime = "off";
78-
compression = "zle";
79-
mountpoint = "legacy";
80-
recordsize = "1M";
81-
};
69+
};
70+
"root/var" = {
71+
mountpoint = "/var";
72+
type = "zfs_fs";
73+
options.mountpoint = "legacy";
74+
};
75+
"root/var/coredump" = {
76+
mountpoint = "/var/lib/systemd/coredump";
77+
type = "zfs_fs";
78+
options = {
79+
atime = "off";
80+
compression = "zle";
81+
mountpoint = "legacy";
82+
recordsize = "1M";
8283
};
83-
"root/var/log" = {
84-
mountpoint = "/var/log";
85-
type = "zfs_fs";
86-
options = {
87-
atime = "off";
88-
mountpoint = "legacy";
89-
};
84+
};
85+
"root/var/log" = {
86+
mountpoint = "/var/log";
87+
type = "zfs_fs";
88+
options = {
89+
atime = "off";
90+
mountpoint = "legacy";
9091
};
91-
"root/nix" = {
92-
mountpoint = "/nix";
93-
type = "zfs_fs";
94-
options = {
95-
atime = "off";
96-
mountpoint = "legacy";
97-
};
92+
};
93+
"root/nix" = {
94+
mountpoint = "/nix";
95+
type = "zfs_fs";
96+
options = {
97+
atime = "off";
98+
mountpoint = "legacy";
9899
};
99-
"root/nix/store" = {
100-
mountpoint = "/nix/store";
101-
type = "zfs_fs";
102-
options = {
103-
"com.sun:auto-snapshot" = "false";
104-
mountpoint = "legacy";
105-
recordsize = "256K";
106-
};
100+
};
101+
"root/nix/store" = {
102+
mountpoint = "/nix/store";
103+
type = "zfs_fs";
104+
options = {
105+
"com.sun:auto-snapshot" = "false";
106+
mountpoint = "legacy";
107+
recordsize = "256K";
107108
};
108109
};
109110
};

nixos/workstation/hosts/msix/disko.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
ESP = {
1111
size = "1G";
1212
type = "EF00";
13-
label = "BOOT";
13+
label = "boot";
14+
1415
content = {
1516
type = "filesystem";
1617
format = "vfat";

nixos/workstation/hosts/rescanix/disko.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
ESP = {
1111
size = "512M";
1212
type = "EF00";
13-
label = "BOOT";
13+
label = "boot";
14+
1415
content = {
1516
type = "filesystem";
1617
format = "vfat";

nixos/workstation/modules/kernel/common.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ in {
77
kernel.sysctl = {
88
"kernel.sysrq" = mkDefault 1;
99

10-
"vm.dirty_background_ratio" = 15;
1110
"vm.dirty_ratio" = 25;
1211
};
1312
};

packages/btrfs-progs/default.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ btrfs-progs.overrideAttrs (old: {
44
(old.patches or [])
55
++ [
66
./dump-csum.patch
7-
./receive-selinux.patch
7+
./remove-receive-errors.patch
8+
];
9+
10+
configureFlags =
11+
(old.configureFlags or [])
12+
++ [
13+
"--enable-experimental"
814
];
915
})

packages/btrfs-progs/dump-csum.patch

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ index c19e664a..8d491c8f 100644
4949
DECLARE_COMMAND(send);
5050
diff --git a/cmds/inspect-dump-csum.c b/cmds/inspect-dump-csum.c
5151
new file mode 100644
52-
index 00000000..8e607e51
52+
index 00000000..4597ebf6
5353
--- /dev/null
5454
+++ b/cmds/inspect-dump-csum.c
55-
@@ -0,0 +1,243 @@
55+
@@ -0,0 +1,244 @@
5656
+/*
5757
+ * Copyright (C) 2019 SUSE. All rights reserved.
5858
+ *
@@ -223,7 +223,7 @@ index 00000000..8e607e51
223223
+}
224224
+
225225
+static const char * const cmd_inspect_dump_csum_usage[] = {
226-
+ "btrfs inspect-internal dump-csum <path> <device>",
226+
+ "btrfs inspect-internal dump-csum <file> <device>",
227227
+ "Dump checksums for a given file",
228228
+ "",
229229
+ OPTLINE("-d|--debug", "Be more verbose"),
@@ -269,13 +269,13 @@ index 00000000..8e607e51
269269
+
270270
+ fd = open(filename, O_RDONLY);
271271
+ if (fd < 0) {
272-
+ error("cannot open file %s: %m", filename);
272+
+ error("couldn't open file %s: %m", filename);
273273
+ return -errno;
274274
+ }
275275
+
276276
+ devfd = open(device, O_RDONLY);
277277
+ if (devfd < 0) {
278-
+ error("cannot open device %s: %m", device);
278+
+ error("couldn't open device %s: %m", device);
279279
+ ret = -errno;
280280
+ goto out_close;
281281
+ }
@@ -284,13 +284,14 @@ index 00000000..8e607e51
284284
+
285285
+ if (btrfs_super_magic(&sb) != BTRFS_MAGIC) {
286286
+ ret = -EINVAL;
287-
+ error("bad magic on superblock on %s", device);
287+
+ error("bad superblock magic on %s", device);
288288
+ goto out_close;
289289
+ }
290290
+
291291
+ ret = btrfs_get_extent_csum(fd, &sb);
292292
+ if (ret)
293-
+ error("checsum lookup for file %s failed", filename);
293+
+ error("checksum lookup for file %s failed", filename);
294+
+
294295
+out_close:
295296
+ close(fd);
296297
+ return ret;

0 commit comments

Comments
 (0)