From d47dcb07825f548c76323143d6f3e04d6a9c773e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 5 Feb 2019 22:32:53 +0100 Subject: ma gum: use aarch64 builder --- makefu/1systems/gum/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index e274b4bf..7bc06f83 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -84,6 +84,7 @@ in { + # services -- cgit v1.2.3 From 6788519e4be7390c76bffacadd05d49f8fc3cace Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 8 Feb 2019 15:17:23 +0100 Subject: ma x: enable remote builder --- makefu/1systems/x/config.nix | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 138735d9..7ed63837 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -15,6 +15,13 @@ + # + #{ + # netboot_server = { + # network.wan = "wlp3s0"; + # network.lan = "enp0s25"; + # }; + #} # @@ -52,21 +59,22 @@ # Virtualization - - { - networking.firewall.allowedTCPPorts = [ 8080 ]; - networking.nat = { - enable = true; - externalInterface = "wlp3s0"; - internalInterfaces = [ "vboxnet0" ]; - }; - } + # + #{ + # networking.firewall.allowedTCPPorts = [ 8080 ]; + # networking.nat = { + # enable = true; + # externalInterface = "wlp3s0"; + # internalInterfaces = [ "vboxnet0" ]; + # }; + #} # Services # + # Hardware @@ -162,7 +170,6 @@ "/home/makefu/docs" "/home/makefu/.password-store" "/home/makefu/.secrets-pass" - "/home/makefu/autosync/Database.kdb" ]; services.syncthing.user = lib.mkForce "makefu"; -- cgit v1.2.3 From 6e82401de73d1a95a5e465fe75974d91c6595c15 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 9 Feb 2019 23:19:19 +0100 Subject: ma cake.r: now perform the important tasks of omo --- makefu/1systems/cake/config.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/cake/config.nix b/makefu/1systems/cake/config.nix index e40042b2..8617578f 100644 --- a/makefu/1systems/cake/config.nix +++ b/makefu/1systems/cake/config.nix @@ -1,9 +1,16 @@ { config, lib, pkgs, ... }: -{ +let + primaryInterface = "eth0"; +in { imports = [ ./hardware-config.nix - + # + { environment.systemPackages = with pkgs;[ rsync screen curl git ];} + + # + + # configure your hw: # ]; @@ -12,7 +19,7 @@ tinc.retiolum.enable = true; build.host = config.krebs.hosts.cake; }; - + networking.firewall.trustedInterfaces = [ primaryInterface ]; documentation.info.enable = false; documentation.man.enable = false; services.nixosManual.enable = false; -- cgit v1.2.3 From a68144db9fef2a46a5817da7449fe2ba89e600ee Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Feb 2019 17:52:22 +0100 Subject: ma gum.r: also load dm-raid at startup of kernel to mount binaergewitter --- makefu/1systems/gum/hardware-config.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum/hardware-config.nix b/makefu/1systems/gum/hardware-config.nix index 542b79fe..857fad7a 100644 --- a/makefu/1systems/gum/hardware-config.nix +++ b/makefu/1systems/gum/hardware-config.nix @@ -41,36 +41,36 @@ in { boot.loader.grub.enable = true; boot.loader.grub.version = 2; boot.loader.grub.devices = [ main-disk ]; - boot.initrd.kernelModules = [ "dm-raid" ]; + boot.initrd.kernelModules = [ "dm-raid" "dm_cache" ]; boot.initrd.availableKernelModules = [ "ata_piix" "vmw_pvscsi" "virtio_pci" "sd_mod" "ahci" "xhci_pci" "ehci_pci" "ahci" "sd_mod" ]; - boot.kernelModules = [ "dm-thin-pool" "kvm-intel" ]; + boot.kernelModules = [ "dm-raid" "dm_cache" "dm-thin-pool" "kvm-intel" ]; hardware.enableRedistributableFirmware = true; fileSystems."/" = { - device = "/dev/mapper/nixos-root"; + device = "/dev/nixos/root"; fsType = "ext4"; }; fileSystems."/var/lib" = { - device = "/dev/mapper/nixos-lib"; + device = "/dev/nixos/lib"; fsType = "ext4"; }; fileSystems."/var/log" = { - device = "/dev/mapper/nixos-log"; + device = "/dev/nixos/log"; fsType = "ext4"; }; fileSystems."/var/download" = { - device = "/dev/mapper/nixos-download"; + device = "/dev/nixos/download"; fsType = "ext4"; }; fileSystems."/var/www/binaergewitter" = { - device = "/dev/mapper/nixos-binaergewitter"; + device = "/dev/nixos/binaergewitter"; fsType = "ext4"; - options = [ "nofail" ]; + options = [ "nofail" "x-systemd.automount" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; }; fileSystems."/var/lib/borgbackup" = { - device = "/dev/mapper/nixos-backup"; + device = "/dev/nixos/backup"; fsType = "ext4"; }; fileSystems."/boot" = { -- cgit v1.2.3 From 93a2ebaa6de0a3e450a28d109ee5d4a92d20f2d8 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 16 Feb 2019 22:37:29 +0100 Subject: ma x.r: prefer remote fetch of sources --- makefu/1systems/x/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'makefu/1systems') diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 7ed63837..ceeccc0b 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -75,6 +75,7 @@ # + { nixpkgs.overlays = [ (self: super: super.prefer-remote-fetch self super) ]; } # Hardware -- cgit v1.2.3 From 9c702551abbf5c486d9dac3becc4d5e998511a52 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 6 Mar 2019 16:42:27 +0100 Subject: ma bureautomation: split into files --- makefu/1systems/wbob/config.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index 3930406b..ab77f16d 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -9,6 +9,7 @@ in { imports = [ # Include the results of the hardware scan. + # @@ -39,7 +40,6 @@ in { - # { environment.systemPackages = [ pkgs.vlc ]; } @@ -51,6 +51,7 @@ in { ]; } + (let -- cgit v1.2.3 From 593a519f6eb210913be25c441cd54c25c12744c6 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 6 Mar 2019 16:43:52 +0100 Subject: ma crapi.r: split into software and hardware config --- makefu/1systems/crapi/config.nix | 33 +------------------------- makefu/1systems/crapi/hardware-config.nix | 39 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 32 deletions(-) create mode 100644 makefu/1systems/crapi/hardware-config.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/crapi/config.nix b/makefu/1systems/crapi/config.nix index d96b872d..e7c6c366 100644 --- a/makefu/1systems/crapi/config.nix +++ b/makefu/1systems/crapi/config.nix @@ -1,46 +1,15 @@ { config, pkgs, lib, ... }: { - # :l - # builtins.readDir (pkgs.fetchFromGitHub { owner = "nixos"; repo = "nixpkgs-channels"; rev = "6c064e6b"; sha256 = "1rqzh475xn43phagrr30lb0fd292c1s8as53irihsnd5wcksnbyd"; }) imports = [ + ./hardware-config.nix ]; krebs.build.host = config.krebs.hosts.crapi; - # NixOS wants to enable GRUB by default - boot.loader.grub.enable = false; - # Enables the generation of /boot/extlinux/extlinux.conf - boot.loader.generic-extlinux-compatible.enable = true; - - boot.kernelPackages = pkgs.linuxPackages_rpi; - - nix.binaryCaches = [ "http://nixos-arm.dezgeg.me/channel" ]; - nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ]; - - fileSystems = { - "/boot" = { - device = "/dev/disk/by-label/NIXOS_BOOT"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - }; - }; - - system.activationScripts.create-swap = '' - if [ ! -e /swapfile ]; then - fallocate -l 2G /swapfile - mkswap /swapfile - fi - ''; - swapDevices = [ { device = "/swapfile"; size = 2048; } ]; - - nix.package = lib.mkForce pkgs.nixStable; services.openssh.enable = true; } diff --git a/makefu/1systems/crapi/hardware-config.nix b/makefu/1systems/crapi/hardware-config.nix new file mode 100644 index 00000000..bba31dab --- /dev/null +++ b/makefu/1systems/crapi/hardware-config.nix @@ -0,0 +1,39 @@ +{ pkgs, lib, ... }: +{ + #raspi1 + boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=tty0" "console=ttyS1,115200n8" ]; + + boot.loader.grub.enable = false; + boot.loader.raspberryPi.enable = true; + boot.loader.raspberryPi.version = 1; + boot.loader.raspberryPi.uboot.enable = true; + boot.loader.raspberryPi.uboot.configurationLimit = 1; + boot.loader.generationsDir.enable = lib.mkDefault false; + hardware.enableRedistributableFirmware = true; + boot.cleanTmpDir = true; + environment.systemPackages = [ pkgs.raspberrypi-tools ]; + boot.kernelPackages = pkgs.linuxPackages_rpi; + + nix.binaryCaches = [ "http://nixos-arm.dezgeg.me/channel" ]; + nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ]; + + fileSystems = { + "/boot" = { + device = "/dev/disk/by-label/NIXOS_BOOT"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + }; + + system.activationScripts.create-swap = '' + if [ ! -e /swapfile ]; then + fallocate -l 2G /swapfile + mkswap /swapfile + chmod 600 /swapfile + fi + ''; + swapDevices = [ { device = "/swapfile"; size = 4096; } ]; +} -- cgit v1.2.3 From 33e5e058c29c27c69db0ae100046dcf000895294 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 6 Mar 2019 16:44:14 +0100 Subject: ma x.r: re-enable virtualbox --- makefu/1systems/x/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index ceeccc0b..de55e9e8 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -59,7 +59,7 @@ # Virtualization - # + #{ # networking.firewall.allowedTCPPorts = [ 8080 ]; # networking.nat = { -- cgit v1.2.3