From e41239db3caa26405ed61c394dd58d31521f80b7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 20 Apr 2021 22:01:35 +0200 Subject: l: searx init at 1.0.0 --- lass/5pkgs/searx/default.nix | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 lass/5pkgs/searx/default.nix (limited to 'lass') diff --git a/lass/5pkgs/searx/default.nix b/lass/5pkgs/searx/default.nix new file mode 100644 index 000000000..e5ce5788a --- /dev/null +++ b/lass/5pkgs/searx/default.nix @@ -0,0 +1,69 @@ +{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }: + +with python3Packages; + +toPythonModule (buildPythonApplication rec { + pname = "searx"; + version = "1.0.0"; + + # Can not use PyPI because certain test files are missing. + src = fetchFromGitHub { + owner = "searx"; + repo = "searx"; + rev = "v${version}"; + sha256 = "0ghkx8g8jnh8yd46p4mlbjn2zm12nx27v7qflr4c8xhlgi0px0mh"; + }; + + postPatch = '' + sed -i 's/==.*$//' requirements.txt + ''; + + preBuild = '' + export SEARX_DEBUG="true"; + ''; + + propagatedBuildInputs = [ + Babel + certifi + dateutil + flask + flaskbabel + gevent + grequests + jinja2 + langdetect + lxml + ndg-httpsclient + pyasn1 + pyasn1-modules + pygments + pysocks + pytz + pyyaml + requests + speaklater + werkzeug + ]; + + # tests try to connect to network + doCheck = false; + # checkInputs = [ + # Babel mock nose2 covCore pep8 plone-testing splinter + # unittest2 zope_testrunner selenium + # ]; + + postInstall = '' + # Create a symlink for easier access to static data + mkdir -p $out/share + ln -s ../${python3.sitePackages}/searx/static $out/share/ + ''; + + passthru.tests = { inherit (nixosTests) searx; }; + + meta = with lib; { + homepage = "https://github.com/searx/searx"; + description = "A privacy-respecting, hackable metasearch engine"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ matejc fpletz globin danielfullmer ]; + }; +}) -- cgit v1.2.3 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') 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.2.3 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') 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.2.3 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 --- lass/2configs/realwallpaper.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lass') 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.2.3 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) --- 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 ++++++++++++++++++++++ 4 files changed, 96 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') 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.2.3 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') 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.2.3