From 19a03764b539123074140f7f0613ab0bfc3814df Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 2 May 2021 17:40:21 +0200 Subject: l realwallpaper: serve krebs-stars --- lass/2configs/realwallpaper.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lass/2configs') diff --git a/lass/2configs/realwallpaper.nix b/lass/2configs/realwallpaper.nix index 7a2f6e916..c873ae4d5 100644 --- a/lass/2configs/realwallpaper.nix +++ b/lass/2configs/realwallpaper.nix @@ -28,6 +28,9 @@ in { locations."/realwallpaper-krebs.png".extraConfig = '' root /var/realwallpaper/; ''; + locations."/realwallpaper-krebs-stars.png".extraConfig = '' + root /var/realwallpaper/; + ''; locations."/realwallpaper-video.mp4".extraConfig = '' root /var/realwallpaper/archive; ''; -- cgit v1.3.1 From fd3dff19ed4952a6a92cb3ebf40e52c7ba81d563 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 2 May 2021 17:48:27 +0200 Subject: l fetchWallpaper: use stars version --- lass/2configs/fetchWallpaper.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lass/2configs') diff --git a/lass/2configs/fetchWallpaper.nix b/lass/2configs/fetchWallpaper.nix index 065ee9c42..251f886a9 100644 --- a/lass/2configs/fetchWallpaper.nix +++ b/lass/2configs/fetchWallpaper.nix @@ -5,8 +5,7 @@ let in { krebs.fetchWallpaper = { enable = true; - unitConfig.ConditionPathExists = "!/var/run/ppp0.pid"; - url = "prism/realwallpaper-krebs.png"; + url = "prism/realwallpaper-krebs-stars.png"; }; } -- cgit v1.3.1 From 020154a8599142dae4f9ac838fe1657dbf0da8d3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 2 May 2021 19:09:47 +0200 Subject: realwallpaper: add krebs-stars-berlin version --- krebs/5pkgs/simple/realwallpaper/default.nix | 26 ++++++++++++++++++++++++++ lass/2configs/realwallpaper.nix | 3 +++ 2 files changed, 29 insertions(+) (limited to 'lass/2configs') diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix index c9b2e76b6..8728c0ae7 100644 --- a/krebs/5pkgs/simple/realwallpaper/default.nix +++ b/krebs/5pkgs/simple/realwallpaper/default.nix @@ -297,6 +297,26 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' shade=15 ''} + xplanet --num_times 1 --geometry $xplanet_out_size \ + --latitude 52.520008 --longitude 13.404954 \ + --output xplanet-krebs-stars-berlin-output.png --projection merc \ + -config ${pkgs.writeText "xplanet-krebs-stars.config" '' + [default] + + arc_thickness=1 + arc_file=constellations.arcs + + [earth] + "Earth" + map=daymap-final.png + night_map=nightmap-final.png + cloud_map=clouds.png + cloud_threshold=1 + cloud_gamma=10 + marker_file=marker_file + shade=15 + ''} + # trim xplanet output if needs_rebuild realwallpaper.png xplanet-output.png; then convert xplanet-output.png -crop $out_geometry \ @@ -323,6 +343,12 @@ pkgs.writers.writeDashBin "generate-wallpaper" '' realwallpaper-krebs-stars-tmp.png mv realwallpaper-krebs-stars-tmp.png realwallpaper-krebs-stars.png fi + + if needs_rebuild realwallpaper-krebs-stars-berlin.png xplanet-krebs-stars-berlin-output.png; then + convert xplanet-krebs-stars-berlin-output.png -crop $out_geometry \ + realwallpaper-krebs-stars-berlin-tmp.png + mv realwallpaper-krebs-stars-berlin-tmp.png realwallpaper-krebs-stars-berlin.png + fi } main "$@" diff --git a/lass/2configs/realwallpaper.nix b/lass/2configs/realwallpaper.nix index c873ae4d5..0bae91d89 100644 --- a/lass/2configs/realwallpaper.nix +++ b/lass/2configs/realwallpaper.nix @@ -31,6 +31,9 @@ in { locations."/realwallpaper-krebs-stars.png".extraConfig = '' root /var/realwallpaper/; ''; + locations."/realwallpaper-krebs-stars-berlin.png".extraConfig = '' + root /var/realwallpaper/; + ''; locations."/realwallpaper-video.mp4".extraConfig = '' root /var/realwallpaper/archive; ''; -- cgit v1.3.1 From 950a735472f2b09b08119ba79f10c54a9efb28e6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 3 May 2021 17:59:52 +0200 Subject: l: (re)init echelon.r (with ssh tor unlocking) --- krebs/3modules/lass/default.nix | 40 ++++++++++++++++++ lass/1systems/echelon/config.nix | 14 +++++++ lass/1systems/echelon/physical.nix | 33 +++++++++++++++ .../tests/dummy-secrets/initrd/ssh.ed25519_key | 0 lass/2configs/tor-initrd.nix | 49 ++++++++++++++++++++++ 5 files changed, 136 insertions(+) create mode 100644 lass/1systems/echelon/config.nix create mode 100644 lass/1systems/echelon/physical.nix create mode 100644 lass/2configs/tests/dummy-secrets/initrd/ssh.ed25519_key create mode 100644 lass/2configs/tor-initrd.nix (limited to 'lass/2configs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 300ea2ccc..d29988be2 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -742,6 +742,46 @@ in { syncthing.id = "W5BJ4TL-GAQ46WS-ZB72HFS-XOURLBA-RNBVMYC-POFH4UA-CBORQID-BMIHNQZ"; }; + echelon = { + cores = 1; + nets = { + retiolum = { + ip4.addr = "10.243.0.3"; + ip6.addr = r6 "4"; + aliases = [ + "echelon.r" + ]; + tinc.pubkey = '' + -----BEGIN PUBLIC KEY----- + MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEArxTpl0YvJWiF9cAYeAdp + 1gG18vrSeYDpmVCsZmxi2qyeWNM4JGSVPYoagyKHSDGH60xvktRh/1Zat+1hHR0A + MAjDIENn9hAICQ8lafnm2v3+xzLNoTMJTYG3eba2MlJpAH0rYP0E5xBhQj9DCSAe + UpEZWAwCKDCOmg/9h0gvs3kh0HopwjOE1IEzApgg05Yuhna96IATVdBAC7uF768V + rJZNkQRvhetGxB459C58uMdcRK3degU6HMpZIXjJk6bqkzKBMm7C3lsAfaWulfez + gavFSHC15NbHkz+fcVZNZReJhfTHP7k05xo5vYpDhszdUSjc3MtWBmk5v9zdS1pO + c+20a1eurr1EPoYBqjQL0tLBwuQc2tN5XqJKVY5LGAnojAI6ktPKPLR6qZHC4Kna + dgJ/S1BzHVxniYh3/rEzhXioneZ6oZgO+65WtsS42WAvh/53U/Q3chgI074Jssze + ev09+zU8Xj0vX/7KpRKy5Vln6RGkQbKAIt7TZL5cJALswQDzcCO4WTv1X5KoG3+D + KfTMfl9HzFsv59uHKlUqUguN5e8CLdmjgU1v2WvHBCw1PArIE8ZC0Tu2bMi5i9Vq + GHxVn9O4Et5yPocyQtE4zOfGfqwR/yNa//Zs1b6DxQ73tq7rbBQaAzq7lxW6Ndbr + 43jjLL40ONdFxX7qW/DhT9MCAwEAAQ== + -----END PUBLIC KEY----- + ''; + }; + wiregrill = { + ip6.addr = w6 "3"; + aliases = [ + "echelon.w" + ]; + wireguard.pubkey = '' + SLdk0lph2rSFU+3dyrWDU1CT/oU+HPcOVYeGVIgDpEc= + ''; + }; + }; + ssh.privkey.path = ; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIn+o0uCBSot254kZKlNepVKFcwDPdr8s6+lQmYGM3Hd "; + }; + }; users = rec { lass = lass-yubikey; diff --git a/lass/1systems/echelon/config.nix b/lass/1systems/echelon/config.nix new file mode 100644 index 000000000..9e72916b3 --- /dev/null +++ b/lass/1systems/echelon/config.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: +{ + imports = [ + + + + + ]; + + krebs.build.host = config.krebs.hosts.echelon; + + boot.tmpOnTmpfs = true; +} + diff --git a/lass/1systems/echelon/physical.nix b/lass/1systems/echelon/physical.nix new file mode 100644 index 000000000..fbacc3927 --- /dev/null +++ b/lass/1systems/echelon/physical.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = [ + ./config.nix + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.efiSupport = true; + boot.loader.grub.efiInstallAsRemovable = true; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.initrd.luks.devices.luksroot.device = "/dev/sda3"; + + networking.useDHCP = false; + networking.interfaces.ens18.useDHCP = true; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/5186edb1-9234-48ae-8679-61facb56b818"; + fsType = "xfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/56D1-34A0"; + fsType = "vfat"; + }; + +} diff --git a/lass/2configs/tests/dummy-secrets/initrd/ssh.ed25519_key b/lass/2configs/tests/dummy-secrets/initrd/ssh.ed25519_key new file mode 100644 index 000000000..e69de29bb diff --git a/lass/2configs/tor-initrd.nix b/lass/2configs/tor-initrd.nix new file mode 100644 index 000000000..64e64b5b3 --- /dev/null +++ b/lass/2configs/tor-initrd.nix @@ -0,0 +1,49 @@ +{config, pkgs, ... }: +## unlock command: +# (pass admin/$host/root;echo) | torify ssh root@$(pass hosts/$host/initrd/hostname) 'cat > /crypt-ramfs/passphrase' +{ + boot.initrd.network.enable = true; + boot.initrd.network.ssh = { + enable = true; + port = 22; + authorizedKeys = [ + config.krebs.users.lass.pubkey + config.krebs.users.lass-mors.pubkey + config.krebs.users.lass-green.pubkey + ]; + hostKeys = [ ]; + }; + boot.initrd.availableKernelModules = [ "e1000e" ]; + + boot.initrd.secrets = { + "/etc/tor/onion/bootup" = ; + }; + + boot.initrd.extraUtilsCommands = '' + copy_bin_and_libs ${pkgs.tor}/bin/tor + ''; + + # start tor during boot process + boot.initrd.network.postCommands = let + torRc = (pkgs.writeText "tor.rc" '' + DataDirectory /etc/tor + SOCKSPort 127.0.0.1:9050 IsolateDestAddr + SOCKSPort 127.0.0.1:9063 + HiddenServiceDir /etc/tor/onion/bootup + HiddenServicePort 22 127.0.0.1:22 + ''); + in '' + echo "tor: preparing onion folder" + # have to do this otherwise tor does not want to start + chmod -R 700 /etc/tor + + echo "make sure localhost is up" + ip a a 127.0.0.1/8 dev lo + ip link set lo up + + echo "tor: starting tor" + tor -f ${torRc} --verify-config + tor -f ${torRc} & + ''; +} + -- cgit v1.3.1 From b1437a3b1761a58cfa8d601c20da0a0f13e3d795 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 25 May 2021 09:49:39 +0200 Subject: l radio: move to hackint --- lass/2configs/radio.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/2configs') diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix index 707cc8459..cfc280e50 100644 --- a/lass/2configs/radio.nix +++ b/lass/2configs/radio.nix @@ -223,7 +223,7 @@ in { systemd.services."reaktor2-the_playlist".serviceConfig.DynamicUser = mkForce false; krebs.reaktor2.the_playlist = { - hostname = "irc.freenode.org"; + hostname = "irc.hackint.org"; port = "6697"; useTLS = true; nick = "the_playlist"; -- cgit v1.3.1