nixos
2configs
bgt-bot
hw
services
websites
3modules
machines
blue
coaxmetal
daedalus
dishfire
echelon
green
hilum
icarus
lasspi
littleT
mors
neoprism
orange
prism
radio
shodan
styx
ubik
wizard
xerxes
yellow
yubi
···
8
8
"prism"
9
9
"littleT"
10
10
];
11
11
-
remote_hosts = filter (h: h != config.networking.hostName) all_hosts;
11
11
+
remote_hosts = lib.filter (h: h != config.networking.hostName) all_hosts;
12
12
13
13
in {
14
14
imports = [
15
15
<stockholm/lass/2configs/container-networking.nix>
16
16
{ #hack for already defined
17
17
-
systemd.services."container@blue".reloadIfChanged = mkForce false;
17
17
+
systemd.services."container@blue".reloadIfChanged = lib.mkForce false;
18
18
systemd.services."container@blue".preStart = ''
19
19
${pkgs.mount}/bin/mount | ${pkgs.gnugrep}/bin/grep -q '^encfs on /var/lib/containers/blue'
20
20
'';
···
1
1
-
{ config, pkgs, ... }:
2
2
-
{
3
3
-
users.users.ciko = {
4
4
-
uid = genid_uint31 "ciko";
5
5
-
description = "acc for ciko";
6
6
-
home = "/home/ciko";
7
7
-
useDefaultShell = true;
8
8
-
createHome = true;
9
9
-
openssh.authorizedKeys.keys = [
10
10
-
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTUWm/fISw/gbuHvf3kwxGEuk1aY5HrNNvr8QXCQv0khDdaYmZSELbtFQtE04WGTWmackNcLpld5mETVyCM0BjOgqMJYQNhtywxfYcodEY5xxHCuGgA3S1t94MZub+DRodXCfB0yUV85Wbb0sltkMTJufMwYmLEGxSLRukxAOcNsXdjlyro96csmYrIiV6R7+REnz8OcR7sKlI4tvKA1mbvWmjbDBd1MZ8Jc0Lwf+b0H/rH69wEQIcB5HRHHJIChoAk0t2azSjXagk1+4AebONZTCKvTHxs/D2wUBIzoxyjmh5S0aso/cKw8qpKcl/A2mZiIvW3KMlJAM5U+RQKMrr"
11
11
-
];
12
12
-
isNormalUser = true;
13
13
-
};
14
14
-
15
15
-
system.activationScripts.user-shadow = ''
16
16
-
${pkgs.coreutils}/bin/chmod +x /home/ciko
17
17
-
'';
18
18
-
}
19
19
-
···
29
29
self.inputs.stockholm.nixosModules.systemd
30
30
self.inputs.stockholm.nixosModules.xresources
31
31
self.inputs.stockholm.nixosModules.ssh
32
32
+
self.inputs.stockholm.nixosModules.sync-containers3
32
33
{
33
34
users.extraUsers.mainUser.passwordFile = "${config.krebs.secret.directory}/passwordFile";
34
35
users.extraUsers.root.passwordFile = "${config.krebs.secret.directory}/passwordFile";
···
1
1
-
{ config, pkgs, ... }:
2
2
-
3
3
-
let
4
4
-
mainUser = config.users.extraUsers.mainUser;
5
5
-
6
6
-
in {
7
7
-
users.extraUsers = {
8
8
-
elster = {
9
9
-
name = "elster";
10
10
-
description = "user for running elster-online";
11
11
-
home = "/home/elster";
12
12
-
useDefaultShell = true;
13
13
-
extraGroups = [];
14
14
-
createHome = true;
15
15
-
isNormalUser = true;
16
16
-
};
17
17
-
};
18
18
-
krebs.per-user.elster.packages = [
19
19
-
pkgs.chromium
20
20
-
];
21
21
-
security.sudo.extraConfig = ''
22
22
-
${mainUser.name} ALL=(elster) NOPASSWD: ALL
23
23
-
'';
24
24
-
}
···
1
1
-
{ config, lib, pkgs, ... }: let
1
1
+
{ self, config, lib, pkgs, ... }: let
2
2
3
3
-
to = concatStringsSep "," [
3
3
+
to = lib.concatStringsSep "," [
4
4
"lass@green.r"
5
5
];
6
6
7
7
-
mails = import <secrets/mails.nix>;
7
7
+
mails = import "${config.krebs.secret.directory}/mails.nix"; # todo make this pure somehow
8
8
9
9
in {
10
10
+
imports = [
11
11
+
self.inputs.stockholm.nixosModules.exim-smarthost
12
12
+
];
10
13
environment.systemPackages = [ pkgs.review-mail-queue ];
11
14
12
15
krebs.exim-smarthost = {
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ config, lib, pkgs, ... }:
2
2
{
3
3
# ipv6 from vodafone is really really flaky
4
4
boot.kernel.sysctl."net.ipv6.conf.et0.disable_ipv6" = 1;
···
55
55
{ predicate = "-o int0"; target = "ACCEPT"; }
56
56
{ predicate = "-p ipv6-icmp"; target = "ACCEPT"; v4 = false; }
57
57
];
58
58
-
krebs.iptables.tables.nat.PREROUTING.rules = mkBefore [
58
58
+
krebs.iptables.tables.nat.PREROUTING.rules = lib.mkBefore [
59
59
{ v6 = false; predicate = "-s 10.42.0.0/24"; target = "ACCEPT"; }
60
60
];
61
61
krebs.iptables.tables.nat.POSTROUTING.rules = [
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, config, lib, pkgs, ... }:
2
2
let
3
3
-
3
3
+
git = self.inputs.stockholm.lib.git;
4
4
repos = krebs-repos;
5
5
-
rules = concatMap krebs-rules (attrValues krebs-repos);
5
5
+
rules = lib.concatMap krebs-rules (lib.attrValues krebs-repos);
6
6
7
7
-
krebs-repos = mapAttrs make-krebs-repo {
7
7
+
krebs-repos = lib.mapAttrs make-krebs-repo {
8
8
brain = { };
9
9
};
10
10
···
31
31
set-owners repo [ config.krebs.users.lass ] ++ set-ro-access repo krebsminister;
32
32
33
33
set-ro-access = with git; repo: user:
34
34
-
singleton {
35
35
-
inherit user;
36
36
-
repo = [ repo ];
37
37
-
perm = fetch;
38
38
-
};
34
34
+
lib.singleton {
35
35
+
inherit user;
36
36
+
repo = [ repo ];
37
37
+
perm = fetch;
38
38
+
};
39
39
40
40
set-owners = with git;repo: user:
41
41
-
singleton {
42
42
-
inherit user;
43
43
-
repo = [ repo ];
44
44
-
perm = push "refs/*" [ non-fast-forward create delete merge ];
45
45
-
};
41
41
+
lib.singleton {
42
42
+
inherit user;
43
43
+
repo = [ repo ];
44
44
+
perm = push "refs/*" [ non-fast-forward create delete merge ];
45
45
+
};
46
46
47
47
in {
48
48
+
imports = [
49
49
+
self.inputs.stockholm.nixosModules.git
50
50
+
];
48
51
krebs.git = {
49
52
enable = true;
50
53
cgit = {
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, config, lib, pkgs, ... }:
2
2
3
3
let
4
4
-
4
4
+
git = self.inputs.stockholm.lib.git;
5
5
out = {
6
6
+
imports = [
7
7
+
self.inputs.stockholm.nixosModules.git
8
8
+
];
6
9
services.nginx.enable = true;
7
10
krebs.git = {
8
11
enable = true;
···
31
34
32
35
repos =
33
36
public-repos //
34
34
-
optionalAttrs config.krebs.build.host.secure restricted-repos;
37
37
+
lib.optionalAttrs config.krebs.build.host.secure restricted-repos;
35
38
36
36
-
rules = concatMap make-rules (attrValues repos);
39
39
+
rules = lib.concatMap make-rules (lib.attrValues repos);
37
40
38
38
-
public-repos = mapAttrs make-public-repo {
41
41
+
public-repos = lib.mapAttrs make-public-repo {
39
42
Reaktor = {
40
43
cgit.desc = "Reaktor IRC bot";
41
44
cgit.section = "software";
···
119
122
cgit.desc = "krebs xmonad modules";
120
123
cgit.section = "configuration";
121
124
};
122
122
-
} // mapAttrs make-public-repo-silent {
123
125
};
124
126
125
125
-
restricted-repos = mapAttrs make-restricted-repo (
126
126
-
{
127
127
-
brain = {
128
128
-
collaborators = with config.krebs.users; [ tv makefu ];
129
129
-
announce = true;
130
130
-
};
127
127
+
restricted-repos = lib.mapAttrs make-restricted-repo {
128
128
+
brain = {
129
129
+
collaborators = with config.krebs.users; [ tv makefu ];
130
130
+
announce = true;
131
131
};
132
132
-
);
132
132
+
};
133
133
134
134
make-public-repo = name: { cgit ? {}, collaborators ? [], ... }: {
135
135
inherit cgit collaborators name;
···
159
159
public = false;
160
160
hooks = {
161
161
post-receive = ''
162
162
-
${optionalString announce (pkgs.git-hooks.irc-announce {
162
162
+
${lib.optionalString announce (pkgs.gystem.build.etct-hooks.irc-announce {
163
163
# TODO make nick = config.krebs.build.host.name the default
164
164
nick = config.krebs.build.host.name;
165
165
channel = "#xxx";
···
179
179
make-rules =
180
180
with git // config.krebs.users;
181
181
repo:
182
182
-
singleton {
182
182
+
lib.singleton {
183
183
user = [ lass lass-green ];
184
184
repo = [ repo ];
185
185
perm = push "refs/*" [ non-fast-forward create delete merge ];
186
186
} ++
187
187
-
optional (length (repo.admins or []) > 0) {
187
187
+
lib.optional (lib.length (repo.admins or []) > 0) {
188
188
user = repo.admins;
189
189
repo = [ repo ];
190
190
perm = push "refs/*" [ non-fast-forward create delete merge ];
191
191
} ++
192
192
-
optional (length (repo.collaborators or []) > 0) {
192
192
+
lib.optional (lib.length (repo.collaborators or []) > 0) {
193
193
user = repo.collaborators;
194
194
repo = [ repo ];
195
195
perm = fetch;
196
196
} ++
197
197
-
optional repo.public {
198
198
-
user = attrValues config.krebs.users;
197
197
+
lib.optional repo.public {
198
198
+
user = lib.attrValues config.krebs.users;
199
199
repo = [ repo ];
200
200
perm = fetch;
201
201
};
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, ... }:
2
2
{
3
3
+
imports = [
4
4
+
self.inputs.stockholm.nixosModules.go
5
5
+
self.inputs.stockholm.nixosModules.htgen
6
6
+
];
3
7
krebs.go = {
4
8
enable = true;
5
9
};
···
1
1
-
{ pkgs, ... }:
1
1
+
{ self, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
./mpv.nix
5
5
];
6
6
users.users.media = {
7
7
isNormalUser = true;
8
8
-
uid = genid_uint31 "media";
8
8
+
uid = self.inputs.stockholm.lib.genid_uint31 "media";
9
9
extraGroups = [ "video" "audio" "pipewire" ];
10
10
packages = [
11
11
(pkgs.writers.writeDashBin "mpv" ''
···
1
1
-
{ config, pkgs, ... }:
2
2
-
let
3
3
-
host-colors = {
4
4
-
mors = "131";
5
5
-
prism = "95";
6
6
-
uriel = "61";
7
7
-
shodan = "51";
8
8
-
icarus = "53";
9
9
-
echelon = "197";
10
10
-
cloudkrebs = "119";
11
11
-
};
12
12
-
urgent = [
13
13
-
"\\blass@blue\\b"
14
14
-
];
15
15
-
in {
16
16
-
environment.systemPackages = [
17
17
-
(pkgs.writeDashBin "logf" ''
18
18
-
export LOGF_URGENT=${pkgs.writeJSON "urgent" urgent}
19
19
-
export LOGF_HOST_COLORS=${pkgs.writeJSON "host-colors" host-colors}
20
20
-
${pkgs.logf}/bin/logf ${concatMapStringsSep " " (name: "root@${name}") (attrNames config.lass.hosts)}
21
21
-
'')
22
22
-
];
23
23
-
}
···
1
1
-
{ config, lib, pkgs, ... }: let
1
1
+
{ self, config, lib, pkgs, ... }: let
2
2
write_to_irc = chan: pkgs.writeDash "write_to_irc" ''
3
3
${pkgs.curl}/bin/curl -fsSv --unix-socket '${lib.removePrefix "unix:" config.krebs.reaktor2.mumble-reminder.API.listen}' http://z/ \
4
4
-H content-type:application/json \
···
60
60
};
61
61
62
62
in {
63
63
+
imports = [
64
64
+
self.inputs.stockholm.nixosModules.reaktor2
65
65
+
];
63
66
krebs.reaktor2.mumble-reminder = {
64
67
hostname = "irc.hackint.org";
65
68
nick = "lassulus__";
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ config, lib, pkgs, ... }:
2
2
3
3
{
4
4
services.nginx.virtualHosts.cyberlocker = {
···
104
104
krebs.htgen.paste-form = {
105
105
port = 7770;
106
106
script = /* sh */ ''
107
107
-
export PATH=${makeBinPath [
107
107
+
export PATH=${lib.makeBinPath [
108
108
pkgs.curl
109
109
pkgs.gnused
110
110
]}:$PATH
···
1
1
-
{ ... }:
1
1
+
{ config, ... }:
2
2
3
3
{
4
4
services.radicale = {
···
8
8
hosts = 0.0.0.0:5555
9
9
[auth]
10
10
type = htpasswd
11
11
-
htpasswd_filename = ${<secrets/radicale.htpasswd>}
11
11
+
htpasswd_filename = ${config.krebs.secret.directory}/radicale.htpasswd
12
12
htpasswd_encryption = plain
13
13
'';
14
14
};
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
3
3
-
let
4
4
-
hostname = config.krebs.build.host.name;
5
5
-
inherit (lib)
6
6
-
nameValuePair
7
7
-
;
8
8
-
9
9
-
in {
1
1
+
{ self, config, lib, pkgs, ... }:
2
2
+
{
3
3
+
imports = [
4
4
+
self.inputs.stockholm.nixosModules.realwallpaper
5
5
+
];
10
6
krebs.realwallpaper.enable = true;
11
7
12
8
system.activationScripts.wallpaper-chmod = ''
···
1
1
-
{ config, lib, pkgs, ... }: let
1
1
+
{ self, config, lib, pkgs, ... }: let
2
2
domains = [
3
3
"hackerfleet.eu"
4
4
"hackerfleet.de"
5
5
];
6
6
in {
7
7
+
imports = [
8
8
+
self.inputs.stockholm.nixosModules.exim-smarthost
9
9
+
];
7
10
containers.riot = {
8
11
config = {
9
12
environment.systemPackages = [
···
1
1
-
{ config, pkgs, ... }:
2
2
-
3
3
-
{
4
4
-
environment.systemPackages = [
5
5
-
pkgs.termite
6
6
-
];
7
7
-
8
8
-
krebs.per-user.lass.packages = let
9
9
-
termitecfg = pkgs.writeTextFile {
10
10
-
name = "termite-config";
11
11
-
destination = "/etc/xdg/termite/config";
12
12
-
text = ''
13
13
-
[colors]
14
14
-
foreground = #d0d7d0
15
15
-
background = #000000
16
16
-
'';
17
17
-
};
18
18
-
in [
19
19
-
termitecfg
20
20
-
];
21
21
-
}
···
11
11
config.krebs.users.lass-mors.pubkey
12
12
config.krebs.users.lass-green.pubkey
13
13
];
14
14
-
hostKeys = [ <secrets/initrd/ssh.ed25519_key> ];
14
14
+
hostKeys = [ "${config.krebs.secret.directory}/ssh.ed25519_key" ];
15
15
};
16
16
boot.initrd.availableKernelModules = [ "e1000e" ];
17
17
18
18
boot.initrd.secrets = {
19
19
-
"/etc/tor/onion/bootup" = ${config.krebs.secret.directory}/initrd;
19
19
+
"/etc/tor/onion/bootup" = "${config.krebs.secret.directory}/initrd";
20
20
};
21
21
22
22
boot.initrd.extraUtilsCommands = ''
···
125
125
let g:fzf_layout = { 'down': '~15%' }
126
126
'';
127
127
128
128
-
extra-runtimepath = lib.concatMapStringsSep "," (pkg: "${pkg.rtp}") [
128
128
+
extra-runtimepath = lib.concatMapStringsSep "," (pkg: "${pkg.outPath}") [
129
129
pkgs.vimPlugins.copilot-vim
130
130
pkgs.vimPlugins.undotree
131
131
pkgs.vimPlugins.fzf-vim
···
4
4
./dnsmasq.nix
5
5
./drbd.nix
6
6
./folderPerms.nix
7
7
-
./hosts.nix
8
7
./klem.nix
9
8
./mysql-backup.nix
10
9
./nichtparasoup.nix
···
1
1
-
{ config, lib, ... }:
2
2
-
3
3
-
with lib;
4
4
-
5
5
-
{
6
6
-
options.lass.hosts = mkOption {
7
7
-
type = types.attrsOf types.host;
8
8
-
default =
9
9
-
filterAttrs (_: host: host.owner.name == "lass" && host.ci)
10
10
-
config.krebs.hosts;
11
11
-
};
12
12
-
}
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, pkgs, ... }:
2
2
let
3
3
4
4
bot_port = "7654";
5
5
irc_channel = "#binaergewitter";
6
6
in
7
7
{
8
8
+
imports = [
9
9
+
self.inputs.stockholm.nixosModules.reaktor2
10
10
+
];
8
11
krebs.reaktor2.bgt-announce = {
9
12
hostname = "irc.libera.chat";
10
13
port = "6697";
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ self, config, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
<stockholm/krebs/2configs/hw/x220.nix>
4
4
+
(self.inputs.stockholm + "/krebs/2configs/hw/x220.nix")
5
5
];
6
6
7
7
boot = {
···
1
1
-
{ config, pkgs, lib, ... }:
1
1
+
{ self, config, pkgs, lib, ... }:
2
2
3
3
let
4
4
5
5
-
inherit (import <stockholm/lib>)
6
6
-
genid
5
5
+
inherit (self.inputs.stockholm.lib)
7
6
genid_uint31
8
7
;
9
9
-
inherit (import <stockholm/lass/2configs/websites/util.nix> {inherit lib pkgs;})
8
8
+
inherit (import ./util.nix {inherit lib pkgs;})
10
9
servePage
11
10
serveOwncloud
12
11
serveWordpress;
···
23
22
24
23
in {
25
24
imports = [
25
25
+
self.inputs.stockholm.nixosModules.acl
26
26
+
self.inputs.stockholm.nixosModules.on-failure
26
27
./default.nix
27
28
./sqlBackup.nix
28
29
(servePage [ "aldonasiech.com" "www.aldonasiech.com" ])
···
101
102
path = "/run/nextcloud.pw";
102
103
owner.name = "nextcloud";
103
104
group-name = "nextcloud";
104
104
-
source-path = toString <secrets> + "/nextcloud_pw";
105
105
+
source-path = "${config.krebs.secret.directory}/nextcloud_pw";
105
106
};
106
107
services.nextcloud = {
107
108
enable = true;
···
412
413
services.restic.backups.domsen = {
413
414
initialize = true;
414
415
repository = "/backups/domsen";
415
415
-
passwordFile = toString <secrets> + "/domsen_backup_pw";
416
416
+
passwordFile = "${config.krebs.secret.directory}/domsen_backup_pw";
416
417
timerConfig = { OnCalendar = "00:05"; RandomizedDelaySec = "5h"; };
417
418
paths = [
418
419
"/home/domsen/Mail"
···
1
1
{ config, lib, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
../../
4
4
+
../../.
5
5
../../2configs
6
6
../../2configs/retiolum.nix
7
7
../../2configs/exim-retiolum.nix
···
2
2
3
3
{
4
4
imports = [
5
5
-
<stockholm/lass>
6
6
-
7
7
-
<stockholm/lass/2configs/retiolum.nix>
8
8
-
<stockholm/lass/2configs/exim-retiolum.nix>
9
9
-
<stockholm/lass/2configs/baseX.nix>
10
10
-
<stockholm/lass/2configs/browsers.nix>
11
11
-
<stockholm/lass/2configs/programs.nix>
12
12
-
<stockholm/lass/2configs/network-manager.nix>
13
13
-
<stockholm/lass/2configs/syncthing.nix>
14
14
-
<stockholm/lass/2configs/sync/sync.nix>
15
15
-
<stockholm/lass/2configs/games.nix>
16
16
-
<stockholm/lass/2configs/steam.nix>
17
17
-
<stockholm/lass/2configs/wine.nix>
18
18
-
<stockholm/lass/2configs/fetchWallpaper.nix>
19
19
-
<stockholm/lass/2configs/yellow-mounts/samba.nix>
20
20
-
<stockholm/lass/2configs/pass.nix>
21
21
-
<stockholm/lass/2configs/mail.nix>
22
22
-
<stockholm/lass/2configs/bitcoin.nix>
23
23
-
<stockholm/lass/2configs/review.nix>
24
24
-
<stockholm/lass/2configs/dunst.nix>
25
25
-
# <stockholm/krebs/2configs/ircd.nix>
5
5
+
../../.
6
6
+
../../2configs/retiolum.nix
7
7
+
../../2configs/exim-retiolum.nix
8
8
+
../../2configs/baseX.nix
9
9
+
../../2configs/browsers.nix
10
10
+
../../2configs/programs.nix
11
11
+
../../2configs/network-manager.nix
12
12
+
../../2configs/syncthing.nix
13
13
+
../../2configs/sync/sync.nix
14
14
+
../../2configs/games.nix
15
15
+
../../2configs/steam.nix
16
16
+
../../2configs/wine.nix
17
17
+
../../2configs/fetchWallpaper.nix
18
18
+
../../2configs/yellow-mounts/samba.nix
19
19
+
../../2configs/pass.nix
20
20
+
../../2configs/mail.nix
21
21
+
../../2configs/bitcoin.nix
22
22
+
../../2configs/review.nix
23
23
+
../../2configs/dunst.nix
26
24
];
27
25
28
26
krebs.build.host = config.krebs.hosts.coaxmetal;
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ self, config, lib, pkgs, ... }:
2
2
3
3
{
4
4
imports = [
5
5
-
../../
5
5
+
../../.
6
6
7
7
../../2configs/retiolum.nix
8
8
../../2configs/pipewire.nix
9
9
{
10
10
# bubsy config
11
11
users.users.bubsy = {
12
12
-
uid = genid "bubsy";
12
12
+
uid = self.inputs.stockholm.lib.genid "bubsy";
13
13
home = "/home/bubsy";
14
14
group = "users";
15
15
createHome = true;
···
23
23
isNormalUser = true;
24
24
};
25
25
networking.networkmanager.enable = true;
26
26
-
networking.wireless.enable = mkForce false;
26
26
+
networking.wireless.enable = lib.mkForce false;
27
27
# programs.chromium = {
28
28
# enable = true;
29
29
# extensions = [
···
1
1
+
{ self, ... }:
1
2
{
2
3
imports = [
3
4
./config.nix
4
4
-
<stockholm/lass/2configs/hw/x220.nix>
5
5
-
<stockholm/lass/2configs/boot/coreboot.nix>
5
5
+
(self.inputs.stockholm + "/krebs/2configs/hw/x220.nix")
6
6
+
../../2configs/boot/coreboot.nix
6
7
];
7
8
8
9
fileSystems = {
···
2
2
3
3
{
4
4
imports = [
5
5
-
<stockholm/lass>
6
6
-
<stockholm/lass/2configs/retiolum.nix>
7
7
-
<stockholm/lass/2configs/monitoring/prometheus.nix>
8
8
-
<stockholm/lass/2configs/monitoring/telegraf.nix>
9
9
-
<stockholm/lass/2configs/consul.nix>
5
5
+
../../.
6
6
+
../../2configs/retiolum.nix
7
7
+
../../2configs/monitoring/prometheus.nix
8
8
+
../../2configs/monitoring/telegraf.nix
9
9
+
../../2configs/consul.nix
10
10
];
11
11
12
12
krebs.build.host = config.krebs.hosts.dishfire;
···
1
1
{ config, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
<stockholm/lass>
5
5
-
6
6
-
<stockholm/lass/2configs/retiolum.nix>
7
7
-
<stockholm/lass/2configs/tor-initrd.nix>
8
8
-
<stockholm/lass/2configs/syncthing.nix>
9
9
-
<stockholm/lass/2configs/green-host.nix>
4
4
+
../../.
5
5
+
../../2configs/retiolum.nix
6
6
+
../../2configs/tor-initrd.nix
7
7
+
../../2configs/syncthing.nix
8
8
+
../../2configs/green-host.nix
10
9
];
11
10
12
11
krebs.build.host = config.krebs.hosts.echelon;
···
1
1
{ config, lib, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
../../
4
4
+
../../.
5
5
../../2configs
6
6
../../2configs/retiolum.nix
7
7
../../2configs/exim-retiolum.nix
···
1
1
{ config, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
<stockholm/lass>
5
5
-
6
6
-
<stockholm/lass/2configs/retiolum.nix>
7
7
-
# <stockholm/lass/2configs/baseX.nix>
8
8
-
# <stockholm/lass/2configs/pipewire.nix>
9
9
-
# <stockholm/lass/2configs/browsers.nix>
10
10
-
# <stockholm/lass/2configs/programs.nix>
11
11
-
<stockholm/lass/2configs/network-manager.nix>
12
12
-
# <stockholm/lass/2configs/mail.nix>
13
13
-
<stockholm/lass/2configs/syncthing.nix>
14
14
-
# <stockholm/lass/2configs/nfs-dl.nix>
4
4
+
../../.
5
5
+
../../2configs/retiolum.nix
6
6
+
../../2configs/network-manager.nix
7
7
+
../../2configs/syncthing.nix
15
8
];
16
9
17
10
krebs.build.host = config.krebs.hosts.hilum;
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, modulesPath, config, lib, pkgs, ... }:
2
2
3
3
{
4
4
imports = [
5
5
./config.nix
6
6
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
6
6
+
(modulesPath + "/installer/scan/not-detected.nix")
7
7
+
self.inputs.disko.nixosModules.disko
7
8
{
8
9
# nice hack to carry around state passed impurely at the beginning
9
10
options.mainDisk = let
···
2
2
3
3
{
4
4
imports = [
5
5
-
../../
5
5
+
../../.
6
6
7
7
-
../../2configs/mouse.nix>
8
8
-
../../2configs/retiolum.nix>
9
9
-
../../2configs/git.nix>
10
10
-
../../2configs/exim-retiolum.nix>
11
11
-
../../2configs/baseX.nix>
12
12
-
../../2configs/pipewire.nix>
13
13
-
../../2configs/browsers.nix>
14
14
-
../../2configs/programs.nix>
15
15
-
../../2configs/fetchWallpaper.nix>
16
16
-
../../2configs/games.nix>
17
17
-
../../2configs/bitcoin.nix>
18
18
-
../../2configs/wine.nix>
19
19
-
../../2configs/network-manager.nix>
20
20
-
../../2configs/red-host.nix>
21
21
-
../../2configs/ipfs.nix>
22
22
-
../../2configs/snapclient.nix>
23
23
-
../../2configs/consul.nix>
7
7
+
../../2configs/mouse.nix
8
8
+
../../2configs/retiolum.nix
9
9
+
../../2configs/git.nix
10
10
+
../../2configs/exim-retiolum.nix
11
11
+
../../2configs/baseX.nix
12
12
+
../../2configs/pipewire.nix
13
13
+
../../2configs/browsers.nix
14
14
+
../../2configs/programs.nix
15
15
+
../../2configs/fetchWallpaper.nix
16
16
+
../../2configs/games.nix
17
17
+
../../2configs/bitcoin.nix
18
18
+
../../2configs/wine.nix
19
19
+
../../2configs/network-manager.nix
20
20
+
../../2configs/red-host.nix
21
21
+
../../2configs/ipfs.nix
22
22
+
../../2configs/snapclient.nix
23
23
+
../../2configs/consul.nix
24
24
{ # === logging playground ===
25
25
# --- client ---
26
26
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, modulesPath, lib, ... }:
2
2
{
3
3
imports = [
4
4
./config.nix
5
5
-
#<stockholm/lass/2configs/hw/x220.nix>
6
6
-
#<stockholm/lass/2configs/boot/universal.nix>
7
7
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
8
8
-
<stockholm/krebs/2configs/hw/x220.nix>
5
5
+
(modulesPath + "/installer/scan/not-detected.nix")
6
6
+
(self.inputs.stockholm + "/krebs/2configs/hw/x220.nix")
9
7
];
10
8
11
9
boot.loader.grub.enable = true;
···
3
3
in
4
4
{
5
5
imports = [
6
6
-
<stockholm/lass>
7
7
-
<stockholm/lass/2configs>
8
8
-
<stockholm/lass/2configs/retiolum.nix>
6
6
+
../../.
7
7
+
../../2configs
8
8
+
../../2configs/retiolum.nix
9
9
];
10
10
11
11
krebs.build.host = config.krebs.hosts.lasspi;
···
1
1
-
{ config, pkgs, ... }:
2
2
-
3
3
-
{
4
4
-
imports = [
5
5
-
../../
6
6
-
7
7
-
../../2configs/retiolum.nix
8
8
-
../../2configs/blue-host.nix
9
9
-
../../2configs/green-host.nix
10
10
-
../../2configs/syncthing.nix
11
11
-
];
12
12
-
13
13
-
networking.networkmanager.enable = true;
14
14
-
networking.wireless.enable = mkForce false;
15
15
-
time.timeZone = "Europe/Berlin";
16
16
-
17
17
-
hardware.trackpoint = {
18
18
-
enable = true;
19
19
-
sensitivity = 220;
20
20
-
speed = 0;
21
21
-
emulateWheel = true;
22
22
-
};
23
23
-
24
24
-
services.logind.extraConfig = ''
25
25
-
HandleLidSwitch=ignore
26
26
-
'';
27
27
-
28
28
-
krebs.build.host = config.krebs.hosts.littleT;
29
29
-
}
···
1
1
-
{
2
2
-
imports = [
3
3
-
./config.nix
4
4
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
5
5
-
];
6
6
-
fileSystems."/" =
7
7
-
{ device = "rpool/root";
8
8
-
fsType = "zfs";
9
9
-
};
10
10
-
11
11
-
fileSystems."/boot" =
12
12
-
{ device = "/dev/disk/by-uuid/5B2E-3734";
13
13
-
fsType = "vfat";
14
14
-
};
15
15
-
boot.loader.grub.enable = true;
16
16
-
boot.loader.grub.version = 2;
17
17
-
boot.loader.grub.efiSupport = true;
18
18
-
boot.loader.grub.efiInstallAsRemovable = true;
19
19
-
boot.loader.grub.device = "nodev";
20
20
-
networking.hostId = "584248c6";
21
21
-
22
22
-
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
23
23
-
boot.kernelModules = [ "kvm-intel" ];
24
24
-
25
25
-
}
···
2
2
3
3
{
4
4
imports = [
5
5
-
../../
5
5
+
../../.
6
6
7
7
../../2configs/mouse.nix
8
8
../../2configs/retiolum.nix
···
14
14
../../2configs/browsers.nix
15
15
../../2configs/games.nix
16
16
../../2configs/pass.nix
17
17
-
../../2configs/elster.nix
18
17
../../2configs/steam.nix
19
18
../../2configs/wine.nix
20
19
../../2configs/fetchWallpaper.nix
21
20
../../2configs/mail.nix
22
22
-
../../2configs/logf.nix
23
21
../../2configs/syncthing.nix
24
22
../../2configs/sync/sync.nix
25
23
../../2configs/sync/decsync.nix
···
121
119
"virtual"
122
120
];
123
121
};
124
124
-
};
125
125
-
126
126
-
krebs.repo-sync.timerConfig = {
127
127
-
OnCalendar = "00:37";
128
122
};
129
123
130
124
nixpkgs.config.android_sdk.accept_license = true;
···
1
1
{
2
2
imports = [
3
3
./config.nix
4
4
-
<stockholm/lass/2configs/hw/x220.nix>
5
5
-
<stockholm/lass/2configs/boot/universal.nix>
4
4
+
../../2configs/hw/x220.nix
5
5
+
../../2configs/boot/universal.nix
6
6
];
7
7
8
8
boot.kernelParams = [ "acpi_backlight=native" ];
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, config, lib, pkgs, ... }:
2
2
3
3
{
4
4
imports = [
5
5
-
<stockholm/lass>
6
6
-
<stockholm/lass/2configs/retiolum.nix>
7
7
-
<stockholm/lass/2configs/mail/internet-gateway.nix>
8
8
-
<stockholm/lass/2configs/binary-cache/server.nix>
9
9
-
<stockholm/lass/2configs/matrix.nix>
10
10
-
<stockholm/lass/2configs/gsm-wiki.nix>
5
5
+
../../.
6
6
+
../../2configs/retiolum.nix
7
7
+
../../2configs/mail/internet-gateway.nix
8
8
+
../../2configs/binary-cache/server.nix
9
9
+
../../2configs/matrix.nix
10
10
+
../../2configs/gsm-wiki.nix
11
11
12
12
# sync-containers
13
13
-
<stockholm/lass/2configs/consul.nix>
14
14
-
<stockholm/lass/2configs/services/flix/container-host.nix>
15
15
-
<stockholm/lass/2configs/services/radio/container-host.nix>
16
16
-
<stockholm/lass/2configs/ubik-host.nix>
17
17
-
<stockholm/lass/2configs/orange-host.nix>
18
18
-
<stockholm/krebs/2configs/hotdog-host.nix>
13
13
+
../../2configs/consul.nix
14
14
+
../../2configs/services/flix/container-host.nix
15
15
+
../../2configs/services/radio/container-host.nix
16
16
+
../../2configs/ubik-host.nix
17
17
+
../../2configs/orange-host.nix
18
18
+
(self.inputs.stockholm + "/krebs/2configs/hotdog-host.nix")
19
19
20
20
# other containers
21
21
-
<stockholm/lass/2configs/riot.nix>
21
21
+
../../2configs/riot.nix
22
22
23
23
# proxying of services
24
24
-
<stockholm/lass/2configs/services/radio/proxy.nix>
25
25
-
<stockholm/lass/2configs/services/flix/proxy.nix>
26
26
-
<stockholm/lass/2configs/services/coms/proxy.nix>
24
24
+
../../2configs/services/radio/proxy.nix
25
25
+
../../2configs/services/flix/proxy.nix
26
26
+
../../2configs/services/coms/proxy.nix
27
27
];
28
28
29
29
krebs.build.host = config.krebs.hosts.neoprism;
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, modulesPath, config, lib, ... }:
2
2
3
3
{
4
4
5
5
imports = [
6
6
./config.nix
7
7
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
7
7
+
(modulesPath + "/installer/scan/not-detected.nix")
8
8
+
self.inputs.disko.nixosModules.disko
8
9
];
9
10
10
11
disko.devices = import ./disk.nix;
···
1
1
{ config, lib, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
<stockholm/lass>
5
5
-
<stockholm/lass/2configs>
6
6
-
<stockholm/lass/2configs/retiolum.nix>
7
7
-
<stockholm/lass/2configs/mumble-reminder.nix>
8
8
-
<stockholm/lass/2configs/services/git>
4
4
+
../../.
5
5
+
../../2configs
6
6
+
../../2configs/retiolum.nix
7
7
+
../../2configs/mumble-reminder.nix
8
8
+
../../2configs/services/git
9
9
];
10
10
11
11
krebs.build.host = config.krebs.hosts.orange;
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
3
3
-
{
1
1
+
{ self, config, lib, pkgs, ... }: let
2
2
+
slib = self.inputs.stockholm.lib;
3
3
+
in {
4
4
imports = [
5
5
./backup.nix
6
6
-
../../
6
6
+
../../.
7
7
../../2configs/retiolum.nix
8
8
../../2configs/libvirt.nix
9
9
../../2configs/websites/lassulus.nix
···
27
27
}
28
28
{ # TODO make new hfos.nix out of this vv
29
29
users.users.riot = {
30
30
-
uid = genid_uint31 "riot";
30
30
+
uid = slib.genid_uint31 "riot";
31
31
isNormalUser = true;
32
32
extraGroups = [ "libvirtd" ];
33
33
openssh.authorizedKeys.keys = [
34
34
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6o6sdTu/CX1LW2Ff5bNDqGEAGwAsjf0iIe5DCdC7YikCct+7x4LTXxY+nDlPMeGcOF88X9/qFwdyh+9E4g0nUAZaeL14Uc14QDqDt/aiKjIXXTepxE/i4JD9YbTqStAnA/HYAExU15yqgUdj2dnHu7OZcGxk0ZR1OY18yclXq7Rq0Fd3pN3lPP1T4QHM9w66r83yJdFV9szvu5ral3/QuxQnCNohTkR6LoJ4Ny2RbMPTRtb+jPbTQYTWUWwV69mB8ot5nRTP4MRM9pu7vnoPF4I2S5DvSnx4C5zdKzsb7zmIvD4AmptZLrXj4UXUf00Xf7Js5W100Ne2yhYyhq+35 riot@lagrange"
35
35
];
36
36
};
37
37
-
krebs.iptables.tables.filter.FORWARD.rules = mkBefore [
37
37
+
krebs.iptables.tables.filter.FORWARD.rules = lib.mkBefore [
38
38
{ v6 = false; predicate = "--destination 95.216.1.130"; target = "ACCEPT"; }
39
39
{ v6 = false; predicate = "--source 95.216.1.130"; target = "ACCEPT"; }
40
40
];
41
41
}
42
42
{
43
43
users.users.tv = {
44
44
-
uid = genid_uint31 "tv";
44
44
+
uid = slib.genid_uint31 "tv";
45
45
isNormalUser = true;
46
46
openssh.authorizedKeys.keys = [
47
47
config.krebs.users.tv.pubkey
48
48
];
49
49
};
50
50
users.users.makefu = {
51
51
-
uid = genid_uint31 "makefu";
51
51
+
uid = slib.genid_uint31 "makefu";
52
52
isNormalUser = true;
53
53
openssh.authorizedKeys.keys = [
54
54
config.krebs.users.makefu.pubkey
55
55
];
56
56
};
57
57
users.extraUsers.dritter = {
58
58
-
uid = genid_uint31 "dritter";
58
58
+
uid = slib.genid_uint31 "dritter";
59
59
isNormalUser = true;
60
60
extraGroups = [
61
61
"download"
···
72
72
];
73
73
};
74
74
users.users.hellrazor = {
75
75
-
uid = genid_uint31 "hellrazor";
75
75
+
uid = slib.genid_uint31 "hellrazor";
76
76
isNormalUser = true;
77
77
extraGroups = [
78
78
"download"
···
115
115
../../2configs/paste.nix
116
116
../../2configs/syncthing.nix
117
117
../../2configs/reaktor-coders.nix
118
118
-
../../2configs/ciko.nix
119
118
../../2configs/container-networking.nix
120
119
../../2configs/fysiirc.nix
121
120
../../2configs/bgt-bot
122
121
../../2configs/matrix.nix
123
123
-
<stockholm/krebs/2configs/mastodon-proxy.nix>
122
122
+
(self.inputs.stockholm + "/krebs/2configs/mastodon-proxy.nix")
124
123
{
125
124
services.tor = {
126
125
enable = true;
···
142
141
'';
143
142
};
144
143
}
145
145
-
/2configs/minecraft.nix
146
146
-
/2configs/codimd.nix
147
147
-
/2configs/go.nix
144
144
+
../../2configs/minecraft.nix
145
145
+
../../2configs/codimd.nix
146
146
+
../../2configs/go.nix
148
147
{
149
148
lass.nichtparasoup.enable = true;
150
149
services.nginx = {
···
162
161
imports = [
163
162
../../2configs/wiregrill.nix
164
163
];
165
165
-
krebs.iptables.tables.nat.PREROUTING.rules = mkOrder 999 [
164
164
+
krebs.iptables.tables.nat.PREROUTING.rules = lib.mkOrder 999 [
166
165
{ v6 = false; predicate = "-s 10.244.0.0/16"; target = "ACCEPT"; }
167
166
{ v4 = false; predicate = "-s 42:1::/32"; target = "ACCEPT"; }
168
167
];
169
169
-
krebs.iptables.tables.filter.FORWARD.rules = mkBefore [
168
168
+
krebs.iptables.tables.filter.FORWARD.rules = lib.mkBefore [
170
169
{ predicate = "-i wiregrill -o retiolum"; target = "ACCEPT"; }
171
170
{ predicate = "-i retiolum -o wiregrill"; target = "ACCEPT"; }
172
171
];
···
242
241
name = "download";
243
242
home = "/var/download";
244
243
useDefaultShell = true;
245
245
-
uid = genid "download";
244
244
+
uid = slib.genid "download";
246
245
isSystemUser = true;
247
246
openssh.authorizedKeys.keys = with config.krebs.users; [
248
247
lass.pubkey
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ modulesPath, config, lib, pkgs, ... }:
2
2
3
3
{
4
4
5
5
imports = [
6
6
./config.nix
7
7
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
7
7
+
(modulesPath + "/installer/scan/not-detected.nix")
8
8
];
9
9
10
10
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" ];
···
1
1
{ config, lib, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
<stockholm/lass>
5
5
-
<stockholm/lass/2configs>
6
6
-
<stockholm/lass/2configs/retiolum.nix>
7
7
-
8
8
-
<stockholm/lass/2configs/syncthing.nix>
9
9
-
<stockholm/lass/2configs/services/radio>
4
4
+
../../.
5
5
+
../../2configs
6
6
+
../../2configs/retiolum.nix
7
7
+
../../2configs/syncthing.nix
8
8
+
../../2configs/services/radio
10
9
];
11
10
12
11
krebs.build.host = config.krebs.hosts.radio;
···
2
2
3
3
{
4
4
imports = [
5
5
-
<stockholm/lass>
6
6
-
7
7
-
<stockholm/lass/2configs/mouse.nix>
8
8
-
<stockholm/lass/2configs/retiolum.nix>
9
9
-
<stockholm/lass/2configs/baseX.nix>
10
10
-
<stockholm/lass/2configs/pipewire.nix>
11
11
-
<stockholm/lass/2configs/exim-retiolum.nix>
12
12
-
<stockholm/lass/2configs/browsers.nix>
13
13
-
<stockholm/lass/2configs/programs.nix>
14
14
-
<stockholm/lass/2configs/wine.nix>
15
15
-
<stockholm/lass/2configs/bitcoin.nix>
16
16
-
<stockholm/lass/2configs/yellow-mounts/samba.nix>
17
17
-
<stockholm/lass/2configs/fetchWallpaper.nix>
18
18
-
<stockholm/lass/2configs/consul.nix>
19
19
-
<stockholm/lass/2configs/snapclient.nix>
5
5
+
../../.
6
6
+
../../2configs/mouse.nix
7
7
+
../../2configs/retiolum.nix
8
8
+
../../2configs/baseX.nix
9
9
+
../../2configs/pipewire.nix
10
10
+
../../2configs/exim-retiolum.nix
11
11
+
../../2configs/browsers.nix
12
12
+
../../2configs/programs.nix
13
13
+
../../2configs/wine.nix
14
14
+
../../2configs/bitcoin.nix
15
15
+
../../2configs/yellow-mounts/samba.nix
16
16
+
../../2configs/fetchWallpaper.nix
17
17
+
../../2configs/consul.nix
18
18
+
../../2configs/snapclient.nix
20
19
];
21
20
22
21
krebs.build.host = config.krebs.hosts.shodan;
···
1
1
+
{ self, ... }:
1
2
{
2
3
#TODO reinstall with correct layout and use lass/hw/x220
3
4
imports = [
4
5
./config.nix
5
5
-
<stockholm/krebs/2configs/hw/x220.nix>
6
6
+
(self.inputs.stockholm + "/krebs/2configs/hw/x220.nix")
6
7
];
7
8
8
9
boot = {
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ config, lib, pkgs, ... }:
2
2
3
3
{
4
4
imports = [
···
30
30
networking.firewall.interfaces.int0.allowedTCPPorts = [ config.services.smokeping.port ];
31
31
networking.firewall.interfaces.retiolum.allowedTCPPorts = [ config.services.smokeping.port ];
32
32
networking.firewall.interfaces.wiregrill.allowedTCPPorts = [ config.services.smokeping.port ];
33
33
-
krebs.power-action.enable = mkForce false;
33
33
+
krebs.power-action.enable = lib.mkForce false;
34
34
35
35
environment.systemPackages = with pkgs; [
36
36
wol
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ nixosModules, config, lib, pkgs, ... }:
2
2
3
3
{
4
4
imports = [
5
5
./config.nix
6
6
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
6
6
+
(nixosModules + "installer/scan/not-detected.nix")
7
7
];
8
8
9
9
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ];
···
1
1
-
{ config, lib, pkgs, ... }:
1
1
+
{ self, config, pkgs, ... }:
2
2
{
3
3
imports = [
4
4
-
<stockholm/lass>
5
5
-
<stockholm/lass/2configs>
6
6
-
<stockholm/lass/2configs/retiolum.nix>
4
4
+
../../.
5
5
+
../../2configs
6
6
+
../../2configs/retiolum.nix
7
7
+
8
8
+
self.inputs.stockholm.nixosModules.exim-smarthost
7
9
];
8
10
9
11
krebs.build.host = config.krebs.hosts.ubik;
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
3
3
-
let
4
4
-
5
5
-
icon = pkgs.writeText "icon" ''
6
6
-
//
7
7
-
//
8
8
-
_ //
9
9
-
.' . // '.
10
10
-
'_ '_\/_' `_
11
11
-
. . \\ . .
12
12
-
.==. ` \\' .'
13
13
-
.\| //bd\\ \,
14
14
-
\_'`._\\__//_.'`.;
15
15
-
`.__ __,' \\
16
16
-
| | \\
17
17
-
| | `
18
18
-
| |
19
19
-
| |
20
20
-
|____|
21
21
-
l42 ==' '==
22
22
-
'';
23
23
-
24
24
-
messenger = pkgs.writeText "message" ''
25
25
-
.
26
26
-
| \/|
27
27
-
(\ _ ) )|/|
28
28
-
(/ _----. /.'.'
29
29
-
.-._________.. .' @ _\ .'
30
30
-
'.._______. '. / (_| .')
31
31
-
'._____. / '-/ | _.'
32
32
-
'.______ ( ) ) \
33
33
-
'..____ '._ ) )
34
34
-
.' __.--\ , , // ((
35
35
-
'.' mrf| \/ (_.'(
36
36
-
' \ .'
37
37
-
\ (
38
38
-
\ '.
39
39
-
\ \ '.)
40
40
-
'-'-'
41
41
-
'';
42
42
-
43
43
-
waiting = pkgs.writeText "waiting" ''
44
44
-
Z
45
45
-
Z
46
46
-
z
47
47
-
z
48
48
-
* '
49
49
-
/ \
50
50
-
/___\
51
51
-
( - - )
52
52
-
) L ( .--------------.
53
53
-
__()(-)()__ | \ |
54
54
-
.~~ )()()() ~. | . :
55
55
-
/ )()() ` | `-.__________)
56
56
-
| )() ~ | : :
57
57
-
| ) | : |
58
58
-
| _ | | [ ## :
59
59
-
\ ~~-. | , oo_______.'
60
60
-
`_ ( \) _____/~~~~ `--___
61
61
-
| ~`-) ) `-. `--- ( - a:f -
62
62
-
| '///` | `-.
63
63
-
| | | | `-.
64
64
-
| | | | `-.
65
65
-
| | |\ |
66
66
-
| | | \|
67
67
-
`-. | | |
68
68
-
`-| '
69
69
-
'';
70
70
-
71
71
-
wizard = pkgs.writers.writeDash "wizard" ''
72
72
-
cat ${icon}
73
73
-
74
74
-
echo -n '${''
75
75
-
welcome to the computer wizard
76
76
-
first we will check for internet connectivity
77
77
-
78
78
-
''}'
79
79
-
80
80
-
read -p '(press enter to continue...)' key
81
81
-
until ping -c1 8.8.8.8; do
82
82
-
${pkgs.nm-dmenu}/bin/nm-dmenu
83
83
-
done
84
84
-
85
85
-
mode=$(echo -n '${''
86
86
-
1. Help of the wizard
87
87
-
2. Install NixOS
88
88
-
3. I know what I need to do
89
89
-
''}' | ${pkgs.fzf}/bin/fzf --reverse)
90
90
-
case "$mode" in
91
91
-
1*)
92
92
-
echo 'mode_1' > /tmp/mode
93
93
-
clear
94
94
-
echo 'waiting for the messenger to reach the wizard'
95
95
-
cat ${messenger}
96
96
-
97
97
-
# get pubkeys
98
98
-
mkdir -p /root/.ssh/
99
99
-
touch /root/.ssh/authorized_keys
100
100
-
curl -Ss 'https://lassul.us/mors.pub' >> /root/.ssh/authorized_keys
101
101
-
curl -Ss 'https://lassul.us/blue.pub' >> /root/.ssh/authorized_keys
102
102
-
curl -Ss 'https://lassul.us/yubi.pub' >> /root/.ssh/authorized_keys
103
103
-
104
104
-
# write via irc
105
105
-
systemctl start hidden-ssh-announce.service
106
106
-
tmux new-session -s help ${pkgs.writers.writeDash "waiting" ''
107
107
-
cat ${waiting}
108
108
-
read -p 'waiting for the wizard to wake up' key
109
109
-
${pkgs.bashInteractive}/bin/bash
110
110
-
''}
111
111
-
;;
112
112
-
2*)
113
113
-
echo 'mode_2' > /tmp/mode
114
114
-
${pkgs.nixos-installer}/bin/nixos-installer
115
115
-
;;
116
116
-
3*)
117
117
-
echo 'mode_3' > /tmp/mode
118
118
-
;;
119
119
-
*)
120
120
-
echo 'no mode selected'
121
121
-
;;
122
122
-
esac
123
123
-
'';
124
124
-
125
125
-
in {
126
126
-
imports = [
127
127
-
<stockholm/krebs>
128
128
-
<stockholm/lass/3modules>
129
129
-
<stockholm/lass/2configs/vim.nix>
130
130
-
# <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-base.nix>
131
131
-
{
132
132
-
nixpkgs.config.packageOverrides = import <stockholm/lass/5pkgs> pkgs;
133
133
-
krebs.enable = true;
134
134
-
krebs.build.user = config.krebs.users.lass;
135
135
-
krebs.build.host = {};
136
136
-
}
137
137
-
# {
138
138
-
# systemd.services.wizard = {
139
139
-
# description = "Computer Wizard";
140
140
-
# wantedBy = [ "multi-user.target" ];
141
141
-
# serviceConfig = {
142
142
-
# ExecStart = pkgs.writers.writeDash "wizard" ''
143
143
-
# set -efu
144
144
-
# cat <<EOF
145
145
-
# welcome to the computer wizard
146
146
-
# you can choose between the following modes
147
147
-
# echo -n '1\n2\n3' | ${pkgs.fzf}/bin/fzf
148
148
-
# EOF
149
149
-
# '';
150
150
-
# StandardInput = "tty";
151
151
-
# StandardOutput = "tty";
152
152
-
# # TTYPath = "/dev/tty1";
153
153
-
# TTYPath = "/dev/ttyS0";
154
154
-
# TTYReset = true;
155
155
-
# TTYVTDisallocate = true;
156
156
-
# Restart = "always";
157
157
-
# };
158
158
-
# };
159
159
-
# }
160
160
-
];
161
161
-
162
162
-
networking.hostName = "wizard";
163
163
-
nixpkgs.config.allowUnfree = true;
164
164
-
165
165
-
# users.extraUsers = {
166
166
-
# root = {
167
167
-
# openssh.authorizedKeys.keys = [
168
168
-
# config.krebs.users.lass.pubkey
169
169
-
# config.krebs.users.lass-mors.pubkey
170
170
-
# ];
171
171
-
# };
172
172
-
# };
173
173
-
174
174
-
environment.systemPackages = with pkgs; [
175
175
-
#stockholm
176
176
-
git
177
177
-
gnumake
178
178
-
jq
179
179
-
parallel
180
180
-
proot
181
181
-
populate
182
182
-
183
183
-
#style
184
184
-
most
185
185
-
rxvt-unicode-unwrapped.terminfo
186
186
-
187
187
-
#monitoring tools
188
188
-
htop
189
189
-
iotop
190
190
-
191
191
-
#network
192
192
-
iptables
193
193
-
iftop
194
194
-
nm-dmenu
195
195
-
196
196
-
#stuff for dl
197
197
-
aria2
198
198
-
199
199
-
#neat utils
200
200
-
chntpw
201
201
-
hashPassword
202
202
-
krebspaste
203
203
-
pciutils
204
204
-
psmisc
205
205
-
tmux
206
206
-
usbutils
207
207
-
208
208
-
#unpack stuff
209
209
-
p7zip
210
210
-
unzip
211
211
-
unrar
212
212
-
213
213
-
#data recovery
214
214
-
ddrescue
215
215
-
ntfs3g
216
216
-
dosfstools
217
217
-
218
218
-
nixos-installer
219
219
-
];
220
220
-
221
221
-
environment.extraInit = ''
222
222
-
EDITOR=vim
223
223
-
'';
224
224
-
225
225
-
programs.bash = {
226
226
-
enableCompletion = true;
227
227
-
interactiveShellInit = ''
228
228
-
HISTCONTROL='erasedups:ignorespace'
229
229
-
HISTSIZE=65536
230
230
-
HISTFILESIZE=$HISTSIZE
231
231
-
232
232
-
shopt -s checkhash
233
233
-
shopt -s histappend histreedit histverify
234
234
-
shopt -s no_empty_cmd_completion
235
235
-
complete -d cd
236
236
-
'';
237
237
-
promptInit = ''
238
238
-
if test $UID = 0; then
239
239
-
PS1='\[\033[1;31m\]\w\[\033[0m\] '
240
240
-
PROMPT_COMMAND='echo -ne "\033]0;$$ $USER@$PWD\007"'
241
241
-
elif test $UID = 1337; then
242
242
-
PS1='\[\033[1;32m\]\w\[\033[0m\] '
243
243
-
PROMPT_COMMAND='echo -ne "\033]0;$$ $PWD\007"'
244
244
-
else
245
245
-
PS1='\[\033[1;33m\]\u@\w\[\033[0m\] '
246
246
-
PROMPT_COMMAND='echo -ne "\033]0;$$ $USER@$PWD\007"'
247
247
-
fi
248
248
-
if test -n "$SSH_CLIENT"; then
249
249
-
PS1='\[\033[35m\]\h'" $PS1"
250
250
-
PROMPT_COMMAND='echo -ne "\033]0;$$ $HOSTNAME $USER@$PWD\007"'
251
251
-
fi
252
252
-
if ! test -e /tmp/mode; then
253
253
-
${wizard}
254
254
-
fi
255
255
-
'';
256
256
-
};
257
257
-
258
258
-
services.openssh.enable = true;
259
259
-
systemd.services.sshd.wantedBy = mkForce [ "multi-user.target" ];
260
260
-
261
261
-
networking.firewall = {
262
262
-
enable = true;
263
263
-
allowedTCPPorts = [ 22 ];
264
264
-
};
265
265
-
networking.networkmanager.enable = true;
266
266
-
networking.wireless.enable = mkForce false;
267
267
-
268
268
-
krebs.hidden-ssh = {
269
269
-
enable = true;
270
270
-
channel = "##lassulus-wizard";
271
271
-
message = "lassulus: torify sshn root@";
272
272
-
};
273
273
-
systemd.services.hidden-ssh-announce.wantedBy = mkForce [];
274
274
-
services.getty.autologinUser = lib.mkForce "root";
275
275
-
276
276
-
nixpkgs.config.packageOverrides = super: {
277
277
-
dmenu = pkgs.writeDashBin "dmenu" ''
278
278
-
${pkgs.fzf}/bin/fzf \
279
279
-
--history=/dev/null \
280
280
-
--print-query \
281
281
-
--prompt=\"$PROMPT\"
282
282
-
'';
283
283
-
};
284
284
-
285
285
-
boot.tmpOnTmpfs = true;
286
286
-
}
···
1
1
-
#!/usr/bin/env nix-shell
2
2
-
#! nix-shell -i bash -p nixos-generators
3
3
-
4
4
-
set -xefu
5
5
-
6
6
-
WD=$(dirname "$0")
7
7
-
nixos-generate -I stockholm="$WD"/../../.. -c "$WD"/config.nix -f install-iso
···
1
1
-
#!/usr/bin/env nix-shell
2
2
-
#! nix-shell -i bash -p nixos-generators
3
3
-
4
4
-
set -efu
5
5
-
6
6
-
WD=$(dirname "$0")
7
7
-
nixos-generate -I stockholm="$WD"/../../.. -c "$WD"/config.nix -f vm-nogui --run
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
{
3
3
-
imports = [
4
4
-
./config.nix
5
5
-
];
6
6
-
virtualisation.emptyDiskImages = [
7
7
-
8000
8
8
-
];
9
9
-
virtualisation.memorySize = 1024;
10
10
-
}
···
2
2
3
3
{
4
4
imports = [
5
5
-
<stockholm/lass>
6
6
-
7
7
-
<stockholm/lass/2configs/retiolum.nix>
8
8
-
<stockholm/lass/2configs/exim-retiolum.nix>
9
9
-
<stockholm/lass/2configs/baseX.nix>
10
10
-
<stockholm/lass/2configs/pipewire.nix>
11
11
-
<stockholm/lass/2configs/browsers.nix>
12
12
-
<stockholm/lass/2configs/programs.nix>
13
13
-
<stockholm/lass/2configs/network-manager.nix>
14
14
-
<stockholm/lass/2configs/syncthing.nix>
15
15
-
<stockholm/lass/2configs/sync/sync.nix>
16
16
-
<stockholm/lass/2configs/steam.nix>
17
17
-
<stockholm/lass/2configs/wine.nix>
18
18
-
<stockholm/lass/2configs/fetchWallpaper.nix>
19
19
-
<stockholm/lass/2configs/pass.nix>
20
20
-
<stockholm/lass/2configs/mail.nix>
5
5
+
../../.
6
6
+
../../2configs/retiolum.nix
7
7
+
../../2configs/exim-retiolum.nix
8
8
+
../../2configs/baseX.nix
9
9
+
../../2configs/pipewire.nix
10
10
+
../../2configs/browsers.nix
11
11
+
../../2configs/programs.nix
12
12
+
../../2configs/network-manager.nix
13
13
+
../../2configs/syncthing.nix
14
14
+
../../2configs/sync/sync.nix
15
15
+
../../2configs/steam.nix
16
16
+
../../2configs/wine.nix
17
17
+
../../2configs/fetchWallpaper.nix
18
18
+
../../2configs/pass.nix
19
19
+
../../2configs/mail.nix
21
20
];
22
21
23
22
krebs.build.host = config.krebs.hosts.xerxes;
···
1
1
-
{ pkgs, lib, ... }:
1
1
+
{ modulesPath, pkgs, lib, ... }:
2
2
{
3
3
imports = [
4
4
./config.nix
5
5
-
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
5
5
+
(modulesPath + "/installer/scan/not-detected.nix")
6
6
];
7
7
8
8
boot.loader.grub = {
···
3
3
torrentport = 56709; # port forwarded in airvpn webinterface
4
4
in {
5
5
imports = [
6
6
-
<stockholm/lass>
7
7
-
<stockholm/lass/2configs>
8
8
-
<stockholm/lass/2configs/retiolum.nix>
9
9
-
<stockholm/lass/2configs/services/flix>
6
6
+
../../.
7
7
+
../../2configs
8
8
+
../../2configs/retiolum.nix
9
9
+
../../2configs/services/flix
10
10
];
11
11
12
12
krebs.build.host = config.krebs.hosts.yellow;
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
3
3
-
# cryptsetup luksOpen /dev/xxx mmc
4
4
-
# mkdir /mnt
5
5
-
# mount /dev/mapper/mmc /mnt
6
6
-
# rm -rf $GNUPGHOME
7
7
-
# cp -rv /mnt/gnupghome $GNUPGHOME
8
8
-
#
9
9
-
### change yubikey pin
10
10
-
# gpg --card-edit
11
11
-
# > admin
12
12
-
# > passwd
13
13
-
# > 1
14
14
-
# > > 123456
15
15
-
# > > $newpin
16
16
-
# > 3
17
17
-
# > > 12345678
18
18
-
# > > $newpuk
19
19
-
#
20
20
-
### transfer keys
21
21
-
# gpg --edit-key $keyid
22
22
-
#
23
23
-
# for x in 1 2 3
24
24
-
# > key $x
25
25
-
# > expire
26
26
-
# > 2y
27
27
-
# > keytocard
28
28
-
# > > $newpuk
29
29
-
# > key $x (to unselect)
30
30
-
31
31
-
{
32
32
-
services.pcscd.enable = true;
33
33
-
services.udev.packages = [ yubikey-personalization ];
34
34
-
35
35
-
environment.systemPackages = [ gnupg pinentry-curses pinentry-qt paperkey wget ];
36
36
-
37
37
-
programs = {
38
38
-
ssh.startAgent = false;
39
39
-
gnupg.agent = {
40
40
-
enable = true;
41
41
-
enableSSHSupport = true;
42
42
-
};
43
43
-
};
44
44
-
boot.tmpOnTmpfs = true;
45
45
-
}
···
1
1
-
#!/usr/bin/env nix-shell
2
2
-
#! nix-shell -i bash -p nixos-generators
3
3
-
4
4
-
set -xefu
5
5
-
6
6
-
WD=$(dirname "$0")
7
7
-
nixos-generate -I stockholm="$WD"/../../.. -c "$WD"/config.nix -f install-iso
···
1
1
-
#!/usr/bin/env nix-shell
2
2
-
#! nix-shell -i bash -p nixos-generators
3
3
-
4
4
-
set -efu
5
5
-
6
6
-
WD=$(dirname "$0")
7
7
-
nixos-generate -I stockholm="$WD"/../../.. -c "$WD"/config.nix -f vm-nogui --run
···
1
1
-
{ config, lib, pkgs, ... }:
2
2
-
{
3
3
-
imports = [
4
4
-
./config.nix
5
5
-
];
6
6
-
virtualisation.emptyDiskImages = [
7
7
-
8000
8
8
-
];
9
9
-
virtualisation.memorySize = 1024;
10
10
-
}
···
1
1
-
{ config, pkgs, ... }:
1
1
+
{ self, config, pkgs, ... }:
2
2
{
3
3
+
imports = [
4
4
+
self.inputs.stockholm.nixosModules.htgen
5
5
+
];
3
6
krebs.sync-containers3.containers.radio = {
4
7
sshKey = "${config.krebs.secret.directory}/radio.sync.key";
5
8
};
···
98
98
"radio" = {};
99
99
};
100
100
101
101
-
krebs.per-user.${name}.packages = with pkgs; [
101
101
+
users.users.${name}.packages = with pkgs; [
102
102
good_track
103
103
skip_track
104
104
print_current