diff options
Diffstat (limited to 'makefu/1systems')
-rw-r--r-- | makefu/1systems/cake/config.nix | 7 | ||||
-rw-r--r-- | makefu/1systems/filepimp/config.nix | 1 | ||||
-rw-r--r-- | makefu/1systems/firecracker/config.nix | 25 | ||||
-rw-r--r-- | makefu/1systems/firecracker/hardware-config.nix | 30 | ||||
-rw-r--r-- | makefu/1systems/firecracker/source.nix | 4 | ||||
-rw-r--r-- | makefu/1systems/gum/config.nix | 29 | ||||
-rw-r--r-- | makefu/1systems/gum/hardware-config.nix | 4 | ||||
-rw-r--r-- | makefu/1systems/sdcard/config.nix | 40 | ||||
-rw-r--r-- | makefu/1systems/sdcard/kernel.nix | 15 | ||||
-rw-r--r-- | makefu/1systems/sdcard/source.nix | 3 | ||||
-rw-r--r-- | makefu/1systems/wbob/config.nix | 10 |
11 files changed, 156 insertions, 12 deletions
diff --git a/makefu/1systems/cake/config.nix b/makefu/1systems/cake/config.nix index 8617578f0..eaaac8f41 100644 --- a/makefu/1systems/cake/config.nix +++ b/makefu/1systems/cake/config.nix @@ -5,14 +5,14 @@ in { imports = [ <stockholm/makefu> ./hardware-config.nix + { environment.systemPackages = with pkgs;[ rsync screen curl git tmux picocom mosh ];} # <stockholm/makefu/2configs/tools/core.nix> - { environment.systemPackages = with pkgs;[ rsync screen curl git ];} <stockholm/makefu/2configs/binary-cache/nixos.nix> #<stockholm/makefu/2configs/support-nixos.nix> <stockholm/makefu/2configs/homeautomation/default.nix> <stockholm/makefu/2configs/homeautomation/google-muell.nix> -# configure your hw: -# <stockholm/makefu/2configs/save-diskspace.nix> + # configure your hw: + # <stockholm/makefu/2configs/save-diskspace.nix> ]; krebs = { enable = true; @@ -24,5 +24,4 @@ in { documentation.man.enable = false; services.nixosManual.enable = false; sound.enable = false; - } diff --git a/makefu/1systems/filepimp/config.nix b/makefu/1systems/filepimp/config.nix index 30ba61a9b..e023c2885 100644 --- a/makefu/1systems/filepimp/config.nix +++ b/makefu/1systems/filepimp/config.nix @@ -48,7 +48,6 @@ in { hardware.cpu.amd.updateMicrocode = true; zramSwap.enable = true; - zramSwap.numDevices = 2; makefu.snapraid = let toMedia = name: "/media/" + name; diff --git a/makefu/1systems/firecracker/config.nix b/makefu/1systems/firecracker/config.nix new file mode 100644 index 000000000..87f500287 --- /dev/null +++ b/makefu/1systems/firecracker/config.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: +let + primaryInterface = "eth0"; +in { + imports = [ + <stockholm/makefu> + ./hardware-config.nix + # <stockholm/makefu/2configs/tools/core.nix> + { environment.systemPackages = with pkgs;[ rsync screen curl git ];} + <stockholm/makefu/2configs/binary-cache/nixos.nix> + #<stockholm/makefu/2configs/support-nixos.nix> +# configure your hw: +# <stockholm/makefu/2configs/save-diskspace.nix> + ]; + krebs = { + enable = true; + tinc.retiolum.enable = true; + build.host = config.krebs.hosts.firecracker; + }; + networking.firewall.trustedInterfaces = [ primaryInterface ]; + documentation.info.enable = false; + documentation.man.enable = false; + services.nixosManual.enable = false; + sound.enable = false; +} diff --git a/makefu/1systems/firecracker/hardware-config.nix b/makefu/1systems/firecracker/hardware-config.nix new file mode 100644 index 000000000..b821a3375 --- /dev/null +++ b/makefu/1systems/firecracker/hardware-config.nix @@ -0,0 +1,30 @@ +{ pkgs, lib, ... }: +{ + boot.kernelParams = lib.mkForce ["console=ttyS2,1500000n8" "earlycon=uart8250,mmio32,0xff1a0000" "earlyprintk"]; + boot.loader.grub.enable = false; + boot.loader.generic-extlinux-compatible.enable = true; + boot.loader.generic-extlinux-compatible.configurationLimit = 1; + boot.loader.generationsDir.enable = lib.mkDefault false; + boot.supportedFilesystems = lib.mkForce [ "vfat" ]; + + boot.tmpOnTmpfs = lib.mkForce false; + boot.cleanTmpDir = true; + hardware.enableRedistributableFirmware = true; + + ## wifi not working, will be fixed with https://github.com/NixOS/nixpkgs/pull/53747 + boot.kernelPackages = pkgs.linuxPackages_latest; + networking.wireless.enable = true; + # File systems configuration for using the installer's partition layout + swapDevices = [ { device = "/var/swap"; size = 4096; } ]; + fileSystems = { + "/boot" = { + device = "/dev/disk/by-label/NIXOS_BOOT"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + }; + +} diff --git a/makefu/1systems/firecracker/source.nix b/makefu/1systems/firecracker/source.nix new file mode 100644 index 000000000..22c40039e --- /dev/null +++ b/makefu/1systems/firecracker/source.nix @@ -0,0 +1,4 @@ +{ + name="cake"; + full = true; +} diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 7bc06f833..9585d8599 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -97,6 +97,24 @@ in { # sharing <stockholm/makefu/2configs/share/gum.nix> <stockholm/makefu/2configs/torrent.nix> + { services.sickbeard = { + enable = true; + package = pkgs.sickgear; + user = "sickbeard"; + group = "download"; + port = 8280; + }; + services.nginx.virtualHosts."sick.makefu.r" = { + locations."/".proxyPass = http://localhost:8280; + extraConfig = '' + if ( $server_addr = "${external-ip}" ) { + return 403; + } + ''; + }; + users.users.sickbeard.extraGroups = [ "nginx" ]; + } + { nixpkgs.config.allowUnfree = true; } #<stockholm/makefu/2configs/retroshare.nix> ## <stockholm/makefu/2configs/ipfs.nix> #<stockholm/makefu/2configs/syncthing.nix> @@ -111,6 +129,7 @@ in { <stockholm/makefu/2configs/iodined.nix> <stockholm/makefu/2configs/bitlbee.nix> <stockholm/makefu/2configs/wireguard/server.nix> + <stockholm/makefu/2configs/wireguard/wiregrill.nix> # Removed until move: no extra mails <stockholm/makefu/2configs/urlwatch> @@ -153,11 +172,17 @@ in { makefu.dl-dir = "/var/download"; - services.openssh.hostKeys = [ + services.openssh.hostKeys = lib.mkForce [ { bits = 4096; path = (toString <secrets/ssh_host_rsa_key>); type = "rsa"; } { path = (toString <secrets/ssh_host_ed25519_key>); type = "ed25519"; } ]; ###### stable - services.nginx.virtualHosts.cgit.serverAliases = [ "cgit.euer.krebsco.de" ]; + + services.nginx.virtualHosts."cgit.euer.krebsco.de" = { + forceSSL = true; + enableACME = true; + locations."/".proxyPass = "http://cgit.gum.r"; + }; + krebs.build.host = config.krebs.hosts.gum; # Network diff --git a/makefu/1systems/gum/hardware-config.nix b/makefu/1systems/gum/hardware-config.nix index 857fad7aa..e49b621e7 100644 --- a/makefu/1systems/gum/hardware-config.nix +++ b/makefu/1systems/gum/hardware-config.nix @@ -41,7 +41,7 @@ in { boot.loader.grub.enable = true; boot.loader.grub.version = 2; boot.loader.grub.devices = [ main-disk ]; - boot.initrd.kernelModules = [ "dm-raid" "dm_cache" ]; + boot.initrd.kernelModules = [ "dm-raid" "dm_cache" "dm-thin-pool" ]; boot.initrd.availableKernelModules = [ "ata_piix" "vmw_pvscsi" "virtio_pci" "sd_mod" "ahci" "xhci_pci" "ehci_pci" "ahci" "sd_mod" @@ -67,7 +67,7 @@ in { fileSystems."/var/www/binaergewitter" = { device = "/dev/nixos/binaergewitter"; fsType = "ext4"; - options = [ "nofail" "x-systemd.automount" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; + options = [ "nofail" ]; }; fileSystems."/var/lib/borgbackup" = { device = "/dev/nixos/backup"; diff --git a/makefu/1systems/sdcard/config.nix b/makefu/1systems/sdcard/config.nix new file mode 100644 index 000000000..4e3c22a30 --- /dev/null +++ b/makefu/1systems/sdcard/config.nix @@ -0,0 +1,40 @@ +{ config, pkgs, lib, ... }: +let + kernel = pkgs.callPackage ./kernel.nix { + kernelPatches = with pkgs.kernelPatches; [ + # kernelPatches.bridge_stp_helper + # kernelPatches.modinst_arg_list_too_long + ]; + }; +in +{ + imports = [ + <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix> + # <stockholm/makefu/2configs/minimal.nix> + ]; + # TODO: NIX_PATH and nix.nixPath are being set by default.nix right now + # cd ~/stockholm ; nix build config.system.build.sdImage -I nixos-config=makefu/1systems/sdcard/config.nix -f /home/makefu/nixpkgs/nixos + + boot.kernelParams = ["console=ttyS2,1500000" "earlycon=uart8250,mmio32,0xff1a0000"]; + # boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackagesFor kernel; + boot.supportedFilesystems = lib.mkForce [ "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; + + # krebs.hidden-ssh.enable = true; + environment.systemPackages = with pkgs; [ + aria2 + ddrescue + ]; + environment.extraInit = '' + EDITOR=vim + ''; + # iso-specific + services.openssh = { + enable = true; + hostKeys = [ + { bits = 8192; type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; } + ]; + }; + # enable ssh in the iso boot process + systemd.services.sshd.wantedBy = lib.mkForce [ "multi-user.target" ]; +} diff --git a/makefu/1systems/sdcard/kernel.nix b/makefu/1systems/sdcard/kernel.nix new file mode 100644 index 000000000..df5e7ada9 --- /dev/null +++ b/makefu/1systems/sdcard/kernel.nix @@ -0,0 +1,15 @@ +{ fetchFromGitLab, buildLinux, ... } @ args: +buildLinux (args // rec { + version = "4.4.55"; + modDirVersion = "4.4.55"; + extraMeta.branch = "4.4"; + defconfig = "firefly_linux_defconfig"; + + src = fetchFromGitLab { + owner = "TeeFirefly"; + repo = "linux-kernel"; + rev = "firefly_0821_release"; + sha256 = "1fwj9cm5ysz286znrr3fyrhfn903m84i7py4rv3y3h9avxb3zl1r"; + }; + extraMeta.platforms = [ "aarch64-linux" ]; +} // (args.argsOverride or {})) diff --git a/makefu/1systems/sdcard/source.nix b/makefu/1systems/sdcard/source.nix new file mode 100644 index 000000000..6bef8ada9 --- /dev/null +++ b/makefu/1systems/sdcard/source.nix @@ -0,0 +1,3 @@ +{ + name="iso"; +} diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index ab77f16dd..8b01de4d0 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -16,15 +16,16 @@ in { <stockholm/makefu/2configs/tools/core-gui.nix> <stockholm/makefu/2configs/tools/extra-gui.nix> <stockholm/makefu/2configs/tools/media.nix> - <stockholm/makefu/2configs/virtualisation/libvirt.nix> + # <stockholm/makefu/2configs/virtualisation/libvirt.nix> + # <stockholm/makefu/2configs/virtualisation/virtualbox.nix> <stockholm/makefu/2configs/tinc/retiolum.nix> - <stockholm/makefu/2configs/mqtt.nix> <stockholm/makefu/2configs/gui/wbob-kiosk.nix> # <stockholm/makefu/2configs/gui/studio-virtual.nix> # <stockholm/makefu/2configs/audio/jack-on-pulse.nix> # <stockholm/makefu/2configs/audio/realtime-audio.nix> # <stockholm/makefu/2configs/vncserver.nix> + <stockholm/makefu/2configs/logging/server.nix> # Services # <stockholm/makefu/2configs/hydra/stockholm.nix> @@ -33,7 +34,7 @@ in { <stockholm/makefu/2configs/bluetooth-mpd.nix> # Sensors - <stockholm/makefu/2configs/stats/client.nix> + # <stockholm/makefu/2configs/stats/client.nix> <stockholm/makefu/2configs/stats/collectd-client.nix> <stockholm/makefu/2configs/stats/telegraf> <stockholm/makefu/2configs/stats/telegraf/airsensor.nix> @@ -53,6 +54,7 @@ in { <stockholm/makefu/2configs/bureautomation> <stockholm/makefu/2configs/bureautomation/led-fader.nix> <stockholm/makefu/2configs/bureautomation/mpd.nix> + <stockholm/makefu/2configs/mqtt.nix> <stockholm/makefu/2configs/bureautomation/hass.nix> (let collectd-port = 25826; @@ -85,6 +87,7 @@ in { ''; }) + <stockholm/makefu/2configs/backup/state.nix> # temporary # <stockholm/makefu/2configs/temp/rst-issue.nix> ]; @@ -106,6 +109,7 @@ in { LoadPlugin curl <Plugin curl> + Interval 300 TotalTime true NamelookupTime true ConnectTime true |