Compare commits
498 Commits
mesa172tes
...
master
Author | SHA1 | Date | |
---|---|---|---|
37033049ed | |||
2b8fc1d91c | |||
69b54087e0 | |||
eaf2334a04 | |||
4525b47d35 | |||
4d9937cf9d | |||
90e1c36244 | |||
5f3628d1a1 | |||
d02a0d7a45 | |||
36e5d09e8a | |||
821549f525 | |||
9da7c7c9fc | |||
32ec56e6e0 | |||
bd20b7622d | |||
4fb0970418 | |||
25f079383f | |||
d7cdd2a2b3 | |||
c12f4efc1d | |||
3c6000dc31 | |||
81db657d73 | |||
84c356d93c | |||
8d767ca499 | |||
b5b2062620 | |||
e3b25a5bc1 | |||
3849c3720b | |||
cd4199dc3e | |||
429a7a1e55 | |||
06a4738877 | |||
2aabd4f7db | |||
2fd59032f4 | |||
8d4f04d8a2 | |||
18ecb5248d | |||
e8229ce713 | |||
5cdd1b8f02 | |||
d79dd140fc | |||
26b98e4131 | |||
b89904422f | |||
048e8daf96 | |||
4d3b6bcba4 | |||
981f860bdc | |||
26e9a7d7da | |||
a74f967624 | |||
15f17e3051 | |||
746eeffff8 | |||
692c8368eb | |||
a1d4c16326 | |||
1c25e80ce5 | |||
ceeebd285f | |||
fb2d5cab05 | |||
93d868d047 | |||
7246542704 | |||
7cda28aacc | |||
a9ca075f23 | |||
07460df992 | |||
513e53b032 | |||
75176c7aef | |||
cecc2f51a0 | |||
4b727896b7 | |||
0c1d76cb38 | |||
c81774e6a7 | |||
7bca210546 | |||
65ee751ec8 | |||
58f0c5f83c | |||
3a5bc4f034 | |||
bc514fd011 | |||
bede6a3d48 | |||
d5a8330136 | |||
a1b116cc91 | |||
f3e5a57fba | |||
7faa9f2010 | |||
a9fa48daee | |||
cb1548edb0 | |||
dd36e04b39 | |||
deb38305c5 | |||
ab2f9f8f4e | |||
446f271532 | |||
d63d82571f | |||
c4a0c593c8 | |||
ccee0a99bf | |||
3fcd2ff615 | |||
f3f22581d3 | |||
c3d9242e2e | |||
3588811d70 | |||
73ce3ae8db | |||
69a1962827 | |||
ac7014a17f | |||
b5e5d70248 | |||
7ed620c95a | |||
5a21e8549d | |||
4f532a91e6 | |||
3d5c629da2 | |||
1e6b59eb10 | |||
121050b0f6 | |||
44c93e4d49 | |||
1bb964cd15 | |||
a0afc38771 | |||
123fb233c5 | |||
15ed947ac1 | |||
a7d3edef60 | |||
ba2c2738c0 | |||
e1d5bea5cc | |||
ef5860df46 | |||
2c88d6efb8 | |||
2ba9a7db29 | |||
f938fd473e | |||
c147fb9a69 | |||
97c9eeb0a1 | |||
32d1647ebd | |||
c95bcb5eaf | |||
ea517b4e74 | |||
231c0088bb | |||
671415d3db | |||
8dbafb128f | |||
36dbee629f | |||
82441e276a | |||
6b022802dd | |||
cf7000da8a | |||
1339d81209 | |||
621e7a4195 | |||
f1d81035b0 | |||
4e4b859940 | |||
4c948bf59a | |||
2f5aa92bb9 | |||
0bfee3d416 | |||
a73446c9fe | |||
ce44a334cc | |||
19070abca7 | |||
19e683ec3c | |||
00aba1d288 | |||
ca21dfd78b | |||
b87d5c589c | |||
f5b47396d3 | |||
4db98ae432 | |||
199a195ef8 | |||
129850b77a | |||
fb0c1eaa4a | |||
41180b28b1 | |||
05e2939f56 | |||
2d99fd2a6c | |||
2f218c4aed | |||
42d9f2642c | |||
b49b708b0f | |||
3fdda46bdd | |||
393a699de3 | |||
7846a0da2d | |||
56626d02d4 | |||
cf45358391 | |||
58a731fff9 | |||
32ccaa5cdc | |||
9b6ade6c46 | |||
ff1d7507a7 | |||
3e04ee4912 | |||
e0be60449b | |||
99727a34f7 | |||
c9ca9058ea | |||
a001601ec9 | |||
41c4cbdf00 | |||
9f87c397b4 | |||
fb720362a8 | |||
8ef91afbef | |||
097bdd971d | |||
528ee71f8f | |||
b526b0ccc4 | |||
116f447e39 | |||
98daa4eec2 | |||
fd49f352b7 | |||
c82c06c66b | |||
6da10fb12c | |||
23e285bc47 | |||
1d6b0734b8 | |||
eccbfe2d4e | |||
801b877e42 | |||
197e008f04 | |||
81e29fea39 | |||
bcd7b2077a | |||
54c21b382a | |||
2c362d41cf | |||
6f78a84615 | |||
fc6f5bcac9 | |||
64c6738675 | |||
1db5517027 | |||
156dae4c56 | |||
7f6e5b1294 | |||
0f0f67f114 | |||
009220fd46 | |||
90115d4c0b | |||
42001b4f3c | |||
4773219133 | |||
aa09035b08 | |||
0482486ce6 | |||
4a63af68cf | |||
fdbf06fcae | |||
30039f69bd | |||
a0462a5254 | |||
1ac132ac31 | |||
88ab086ce5 | |||
4611083f9a | |||
723234be94 | |||
8e26c3fb34 | |||
9b6f76216c | |||
06d038b942 | |||
73a9f4660f | |||
ec0eb1930b | |||
f58a4b31c1 | |||
4d7509f336 | |||
41916a2e03 | |||
647a83bc1c | |||
db5f55bfd1 | |||
7ba7f967fa | |||
8b2371ffea | |||
b5232c4a88 | |||
0938a7079e | |||
2c58227d53 | |||
fd5f32dd18 | |||
0379f7e4e3 | |||
47c12d1d0f | |||
400ecb9489 | |||
9b6605707b | |||
a03de989d1 | |||
90bde009e8 | |||
9126385cbb | |||
3a6692a580 | |||
7aeab57206 | |||
b311268a50 | |||
40783c7331 | |||
d82274f7d7 | |||
07171c5c8f | |||
9f4e32fc22 | |||
843cbca199 | |||
1d87223b87 | |||
479986d2f6 | |||
67f790dab7 | |||
4d62e4b028 | |||
557620b462 | |||
35651f0070 | |||
9bb3639a04 | |||
279096dee5 | |||
750c817ce5 | |||
3eae53f261 | |||
23a64be276 | |||
f1fd27093b | |||
f52e993906 | |||
05cb452f0d | |||
d15faa1d15 | |||
32c0882522 | |||
1c1739317c | |||
6f4f452c1d | |||
0ec6adee10 | |||
a405cefba7 | |||
9376a369b5 | |||
a2a81e167f | |||
9c8bf11ac6 | |||
38dbe47139 | |||
9dd48cf55c | |||
e87b6b93b6 | |||
26613ac8d6 | |||
678add5bb9 | |||
047e92382e | |||
9c892c0606 | |||
e763ebcbe4 | |||
798b114b1d | |||
bcafc0a526 | |||
0447ee0a8e | |||
366f5f2f0c | |||
eaa8f70cbf | |||
d609117a14 | |||
14338b1b08 | |||
26d75615d0 | |||
962ea693af | |||
03ca0530f9 | |||
ddae1c3361 | |||
9069ea1716 | |||
0b6a984071 | |||
a3eeafbc19 | |||
5cfe3dabcd | |||
890c4bf464 | |||
8f5ce8e2e8 | |||
05c4373f1b | |||
e1b97efdb2 | |||
103f5c3758 | |||
f504d72136 | |||
ef8a893828 | |||
1fe4d168a7 | |||
5147ecfd8c | |||
182743b525 | |||
c421086704 | |||
63a3767efd | |||
25469ac56e | |||
934bfb875d | |||
3357962f02 | |||
a7e98abd53 | |||
fd7b351486 | |||
c7d6e1c16a | |||
68d748d535 | |||
b198dc700c | |||
8ee276da6d | |||
4f0ce97ec6 | |||
e14b9ffc8d | |||
37d3d4ac55 | |||
a9c8398ed7 | |||
7a8a25926e | |||
67d3414005 | |||
fa5a20c542 | |||
4bcdee4a28 | |||
efaa0f412d | |||
cfad7061f8 | |||
c21f3ee608 | |||
269716cef0 | |||
6e2a432358 | |||
cd09bef44d | |||
25e24e7876 | |||
d2443c4326 | |||
e3c5774448 | |||
9b4ac012ed | |||
dc793815e0 | |||
37b91c8bbd | |||
5e14a8652d | |||
37d852f36d | |||
b0fa421392 | |||
e0d1ac9d2c | |||
88b3f477bc | |||
0d647a7c80 | |||
31c4ded910 | |||
f866389c28 | |||
20353dde3f | |||
ab733c8797 | |||
db512c1dcd | |||
5943f7ec95 | |||
2a596102d1 | |||
15df1a7b24 | |||
83b6967be6 | |||
882db43696 | |||
d403cf223a | |||
6c86c80e07 | |||
1a456bef2a | |||
3f0dac7992 | |||
2878e73ad0 | |||
9636644d77 | |||
fd74adb3f9 | |||
63ffa3df73 | |||
156181518d | |||
e0fc41f1cc | |||
7d487e0c5a | |||
fe5b058aa0 | |||
f2dfdfe5c9 | |||
f38391801b | |||
1ea122b6d9 | |||
88c7f3c0a5 | |||
8aab14d26e | |||
6bdada2437 | |||
b6a9c3ced5 | |||
ef94df7dd7 | |||
cd15b820f1 | |||
284c53183a | |||
a9d5985e80 | |||
43765b9038 | |||
f78f549c6b | |||
432bd49810 | |||
a1842f265f | |||
a64c31c7fd | |||
ee80e79952 | |||
2b5733f6d9 | |||
c15d04479e | |||
f35353812a | |||
8712488db7 | |||
9fe6f8ac0a | |||
2f515fa498 | |||
b7a36e2212 | |||
4686e84de4 | |||
63bf410b81 | |||
9a2584c22c | |||
12fa8dbd67 | |||
8933ec7177 | |||
7ee95d870d | |||
1359eac9b8 | |||
1b73fb1e87 | |||
2912eeda5d | |||
13fb75ef14 | |||
72314db661 | |||
4acb7a5e87 | |||
d9c7c6db05 | |||
41f5e6bd11 | |||
13d146fb0a | |||
5724f43540 | |||
32597895e5 | |||
78b51d787e | |||
e76bccb537 | |||
ee25b7e75e | |||
990d5de3c8 | |||
5eacab2eee | |||
4d25702c3e | |||
45ffe6c587 | |||
86b86266e4 | |||
4b5f4c9238 | |||
7e1676b61c | |||
a655283b60 | |||
f04d990860 | |||
f5efaf04a9 | |||
590c4ffb7f | |||
78406a49ad | |||
9a3a0650ed | |||
59e4b87363 | |||
10f69ddc09 | |||
491b53aee9 | |||
8aba4ef431 | |||
58361afaaf | |||
3cbf73bc8b | |||
574dd3a5c1 | |||
ee38033d99 | |||
28835c5915 | |||
c96b4b281e | |||
e5a0485884 | |||
ea61d4b093 | |||
d98c680839 | |||
e467fb6ca3 | |||
d0740204a8 | |||
d501bf6708 | |||
c7369f98c1 | |||
126bb1e0c6 | |||
4951130595 | |||
754cd7c814 | |||
37f1d82432 | |||
581100fb18 | |||
17ace16793 | |||
13b2d0c933 | |||
20030ce908 | |||
cd468db768 | |||
d8008d3bef | |||
e7e07d732a | |||
d078aa51f7 | |||
88378d8a7b | |||
ea718b3967 | |||
e779620861 | |||
9b2e0d616f | |||
7c7146cf9c | |||
83099f22b4 | |||
adfcd6f7ae | |||
e5021d2015 | |||
0b8e55c5c4 | |||
8c66260738 | |||
6300f08e75 | |||
748f8a6eb1 | |||
8823a8091f | |||
a3ad278358 | |||
27572e66cd | |||
b9e84486b5 | |||
9df91057ad | |||
14b1753644 | |||
65f5be596b | |||
7ed27bc204 | |||
298be20708 | |||
a6f4b3ab84 | |||
97aea12bb6 | |||
5e8acd1b37 | |||
a5ddbe521f | |||
de7cd28dc6 | |||
6197556eb3 | |||
78daed93cf | |||
925e4e0b50 | |||
71a3e19c65 | |||
3c95036437 | |||
4e5bf55c2c | |||
81f1c549a7 | |||
533cdabc8f | |||
5535f5eaeb | |||
ad3ca6bcde | |||
612e4d3c4b | |||
2e50d76d90 | |||
852e922e45 | |||
0c106f5c46 | |||
ef97ddd8e4 | |||
c9b83860f7 | |||
fb6b210541 | |||
22e9dec442 | |||
b3f948ae69 | |||
87a68d0b26 | |||
e6b258c9c1 | |||
23c2f87794 | |||
8da778c039 | |||
1be3472ce7 | |||
41e7bc98d2 | |||
c9fd298def | |||
efe5adb30e | |||
b93b7f08e8 | |||
faa85a0ed4 | |||
278f0b2e67 | |||
5210f0eaad | |||
6745772573 | |||
8a4401fb91 | |||
bc067ed6dc | |||
0c3d800809 | |||
90ace13369 | |||
df64d06b7e | |||
5c606ec298 | |||
29ac6bc689 | |||
370434f673 | |||
4d38965ad7 | |||
c2a2306dad |
179
aplysia.nix
179
aplysia.nix
@ -1,9 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
trnsmssnIface = "wg-trnsmssn";
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./common-headless.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
@ -26,11 +31,31 @@
|
||||
hostId = "34a820f1";
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
users = {
|
||||
users = {
|
||||
gebner.extraGroups = [
|
||||
"transmission"
|
||||
"nilotica"
|
||||
];
|
||||
|
||||
users.extraUsers.gebner = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "transmission"];
|
||||
nilotica = {
|
||||
group = "nilotica";
|
||||
isNormalUser = true;
|
||||
};
|
||||
|
||||
transmission = {
|
||||
group = "transmission";
|
||||
uid = config.ids.uids.transmission;
|
||||
};
|
||||
};
|
||||
|
||||
groups = {
|
||||
nilotica = {};
|
||||
|
||||
transmission = {
|
||||
gid = config.ids.gids.transmission;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
|
||||
@ -42,11 +67,19 @@
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boota".options = [ "nofail" ];
|
||||
fileSystems."/bootb".options = [ "nofail" ];
|
||||
fileSystems."/bootc".options = [ "nofail" ];
|
||||
fileSystems."/bootd".options = [ "nofail" ];
|
||||
fileSystems."/boote".options = [ "nofail" ];
|
||||
fileSystems."/bootf".options = [ "nofail" ];
|
||||
|
||||
services.samba = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
passdb backend = tdbsam
|
||||
unix password sync = no
|
||||
min protocol = NT1
|
||||
'';
|
||||
shares = {
|
||||
export = {
|
||||
@ -57,26 +90,116 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
settings = {
|
||||
download-dir = "/mnt/aplysia/torrents";
|
||||
incomplete-dir = "/mnt/aplysia/torrents";
|
||||
containers.trnsmssn =
|
||||
let
|
||||
homeDir = "/mnt/aplysia/torrents";
|
||||
in rec {
|
||||
config = {
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
settings = {
|
||||
download-dir = homeDir;
|
||||
incomplete-dir = homeDir;
|
||||
|
||||
peer-port = 51413;
|
||||
speed-limit-down = 5000;
|
||||
speed-limit-down-enabled = true;
|
||||
speed-limit-up = 800;
|
||||
speed-limit-up-enabled = true;
|
||||
|
||||
peer-port = 7455;
|
||||
|
||||
rpc-bind-address = localAddress;
|
||||
rpc-whitelist-enabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
interfaces.${trnsmssnIface}.allowedTCPPorts = [
|
||||
config.services.transmission.settings.peer-port
|
||||
];
|
||||
interfaces.eth0.allowedTCPPorts = [
|
||||
9091
|
||||
];
|
||||
};
|
||||
|
||||
networking.nameservers = [ "193.138.218.74" ];
|
||||
|
||||
networking.interfaces.${trnsmssnIface} = {
|
||||
ipv4.addresses = [ { address = "10.64.157.93"; prefixLength = 32; } ];
|
||||
ipv6.addresses = [ { address = "fc00:bbbb:bbbb:bb01::1:9d5c"; prefixLength = 128; } ];
|
||||
ipv4.routes = [
|
||||
{ address = "0.0.0.0"; prefixLength = 1; }
|
||||
{ address = "128.0.0.0"; prefixLength = 1; }
|
||||
];
|
||||
ipv6.routes = [ { address = "::"; prefixLength = 0; } ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
||||
};
|
||||
|
||||
privateNetwork = true;
|
||||
interfaces = [ trnsmssnIface ];
|
||||
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.11";
|
||||
|
||||
autoStart = true;
|
||||
|
||||
bindMounts.${homeDir} = {
|
||||
hostPath = homeDir;
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
networking.wireguard = {
|
||||
enable = true;
|
||||
interfaces.${trnsmssnIface} = {
|
||||
privateKeyFile = "/etc/wgkeys/mullvad";
|
||||
peers = [
|
||||
{
|
||||
allowedIPs = ["0.0.0.0/0" "::/0"];
|
||||
publicKey = "5y66WShsFXqM5K7/4CPEGCWfk7PQyNhVBT2ILjbGm2I=";
|
||||
endpoint = "se15-wireguard.mullvad.net:51820";
|
||||
}
|
||||
];
|
||||
allowedIPsAsRoutes = false;
|
||||
};
|
||||
};
|
||||
systemd.services."container@trnsmssn" = {
|
||||
requires = [ "wireguard-${trnsmssnIface}.service" ];
|
||||
after = [ "wireguard-${trnsmssnIface}.service" ];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
445 139 # samba
|
||||
config.services.transmission.settings.peer-port
|
||||
config.services.rsyncd.port
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
137 138 # samba
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
|
||||
virtualHosts."transmission-proxy" = {
|
||||
serverName = "localhost";
|
||||
listen = [
|
||||
{ addr = "localhost"; port = 9091; }
|
||||
];
|
||||
locations."/transmission/" = {
|
||||
proxyPass = "http://192.168.100.11:9091";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
transmission
|
||||
samba
|
||||
@ -87,4 +210,38 @@
|
||||
${pkgs.hdparm}/bin/hdparm -B127 -S100 /dev/sd{a,b,c,d,e,f}
|
||||
'';
|
||||
|
||||
services.rsyncd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
lr_mobile = {
|
||||
path = "/mnt/aplysia/fotos/lr_mobile";
|
||||
"read only" = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.backup-fotos = rec {
|
||||
wants = [ "network.target" "mnt-aplysia.mount" ];
|
||||
after = wants;
|
||||
|
||||
serviceConfig = {
|
||||
User = "gebner";
|
||||
Group = "users";
|
||||
Type = "oneshot";
|
||||
};
|
||||
|
||||
script = ''
|
||||
${pkgs.rclone}/bin/rclone sync -v --update --use-server-modtime \
|
||||
/mnt/aplysia/fotos/lightroom/ \
|
||||
glacier:gebner-fotos-raw-backup/
|
||||
'';
|
||||
};
|
||||
systemd.timers.backup-fotos = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "Mon,Fri 03:00";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,10 +3,20 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common.nix
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./common-headless.nix
|
||||
# ./sway.nix
|
||||
./i3.nix
|
||||
./large-sw.nix
|
||||
./uefi.nix
|
||||
./fstrim.nix
|
||||
# ./qemu-user.nix
|
||||
./atmega.nix
|
||||
./v4l2loopback.nix
|
||||
./huion.nix
|
||||
./rtl8761b.nix
|
||||
./unstable-nix.nix
|
||||
./nm-restart.nix
|
||||
];
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
@ -14,55 +24,61 @@
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "sda2_crypt";
|
||||
boot.initrd.luks.devices = {
|
||||
sda2_crypt = {
|
||||
device = "/dev/disk/by-uuid/2e2e2824-e357-4a75-bddc-8cf386cd0f53";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "archachatina"; # Define your hostname.
|
||||
networking.hostId = "cc7ea3ba";
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
services.wakeonlan.interfaces = [
|
||||
{
|
||||
interface = "enp3s0";
|
||||
method = "magicpacket";
|
||||
}
|
||||
];
|
||||
networking.interfaces."enp3s0".wakeOnLan.enable = true;
|
||||
|
||||
# services.xserver.displayManager.defaultSession = pkgs.lib.mkForce "sway";
|
||||
#
|
||||
# users.extraUsers.presentation = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "networkmanager" "audio" ];
|
||||
# # shell = "${pkgs.zsh}/bin/zsh";
|
||||
# shell = "/run/current-system/sw/bin/fish";
|
||||
#
|
||||
# password = if config.virtualisation != null then "" else null;
|
||||
# };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
beets
|
||||
mediainfo
|
||||
flac
|
||||
|
||||
recoll
|
||||
uvccapture
|
||||
|
||||
# libratbag
|
||||
piper
|
||||
];
|
||||
|
||||
services.thermald.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
users.extraUsers.gebner.extraGroups = [ "docker" "libvirtd" ];
|
||||
virtualisation.virtualbox.host = {
|
||||
enable = true;
|
||||
# enableExtensionPack = true;
|
||||
};
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# virtualisation.virtualbox.host.enable = true;
|
||||
|
||||
# virtualisation.libvirtd.enable = true;
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
};
|
||||
networking.firewall.checkReversePath = false;
|
||||
# fileSystems."/var/lib/libvirt/images/vaccaria" = {
|
||||
# device = "//vaccaria.mtlaa.gebner.org/export/tmp/vms";
|
||||
# fsType = "cifs";
|
||||
# options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria"
|
||||
# "forceuid" "forcegid" "uid=0" "gid=0" ];
|
||||
# };
|
||||
fileSystems."/var/lib/libvirt/images/vaccaria" = {
|
||||
device = "//vaccaria.htdf.gebner.org/export/tmp/vms";
|
||||
fsType = "cifs";
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria"
|
||||
"forceuid" "forcegid" "uid=0" "gid=0" ];
|
||||
};
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
# rocm-runtime-ext
|
||||
];
|
||||
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
@ -72,8 +88,7 @@
|
||||
|
||||
services.openssh.forwardX11 = true;
|
||||
|
||||
nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
|
||||
# mesa_drivers = self.stable.mesa_drivers;
|
||||
# nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
|
||||
# mesa_drivers = self.mesaDarwinOr (
|
||||
# let mo = self.mesa_noglu.override {
|
||||
# llvmPackages = pkgs.llvmPackages_39;
|
||||
@ -82,9 +97,11 @@
|
||||
# };
|
||||
# in mo.drivers
|
||||
# );
|
||||
};
|
||||
# };
|
||||
|
||||
#boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_latest;
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_5_8;
|
||||
|
||||
services.xserver = {
|
||||
videoDrivers = [ "amdgpu" ];
|
||||
@ -93,6 +110,17 @@
|
||||
'';
|
||||
};
|
||||
|
||||
services.transmission.enable = true;
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
extraPlugins = [ pkgs.postgis ];
|
||||
};
|
||||
|
||||
services.ratbagd.enable = true;
|
||||
|
||||
# virtualisation.anbox = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
system.stateVersion = "18.03";
|
||||
|
||||
}
|
||||
|
13
atmega.nix
Normal file
13
atmega.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.udev.extraRules =
|
||||
let action = '' OWNER := "gebner" ''; in ''
|
||||
# Atmel ATMega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", ${action}
|
||||
# Atmel USBKEY AT90USB1287
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", ${action}
|
||||
# Atmel ATMega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", ${action}
|
||||
'';
|
||||
}
|
@ -6,7 +6,8 @@
|
||||
# nox
|
||||
wget
|
||||
neovim
|
||||
zsh
|
||||
neovim-remote
|
||||
# zsh
|
||||
gitFull gitAndTools.hub tig
|
||||
gnumake
|
||||
m4
|
||||
@ -17,33 +18,45 @@
|
||||
pwgen
|
||||
gcc
|
||||
silver-searcher
|
||||
ripgrep
|
||||
fzf
|
||||
tree
|
||||
python
|
||||
python3
|
||||
python3Packages.ipython
|
||||
lua
|
||||
perl
|
||||
gdb
|
||||
bind nmap tcpdump telnet
|
||||
bind nmap tcpdump (pkgs.inetutils or telnet)
|
||||
usbutils
|
||||
dstat
|
||||
which
|
||||
zip
|
||||
file
|
||||
unzip
|
||||
elinks
|
||||
links2
|
||||
ctags
|
||||
nix-prefetch-scripts
|
||||
nix-repl
|
||||
(pkgs.wireguard-tools or pkgs.wireguard or pkgs.hello)
|
||||
jq
|
||||
#b2sum
|
||||
strace
|
||||
ncdu
|
||||
hyperfine
|
||||
];
|
||||
|
||||
environment.variables.EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
promptInit = "";
|
||||
};
|
||||
# programs.zsh = {
|
||||
# enable = true;
|
||||
# promptInit = "";
|
||||
# };
|
||||
|
||||
programs.bash = {
|
||||
enableCompletion = true;
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
69
bluez-alsa.nix
Normal file
69
bluez-alsa.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook
|
||||
, alsaLib, bluez, glib, sbc, dbus
|
||||
|
||||
# optional, but useful utils
|
||||
, readline, libbsd, ncurses
|
||||
|
||||
# optional codecs
|
||||
, aacSupport ? true, fdk_aac
|
||||
# TODO: aptxSupport
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bluez-alsa";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Arkq";
|
||||
repo = "bluez-alsa";
|
||||
rev = "v${version}";
|
||||
sha256 = "1jlsgxyqfhncfhx1sy3ry0dp6p95kd4agh7g2b7g51h0c4cv74h8";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
|
||||
buildInputs = [
|
||||
alsaLib bluez glib sbc dbus
|
||||
readline libbsd ncurses
|
||||
]
|
||||
++ optional aacSupport fdk_aac;
|
||||
|
||||
configureFlags = [
|
||||
"--with-alsaplugindir=${placeholder "out"}/lib/alsa-lib"
|
||||
"--with-dbusconfdir=${placeholder "out"}/share/dbus-1/system.d"
|
||||
"--enable-rfcomm"
|
||||
"--enable-hcitop"
|
||||
"--enable-msbc"
|
||||
]
|
||||
++ optional aacSupport "--enable-aac";
|
||||
|
||||
meta = {
|
||||
description = "Bluez 5 Bluetooth Audio ALSA Backend";
|
||||
longDescription = ''
|
||||
Bluez-ALSA (BlueALSA) is an ALSA backend for Bluez 5 audio interface.
|
||||
Bluez-ALSA registers all Bluetooth devices with audio profiles in Bluez
|
||||
under a virtual ALSA PCM device called `bluealsa` that supports both
|
||||
playback and capture.
|
||||
|
||||
Some backstory: Bluez 5 removed built-in support for ALSA in favor of a
|
||||
generic interface for 3rd party appliations. Thereafter, PulseAudio
|
||||
implemented a backend for that interface and became the only way to get
|
||||
Bluetooth audio with Bluez 5. Users prefering ALSA stayed on Bluez 4.
|
||||
However, Bluez 4 eventually became deprecated.
|
||||
|
||||
This package is a rebirth of a direct interface between ALSA and Bluez 5,
|
||||
that, unlike PulseAudio, provides KISS near-metal-like experience. It is
|
||||
not possible to run BluezALSA and PulseAudio Bluetooth at the same time
|
||||
due to limitations in Bluez, but it is possible to run PulseAudio over
|
||||
BluezALSA if you disable `bluetooth-discover` and `bluez5-discover`
|
||||
modules in PA and configure it to play/capture sound over `bluealsa` PCM.
|
||||
'';
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.oxij maintainers.lheckemann ];
|
||||
};
|
||||
|
||||
}
|
132
common-gui.nix
Normal file
132
common-gui.nix
Normal file
@ -0,0 +1,132 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./pipewire.nix
|
||||
];
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-table-other fcitx5-m17n fcitx5-rime rime-data ];
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = false;
|
||||
fontconfig = {
|
||||
allowBitmaps = false;
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
# xorg.fontbhlucidatypewriter100dpi
|
||||
# xorg.fontbhlucidatypewriter75dpi
|
||||
# freefont_ttf
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
# xorg.fontbh100dpi
|
||||
# xorg.fontmiscmisc
|
||||
# xorg.fontcursormisc
|
||||
unifont
|
||||
|
||||
noto-fonts-emoji
|
||||
noto-fonts-cjk
|
||||
|
||||
cantarell-fonts # from gnome3 module
|
||||
|
||||
merriweather
|
||||
merriweather-sans
|
||||
open-sans
|
||||
# libertine # breaks
|
||||
|
||||
dejavu_fonts
|
||||
liberation_ttf
|
||||
ubuntu_font_family
|
||||
|
||||
wqy_microhei
|
||||
ipafont
|
||||
ipaexfont
|
||||
source-han-serif
|
||||
source-han-sans
|
||||
|
||||
inconsolata
|
||||
# iosevka
|
||||
fira fira-mono fira-code
|
||||
source-code-pro
|
||||
stix-two
|
||||
|
||||
font-awesome_5
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(writeScriptBin "gsd-xsettings"
|
||||
''
|
||||
#!/bin/sh
|
||||
exec ${gnome3.gnome-settings-daemon}/libexec/gsd-xsettings "$@"
|
||||
'')
|
||||
|
||||
libinput
|
||||
libnotify
|
||||
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
# prevent satanic torture
|
||||
qt.platformTheme = "qt5ct";
|
||||
|
||||
hardware.uinput.enable = true;
|
||||
users.extraUsers.gebner.extraGroups = [ "input" "tty" "audio" "video" "uinput" ];
|
||||
|
||||
services.dbus.packages = with pkgs; [ gcr ];
|
||||
services.udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
|
||||
|
||||
# copied from gnome3 module
|
||||
security.polkit.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
services.accounts-daemon.enable = true;
|
||||
services.geoclue2.enable = true;
|
||||
services.gnome.at-spi2-core.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
programs.seahorse.enable = true;
|
||||
services.gnome.sushi.enable = true;
|
||||
services.gnome.gnome-settings-daemon.enable = true;
|
||||
services.telepathy.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
services.upower.enable = config.powerManagement.enable;
|
||||
programs.dconf.enable = true;
|
||||
services.gnome.glib-networking.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
# Needed for themes and backgrounds
|
||||
environment.pathsToLink = [ "/share" ];
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluezFull;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
programs.gnupg = {
|
||||
agent.enable = true;
|
||||
agent.pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/54083
|
||||
environment.extraSetup = ''
|
||||
if [ -d $out/share/gsettings-schemas/ ]; then
|
||||
# Create the standard schemas directory
|
||||
mkdir -p $out/share/glib-2.0/schemas
|
||||
# symlink any schema files to the standard schema directory
|
||||
for d in $out/share/gsettings-schemas/*; do
|
||||
# Force symlink, in case there are duplicates
|
||||
ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas
|
||||
done
|
||||
# and compile them
|
||||
if [ -w $out/share/glib-2.0/schemas ]; then
|
||||
${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
}
|
@ -3,16 +3,17 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./basic-tools.nix
|
||||
./common-sw.nix
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
nix.useSandbox = true;
|
||||
nix.binaryCaches = [ https://cache.nixos.org ];
|
||||
nix.trustedBinaryCaches = [ https://cache.nixos.org ];
|
||||
nix.settings = {
|
||||
sandbox = true;
|
||||
substituters = [ "https://cache.nixos.org" ];
|
||||
trusted-substituters = [ "https://cache.nixos.org" ];
|
||||
};
|
||||
nix.extraOptions = ''
|
||||
auto-optimise-store = true
|
||||
binary-caches-parallel-connections = 10
|
||||
@ -21,13 +22,13 @@
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Vienna";
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "no";
|
||||
passwordAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
programs.ssh.startAgent = false;
|
||||
|
||||
@ -36,16 +37,40 @@
|
||||
services.printing = {
|
||||
enable = true;
|
||||
browsing = true;
|
||||
drivers = [ pkgs.stable.hplip ];
|
||||
drivers = [ pkgs.hplip ];
|
||||
};
|
||||
# services.colord.enable = true;
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
virtualisation.containers.containersConf.settings = {
|
||||
engine = {
|
||||
cgroup_manager = "cgroupfs";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.containers = {
|
||||
registries.search = [ "docker.io" ];
|
||||
};
|
||||
|
||||
virtualisation.lxd.enable = true;
|
||||
virtualisation.lxd.recommendedSysctlSettings = true;
|
||||
virtualisation.lxd.package = pkgs.lxd;
|
||||
virtualisation.lxc.lxcfs.enable = true;
|
||||
|
||||
systemd.enableUnifiedCgroupHierarchy = pkgs.lib.mkForce true;
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"kernel.perf_event_paranoid" = "0";
|
||||
"kernel.kptr_restrict" = pkgs.lib.mkForce "0";
|
||||
|
||||
# IntelliJ
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
"fs.inotify.max_user_watches" = pkgs.lib.mkDefault 524288;
|
||||
|
||||
# undo lxd "recommendedSysctlSettings"
|
||||
"kernel.dmesg_restrict" = pkgs.lib.mkForce 0;
|
||||
};
|
||||
|
||||
# gapt: `ulimit -n` was 256
|
||||
@ -54,31 +79,60 @@
|
||||
];
|
||||
|
||||
fileSystems."/mnt/vaccaria" = {
|
||||
device = "//vaccaria.mtlaa.gebner.org/export";
|
||||
device = "//vaccaria.htdf.gebner.org/export";
|
||||
fsType = "cifs";
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" "vers=1.0" ];
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" "vers=1.0" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/aplysia" = {
|
||||
device = "//aplysia.mtlaa.gebner.org/export";
|
||||
device = "//aplysia.htdf.gebner.org/export";
|
||||
fsType = "cifs";
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aplysia" "vers=1.0" ];
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aplysia" "vers=1.0" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/aruanus" = {
|
||||
device = "//aruanus.htdf.gebner.org/export";
|
||||
fsType = "cifs";
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" "vers=1.0" ];
|
||||
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" "vers=1.0" ];
|
||||
};
|
||||
|
||||
users.extraUsers.gebner = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "transmission" ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"transmission"
|
||||
"lxd"
|
||||
"libvirtd"
|
||||
"vboxusers"
|
||||
"wireshark"
|
||||
];
|
||||
# shell = "${pkgs.zsh}/bin/zsh";
|
||||
shell = "/run/current-system/sw/bin/fish";
|
||||
|
||||
password = if config.virtualisation != null then "" else null;
|
||||
};
|
||||
|
||||
system.fsPackages = [ pkgs.ntfs3g ];
|
||||
users.groups = {
|
||||
transmission = {
|
||||
gid = config.ids.gids.transmission;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
# LC_TIME = "en_GB.UTF-8";
|
||||
# LC_PAPER = "de_AT.UTF-8";
|
||||
};
|
||||
supportedLocales = [ "all" ]; # https://github.com/NixOS/nixpkgs/pull/177318
|
||||
};
|
||||
|
||||
system.fsPackages = with pkgs; [
|
||||
ntfs3g
|
||||
exfatprogs
|
||||
];
|
||||
|
||||
}
|
||||
|
131
common-sw.nix
131
common-sw.nix
@ -1,134 +1,111 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./fix-firefox.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs.haskellPackages; with pkgs; [
|
||||
gitg
|
||||
gmpc
|
||||
mpdevil
|
||||
m4
|
||||
subversion
|
||||
openjdk8
|
||||
(pkgs.openjdk or pkgs.openjdk14 or pkgs.openjdk12 or pkgs.openjdk11 or pkgs.openjdk10 or openjdk8)
|
||||
sbt scala
|
||||
stable.chromium
|
||||
ungoogled-chromium
|
||||
# chromium
|
||||
firefox
|
||||
qalculate-gtk
|
||||
speedcrunch
|
||||
libqalculate
|
||||
viewnior
|
||||
gnupg
|
||||
pass xclip pwgen
|
||||
(pass.withExtensions (ext: [ ext.pass-otp ]))
|
||||
xclip pwgen
|
||||
remmina
|
||||
ledger
|
||||
hledger
|
||||
hledger-diff
|
||||
# hledger
|
||||
# hledger-diff
|
||||
cmake ninja
|
||||
bear
|
||||
mpv
|
||||
stable.wireshark-gtk
|
||||
neomutt notmuch
|
||||
stable.goldendict
|
||||
patchelf
|
||||
bazaar
|
||||
tokei loc
|
||||
loc
|
||||
tokei
|
||||
ripgrep
|
||||
imagemagick
|
||||
mercurial
|
||||
(pkgs.man-pages or manpages)
|
||||
|
||||
androidenv.platformTools # adb & fastboot
|
||||
dfeet
|
||||
|
||||
geoipWithDatabase
|
||||
|
||||
nix-index
|
||||
|
||||
alacritty
|
||||
|
||||
neovim-qt
|
||||
|
||||
clinfo
|
||||
|
||||
lm_sensors
|
||||
hdparm
|
||||
smartmontools
|
||||
lsof
|
||||
|
||||
pdfpc
|
||||
|
||||
# haskell dev
|
||||
cabal2nix
|
||||
cabal-install
|
||||
# ghc-mod
|
||||
poppler_utils
|
||||
|
||||
# emacs
|
||||
emacs
|
||||
emacsPackages.cask
|
||||
ghostscript # for auctex
|
||||
aspell
|
||||
|
||||
nodejs
|
||||
(pkgs.nodejs_latest or pkgs.nodejs-12_x or pkgs.nodejs-11_x or pkgs.nodejs-10_x or nodejs-9_x)
|
||||
|
||||
mediainfo
|
||||
|
||||
isync
|
||||
mu
|
||||
msmtp
|
||||
vdirsyncer khard khal
|
||||
|
||||
rclone
|
||||
duplicity
|
||||
restic
|
||||
magic-wormhole
|
||||
|
||||
linuxPackages.perf
|
||||
|
||||
qrencode zbar
|
||||
|
||||
veriT
|
||||
minisat
|
||||
picosat
|
||||
glucose
|
||||
prover9
|
||||
eprover
|
||||
vampire
|
||||
metis-prover
|
||||
spass
|
||||
z3
|
||||
stable.cvc4
|
||||
cvc4
|
||||
graphviz
|
||||
open-wbo
|
||||
# toysolver
|
||||
oldstable.haskellPackages.tip-lib
|
||||
|
||||
emacsPackages.proofgeneral
|
||||
|
||||
oldstablePkgs # protect nixpkgs checkout from GC
|
||||
stablePkgs
|
||||
] ++ (with aspellDicts; [ en de fr nl ]);
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; let
|
||||
fetchNixPkgs = { rev, sha256 }:
|
||||
fetchFromGitHub {
|
||||
inherit sha256 rev;
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs-channels";
|
||||
};
|
||||
oldstablePkgs = fetchNixPkgs {
|
||||
rev = "5237768d62a40236d24fafbd9f4f97f3227399ce";
|
||||
sha256 = "1j707pwm6ll2cvmqvwfxxq21gd9q7l6s3vi3vc01jklplj2v20is";
|
||||
};
|
||||
stablePkgs = fetchNixPkgs {
|
||||
rev = "19879836d10f64a10658d1e2a84fc54b090e2087";
|
||||
sha256 = "1x41ch2mgzs85ivvyp3zqkbh4i0winjg69g5x0p3q7avgrhkl7ph";
|
||||
};
|
||||
in {
|
||||
# idea-community-eap = pkgs.idea.idea-community.overrideDerivation (oldAttrs: rec {
|
||||
# name = "idea-community-${version}";
|
||||
# version = "2017.2.eap";
|
||||
# src = pkgs.fetchurl {
|
||||
# url = "https://download.jetbrains.com/idea/ideaIC-172.3544.6-no-jdk.tar.gz";
|
||||
# sha256 = "72874a0393a6388b04353a359eea1d1242f59d6e7b96a4cf43c793602ac7ccdb";
|
||||
# };
|
||||
# });
|
||||
idea-community-eap = pkgs.idea.idea-community;
|
||||
|
||||
# clion-eap = pkgs.idea.clion.overrideDerivation (oldAttrs: rec {
|
||||
# name = "clion-${version}";
|
||||
# version = "2017.1.eap";
|
||||
# src = pkgs.fetchurl {
|
||||
# url = "http://download.jetbrains.com/cpp/CLion-2017.1-RC.tar.gz";
|
||||
# sha256 = "1rv9rcjv4kv39l9r4g5kqbd4y175301a6kr3js3szkjmhqd50qq3";
|
||||
# };
|
||||
# });
|
||||
clion-eap = pkgs.idea.clion;
|
||||
|
||||
# neovim = pkgs.neovim.override {
|
||||
# extraPythonPackages = [ pkgs.pythonPackages.websocket_client ];
|
||||
# };
|
||||
|
||||
oldstablePkgs = oldstablePkgs;
|
||||
oldstable = import oldstablePkgs {};
|
||||
stablePkgs = stablePkgs;
|
||||
stable = import stablePkgs {};
|
||||
|
||||
qutebrowser = pkgs.qutebrowser.override { withWebEngineDefault = true; };
|
||||
};
|
||||
] ++ (with aspellDicts; [ en de fr nl ])
|
||||
++ (with gst_all_1; [ gstreamer gstreamer.dev
|
||||
gst-plugins-bad gst-plugins-good gst-plugins-base gst-plugins-ugly ]);
|
||||
|
||||
nixpkgs.config.allowTexliveBuilds = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||
nixpkgs.config.android_sdk.accept_license = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
users.extraUsers.gebner.extraGroups = [ "adbusers" ];
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
|
||||
khal = pkgs.khal.overridePythonAttrs (_: { doCheck = false; });
|
||||
};
|
||||
|
||||
}
|
||||
|
10
common.nix
10
common.nix
@ -1,10 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common-headless.nix
|
||||
./i3.nix
|
||||
];
|
||||
|
||||
}
|
103
decoysnail.nix
103
decoysnail.nix
@ -3,18 +3,53 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common.nix
|
||||
./common-headless.nix
|
||||
# ./i3.nix
|
||||
./sway.nix
|
||||
./large-sw.nix
|
||||
./uefi.nix
|
||||
./fstrim.nix
|
||||
./atmega.nix
|
||||
./v4l2loopback.nix
|
||||
./huion.nix
|
||||
./nvim05.nix
|
||||
./nm-restart.nix
|
||||
];
|
||||
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "sda2_crypt";
|
||||
device = "/dev/disk/by-uuid/6c687d35-1b43-4799-b71c-a5b5c21b3e2a";
|
||||
preLVM = true;
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/a16ae3f7-11df-47fc-a8df-f22c474ec1c1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3C5C-049B";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
#swapDevices = [
|
||||
# { device = "/dev/disk/by-uuid/b7274abd-58a5-4acc-8481-30e105e94eec"; }
|
||||
#];
|
||||
|
||||
nix.settings.max-jobs = pkgs.lib.mkDefault 6;
|
||||
powerManagement.cpuFreqGovernor = pkgs.lib.mkDefault "powersave";
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
devices {
|
||||
issue_discards = 1
|
||||
}
|
||||
];
|
||||
'';
|
||||
boot.initrd.luks.devices = {
|
||||
sda_crypt = {
|
||||
device = "/dev/disk/by-partuuid/00292928-0088-4887-9e5d-2f2eccb4816f";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "decoysnail";
|
||||
@ -27,14 +62,56 @@
|
||||
|
||||
services.thermald.enable = true;
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
storageDriver = "overlay2";
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [ beignet ];
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
users.extraUsers.gebner.extraGroups = [ "docker" ];
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
#services.avahi.nssmdns = true;
|
||||
#services.nscd.enable = pkgs.lib.mkOverride 10 true;
|
||||
|
||||
services.avahi.nssmdns = true;
|
||||
services.openssh.forwardX11 = true;
|
||||
|
||||
system.stateVersion = "19.09";
|
||||
|
||||
networking.wireguard.interfaces.wg0 = {
|
||||
ips = ["10.59.0.4/16"];
|
||||
privateKeyFile = "/etc/wgkeys/decoysnail";
|
||||
allowedIPsAsRoutes = true;
|
||||
postSetup = ''
|
||||
${pkgs.systemd}/bin/resolvectl domain wg0 '~htdf.gebner.org' '~mtlaa.gebner.org' '~ams.gebner.org'
|
||||
${pkgs.systemd}/bin/resolvectl dns wg0 10.57.0.1
|
||||
'';
|
||||
peers = [{
|
||||
publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4=";
|
||||
allowedIPs = ["10.56.0.0/14" "10.60.1.1"];
|
||||
# endpoint = "mtlaa-gw.gebner.org:35869";
|
||||
# endpoint = "84.112.114.160:35869";
|
||||
endpoint = "127.0.0.1:35869";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
|
||||
systemd.services.wstunnel = {
|
||||
path = [ pkgs.wstunnel ];
|
||||
wantedBy = [ "wireguard-wg0.service" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
wstunnel -L 35869:htdf-gw.gebner.org:35869 -u wss://gebner.org
|
||||
'';
|
||||
};
|
||||
|
||||
services.resolved = {
|
||||
domains = [];
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# services.xserver = {
|
||||
# videoDrivers = [ "intel" ];
|
||||
# };
|
||||
|
||||
fonts.fontconfig = {
|
||||
subpixel.rgba = "none";
|
||||
};
|
||||
|
||||
}
|
||||
|
102
euhadra.nix
102
euhadra.nix
@ -1,11 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let mpdStreamingPort = 8080; in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common.nix
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./common-headless.nix
|
||||
./sway.nix
|
||||
./uefi.nix
|
||||
./fstrim.nix
|
||||
# ./nebula.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
@ -13,27 +18,44 @@
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "euhadra_crypt";
|
||||
boot.initrd.luks.devices = {
|
||||
euhadra_crypt = {
|
||||
device = "/dev/disk/by-uuid/328a9ede-0958-490b-8e82-62b06b839e21";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "euhadra";
|
||||
networking.hostId = "ddb5f0fd";
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.listenAddress = "any";
|
||||
musicDirectory = "/mnt/vaccaria/music";
|
||||
# network.listenAddress = "127.0.0.1";
|
||||
musicDirectory = "/mnt/aplysia/music";
|
||||
extraConfig = ''
|
||||
bind_to_address "10.59.0.6"
|
||||
bind_to_address "100.97.134.100"
|
||||
|
||||
# audio_output {
|
||||
# type "alsa"
|
||||
# name "dac"
|
||||
# device "sysdefault:CARD=QAMP"
|
||||
# }
|
||||
|
||||
audio_output {
|
||||
type "alsa"
|
||||
name "dac"
|
||||
device "sysdefault:CARD=QAMP"
|
||||
type "pulse"
|
||||
name "pulse"
|
||||
server "127.0.0.1"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "http"
|
||||
encoder "flac"
|
||||
port "${toString mpdStreamingPort}"
|
||||
}
|
||||
|
||||
replaygain "auto"
|
||||
@ -41,9 +63,43 @@
|
||||
'';
|
||||
};
|
||||
|
||||
services.pipewire = {
|
||||
config.pipewire-pulse = {
|
||||
"pulse.properties"."server.address" = [
|
||||
"unix:native"
|
||||
"tcp:127.0.0.1:4713"
|
||||
"tcp:100.97.134.100:4713"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.wireguard.interfaces.wg0 = {
|
||||
ips = ["10.59.0.6/16"];
|
||||
privateKeyFile = "/etc/wgkeys/euhadra";
|
||||
allowedIPsAsRoutes = true;
|
||||
postSetup = ''
|
||||
${pkgs.systemd}/bin/resolvectl domain wg0 '~htdf.gebner.org' '~mtlaa.gebner.org' '~ams.gebner.org'
|
||||
${pkgs.systemd}/bin/resolvectl dns wg0 10.58.0.1
|
||||
'';
|
||||
peers = [{
|
||||
publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4=";
|
||||
allowedIPs = ["10.56.0.0/14" "10.60.1.1"];
|
||||
endpoint = "htdf-gw.gebner.org:35869";
|
||||
# endpoint = "80.109.29.104:35869";
|
||||
# endpoint = "127.0.0.1:35869";
|
||||
}];
|
||||
};
|
||||
# systemd.services.wireguard-wg0.wantedBy = pkgs.lib.mkOverride 10 [];
|
||||
|
||||
services.resolved = {
|
||||
domains = [];
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
config.services.mpd.network.port
|
||||
4713 # pulseaudio
|
||||
mpdStreamingPort # mpd streaming
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ mpc_cli ];
|
||||
@ -52,15 +108,19 @@
|
||||
|
||||
nixpkgs.config.mpv.vaapiSupport = true;
|
||||
|
||||
hardware.pulseaudio = {
|
||||
zeroconf.publish.enable = true;
|
||||
tcp = {
|
||||
enable = true;
|
||||
anonymousClients.allowedIpRanges = [
|
||||
"127.0.0.1"
|
||||
"10.57.0.0/16"
|
||||
];
|
||||
};
|
||||
};
|
||||
# hardware.pulseaudio = {
|
||||
# systemWide = true;
|
||||
# zeroconf.publish.enable = true;
|
||||
# tcp = {
|
||||
# enable = true;
|
||||
# anonymousClients.allowedIpRanges = [
|
||||
# "127.0.0.1"
|
||||
# "10.57.0.0/16"
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
time.timeZone = pkgs.lib.mkOverride 10 "US/Pacific";
|
||||
}
|
||||
|
37
fix-firefox.nix
Normal file
37
fix-firefox.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
# unreserve ctrl+w shortcuts
|
||||
|
||||
{
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
|
||||
firefox-unwrapped = stdenv.mkDerivation {
|
||||
inherit (firefox-unwrapped) name version;
|
||||
|
||||
nativeBuildInputs = [ unzip zip ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
cp -ra ${firefox-unwrapped}/. $out/.
|
||||
chmod +w -R $out
|
||||
sed -i "s|${firefox-unwrapped}|$out|g" $out/bin/firefox
|
||||
|
||||
j=$out/lib/firefox/browser/omni.ja
|
||||
f=localization/en-US/browser/browserSets.ftl
|
||||
mkdir browser
|
||||
cd browser
|
||||
# corrupt zip files??
|
||||
unzip $j || true
|
||||
patch $f <${./fix-firefox.patch}
|
||||
rm $j
|
||||
zip -0DXqr $j *
|
||||
'';
|
||||
|
||||
inherit (firefox-unwrapped) meta;
|
||||
passthru = {
|
||||
inherit (firefox-unwrapped.passthru) version isFirefox3Like gtk
|
||||
nspr gssSupport browserName ffmpegSupport gtk3 binaryName;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
31
fix-firefox.patch
Normal file
31
fix-firefox.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- localization/en-US/browser/browserSets.ftl~ 2020-08-31 11:28:51.148881026 +0200
|
||||
+++ localization/en-US/browser/browserSets.ftl 2020-08-31 19:07:11.687530527 +0200
|
||||
@@ -9,16 +9,16 @@
|
||||
.label = Zoom
|
||||
|
||||
window-new-shortcut =
|
||||
- .key = N
|
||||
+ .keycode = VK_F20
|
||||
|
||||
window-minimize-shortcut =
|
||||
.key = M
|
||||
|
||||
close-shortcut =
|
||||
- .key = W
|
||||
+ .keycode = VK_F17
|
||||
|
||||
tab-new-shortcut =
|
||||
- .key = T
|
||||
+ .key = T
|
||||
|
||||
location-open-shortcut =
|
||||
.key = L
|
||||
@@ -185,7 +185,7 @@
|
||||
## global menu.
|
||||
|
||||
quit-app-shortcut =
|
||||
- .key = Q
|
||||
+ .keycode = VK_F18
|
||||
|
||||
help-shortcut =
|
||||
.key = ?
|
62
flake.lock
Normal file
62
flake.lock
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1693158576,
|
||||
"narHash": "sha256-aRTTXkYvhXosGx535iAFUaoFboUrZSYb1Ooih/auGp0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a999c1cc0c9eb2095729d5aa03e0d8f7ed256780",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1638172912,
|
||||
"narHash": "sha256-jxhQGNEsZTdop/Br3JPS+xmBf6t9cIWRzVZFxbT76Rw=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "166d6ebd9f0de03afc98060ac92cba9c71cfe550",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"ref": "v1.3.1",
|
||||
"repo": "flake-utils-plus",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
35
flake.nix
Normal file
35
flake.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.3.1";
|
||||
|
||||
# neovim-overlay = {
|
||||
# url = "github:nix-community/neovim-nightly-overlay";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, utils, ... }: utils.lib.mkFlake {
|
||||
inherit self inputs;
|
||||
|
||||
channels.nixpkgs.input = nixpkgs;
|
||||
|
||||
channels.nixpkgs.patches = [ ];
|
||||
|
||||
nix.generateRegistryFromInputs = true;
|
||||
|
||||
hostDefaults = {
|
||||
modules = [
|
||||
({ ... }: { nix.extraOptions = "warn-dirty = false"; })
|
||||
];
|
||||
};
|
||||
|
||||
hosts = {
|
||||
petalius.modules = [ ./petalius.nix ];
|
||||
flammea.modules = [ ./flammea.nix ];
|
||||
decoysnail.modules = [ ./decoysnail.nix ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
195
flammea.nix
Normal file
195
flammea.nix
Normal file
@ -0,0 +1,195 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let mpdStreamingPort = 8080; in
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common-headless.nix
|
||||
# ./sway.nix
|
||||
# ./i3.nix
|
||||
./gnome3.nix
|
||||
./large-sw.nix
|
||||
./uefi.nix
|
||||
./fstrim.nix
|
||||
# ./qemu-user.nix
|
||||
./atmega.nix
|
||||
./v4l2loopback.nix
|
||||
./huion.nix
|
||||
./spacenav.nix
|
||||
./nvim05.nix
|
||||
./nm-restart.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [
|
||||
"kvm-amd"
|
||||
"zenpower"
|
||||
];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/3b8c5c8a-fff2-49ba-98bd-ceb01d6d57c3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1FA2-93AB";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
devices {
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
boot.initrd.luks.devices = {
|
||||
nvme0n1p2_crypt = {
|
||||
device = "/dev/disk/by-uuid/0fd33358-83dc-4acd-b6b8-0f079082367e";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "flammea"; # Define your hostname.
|
||||
networking.hostId = "390adc00";
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
networking.interfaces."enp42s0".wakeOnLan.enable = true;
|
||||
|
||||
# users.extraUsers.presentation = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "networkmanager" "audio" ];
|
||||
# # shell = "${pkgs.zsh}/bin/zsh";
|
||||
# shell = "/run/current-system/sw/bin/fish";
|
||||
#
|
||||
# password = if config.virtualisation != null then "" else null;
|
||||
# };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
beets
|
||||
piper
|
||||
ddcutil
|
||||
ddcui
|
||||
];
|
||||
|
||||
services.thermald.enable = true;
|
||||
|
||||
virtualisation.virtualbox.host = {
|
||||
enable = true;
|
||||
enableExtensionPack = true;
|
||||
};
|
||||
# nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# virtualisation.libvirtd = {
|
||||
# enable = true;
|
||||
# };
|
||||
# networking.firewall.checkReversePath = false;
|
||||
# fileSystems."/var/lib/libvirt/images/vaccaria" = {
|
||||
# device = "//vaccaria.htdf.gebner.org/export/tmp/vms";
|
||||
# fsType = "cifs";
|
||||
# options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria"
|
||||
# "forceuid" "forcegid" "uid=0" "gid=0" ];
|
||||
# };
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
rocm-runtime
|
||||
];
|
||||
|
||||
# services.nix-serve = {
|
||||
# enable = true;
|
||||
# secretKeyFile = "/etc/nix-serve/secret.key";
|
||||
# };
|
||||
# networking.firewall.allowedTCPPorts = [ config.services.nix-serve.port ];
|
||||
|
||||
networking.firewall.trustedInterfaces = [ "tailscale0" ];
|
||||
|
||||
services.openssh.settings.X11Forwarding = true;
|
||||
|
||||
fileSystems."/mnt/aplysia".device = pkgs.lib.mkOverride 10 "//aplysia.auroch-boa.ts.net/export";
|
||||
|
||||
time.timeZone = pkgs.lib.mkOverride 10 "US/Pacific";
|
||||
|
||||
# nixpkgs.config.packageOverrides = super: let self = super.pkgs; in {
|
||||
# mesa_drivers = self.mesaDarwinOr (
|
||||
# let mo = self.mesa_noglu.override {
|
||||
# llvmPackages = pkgs.llvmPackages_39;
|
||||
# grsecEnabled = false;
|
||||
# enableTextureFloats = true;
|
||||
# };
|
||||
# in mo.drivers
|
||||
# );
|
||||
# };
|
||||
|
||||
boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_6_1;
|
||||
|
||||
# services.xserver = {
|
||||
# videoDrivers = [ "amdgpu" ];
|
||||
# deviceSection = ''
|
||||
# Option "TearFree" "on"
|
||||
# '';
|
||||
# };
|
||||
|
||||
services.ratbagd.enable = true;
|
||||
|
||||
# virtualisation.anbox = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# allow admin use of i2c devices
|
||||
ACTION=="add", KERNEL=="i2c-[0-9]*", GROUP="wheel", MODE="666"
|
||||
'';
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
# services.mpd = {
|
||||
# enable = true;
|
||||
# # network.listenAddress = "127.0.0.1";
|
||||
# # musicDirectory = "/mnt/aplysia/music";
|
||||
# musicDirectory = "/home/gebner/Music";
|
||||
# user = "gebner";
|
||||
# extraConfig = ''
|
||||
# bind_to_address "100.125.210.32"
|
||||
#
|
||||
# # audio_output {
|
||||
# # type "alsa"
|
||||
# # name "dac"
|
||||
# # device "sysdefault:CARD=QAMP"
|
||||
# # }
|
||||
#
|
||||
# audio_output {
|
||||
# type "pulse"
|
||||
# name "pulse"
|
||||
# server "127.0.0.1"
|
||||
# }
|
||||
#
|
||||
# audio_output {
|
||||
# type "httpd"
|
||||
# name "http"
|
||||
# encoder "flac"
|
||||
# port "${toString mpdStreamingPort}"
|
||||
# }
|
||||
#
|
||||
# replaygain "auto"
|
||||
# restore_paused "yes"
|
||||
# '';
|
||||
# };
|
||||
#
|
||||
# environment.etc."pipewire/pipewire-pulse.conf.d/listen.conf".text = ''
|
||||
# pulse.properties = {
|
||||
# server.address = [
|
||||
# "unix:native"
|
||||
# "tcp:127.0.0.1:4713"
|
||||
# # "tcp:100.97.134.100:4713"
|
||||
# ]
|
||||
# }
|
||||
# '';
|
||||
}
|
78
freecad-asm3.nix
Normal file
78
freecad-asm3.nix
Normal file
@ -0,0 +1,78 @@
|
||||
with import <nixpkgs> { }; let der =
|
||||
|
||||
{ stdenv, mkDerivation, fetchFromGitHub, fetchpatch, cmake, ninja, coin3d,
|
||||
xercesc, ode, eigen, qtbase, qttools, qtwebengine, qtxmlpatterns, wrapQtAppsHook,
|
||||
opencascade-occt, gts, hdf5, vtk, medfile, zlib, python3Packages, swig,
|
||||
gfortran, libXmu, soqt, libf2c, libGLU, makeWrapper, pkgconfig, mpi ? null }:
|
||||
|
||||
let
|
||||
pythonPackages = python3Packages;
|
||||
in mkDerivation rec {
|
||||
pname = "freecad-assembly3";
|
||||
version = "08.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "realthunder";
|
||||
repo = "FreeCAD";
|
||||
rev = "04c80c99eee0f7d2f761bdc7d8b32c077adefdec";
|
||||
sha256 = "1f40biy2gc16awb233lha77xabwf2p3jvzzjrp0lnsl2gk4l9w8h";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
pkgconfig
|
||||
pythonPackages.pyside2-tools
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cmake coin3d xercesc ode eigen opencascade-occt gts
|
||||
zlib swig gfortran soqt libf2c makeWrapper mpi vtk hdf5 medfile
|
||||
libGLU libXmu qtbase qttools qtwebengine qtxmlpatterns
|
||||
] ++ (with pythonPackages; [
|
||||
matplotlib pycollada shiboken2 pyside2 pyside2-tools pivy python boost
|
||||
]);
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_QT5=ON"
|
||||
"-DSHIBOKEN_INCLUDE_DIR=${pythonPackages.shiboken2}/include"
|
||||
"-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken"
|
||||
("-DPYSIDE_INCLUDE_DIR=${pythonPackages.pyside2}/include"
|
||||
+ ";${pythonPackages.pyside2}/include/PySide2/QtCore"
|
||||
+ ";${pythonPackages.pyside2}/include/PySide2/QtWidgets"
|
||||
+ ";${pythonPackages.pyside2}/include/PySide2/QtGui"
|
||||
)
|
||||
"-DPYSIDE_LIBRARY=PySide2::pyside2"
|
||||
];
|
||||
|
||||
# This should work on both x86_64, and i686 linux
|
||||
preBuild = ''
|
||||
export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS";
|
||||
'';
|
||||
|
||||
# Their main() removes PYTHONPATH=, and we rely on it.
|
||||
preConfigure = ''
|
||||
sed '/putenv("PYTHONPATH/d' -i src/Main/MainGui.cpp
|
||||
|
||||
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
|
||||
'';
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
mv $out/share/doc $out
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler";
|
||||
homepage = "https://www.freecadweb.org/";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ viric gebner ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
; in libsForQt514.callPackage der { mpi = openmpi; }
|
@ -8,7 +8,7 @@
|
||||
Type = "oneshot";
|
||||
};
|
||||
|
||||
script = "fstrim -v /";
|
||||
script = "${pkgs.utillinux.bin}/bin/fstrim -v /";
|
||||
|
||||
startAt = "04:00";
|
||||
};
|
||||
|
110
gnome3.nix
110
gnome3.nix
@ -1,30 +1,106 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.ibus.enable = true;
|
||||
programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xlibs.xwininfo # for gnome maximus extension
|
||||
unzip
|
||||
gnome3.libgweather
|
||||
imports = [
|
||||
./pipewire.nix
|
||||
];
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [ mozc table-others m17n rime ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.gnome-tweaks
|
||||
pavucontrol
|
||||
paprefs
|
||||
playerctl
|
||||
xorg.xlsclients
|
||||
gthumb
|
||||
];
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = false;
|
||||
fontconfig = {
|
||||
allowBitmaps = false;
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
inconsolata
|
||||
dejavu_fonts
|
||||
ipafont
|
||||
# xorg.fontbhlucidatypewriter100dpi
|
||||
# xorg.fontbhlucidatypewriter75dpi
|
||||
# freefont_ttf
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
# xorg.fontbh100dpi
|
||||
# xorg.fontmiscmisc
|
||||
# xorg.fontcursormisc
|
||||
unifont
|
||||
|
||||
noto-fonts-emoji
|
||||
noto-fonts-cjk
|
||||
|
||||
cantarell-fonts # from gnome3 module
|
||||
|
||||
merriweather
|
||||
merriweather-sans
|
||||
open-sans
|
||||
# libertine # breaks
|
||||
|
||||
dejavu_fonts
|
||||
liberation_ttf
|
||||
ubuntu_font_family
|
||||
|
||||
wqy_microhei
|
||||
ipafont
|
||||
ipaexfont
|
||||
source-han-serif
|
||||
source-han-sans
|
||||
|
||||
inconsolata
|
||||
iosevka
|
||||
fira fira-mono fira-code
|
||||
source-code-pro
|
||||
stix-two
|
||||
|
||||
font-awesome_5
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.displayManager.desktopManagerHandlesLidAndPower = false;
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
services.xserver.layout = "us";
|
||||
services.xserver.xkbVariant = "altgr-intl";
|
||||
services.xserver.xkbOptions = "caps:ctrl_modifier";
|
||||
# prevent satanic torture
|
||||
qt.platformTheme = "qt5ct";
|
||||
|
||||
hardware.uinput.enable = true;
|
||||
users.extraUsers.gebner.extraGroups = [ "input" "tty" "audio" "video" "uinput" ];
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluezFull;
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
programs.gnupg = {
|
||||
agent.enable = true;
|
||||
agent.pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
# libinput.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
# displayManager.defaultSession = "gnome";
|
||||
|
||||
desktopManager.gnome = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# rust winit's wayland support is broken for input methods
|
||||
environment.sessionVariables.WINIT_UNIX_BACKEND = "x11";
|
||||
|
||||
# services.xserver.enable = true;
|
||||
# services.xserver.displayManager.gdm.enable = true;
|
||||
# services.xserver.displayManager.desktopManagerHandlesLidAndPower = false;
|
||||
# services.xserver.layout = "us";
|
||||
# services.xserver.xkbVariant = "altgr-intl";
|
||||
# services.xserver.xkbOptions = "caps:ctrl_modifier";
|
||||
}
|
||||
|
10
huion.nix
Normal file
10
huion.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver.digimend.enable = true;
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="input", ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="256c", \
|
||||
ATTRS{name}=="* Touch *", ENV{ID_INPUT.tags}="low_res_touch"
|
||||
'';
|
||||
}
|
121
i3.nix
121
i3.nix
@ -1,71 +1,43 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# programs.ibus.enable = true;
|
||||
# programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx";
|
||||
fcitx.engines = with pkgs.fcitx-engines; [ mozc anthy table-other m17n ];
|
||||
};
|
||||
imports = [
|
||||
./common-gui.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; with gnome3; [
|
||||
environment.systemPackages = with pkgs; [
|
||||
i3
|
||||
i3status
|
||||
rofi
|
||||
rofi-pass
|
||||
pa_applet
|
||||
feh
|
||||
gnome_keyring
|
||||
gnome3.gnome-keyring
|
||||
networkmanagerapplet
|
||||
gnome_terminal
|
||||
nautilus # in closure of gnome-terminal anyhow
|
||||
colord
|
||||
gnome3.nautilus # in closure of gnome-terminal anyhow
|
||||
pcmanfm
|
||||
# colord
|
||||
evince
|
||||
arandr
|
||||
xss-lock i3lock
|
||||
xss-lock i3lock i3lock-color
|
||||
xdotool
|
||||
scrot
|
||||
pavucontrol
|
||||
dconf-editor
|
||||
pasystray
|
||||
gnome3.dconf-editor
|
||||
unclutter-xfixes
|
||||
dunst
|
||||
|
||||
xorg.xev
|
||||
|
||||
# gnome3 core packages
|
||||
desktop_file_utils shared_mime_info
|
||||
desktop-file-utils shared-mime-info
|
||||
glib gtk3
|
||||
glib_networking gvfs dconf
|
||||
gnome_settings_daemon
|
||||
gnome_themes_standard defaultIconTheme
|
||||
hicolor_icon_theme
|
||||
glib-networking gvfs dconf
|
||||
gnome3.gnome-settings-daemon
|
||||
gnome-themes-extra gnome3.adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = false;
|
||||
fonts = with pkgs; [
|
||||
xorg.fontbhlucidatypewriter100dpi
|
||||
xorg.fontbhlucidatypewriter75dpi
|
||||
dejavu_fonts
|
||||
freefont_ttf
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
liberation_ttf
|
||||
xorg.fontbh100dpi
|
||||
xorg.fontmiscmisc
|
||||
xorg.fontcursormisc
|
||||
# unifont
|
||||
|
||||
wqy_microhei
|
||||
inconsolata
|
||||
dejavu_fonts
|
||||
ipafont
|
||||
ipaexfont
|
||||
# unifont
|
||||
ubuntu_font_family
|
||||
source-code-pro
|
||||
fira
|
||||
stable.noto-fonts-emoji
|
||||
|
||||
cantarell_fonts # from gnome3 module
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
@ -75,21 +47,21 @@
|
||||
# # slim.autoLogin = true;
|
||||
|
||||
lightdm.enable = true;
|
||||
# startx.enable = true;
|
||||
# sddm.enable = true;
|
||||
|
||||
defaultSession = "i3wm";
|
||||
};
|
||||
|
||||
desktopManager = {
|
||||
default = "i3wm";
|
||||
xterm.enable = false;
|
||||
|
||||
session = [ {
|
||||
name = "i3wm";
|
||||
start = ''
|
||||
export XDG_DATA_DIRS=/run/current-system/sw/share/''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
|
||||
export $(${pkgs.gnome3.gnome_keyring}/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg)
|
||||
export XDG_CURRENT_DESKTOP=GNOME
|
||||
for m in xsettings; do
|
||||
${pkgs.gnome3.gnome_settings_daemon}/libexec/gsd-$m &
|
||||
done
|
||||
export $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
|
||||
export XDG_CURRENT_DESKTOP=X-Generic
|
||||
i3 &
|
||||
waitPID=$!
|
||||
'';
|
||||
@ -98,48 +70,13 @@
|
||||
|
||||
updateDbusEnvironment = true;
|
||||
|
||||
windowManager = {
|
||||
default = "i3";
|
||||
i3.enable = true;
|
||||
};
|
||||
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
xkbOptions = "caps:ctrl_modifier";
|
||||
};
|
||||
|
||||
services.dbus.packages = with pkgs; [ dunst gnome3.gcr ];
|
||||
services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ];
|
||||
|
||||
# copied from gnome3 module
|
||||
security.polkit.enable = true;
|
||||
services.udisks2.enable = true;
|
||||
services.accounts-daemon.enable = true;
|
||||
services.geoclue2.enable = true;
|
||||
services.gnome3.at-spi2-core.enable = true;
|
||||
# services.gnome3.evolution-data-server.enable = true;
|
||||
# services.gnome3.gnome-documents.enable = true;
|
||||
services.gnome3.gnome-keyring.enable = true;
|
||||
#services.gnome3.gnome-online-accounts.enable = true;
|
||||
# services.gnome3.gnome-user-share.enable = true;
|
||||
services.gnome3.gvfs.enable = true;
|
||||
services.gnome3.seahorse.enable = true;
|
||||
services.gnome3.sushi.enable = true;
|
||||
# services.gnome3.tracker.enable = true;
|
||||
services.telepathy.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
services.upower.enable = config.powerManagement.enable;
|
||||
hardware.bluetooth.enable = true;
|
||||
# Needed for themes and backgrounds
|
||||
environment.pathsToLink = [ "/share" ];
|
||||
environment.variables.GIO_EXTRA_MODULES = with pkgs.gnome3; [
|
||||
"${pkgs.lib.getLib dconf}/lib/gio/modules"
|
||||
"${glib_networking.out}/lib/gio/modules"
|
||||
"${gvfs}/lib/gio/modules" ];
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
zeroconf.discovery.enable = true;
|
||||
};
|
||||
# services.dbus.socketActivated = true;
|
||||
services.dbus.packages = with pkgs; [ dunst ];
|
||||
systemd.packages = [ pkgs.dunst ];
|
||||
|
||||
}
|
||||
|
70
large-sw.nix
70
large-sw.nix
@ -2,35 +2,65 @@
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs.haskellPackages; with pkgs; [
|
||||
idea-community-eap
|
||||
clion-eap
|
||||
jetbrains.idea-community
|
||||
# idea.clion
|
||||
texlive.combined.scheme-full biber
|
||||
stable.gimp
|
||||
stable.inkscape
|
||||
jabref
|
||||
stable.libreoffice-fresh
|
||||
stable.calibre
|
||||
gimp
|
||||
inkscape
|
||||
# jabref
|
||||
libreoffice-fresh
|
||||
# calibre
|
||||
# goldendict
|
||||
|
||||
# qutebrowser
|
||||
|
||||
open-wbo # only in 17.09+
|
||||
xournal
|
||||
xournalpp
|
||||
|
||||
vscode
|
||||
clang
|
||||
|
||||
stack
|
||||
ccls
|
||||
sumneko-lua-language-server
|
||||
texlab
|
||||
rnix-lsp
|
||||
pyright
|
||||
nodePackages.typescript-language-server
|
||||
rust-analyzer
|
||||
|
||||
stable.coq_8_6
|
||||
# stack
|
||||
|
||||
# cargo rustc
|
||||
elan
|
||||
# coq
|
||||
# emacsPackages.proofgeneral
|
||||
|
||||
# virtmanager
|
||||
|
||||
(if lib.hasAttr "curaPlugins" pkgs then
|
||||
cura.override {
|
||||
plugins = with curaPlugins; [ octoprint rawmouse ];
|
||||
}
|
||||
else cura)
|
||||
openscad
|
||||
freecad
|
||||
calculix
|
||||
meshlab
|
||||
|
||||
audacious
|
||||
flac
|
||||
clementine
|
||||
|
||||
uvccapture
|
||||
|
||||
yarn
|
||||
|
||||
gnome3.baobab
|
||||
|
||||
rustup
|
||||
] ++ (with aspellDicts; [ en de fr nl ]);
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
|
||||
myemacs = emacs25.override {
|
||||
withGTK2 = false;
|
||||
withGTK3 = true;
|
||||
withXwidgets = true;
|
||||
};
|
||||
programs.wireshark = {
|
||||
enable = true;
|
||||
package = pkgs.wireshark;
|
||||
};
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
}
|
||||
|
@ -1,46 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.nginx.httpConfig = ''
|
||||
server {
|
||||
listen [::]:443;
|
||||
listen 443;
|
||||
server_name gabrielebner.at www.gabrielebner.at 2b7e.org www.2b7e.org www.gebner.org;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate_key /var/lib/acme/gebner.org/key.pem;
|
||||
ssl_certificate /var/lib/acme/gebner.org/fullchain.pem;
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
location / {
|
||||
rewrite ^(.*) https://gebner.org$1 permanent;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen [::]:443;
|
||||
listen 443;
|
||||
server_name gebner.org;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate_key /var/lib/acme/gebner.org/key.pem;
|
||||
ssl_certificate /var/lib/acme/gebner.org/fullchain.pem;
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
root /srv/www.gebner.org;
|
||||
error_page 404 403 /pages/404.html;
|
||||
}
|
||||
'';
|
||||
}
|
@ -6,15 +6,18 @@
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
../basic-tools.nix
|
||||
./backup.nix
|
||||
./duplicity.nix
|
||||
|
||||
./mail.nix
|
||||
./www.nix
|
||||
./gogs.nix
|
||||
./gitea.nix
|
||||
./letsencrypt.nix
|
||||
./blog.nix
|
||||
./website.nix
|
||||
./wstunnel.nix
|
||||
./radicale.nix
|
||||
./ttrss.nix
|
||||
# ./ttrss.nix
|
||||
./dns.nix
|
||||
./nebula.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
|
@ -9,7 +9,7 @@ let
|
||||
IN AAAA 2a02:2770:3:0:21a:4aff:feac:bc0e
|
||||
'';
|
||||
|
||||
timestamp = "1497294847";
|
||||
timestamp = "1664458744";
|
||||
|
||||
heNsServers = ''
|
||||
@ IN NS ns1.he.net.
|
||||
@ -48,9 +48,9 @@ in
|
||||
misuji ${misuji}
|
||||
mastus ${mastus}
|
||||
|
||||
home-gw IN A 80.109.2.154
|
||||
htdf-gw IN A 80.109.2.154
|
||||
mtlaa-gw IN A 84.112.114.160
|
||||
home-gw IN A 80.109.29.104
|
||||
htdf-gw IN A 80.109.29.104
|
||||
ams-gw IN A 82.217.167.76
|
||||
|
||||
@ ${mastus}
|
||||
www IN CNAME mastus
|
||||
|
7
mastus/duplicity.nix
Normal file
7
mastus/duplicity.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
environment.systemPackages = [ pkgs.duplicity ];
|
||||
|
||||
}
|
35
mastus/fts_xapian.nix
Normal file
35
mastus/fts_xapian.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ stdenv, fetchFromGitHub, autoconf, automake, pkg-config, dovecot, libtool, xapian, icu64, sqlite }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fts-xapian";
|
||||
version = "1.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grosjo";
|
||||
repo = "fts-xapian";
|
||||
rev = version;
|
||||
sha256 = "12rgchx1ikwxbhdgychcfrhfnmx1rzl1l5zhmzchjkh44cwmpdbh";
|
||||
};
|
||||
|
||||
buildInputs = [ dovecot xapian icu64 sqlite ];
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool pkg-config ];
|
||||
|
||||
preConfigure = ''
|
||||
export PANDOC=false
|
||||
autoreconf -vi
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-dovecot=${dovecot}/lib/dovecot"
|
||||
"--without-dovecot-install-dirs"
|
||||
"--with-moduledir=$(out)/lib/dovecot"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/grosjo/fts-xapian";
|
||||
description = "Dovecot FTS plugin based on Xapian";
|
||||
license = licenses.lgpl21;
|
||||
maintainers = with maintainers; [ julm ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
gitblitWar = pkgs.fetchurl {
|
||||
url = "http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.war";
|
||||
sha256 = "01gqarpwqbx1ix5zycfxw4172q5l8hhxvb7f92y3lz8l6x42l7i9";
|
||||
};
|
||||
|
||||
gitHome = "/srv/git.gebner.org";
|
||||
in
|
||||
{
|
||||
containers.gitblit = {
|
||||
config = { config, pkgs, ... }: {
|
||||
users.extraUsers.git = { home = gitHome; extraGroups = [ "git" ]; };
|
||||
users.extraGroups.git = { };
|
||||
|
||||
systemd.services.createGitDir = {
|
||||
wantedBy = [ "winstone-gitblit.service" ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir -p ${gitHome}
|
||||
chown git:git -R ${gitHome}
|
||||
'';
|
||||
};
|
||||
|
||||
services.winstone.gitblit = {
|
||||
user = "git";
|
||||
group = "git";
|
||||
warFile = "${gitblitWar}";
|
||||
extraJavaOptions = [ "-DGITBLIT_HOME=${gitHome}" ];
|
||||
};
|
||||
};
|
||||
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.101.10";
|
||||
};
|
||||
|
||||
services.nginx.appendConfig = ''
|
||||
http {
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name git.gebner.org;
|
||||
|
||||
rewrite ^(.*) https://$host$1 permanent;
|
||||
}
|
||||
|
||||
server {
|
||||
listen [::]:443;
|
||||
listen 443;
|
||||
server_name git.gebner.org;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate_key /var/lib/acme/gebner.org/mastus.key;
|
||||
ssl_certificate /var/lib/acme/gebner.org/git.cert;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://gitblit;
|
||||
client_max_body_size 30M;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
upstream gitblit {
|
||||
server 192.168.100.10:8080;
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
42
mastus/gitea.nix
Normal file
42
mastus/gitea.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.gitea = rec {
|
||||
enable = true;
|
||||
stateDir = "/srv/git.gebner.org";
|
||||
appName = "Gabriel Ebner's git server";
|
||||
domain = "git.gebner.org";
|
||||
rootUrl = "https://git.gebner.org/";
|
||||
httpPort = 8001;
|
||||
cookieSecure = true;
|
||||
log.level = "Info";
|
||||
disableRegistration = true;
|
||||
settings = {
|
||||
picture = {
|
||||
DISABLE_GRAVATAR = "false";
|
||||
AVATAR_UPLOAD_PATH = "${stateDir}/data/avatars";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(let cfg = config.services.gitea; in pkgs.writeScriptBin "gitea" ''
|
||||
exec ${pkgs.sudo}/bin/sudo -u ${cfg.user} \
|
||||
env GITEA_WORK_DIR=${cfg.stateDir} ${pkgs.gitea}/bin/gitea "$@"
|
||||
'')
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts."git.gebner.org" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "gebner.org";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.gitea.httpPort}";
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
client_max_body_size 256M;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
156
mastus/gogs.nix
156
mastus/gogs.nix
@ -1,125 +1,45 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
gitHome = "/srv/git.gebner.org";
|
||||
|
||||
gogs = pkgs.callPackage ../pkgs/gogs.nix { };
|
||||
|
||||
gogsPort = 8001;
|
||||
gogsConfig = pkgs.writeText "gogs.ini" ''
|
||||
APP_NAME = Gogs: Go Git Service
|
||||
RUN_USER = git
|
||||
RUN_MODE = prod
|
||||
|
||||
[database]
|
||||
DB_TYPE = sqlite3
|
||||
HOST = 127.0.0.1:3306
|
||||
NAME = gogs
|
||||
USER = root
|
||||
PASSWD =
|
||||
SSL_MODE = disable
|
||||
PATH = ${gitHome}/data/gogs.db
|
||||
|
||||
[repository]
|
||||
ROOT = ${gitHome}/gogs-repositories
|
||||
|
||||
[server]
|
||||
DOMAIN = git.gebner.org
|
||||
HTTP_PORT = ${toString gogsPort}
|
||||
ROOT_URL = https://git.gebner.org/
|
||||
DISABLE_SSH = false
|
||||
SSH_PORT = 22
|
||||
OFFLINE_MODE = true
|
||||
|
||||
[mailer]
|
||||
ENABLED = false
|
||||
|
||||
[service]
|
||||
REGISTER_EMAIL_CONFIRM = false
|
||||
ENABLE_NOTIFY_MAIL = false
|
||||
DISABLE_REGISTRATION = true
|
||||
REQUIRE_SIGNIN_VIEW = false
|
||||
|
||||
[picture]
|
||||
DISABLE_GRAVATAR = false
|
||||
AVATAR_UPLOAD_PATH = ${gitHome}/data/avatars
|
||||
|
||||
[session]
|
||||
PROVIDER = file
|
||||
|
||||
[log]
|
||||
ROOT_PATH = ${gitHome}/logs
|
||||
MODE = file
|
||||
LEVEL = Info
|
||||
|
||||
[security]
|
||||
INSTALL_LOCK = true
|
||||
'';
|
||||
in
|
||||
{
|
||||
users.extraUsers.git = { home = gitHome; extraGroups = [ "git" ]; };
|
||||
users.extraUsers.git = { home = config.services.gogs.stateDir; extraGroups = [ "git" ]; };
|
||||
users.extraGroups.git = { };
|
||||
|
||||
systemd.services.gogs = {
|
||||
path = with pkgs; [ git openssh bash ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
User = "git";
|
||||
Group = "git";
|
||||
ExecStart = "${gogs}/gogs web -c ${gogsConfig}";
|
||||
WorkingDirectory = gitHome;
|
||||
};
|
||||
services.gogs = rec {
|
||||
enable = true;
|
||||
stateDir = "/srv/git.gebner.org";
|
||||
user = "git";
|
||||
group = "git";
|
||||
appName = "Gabriel Ebner's git server";
|
||||
domain = "git.gebner.org";
|
||||
rootUrl = "https://git.gebner.org/";
|
||||
httpPort = 8001;
|
||||
cookieSecure = true;
|
||||
extraConfig = ''
|
||||
[picture]
|
||||
DISABLE_GRAVATAR = false
|
||||
AVATAR_UPLOAD_PATH = ${stateDir}/data/avatars
|
||||
|
||||
[log]
|
||||
ROOT_PATH = ${stateDir}/logs
|
||||
MODE = file
|
||||
LEVEL = Info
|
||||
|
||||
[service]
|
||||
DISABLE_REGISTRATION = true
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.httpConfig = ''
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name git.gebner.org;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type text/plain;
|
||||
alias /var/lib/acme/www/.well-known/acme-challenge;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite ^(.*) https://$host$1 permanent;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen [::]:443;
|
||||
listen 443;
|
||||
server_name git.gebner.org;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate_key /var/lib/acme/gebner.org/key.pem;
|
||||
ssl_certificate /var/lib/acme/gebner.org/fullchain.pem;
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_pass http://gogs;
|
||||
client_max_body_size 30M;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
upstream gogs {
|
||||
server 127.0.0.1:${toString gogsPort};
|
||||
}
|
||||
'';
|
||||
services.nginx = {
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts."git.gebner.org" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "gebner.org";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.gogs.httpPort}";
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
client_max_body_size 30M;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -3,18 +3,18 @@
|
||||
{
|
||||
security.acme.certs = {
|
||||
"gebner.org" = {
|
||||
webroot = "/var/lib/acme/www";
|
||||
webroot = "/var/lib/acme/acme-challenge";
|
||||
email = "gebner@gebner.org";
|
||||
extraDomains = {
|
||||
"git.gebner.org" = null;
|
||||
"mail.gebner.org" = null;
|
||||
"gebner.org" = null;
|
||||
"www.gebner.org" = null;
|
||||
"gabrielebner.at" = null;
|
||||
"www.gabrielebner.at" = null;
|
||||
"2b7e.org" = null;
|
||||
"www.2b7e.org" = null;
|
||||
};
|
||||
extraDomainNames = [
|
||||
"git.gebner.org"
|
||||
"mail.gebner.org"
|
||||
"gebner.org"
|
||||
"www.gebner.org"
|
||||
"gabrielebner.at"
|
||||
"www.gabrielebner.at"
|
||||
"2b7e.org"
|
||||
"www.2b7e.org"
|
||||
];
|
||||
|
||||
postRun = ''
|
||||
systemctl reload nginx
|
||||
@ -26,4 +26,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
extraAliases = ''
|
||||
ge: gebner
|
||||
cutintro: gebner
|
||||
gebne: gebner
|
||||
'';
|
||||
hostname = "mastus.gebner.org";
|
||||
sslCert = "/var/lib/acme/gebner.org/fullchain.pem";
|
||||
@ -67,8 +68,6 @@
|
||||
sslServerCert = "/var/lib/acme/gebner.org/fullchain.pem";
|
||||
sslServerKey = "/var/lib/acme/gebner.org-dovecot/key.pem";
|
||||
extraConfig = ''
|
||||
ssl_protocols = !SSLv2 !SSLv3
|
||||
|
||||
service auth {
|
||||
unix_listener /var/lib/postfix/queue/private/auth {
|
||||
mode = 0660
|
||||
@ -76,7 +75,30 @@
|
||||
group = postfix
|
||||
}
|
||||
}
|
||||
|
||||
# # use mailPlugins.globally.enable after nixos 20.09
|
||||
# mail_plugins = fts fts_xapian
|
||||
#
|
||||
# plugin {
|
||||
# plugin = fts fts_xapian
|
||||
#
|
||||
# fts = xapian
|
||||
# fts_xapian = partial=2 full=20 attachments=1 verbose=0
|
||||
#
|
||||
# fts_autoindex = yes
|
||||
# fts_enforced = yes
|
||||
#
|
||||
# fts_autoindex_exclude = Trash
|
||||
# fts_autoindex_exclude2 = spam
|
||||
# }
|
||||
#
|
||||
# default_vsz_limit = 0
|
||||
#
|
||||
# service indexer-worker {
|
||||
# vsz_limit = 0
|
||||
# }
|
||||
'';
|
||||
# modules = [ (pkgs.callPackage ./fts_xapian.nix {}) ];
|
||||
};
|
||||
systemd.services.dovecotSslKey = rec {
|
||||
wantedBy = [ "dovecot2.service" ];
|
||||
|
25
mastus/nebula.nix
Normal file
25
mastus/nebula.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let mastus = "37.252.120.145";
|
||||
in {
|
||||
services.nebula.networks.gabriel = {
|
||||
enable = true;
|
||||
ca = "/etc/nebula/gabriel/ca.crt";
|
||||
cert = "/etc/nebula/gabriel/mastus.crt";
|
||||
key = "/etc/nebula/gabriel/mastus.key";
|
||||
|
||||
isLighthouse = true;
|
||||
staticHostMap = {
|
||||
"192.168.18.36" = [ "${mastus}:4242" ];
|
||||
};
|
||||
|
||||
firewall.inbound = [ { port = "any"; proto = "any"; host = "any"; } ];
|
||||
|
||||
settings = {
|
||||
serve_dns = true;
|
||||
lighthouse.dns = { host = "192.168.18.36"; port = 5353; };
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 4242 ];
|
||||
}
|
@ -5,77 +5,56 @@ in
|
||||
{
|
||||
services.radicale = {
|
||||
enable = true;
|
||||
config = ''
|
||||
[server]
|
||||
hosts = 127.0.0.1:${toString radicalePort}
|
||||
ssl = false
|
||||
dns_lookup = false
|
||||
package = pkgs.radicale3.overrideDerivation (_: {
|
||||
#patches = [ ./radicale1249.patch ];
|
||||
doCheck = false;
|
||||
pytestCheckPhase = "true";
|
||||
});
|
||||
settings = {
|
||||
server = {
|
||||
hosts = "127.0.0.1:${toString radicalePort}";
|
||||
ssl = false;
|
||||
};
|
||||
|
||||
[storage]
|
||||
filesystem_folder = /var/lib/radicale/storage
|
||||
storage = {
|
||||
filesystem_folder = "/var/lib/radicale/collections";
|
||||
};
|
||||
|
||||
[auth]
|
||||
type = IMAP
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = "/var/lib/radicale/htpasswd";
|
||||
htpasswd_encryption = "bcrypt";
|
||||
};
|
||||
|
||||
[rights]
|
||||
type = owner_only
|
||||
'';
|
||||
rights = {
|
||||
type = "owner_only";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.certs."gebner.org".extraDomains."radicale.gebner.org" = null;
|
||||
security.acme.certs."gebner.org".extraDomainNames = [ "radicale.gebner.org" ];
|
||||
|
||||
services.nginx.httpConfig = ''
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name radicale.gebner.org;
|
||||
services.nginx = {
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts."radicale.gebner.org" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "gebner.org";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString radicalePort}";
|
||||
};
|
||||
# Fake nextcloud api:
|
||||
# https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/1#note_857357
|
||||
extraConfig = ''
|
||||
rewrite ^/remote.php/carddav / redirect;
|
||||
rewrite ^/remote.php/caldav / redirect;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type text/plain;
|
||||
alias /var/lib/acme/www/.well-known/acme-challenge;
|
||||
}
|
||||
location /remote.php/webdav {
|
||||
return 200;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
location / {
|
||||
rewrite ^(.*) https://$host$1 permanent;
|
||||
}
|
||||
}
|
||||
environment.systemPackages = with pkgs; [ apacheHttpd ];
|
||||
|
||||
server {
|
||||
listen [::]:443;
|
||||
listen 443;
|
||||
server_name radicale.gebner.org;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate_key /var/lib/acme/gebner.org/key.pem;
|
||||
ssl_certificate /var/lib/acme/gebner.org/fullchain.pem;
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_connect_timeout 900;
|
||||
proxy_send_timeout 900;
|
||||
proxy_read_timeout 900;
|
||||
send_timeout 900;
|
||||
proxy_pass http://radicale;
|
||||
client_max_body_size 30M;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
upstream radicale {
|
||||
server 127.0.0.1:${toString radicalePort};
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
37
mastus/radicale1249.patch
Normal file
37
mastus/radicale1249.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff --git a/radicale/app/propfind.py b/radicale/app/propfind.py
|
||||
index 52d0b00..ee7cf28 100644
|
||||
--- a/radicale/app/propfind.py
|
||||
+++ b/radicale/app/propfind.py
|
||||
@@ -350,8 +350,8 @@ class ApplicationPartPropfind(ApplicationBase):
|
||||
permission = "r"
|
||||
status = "read"
|
||||
else:
|
||||
- permission = ""
|
||||
- status = "NO"
|
||||
+ permission = "r"
|
||||
+ status = "read"
|
||||
logger.debug(
|
||||
"%s has %s access to %s",
|
||||
repr(user) if user else "anonymous user", status, target)
|
||||
@@ -362,8 +362,8 @@ class ApplicationPartPropfind(ApplicationBase):
|
||||
path: str, user: str) -> types.WSGIResponse:
|
||||
"""Manage PROPFIND request."""
|
||||
access = Access(self._rights, user, path)
|
||||
- if not access.check("r"):
|
||||
- return httputils.NOT_ALLOWED
|
||||
+ #if not access.check("r"):
|
||||
+ # return httputils.NOT_ALLOWED
|
||||
try:
|
||||
xml_content = self._read_xml_request_body(environ)
|
||||
except RuntimeError as e:
|
||||
@@ -380,8 +380,8 @@ class ApplicationPartPropfind(ApplicationBase):
|
||||
item = next(items_iter, None)
|
||||
if not item:
|
||||
return httputils.NOT_FOUND
|
||||
- if not access.check("r", item):
|
||||
- return httputils.NOT_ALLOWED
|
||||
+ #if not access.check("r", item):
|
||||
+ # return httputils.NOT_ALLOWED
|
||||
# put item back
|
||||
items_iter = itertools.chain([item], items_iter)
|
||||
allowed_items = self._collect_allowed_items(items_iter, user)
|
108
mastus/ttrss.nix
108
mastus/ttrss.nix
@ -2,7 +2,13 @@
|
||||
{
|
||||
containers.ttrss = {
|
||||
config = {
|
||||
users.extraUsers.ttrss = {};
|
||||
users.users.ttrss = {
|
||||
group = "ttrss";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.ttrss = {};
|
||||
|
||||
users.users.tt_rss.isSystemUser = true;
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
@ -19,6 +25,7 @@
|
||||
user = "ttrss";
|
||||
|
||||
pool = "ttrss";
|
||||
virtualHost = null;
|
||||
|
||||
database = {
|
||||
type = "pgsql";
|
||||
@ -32,23 +39,21 @@
|
||||
};
|
||||
|
||||
services.phpfpm = {
|
||||
extraConfig = ''
|
||||
error_log = /var/log/phpfpm.log
|
||||
log_level = notice
|
||||
'';
|
||||
|
||||
poolConfigs = {
|
||||
ttrss = ''
|
||||
listen = 9000
|
||||
user = ttrss
|
||||
pm = dynamic
|
||||
pm.max_children = 75
|
||||
pm.start_servers = 10
|
||||
pm.min_spare_servers = 5
|
||||
pm.max_spare_servers = 20
|
||||
pm.max_requests = 500
|
||||
catch_workers_output = 1
|
||||
'';
|
||||
pools = {
|
||||
ttrss = {
|
||||
user = "ttrss";
|
||||
group = "ttrss";
|
||||
settings = {
|
||||
listen = "9000";
|
||||
pm = "dynamic";
|
||||
"pm.max_children" = 75;
|
||||
"pm.start_servers" = 10;
|
||||
"pm.min_spare_servers" = 5;
|
||||
"pm.max_spare_servers" = 20;
|
||||
"pm.max_requests" = 500;
|
||||
catch_workers_output = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -63,61 +68,28 @@
|
||||
|
||||
networking.nat.enable = true;
|
||||
networking.nat.internalInterfaces = ["ve-+"];
|
||||
networking.nat.externalInterface = "enp0s3";
|
||||
networking.nat.externalInterface = "ens3";
|
||||
|
||||
security.acme.certs."gebner.org".extraDomains."reader.gebner.org" = null;
|
||||
security.acme.certs."gebner.org".extraDomainNames = [ "reader.gebner.org" ];
|
||||
|
||||
services.nginx.httpConfig = ''
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name reader.gebner.org;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type text/plain;
|
||||
alias /var/lib/acme/www/.well-known/acme-challenge;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite ^(.*) https://$host$1 permanent;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen [::]:443;
|
||||
listen 443;
|
||||
server_name reader.gebner.org;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate_key /var/lib/acme/gebner.org/key.pem;
|
||||
ssl_certificate /var/lib/acme/gebner.org/fullchain.pem;
|
||||
ssl_dhparam /etc/nginx/dhparam.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
|
||||
ssl_prefer_server_ciphers on;
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
location / {
|
||||
root /var/lib/containers/ttrss/var/lib/tt-rss;
|
||||
index index.php;
|
||||
}
|
||||
|
||||
location /cache {
|
||||
deny all;
|
||||
}
|
||||
location = /config.php {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
services.nginx = {
|
||||
virtualHosts."reader.gebner.org" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "gebner.org";
|
||||
locations."/" = {
|
||||
root = "/var/lib/containers/ttrss/var/lib/tt-rss";
|
||||
index = "index.php";
|
||||
};
|
||||
locations."/cache".extraConfig = "deny all;";
|
||||
locations."= /config.php".extraConfig = "deny all;";
|
||||
locations."~ \\.php$".extraConfig = ''
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 192.168.100.11:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/lib/tt-rss/$fastcgi_script_name;
|
||||
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||
}
|
||||
}
|
||||
'';
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ let
|
||||
boot.enableContainers = true;
|
||||
|
||||
systemd.services.setupVM = rec {
|
||||
wantedBy = [ "gogs.service" "dovecot2.service" "nginx.service" ];
|
||||
wantedBy = [ "gitea.service" "dovecot2.service" "nginx.service" ];
|
||||
before = wantedBy;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
@ -17,14 +17,22 @@ let
|
||||
};
|
||||
script = ''
|
||||
mkdir -p /srv/git.gebner.org
|
||||
chown git:git -R /srv/git.gebner.org
|
||||
chown gitea:gitea -R /srv/git.gebner.org
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ elinks carddav-util fcgi ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
elinks
|
||||
carddav-util
|
||||
fcgi
|
||||
wstunnel
|
||||
sqlite-interactive
|
||||
];
|
||||
|
||||
security.acme.server = "http://localhost";
|
||||
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 gebner.org www.gebner.org reader.gebner.org git.gebner.org mail.gebner.org radicale.gebner.org
|
||||
127.0.0.1 gebner.org www.gebner.org reader.gebner.org git.gebner.org mail.gebner.org radicale.gebner.org gabrielebner.at
|
||||
|
||||
# disable letsencrypt
|
||||
127.0.0.111 acme-v01.api.letsencrypt.org
|
||||
|
33
mastus/website.nix
Normal file
33
mastus/website.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts."gebner.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/srv/www.gebner.org";
|
||||
extraConfig = ''
|
||||
access_log /var/log/nginx/website_access.log;
|
||||
|
||||
error_page 404 403 /404.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @not_found;
|
||||
}
|
||||
|
||||
location @not_found {
|
||||
try_files /404.cgi =404;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.fcgiwrap = {
|
||||
enable = true;
|
||||
user = "nobody";
|
||||
group = "nogroup";
|
||||
};
|
||||
}
|
24
mastus/wstunnel.nix
Normal file
24
mastus/wstunnel.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
port = 58613;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
systemd.services.wstunnel = rec {
|
||||
path = [ pkgs.wstunnel ];
|
||||
wantedBy = [ "nginx.service" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
wstunnel --server --restrictTo=htdf-gw.gebner.org:35869 ws://localhost:${toString port}
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."gebner.org".locations = {
|
||||
"/wstunnel/udp/htdf-gw.gebner.org/35869" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
@ -16,21 +16,18 @@
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
httpConfig = ''
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
default_type text/plain;
|
||||
alias /var/lib/acme/www/.well-known/acme-challenge;
|
||||
}
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
|
||||
location / {
|
||||
rewrite ^(.*) https://gebner.org$1 permanent;
|
||||
}
|
||||
}
|
||||
'';
|
||||
sslDhparam = "/etc/nginx/dhparam.pem";
|
||||
|
||||
virtualHosts."_" = {
|
||||
default = true;
|
||||
addSSL = true;
|
||||
useACMEHost = "gebner.org";
|
||||
globalRedirect = "gebner.org";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
147
murex.nix
Normal file
147
murex.nix
Normal file
@ -0,0 +1,147 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./basic-tools.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
|
||||
boot.loader.raspberryPi = {
|
||||
enable = true;
|
||||
version = 3;
|
||||
uboot.enable = true;
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_5_4;
|
||||
|
||||
boot.kernelParams = [
|
||||
"cma=32M" # for virtual console, see https://nixos.wiki/wiki/NixOS_on_ARM
|
||||
"console=tty0"
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
# hardware.firmware = with pkgs; [
|
||||
# (stdenv.mkDerivation {
|
||||
# name = "broadcom-rpi3bplus-extra";
|
||||
# src = fetchurl {
|
||||
# url = "https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/b518de4/brcm/brcmfmac43455-sdio.txt";
|
||||
# sha256 = "0r4bvwkm3fx60bbpwd83zbjganjnffiq1jkaj0h20bwdj9ysawg9";
|
||||
# };
|
||||
# phases = [ "installPhase" ];
|
||||
# installPhase = ''
|
||||
# mkdir -p $out/lib/firmware/brcm
|
||||
# cp $src $out/lib/firmware/brcm/brcmfmac43455-sdio.txt
|
||||
# '';
|
||||
# })
|
||||
# ];
|
||||
# networking.wireless.enable = true;
|
||||
# networking.networkmanager.enable = true;
|
||||
networking.wireless.iwd.enable = true;
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "murex";
|
||||
#networking.hostId = "34a820f1";
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
raspberrypi-tools
|
||||
];
|
||||
|
||||
users.extraUsers.gebner = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "dialout" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
documentation.nixos.enable = false;
|
||||
|
||||
services.octoprint = {
|
||||
enable = true;
|
||||
plugins = ps: with ps; [
|
||||
printtimegenius
|
||||
touchui
|
||||
# psucontrol
|
||||
];
|
||||
};
|
||||
# systemd.services.setupGpioForRelais = rec {
|
||||
# wantedBy = [ "octoprint.service" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# RemainAfterExit = "yes";
|
||||
# };
|
||||
# script = let gpio = toString (458 + 17); in ''
|
||||
# if echo ${gpio} > /sys/class/gpio/export; then
|
||||
# echo high > /sys/class/gpio/gpio${gpio}/direction
|
||||
# fi
|
||||
# chown octoprint:dialout /sys/class/gpio/gpio${gpio}/value
|
||||
# '';
|
||||
# };
|
||||
users.users.${config.services.octoprint.user}.extraGroups = [
|
||||
"dialout" # ttyUSB access
|
||||
];
|
||||
|
||||
systemd.services.ethKernelPanicFix = rec {
|
||||
wantedBy = [ "networking.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
# https://github.com/raspberrypi/linux/issues/2449
|
||||
script = ''
|
||||
${pkgs.ethtool}/bin/ethtool -K eth0 tx-tcp-segmentation off tx-tcp6-segmentation off
|
||||
'';
|
||||
};
|
||||
|
||||
services.mjpg-streamer = {
|
||||
enable = true;
|
||||
# inputPlugin = "input_uvc.so -r 1920x1080";
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
# config.services.octoprint.port
|
||||
# 5050 # mjpg-streamer
|
||||
80
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
|
||||
virtualHosts."murex.ams.gebner.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString config.services.octoprint.port}";
|
||||
proxyWebsockets = true;
|
||||
# do not cache that octoprint is inaccessible on startup
|
||||
extraConfig = ''
|
||||
proxy_cache off;
|
||||
proxy_set_header Accept-Encoding "*";
|
||||
client_max_body_size 50M;
|
||||
'';
|
||||
};
|
||||
locations."/webcam/".proxyPass = "http://localhost:5050/?action=stream";
|
||||
locations."/webcampic/".proxyPass = "http://localhost:5050/?action=snapshot";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
}
|
26
nebula.nix
Normal file
26
nebula.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let mastus = "37.252.120.145"; hostname = config.networking.hostName;
|
||||
in {
|
||||
services.nebula.networks.gabriel = {
|
||||
enable = true;
|
||||
ca = "/etc/nebula/gabriel/ca.crt";
|
||||
cert = "/etc/nebula/gabriel/${hostname}.crt";
|
||||
key = "/etc/nebula/gabriel/${hostname}.key";
|
||||
|
||||
listen.host = "[::]";
|
||||
listen.port = 0; # dynamic ip
|
||||
|
||||
staticHostMap = {
|
||||
"192.168.18.36" = [ "${mastus}:4242" ];
|
||||
};
|
||||
lighthouses = [
|
||||
"192.168.18.36"
|
||||
];
|
||||
|
||||
firewall.outbound = [ { port = "any"; proto = "any"; host = "any"; } ];
|
||||
firewall.inbound = [ { port = "any"; proto = "any"; host = "any"; } ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 4242 ];
|
||||
}
|
9
nm-restart.nix
Normal file
9
nm-restart.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
systemd.services.NetworkManager.restartIfChanged = false;
|
||||
systemd.services.NetworkManager-dispatcher.restartIfChanged = false;
|
||||
systemd.services.NetworkManager-wait-online.restartIfChanged = false;
|
||||
systemd.services.wpa_supplicant.restartIfChanged = false;
|
||||
systemd.services.systemd-resolved.restartIfChanged = false;
|
||||
}
|
21
nvim05.nix
Normal file
21
nvim05.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
# nixpkgs.overlays = [ inputs.neovim-overlay.overlay ];
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
|
||||
# neovim-unwrapped = neovim-unwrapped.overrideDerivation (orig: {
|
||||
# patches = orig.patches ++ [ ];
|
||||
# });
|
||||
|
||||
# neovim-qt-unwrapped = neovim-qt-unwrapped.overrideDerivation (_: {
|
||||
# version = "0.2.17.9999";
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "equalsraf";
|
||||
# repo = "neovim-qt";
|
||||
# rev = "67cc4e414a8e64a475e55230818fab0f78415634";
|
||||
# sha256 = "sha256-3jYYY7T7L4rMsxIxJwY32izmlJKrrqbmU4DZ2Aow5uE=";
|
||||
# };
|
||||
# });
|
||||
};
|
||||
}
|
174
petalius.nix
174
petalius.nix
@ -3,42 +3,73 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common.nix
|
||||
./common-headless.nix
|
||||
./sway.nix
|
||||
# ./i3.nix
|
||||
./large-sw.nix
|
||||
./uefi.nix
|
||||
./fstrim.nix
|
||||
./atmega.nix
|
||||
./v4l2loopback.nix
|
||||
./huion.nix
|
||||
./nvim05.nix
|
||||
./nm-restart.nix
|
||||
# ./nebula.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
"rmi_smbus"
|
||||
"i2c_hid"
|
||||
"psmouse"
|
||||
];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c87491ed-0dd6-4eb4-bef2-fe4c707e91f2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E526-BAB7";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.settings.max-jobs = 4;
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
devices {
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "nvme0n1p2";
|
||||
boot.initrd.luks.devices = {
|
||||
nvme0n1p2 = {
|
||||
device = "/dev/disk/by-uuid/5ca3d7ec-3f9e-4a08-8bc2-b26bfc3459c5";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
dpi = 120;
|
||||
|
||||
libinput.enable = true;
|
||||
config = ''
|
||||
Section "InputClass"
|
||||
Identifier "touchpad"
|
||||
Driver "libinput"
|
||||
MatchDevicePath "/dev/input/event*"
|
||||
MatchIsPointer "true"
|
||||
EndSection
|
||||
'';
|
||||
|
||||
videoDrivers = [ "modesetting" ];
|
||||
useGlamor = true;
|
||||
};
|
||||
};
|
||||
|
||||
# services.xserver = {
|
||||
# dpi = 120;
|
||||
#
|
||||
# libinput.enable = true;
|
||||
# config = ''
|
||||
# Section "InputClass"
|
||||
# Identifier "touchpad"
|
||||
# Driver "libinput"
|
||||
# MatchDevicePath "/dev/input/event*"
|
||||
# MatchIsPointer "true"
|
||||
# EndSection
|
||||
# '';
|
||||
#
|
||||
# videoDrivers = [ "modesetting" ];
|
||||
# useGlamor = true;
|
||||
# };
|
||||
programs.light.enable = true;
|
||||
|
||||
services.tlp.enable = true;
|
||||
@ -46,29 +77,34 @@
|
||||
networking.hostName = "petalius";
|
||||
networking.hostId = "cf58caa9";
|
||||
|
||||
systemd.services.ModemManager = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# systemd.services.ModemManager = {
|
||||
# enable = true;
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# };
|
||||
|
||||
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: rec {
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
unison
|
||||
];
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# unison
|
||||
# ];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
storageDriver = "overlay2";
|
||||
};
|
||||
users.extraUsers.gebner.extraGroups = [ "docker" ];
|
||||
users.extraUsers.gebner.extraGroups = [ "libvirtd" ];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
#virtualisation.virtualbox.host.enable = true;
|
||||
virtualisation.waydroid.enable = true;
|
||||
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
|
||||
# virtualisation.virtualbox.host.enable = true;
|
||||
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_5_4;
|
||||
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_5_5;
|
||||
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages_4_19;
|
||||
boot.kernelPatches = [
|
||||
# { patch = ./len0073.patch; name = "len0073"; }
|
||||
];
|
||||
@ -76,14 +112,70 @@
|
||||
# "psmouse.synaptics_intertouch=1"
|
||||
"psmouse.proto=imps"
|
||||
];
|
||||
boot.kernelModules = [
|
||||
"rmi_smbus"
|
||||
"i2c_hid"
|
||||
"psmouse"
|
||||
];
|
||||
|
||||
# time.timeZone = pkgs.lib.mkOverride 10 "Asia/Tokyo";
|
||||
# time.timeZone = pkgs.lib.mkOverride 10 "Europe/London";
|
||||
# time.timeZone = pkgs.lib.mkOverride 10 "Europe/Lisbon";
|
||||
# time.timeZone = pkgs.lib.mkOverride 10 "US/Eastern";
|
||||
time.timeZone = pkgs.lib.mkOverride 10 "US/Pacific";
|
||||
|
||||
#services.avahi.nssmdns = true;
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
|
||||
networking.wireguard.interfaces.wg0 = {
|
||||
ips = ["10.59.0.2/16"];
|
||||
privateKeyFile = "/etc/wgkeys/petalius";
|
||||
allowedIPsAsRoutes = true;
|
||||
postSetup = ''
|
||||
${pkgs.systemd}/bin/resolvectl domain wg0 '~htdf.gebner.org' '~mtlaa.gebner.org' '~ams.gebner.org'
|
||||
${pkgs.systemd}/bin/resolvectl dns wg0 10.58.0.1
|
||||
'';
|
||||
peers = [{
|
||||
publicKey = "ByLlJbevlTBooAo2RIZGGJvBHKqA9qiOpHBvR5yuJX4=";
|
||||
allowedIPs = ["10.56.0.0/14" "10.60.1.1"];
|
||||
endpoint = "htdf-gw.gebner.org:35869";
|
||||
# endpoint = "80.109.29.104:35869";
|
||||
# endpoint = "127.0.0.1:35869";
|
||||
}];
|
||||
};
|
||||
systemd.services.wireguard-wg0.wantedBy = pkgs.lib.mkOverride 10 [];
|
||||
|
||||
systemd.services.wstunnel = {
|
||||
path = [ pkgs.wstunnel ];
|
||||
wantedBy = [ "wireguard-wg0.service" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
wstunnel -L 35869:htdf-gw.gebner.org:35869 -u wss://gebner.org
|
||||
'';
|
||||
};
|
||||
|
||||
services.resolved = {
|
||||
domains = [];
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# environment.systemPackages = [
|
||||
# (pkgs.callPackage ./bluez-alsa.nix {})
|
||||
# ];
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
users.extraUsers.gebner2 = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
# "networkmanager"
|
||||
"audio"
|
||||
# "transmission"
|
||||
# "lxd"
|
||||
# "libvirtd"
|
||||
# "vboxusers"
|
||||
# "wireshark"
|
||||
"input" "tty" "audio" "video" "uinput"
|
||||
];
|
||||
# shell = "${pkgs.zsh}/bin/zsh";
|
||||
shell = "/run/current-system/sw/bin/fish";
|
||||
};
|
||||
|
||||
}
|
||||
|
38
pipewire.nix
Normal file
38
pipewire.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
users.extraUsers.gebner.extraGroups = [ "bluetooth" ];
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
# media-session.config.bluez-monitor.rules = [
|
||||
# {
|
||||
# # Matches all cards
|
||||
# matches = [ { "device.name" = "~bluez_card.*"; } ];
|
||||
# actions = {
|
||||
# "update-props" = {
|
||||
# "bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
||||
# "bluez5.msbc-support" = true;
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pulseaudio
|
||||
alsaUtils
|
||||
carla
|
||||
qjackctl
|
||||
pipewire.lib
|
||||
helvum
|
||||
];
|
||||
|
||||
}
|
32
pkgs/eclipse-5.nix
Normal file
32
pkgs/eclipse-5.nix
Normal file
@ -0,0 +1,32 @@
|
||||
with import <nixpkgs> {};
|
||||
stdenv.mkDerivation rec {
|
||||
name = "eclipse-clp-${version}";
|
||||
version = "5.10_147";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://eclipseclp.org/Distribution/Old/${version}/src/eclipse_src.tgz";
|
||||
sha256 = "1473b1byfjgygf80sqyjjl53pvybcyyr397w23f2gn64cv68f6qx";
|
||||
};
|
||||
|
||||
# configureFlags = [ "--without-tcl" ];
|
||||
|
||||
preConfigure = ''
|
||||
find -name Makefile.in | xargs sed -i "s,/bin/\(cp\|mv\|chmod\|pwd\),${coreutils}&,g"
|
||||
sed -i "s,/bin/pwd,pwd,g;s,/usr/bin/ranlib,ranlib,g" RUNME
|
||||
sed -i "s/-fforce-mem/-D_GNU_SOURCE/" configure
|
||||
cp sepia/include/*.h icparc_solvers/
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
ln -s Makefile.*_* Makefile # rename Makefile.x86_64_linux
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# eclipse puts files in bin/x86_64_linux...
|
||||
mv $out/bin/*/* $out/bin/
|
||||
rmdir $out/bin/*/
|
||||
'';
|
||||
|
||||
buildInputs = [ tcl-8_5 gmp ];
|
||||
# tcltk, java, mysqlclient, latex
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
{ nixpkgs ? import <nixpkgs> {} }: with nixpkgs;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gogs-${version}";
|
||||
version = "0.9.48";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/gogits/gogs/releases/download/v${version}/linux_amd64.zip";
|
||||
sha256 = "1z00lqcz7nwbyavs1mwgsr9zjnqrjjmqvxy43p8gap768y45pvlb";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath ${pam}/lib \
|
||||
gogs
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -ra ./ $out/
|
||||
'';
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
with import <nixpkgs> {};
|
||||
stdenv.mkDerivation rec {
|
||||
name = "yjp-${version}";
|
||||
version = "2017.02-b53";
|
||||
version = "2017.02-b75";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.yourkit.com/download/${name}.zip";
|
||||
sha256 = "0ms1pq5badk6wb468s6kxqb2c9ll1sbjz2p61sdbpjp59a1sv2gx";
|
||||
url = "https://www.yourkit.com/download/YourKit-JavaProfiler-${version}.zip";
|
||||
sha256 = "0m0xjyp2plwpfgy2fps86k3cqv49268s4piasyszc00gf5n5cban";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip makeWrapper patchelf ];
|
||||
|
31
pulseaudio.nix
Normal file
31
pulseaudio.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
zeroconf.discovery.enable = true;
|
||||
daemon.config = {
|
||||
flat-volumes = "no";
|
||||
avoid-resampling = "yes";
|
||||
resample-method = "speex-float-10";
|
||||
default-sample-format = "s32le";
|
||||
default-sample-rate = "96000";
|
||||
};
|
||||
# package = pkgs.pulseaudio-hsphfpd;
|
||||
package = pkgs.pulseaudioFull;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
};
|
||||
|
||||
# hardware.bluetooth.hsphfpd.enable = true;
|
||||
|
||||
users.extraUsers.gebner.extraGroups = [ "bluetooth" ];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# causes recompilation
|
||||
# nixpkgs.config.pulseaudio = true;
|
||||
|
||||
}
|
29
qemu-user.nix
Normal file
29
qemu-user.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
arm = {
|
||||
interpreter = "${pkgs.qemu}/bin/qemu-arm";
|
||||
magicOrExtension = ''\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'';
|
||||
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff'';
|
||||
};
|
||||
aarch64 = {
|
||||
interpreter = "${pkgs.qemu}/bin/qemu-aarch64";
|
||||
magicOrExtension = ''\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00'';
|
||||
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff'';
|
||||
};
|
||||
riscv64 = {
|
||||
interpreter = "${pkgs.qemu}/bin/qemu-riscv64";
|
||||
magicOrExtension = ''\x7fELF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x00'';
|
||||
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff'';
|
||||
};
|
||||
in {
|
||||
boot.binfmt.registrations = {
|
||||
inherit arm;
|
||||
inherit aarch64;
|
||||
inherit riscv64;
|
||||
};
|
||||
nix.extraOptions = ''
|
||||
extra-platforms = armv6l-linux armv7l-linux aarch64-linux riscv64-linux i686-linux
|
||||
'';
|
||||
nix.sandboxPaths = [ "/run/binfmt" "${pkgs.qemu}" ];
|
||||
}
|
16
remote-ssh-install-cd.nix
Normal file
16
remote-ssh-install-cd.nix
Normal file
@ -0,0 +1,16 @@
|
||||
with import <nixpkgs> {};
|
||||
(pkgs.nixos ({ config, pkgs, ... }: {
|
||||
imports = [
|
||||
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
|
||||
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
|
||||
];
|
||||
|
||||
networking.hostName = "nixos-install";
|
||||
|
||||
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmLT+dRGdvDQS/1+34f86Dr62UUUCyoBoQDa3Keyy0oMQqdgWK+4qIVOzvKKn2/nZ7rbNDXEnZ1wJ2+BvQ8V1QAl7I6GvkLJifZpztZ9B0o8t6fnGRMoi3BXu2cdb+HBvKvTZH0A+WU/OEwc4HF/+o2DyrTytYNucBgWaIUGZDw4RzUfoAurQ827Eslrz34qRaEk/Q+BGE2G8bDzrEHmf2wR6apuA7mF0961CNq09DNtYUTuxnqWVuzg1yOFQ0e8K4NzjqvRoproK3472/6Wifg20V7CoKE/81IocfVCuCvLuUyyQ6HHlq7MmJowCZzGs6L7SmXOMeponUTSZ1ivZ9 gebner@archachatina"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9n0cCLVTBg8IhXvonlNU3kJ5ScOVzoHdnXaffVAq+UihNQYayDtLlFetYD4RvjAgoxb8xkLKM0PWjYJicVntuPz0GhHVKlZeWIqgDG+Ec8w+7PI2Fc2WF1fLatTRBH7lwDMd7eEhPLPY5FVfqTtvEAL6aIV9uzJ0coHeh1GPp6YQ9kgobuGTxpa0r8wtd/7Q7uKkkuxfqZW6Aig56xohNYHkcI2LAJgv5e4Cim1GR/2kXY4EHfxPfxAhzx0ZIxRdp0kAmkLHEbeEUASs1kd6n/5XtmJgjl9605QrCXrKXQXf+czTbjKu5isOimFdKlXwLZYVaZd1iPPvzSNcYhMat gebner@petalius"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMTO3cgQHCgHEBK8SeHJ+Nh/pNHCBASw04VCnuVBv9EW1gApGLx4K1F1nsS/TJR9N+ayxADbAfKOTyJ5Dj6AyG16im8UM1or+GMpkXeY+t9HbFt7aHt8Ogn3P4G7VZyEwTvTEifNjmCrIdaAFnDztBoGMo0oR8MT+ry58byiMH5tIlt8yKsYdE5M1UzAyrwbTmAf8N3WxgQQv1wTvIET9+OrcY4Pw1z55Tft44ZdvQDghCRTUHz9kGpHSlOXYxa0ht+pPRLiufbsAvs5Ue+TwQmVVuAHbGn+tNrBlvYPjuNHCfiXXcGiBqNVNaWb28DCCCuchzpu9hAUXr8MbQuOnH gebner@decoysnail"
|
||||
];
|
||||
})).isoImage
|
27
rtl8761b.nix
Normal file
27
rtl8761b.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
hardware.firmware = with pkgs; [ (stdenv.mkDerivation rec {
|
||||
name = "rtl8761b-fw";
|
||||
|
||||
fw = fetchurl {
|
||||
url = "https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/e58b611f34f2f5ff57bb0d8cdf1b2e4751e3ccbd/bt/rtkbt/Firmware/BT/rtl8761b_fw";
|
||||
sha256 = "0b59a1f2422c006837c4b5e46b59d49bfdbca1defb958adbbc0d57ebdc19cc82";
|
||||
};
|
||||
config = fetchurl {
|
||||
url = "https://github.com/Realtek-OpenSource/android_hardware_realtek/raw/e58b611f34f2f5ff57bb0d8cdf1b2e4751e3ccbd/bt/rtkbt/Firmware/BT/rtl8761b_config";
|
||||
sha256 = "aa86a092ee58e96256331d5c28c199ceaadec434460e98e7dea20e411e1aa570";
|
||||
};
|
||||
|
||||
unpackPhase = ":";
|
||||
buildPhase = ''
|
||||
dn=$out/lib/firmware
|
||||
mkdir -p $dn/rtl_bt
|
||||
ln -s ${fw} $dn/rtl_bt/rtl8761b_fw.bin
|
||||
ln -s ${config} $dn/rtl_bt/rtl8761b_config.bin
|
||||
'';
|
||||
installPhase = ":";
|
||||
}) ];
|
||||
|
||||
}
|
22
spacenav.nix
Normal file
22
spacenav.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
spnavcfg
|
||||
];
|
||||
|
||||
hardware.spacenavd.enable = true;
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; {
|
||||
spacenavd = spacenavd.overrideDerivation (_: {
|
||||
patches = spacenavd.patches ++ [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/FreeSpacenav/spacenavd/commit/fbf9019470f2511d24a368e2c9113361b58483d5.patch";
|
||||
sha256 = "1i98c3k4x8f35kpfp4b9xcwgq45mdjab2frp8c2jl6y62fs84d6j";
|
||||
})
|
||||
];
|
||||
});
|
||||
};
|
||||
|
||||
}
|
84
sway.nix
Normal file
84
sway.nix
Normal file
@ -0,0 +1,84 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common-gui.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
i3status
|
||||
(waybar.override { pulseSupport = true; })
|
||||
rofi-wayland
|
||||
ydotool
|
||||
wtype
|
||||
wl-clipboard
|
||||
feh
|
||||
gnome3.gnome-keyring
|
||||
networkmanagerapplet
|
||||
pcmanfm
|
||||
evince
|
||||
grim
|
||||
mako
|
||||
pavucontrol
|
||||
paprefs
|
||||
gnome3.dconf-editor
|
||||
|
||||
xdg_utils # for xdg-open
|
||||
|
||||
# gnome3 core packages
|
||||
desktop-file-utils shared-mime-info
|
||||
glib gtk3
|
||||
glib-networking gvfs dconf
|
||||
gnome-themes-extra gnome3.adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
|
||||
# for QT_QPA_PLATFORM=wayland
|
||||
qt5.qtwayland
|
||||
|
||||
wdisplays
|
||||
|
||||
playerctl
|
||||
|
||||
xorg.xlsclients
|
||||
];
|
||||
|
||||
# services.dbus.socketActivated = true;
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
|
||||
wrapperFeatures.gtk = true;
|
||||
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
|
||||
# https://github.com/swaywm/sway/issues/4506
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
# export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
|
||||
# Fix for some Java AWT applications (e.g. Android Studio),
|
||||
# use this if they aren't displayed properly:
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
||||
# rust winit's wayland support is broken for input methods
|
||||
export WINIT_UNIX_BACKEND=x11
|
||||
|
||||
export XDG_DATA_DIRS=/run/current-system/sw/share/''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
|
||||
export $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg)
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
'';
|
||||
};
|
||||
|
||||
# services.xserver = {
|
||||
# enable = true;
|
||||
# libinput.enable = true;
|
||||
# # displayManager.lightdm.enable = true;
|
||||
# displayManager.defaultSession = "sway";
|
||||
# };
|
||||
|
||||
services.dbus.packages = with pkgs; [ mako ];
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
||||
|
||||
}
|
9
tailscale.nix
Normal file
9
tailscale.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, pkgs, ... }: {
|
||||
# make the tailscale command usable to users
|
||||
environment.systemPackages = [ pkgs.tailscale ];
|
||||
|
||||
# enable the tailscale service
|
||||
services.tailscale.enable = true;
|
||||
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
}
|
74
theba.nix
74
theba.nix
@ -1,74 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./common.nix
|
||||
./large-sw.nix
|
||||
./uefi.nix
|
||||
./fstrim.nix
|
||||
];
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
devices {
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
boot.initrd.luks.devices = [
|
||||
{
|
||||
name = "sda2_crypt";
|
||||
device = "/dev/disk/by-uuid/a7482f34-1d7b-4181-9f3c-f6bbbdb8679d";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
}
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
libinput.enable = true;
|
||||
config = ''
|
||||
Section "InputClass"
|
||||
Identifier "touchpad"
|
||||
Driver "libinput"
|
||||
MatchDevicePath "/dev/input/event*"
|
||||
MatchIsPointer "true"
|
||||
EndSection
|
||||
'';
|
||||
|
||||
videoDrivers = [ "modesetting" ];
|
||||
useGlamor = true;
|
||||
};
|
||||
programs.light.enable = true;
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
networking.hostName = "theba"; # Define your hostname.
|
||||
networking.hostId = "b29b900f";
|
||||
|
||||
# services.colord.enable = true;
|
||||
|
||||
systemd.services.ModemManager.enable = true;
|
||||
|
||||
hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: rec {
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
unison
|
||||
];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
storageDriver = "overlay2";
|
||||
};
|
||||
users.extraUsers.gebner.extraGroups = [ "docker" ];
|
||||
|
||||
# virtualisation.virtualbox.host.enable = true;
|
||||
|
||||
# boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
|
||||
|
||||
# time.timeZone = pkgs.lib.mkOverride 10 "Europe/London";
|
||||
|
||||
services.avahi.nssmdns = true;
|
||||
|
||||
}
|
2
uefi.nix
2
uefi.nix
@ -4,6 +4,4 @@
|
||||
# Use the gummiboot efi boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.initrd.kernelModules = [ "fbcon" ];
|
||||
}
|
||||
|
11
unstable-nix.nix
Normal file
11
unstable-nix.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
nix.package = pkgs.nixUnstable;
|
||||
|
||||
nix.extraOptions = ''
|
||||
experimental-features = flakes nix-command
|
||||
'';
|
||||
|
||||
}
|
10
v4l2loopback.nix
Normal file
10
v4l2loopback.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
boot = {
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
};
|
||||
|
||||
}
|
75
vaccaria.nix
75
vaccaria.nix
@ -3,6 +3,7 @@
|
||||
{
|
||||
imports =
|
||||
[
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./common-headless.nix
|
||||
];
|
||||
|
||||
@ -15,12 +16,7 @@
|
||||
hostId = "3d551a7c";
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
users.extraUsers.gebner = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "transmission"];
|
||||
};
|
||||
users.extraUsers.gebner.extraGroups = ["transmission"];
|
||||
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
boot.kernelPackages = pkgs.lib.mkOverride 10 pkgs.linuxPackages;
|
||||
@ -32,11 +28,21 @@
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home/drebner" = pkgs.lib.mkOverride 10 {
|
||||
device = "vaccaria/drebner";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
users.extraUsers.drebner = {
|
||||
isNormalUser = true;
|
||||
};
|
||||
|
||||
services.samba = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
passdb backend = tdbsam
|
||||
unix password sync = no
|
||||
min protocol = NT1
|
||||
'';
|
||||
shares = {
|
||||
export = {
|
||||
@ -44,6 +50,11 @@
|
||||
"read only" = "no";
|
||||
path = "/mnt/vaccaria";
|
||||
};
|
||||
drebner = {
|
||||
"guest ok" = "no";
|
||||
"read only" = "no";
|
||||
path = "/home/drebner";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -61,6 +72,7 @@
|
||||
allowedTCPPorts = [
|
||||
445 139 # samba
|
||||
config.services.transmission.settings.peer-port
|
||||
config.services.rsyncd.port
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
137 138 # samba
|
||||
@ -70,32 +82,47 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
transmission
|
||||
samba
|
||||
rdiff-backup
|
||||
];
|
||||
|
||||
|
||||
# fancontrol
|
||||
boot.kernelModules = ["it87"];
|
||||
systemd.services.fancontrol =
|
||||
let fancontrolConfig = pkgs.writeText "fancontrol" ''
|
||||
# Configuration file generated by pwmconfig, changes will be lost
|
||||
INTERVAL=10
|
||||
DEVPATH=hwmon0=devices/pci0000:00/0000:00:18.3 hwmon2=devices/platform/it87.552
|
||||
DEVNAME=hwmon0=k10temp hwmon2=it8720
|
||||
FCTEMPS=hwmon2/pwm3=hwmon0/temp1_input hwmon2/pwm1=hwmon0/temp1_input
|
||||
FCFANS=hwmon2/pwm3=hwmon2/fan1_input hwmon2/pwm1=hwmon2/fan1_input
|
||||
MINTEMP=hwmon2/pwm3=40 hwmon2/pwm1=40
|
||||
MAXTEMP=hwmon2/pwm3=65 hwmon2/pwm1=65
|
||||
MINSTART=hwmon2/pwm3=150 hwmon2/pwm1=150
|
||||
MINSTOP=hwmon2/pwm3=0 hwmon2/pwm1=100
|
||||
''; in {
|
||||
description = "fancontrol from lm_sensors";
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig.ExecStart = "${pkgs.lm_sensors}/bin/fancontrol ${fancontrolConfig}";
|
||||
};
|
||||
# systemd.services.fancontrol =
|
||||
# let fancontrolConfig = pkgs.writeText "fancontrol" ''
|
||||
# # Configuration file generated by pwmconfig, changes will be lost
|
||||
# INTERVAL=10
|
||||
# DEVPATH=hwmon1=devices/pci0000:00/0000:00:18.3 hwmon0=devices/platform/it87.552
|
||||
# DEVNAME=hwmon1=k10temp hwmon0=it8720
|
||||
# FCTEMPS=hwmon0/pwm3=hwmon1/temp1_input hwmon0/pwm1=hwmon1/temp1_input
|
||||
# FCFANS=hwmon0/pwm3=hwmon0/fan1_input hwmon0/pwm1=hwmon0/fan1_input
|
||||
# MINTEMP=hwmon0/pwm3=40 hwmon0/pwm1=40
|
||||
# MAXTEMP=hwmon0/pwm3=65 hwmon0/pwm1=65
|
||||
# MINSTART=hwmon0/pwm3=150 hwmon0/pwm1=150
|
||||
# MINSTOP=hwmon0/pwm3=0 hwmon0/pwm1=100
|
||||
# ''; in {
|
||||
# description = "fancontrol from lm_sensors";
|
||||
# wantedBy = ["multi-user.target"];
|
||||
# serviceConfig.ExecStart = "${pkgs.lm_sensors}/bin/fancontrol ${fancontrolConfig}";
|
||||
# };
|
||||
|
||||
# hdd spindown
|
||||
powerManagement.powerUpCommands = ''
|
||||
${pkgs.hdparm}/bin/hdparm -B127 -S100 /dev/sd{a,b,c,d,e,f}
|
||||
${pkgs.hdparm}/bin/hdparm -B200 -S0 /dev/sd{a,b,c,d,e,f}
|
||||
'';
|
||||
|
||||
services.rsyncd = {
|
||||
enable = true;
|
||||
modules = {
|
||||
lr_mobile = {
|
||||
path = "/mnt/vaccaria/fotos/lr_mobile";
|
||||
"read only" = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.gebner.openssh.authorizedKeys.keys = [
|
||||
''command="rdiff-backup --server --restrict-read-only /",no-port-forwarding,no-X11-forwarding,no-pty ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiZhy9mm9sUeomfe9Vj5JhNE4l7YOkj7Yiii5Ni2RzUyj/dc9pxvNJSI+om/ruwb1n2gIYi0bOpwrZGiyvrUrpiqLcOwU6IOYLxnQ3E9nHLX3rsGMIyJtMcoBOcTY/rJMogqA4m6uMaaPEaeBlS5F/qb5UGIvQ7YlW1rF75RJ/QXrdL3Y7R3OJbG90QGR5EThs/1HOEBUKgkEcPQDodzNvZ8hFtznWrCw5bMSQYGMfY4WBc1b7UdLaYZ6vghQgsZ5IyvFDvCNTHTfhObYhv71YMXDkocAyI8XecNP1hoJ67oZ1xn06LEUEMiuXIQ4Ss7RYZLzNc2yrd5RYqCdd4x1n backups@aruanus''
|
||||
];
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user