❄️ Dotfiles and NixOS configurations
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

wip

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>

+180
+1
flake.nix
··· 144 144 ./nixosConfigurations/eclipse 145 145 ./nixosConfigurations/universe 146 146 ./nixosConfigurations/centauri 147 + ./nixosConfigurations/sonic 147 148 148 149 ./darwinConfigurations/builder 149 150
+29
nixosConfigurations/common/snapclient.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + ... 5 + }: { 6 + services.pipewire = { 7 + enable = true; 8 + systemWide = true; 9 + pulse.enable = true; 10 + }; 11 + 12 + systemd.services."snapclient" = { 13 + description = "SnapCast client"; 14 + wantedBy = ["multi-user.target"]; 15 + after = [ 16 + "network.target" 17 + "nss-lookup.target" 18 + "pipewire.socket" 19 + ]; 20 + serviceConfig = { 21 + Type = "forking"; 22 + ExecStart = "${lib.getExe' pkgs.snapcast "snapclient"} --daemon --host cosmos.lan --player pulse"; 23 + DynamicUser = true; 24 + SupplementaryGroups = ["pipewire"]; 25 + RuntimeDirectory = "snapclient"; 26 + PIDFile = "/var/run/snapclient/pid"; 27 + }; 28 + }; 29 + }
+33
nixosConfigurations/common/snapserver.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + services.mopidy = { 8 + enable = true; 9 + extensionPackages = with pkgs; [mopidy-jellyfin]; 10 + configuration = '' 11 + [audio] 12 + output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! tcpclientsink host=127.0.0.1 port=4953 13 + ''; 14 + }; 15 + 16 + services.snapserver = { 17 + enable = true; 18 + openFirewall = true; 19 + http = { 20 + enable = true; 21 + listenAddress = "0.0.0.0"; 22 + docRoot = pkgs.snapweb; 23 + }; 24 + streams = { 25 + Mopidy = { 26 + type = "tcp"; 27 + location = "127.0.0.1:4953"; 28 + }; 29 + }; 30 + }; 31 + 32 + networking.firewall.allowedTCPPorts = [config.services.snapserver.http.port]; 33 + }
+1
nixosConfigurations/cosmos/default.nix
··· 24 24 ../common/regional.nix 25 25 ../common/remote-build-provider.nix 26 26 ../common/server.nix 27 + ../common/snapserver.nix 27 28 ../common/traefik.nix 28 29 ../common/upgrade.nix 29 30 ../common/utils.nix
+72
nixosConfigurations/sonic/configuration.nix
··· 1 + { 2 + config, 3 + inputs, 4 + lib, 5 + pkgs, 6 + ... 7 + }: let 8 + inherit (inputs) srvos nixos-hardware; 9 + in { 10 + imports = [ 11 + "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" 12 + srvos.nixosModules.server 13 + nixos-hardware.nixosModules.raspberry-pi-3 14 + inputs.nixos-facter-modules.nixosModules.facter 15 + ]; 16 + 17 + age.secrets."Beehive.psk".file = ../../secrets/common/Beehive.psk.age; 18 + 19 + nixpkgs.hostPlatform = "aarch64-linux"; 20 + 21 + sdImage = { 22 + # bzip2 compression takes loads of time with emulation, skip it. Enable this if you're low on space. 23 + compressImage = false; 24 + imageName = "zero2.img"; 25 + }; 26 + 27 + hardware = { 28 + enableRedistributableFirmware = lib.mkForce false; 29 + firmware = [pkgs.raspberrypiWirelessFirmware]; 30 + i2c.enable = true; 31 + deviceTree.filter = "bcm2837-rpi-zero*.dtb"; 32 + deviceTree.overlays = [ 33 + { 34 + name = "enable-i2c"; 35 + dtsText = '' 36 + /dts-v1/; 37 + /plugin/; 38 + / { 39 + compatible = "brcm,bcm2837"; 40 + fragment@0 { 41 + target = <&i2c1>; 42 + __overlay__ { 43 + status = "okay"; 44 + }; 45 + }; 46 + }; 47 + ''; 48 + } 49 + ]; 50 + }; 51 + 52 + boot.initrd.supportedFilesystems.zfs = false; 53 + boot.supportedFilesystems.zfs = false; 54 + boot.kernelPackages = inputs.nixpkgs-stable.legacyPackages.aarch64-linux.linuxPackages_rpi02w; 55 + # Workaround for https://forums.raspberrypi.com/viewtopic.php?t=366155 56 + boot.kernelParams = ["brcmfmac.feature_disable=0x82000"]; 57 + 58 + #facter.reportPath = ./facter.json; 59 + 60 + systemd.tmpfiles.settings."10-iwd"."/var/lib/iwd/Beehive.psk"."L" = { 61 + mode = "0600"; 62 + argument = config.age.secrets."Beehive.psk".path; 63 + }; 64 + 65 + networking = { 66 + wireless.iwd.enable = true; 67 + domain = "lan"; 68 + interfaces.wlan0.useDHCP = true; 69 + }; 70 + 71 + system.stateVersion = "25.05"; 72 + }
+31
nixosConfigurations/sonic/default.nix
··· 1 + { 2 + lib', 3 + self, 4 + ... 5 + }: let 6 + inherit (builtins) attrValues; 7 + in { 8 + flake.nixosConfigurations = lib'.mkHost { 9 + hostName = "sonic"; 10 + modules = 11 + [ 12 + (lib'.mkDeploy { 13 + targetHost = "root@sonic.lan"; 14 + extraFlags = ["--verbose" "--print-build-logs"]; 15 + }) 16 + 17 + ../common 18 + ../common/nix.nix 19 + ../common/nix-index.nix 20 + ../common/openssh.nix 21 + ../common/pkgs 22 + ../common/regional.nix 23 + ../common/snapclient.nix 24 + ../common/server.nix 25 + ../common/utils.nix 26 + 27 + ./configuration.nix 28 + ] 29 + ++ attrValues self.nixosModules; 30 + }; 31 + }
+11
secrets/common/Beehive.psk.age
··· 1 + age-encryption.org/v1 2 + -> ssh-ed25519 8rohug 2gvCIzcYifHRviTQ+oy72A2q54uTpG9j06dX7OyVmWs 3 + k81107JqOC3qLihPaw7KPpXDOO+2TXKV60yrdc+Hs6E 4 + -> ssh-ed25519 ecz3Uw MP3sY8V0dvR3/hOVa4LulbfriMG8FzTycfIfnl5ntU4 5 + ic/JFuH+uxapwbNrdDF3RDoXa9WM9V0rMKxiDOkEQc4 6 + -> ssh-ed25519 ywGURw PMFUmEJeiDgoK14BIYAw5f+NXZzoeQFrE2N528vk7zM 7 + F8FTLH2KHaqYPFuoGz0euEMJuURq6mksNpcfOeB1c2c 8 + -> ssh-ed25519 HEOV7w C21n2MnnY/SaLOwsp3YZpYsV0tg1TYCMKbF4a5gx0XE 9 + LwJQ0kyY1spXPSHiK6q3i91E8sVIZ3HoCA35t2DpaGg 10 + --- vFnbabHIIYsg/UiEyaOQLKgozM4r6Dt4iUrnYfhjIQk 11 + � � �1��*��/A�^K��c�5XS�5�"���>/{U�|!N7��}Z����7Nq���.r���~5�
+2
secrets/secrets.nix
··· 13 13 14 14 universe = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPWva83JbLRs2E6oqAP71CARJpdGRLWEUxM524vhfxXr"]; 15 15 cosmos = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFP1mSnn2jJw4nsRtGdikPlN6Cie+kOo5a1bYctjjapg"]; 16 + sonic = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFlUqH1I3MG76kXF9cpDO6geUbhRF8h2LkSW0gO1cm+k scrumplex@dyson"]; 16 17 centauri = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIY8VwneXuBfB88eQqz48LFkfCgIghlBNzbeqyL99EcP"]; 17 18 eclipse = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgfjN4xqCCsl+XzvSFFIR4WQ18r4+G7kGcMLkTe4be6"]; 18 19 in { ··· 70 71 "eclipse/wg-backdoor.key.age".publicKeys = scrumplex ++ eclipse; 71 72 "eclipse/yt-dlp-targets.age".publicKeys = scrumplex ++ eclipse; 72 73 74 + "common/Beehive.psk.age".publicKeys = cosmos ++ sonic ++ scrumplex; 73 75 "common/beets-secrets.yaml.age".publicKeys = andromeda ++ dyson ++ scrumplex; 74 76 "common/listenbrainz-token.age".publicKeys = andromeda ++ dyson ++ scrumplex; 75 77 "common/mqtt-password.age".publicKeys = scrumplex ++ universe ++ cosmos ++ eclipse;