diff --git a/flake.nix b/flake.nix index d825442f..0d7f5fd1 100644 --- a/flake.nix +++ b/flake.nix @@ -11,11 +11,28 @@ nixosConfigurations = { + glotzbert = nixpkgs.lib.nixosSystem { + modules = [ ./hosts/glotzbert/configuration.nix ]; + system = "x86_64-linux"; + }; + + hydra = nixpkgs.lib.nixosSystem { + modules = [ ./hosts/hydra/configuration.nix ]; + system = "x86_64-linux"; + }; + + kibana = nixpkgs.lib.nixosSystem { + modules = [ ./hosts/containers/kibana/configuration.nix ]; + system = "x86_64-linux"; + }; + + pulsebert = nixpkgs.lib.nixosSystem { + modules = [ ./hosts/pulsebert/configuration.nix ]; + system = "aarch64-linux"; + }; + server7 = nixpkgs.lib.nixosSystem { - modules = [ - ./hosts/server7 - hydra.nixosModules.hydra - ]; + modules = [ ./hosts/server7 hydra.nixosModules.hydra ]; system = "x86_64-linux"; }; diff --git a/hosts/containers/freifunk/configuration.nix b/hosts/containers/freifunk/configuration.nix index d8dcdad6..f212667b 100644 --- a/hosts/containers/freifunk/configuration.nix +++ b/hosts/containers/freifunk/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, modulesPath, ... }: let coreAddress = "172.20.72.40"; @@ -11,16 +11,15 @@ let ddmeshNode = 51073; ddmeshAddrPart = "200.74"; rt_table = 7; - bmxd = import (toString ) { inherit pkgs; }; - sysinfo-json = import { - inherit pkgs bmxd ddmeshNode; - }; + bmxd = import ../../../lib/pkgs/bmxd.nix { inherit pkgs; }; + sysinfo-json = + import ./sysinfo-json.nix { inherit pkgs bmxd ddmeshNode; }; in { imports = [ - - - - + (modulesPath + "/profiles/minimal.nix") + ../../../lib + ../../../lib/lxc-container.nix + ../../../lib/shared.nix ]; boot.tmpOnTmpfs = true; diff --git a/hosts/containers/grafana/configuration.nix b/hosts/containers/grafana/configuration.nix index cc2e77ec..ad061778 100644 --- a/hosts/containers/grafana/configuration.nix +++ b/hosts/containers/grafana/configuration.nix @@ -1,8 +1,8 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, modulesPath, ... }: { imports = [ - + (modulesPath + "/profiles/minimal.nix") ../../../lib ../../../lib/lxc-container.nix ../../../lib/shared.nix diff --git a/hosts/containers/kibana/configuration.nix b/hosts/containers/kibana/configuration.nix index 9a30e5da..ce543d4c 100644 --- a/hosts/containers/kibana/configuration.nix +++ b/hosts/containers/kibana/configuration.nix @@ -1,11 +1,11 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, modulesPath, ... }: { imports = [ - - - - + (modulesPath + "/profiles/minimal.nix") + ../../../lib + ../../../lib/lxc-container.nix + ../../../lib/shared.nix ]; networking.hostName = "kibana"; diff --git a/hosts/containers/ledstripes/configuration.nix b/hosts/containers/ledstripes/configuration.nix index 55d9a129..e549161e 100644 --- a/hosts/containers/ledstripes/configuration.nix +++ b/hosts/containers/ledstripes/configuration.nix @@ -1,11 +1,11 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, modulesPath, ... }: { imports = [ - - - - + (modulesPath + "/profiles/minimal.nix") + ../../../lib + ../../../lib/lxc-container.nix + ../../../lib/shared.nix ]; c3d2 = { @@ -22,8 +22,7 @@ environment.systemPackages = [ pkgs.git ]; systemd.services.ledball = - let - pile = import (toString ) { inherit pkgs; }; + let pile = import ../../../lib/pkgs/pile.nix { inherit pkgs; }; in { after = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; diff --git a/hosts/containers/lxc-template.nix b/hosts/containers/lxc-template.nix index f33129df..dbb6ba58 100644 --- a/hosts/containers/lxc-template.nix +++ b/hosts/containers/lxc-template.nix @@ -2,15 +2,15 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, modulesPath, ... }: { - imports = - [ ../../lib/lxc-container.nix - ../../lib/shared.nix - ../../lib/admins.nix - - ]; + imports = [ + ../../lib/lxc-container.nix + ../../lib/shared.nix + ../../lib/admins.nix + (modulesPath + "/profiles/minimal.nix") + ]; networking.hostName = "nixbert"; # Define your hostname. networking.useNetworkd = false; diff --git a/hosts/containers/scrape/configuration.nix b/hosts/containers/scrape/configuration.nix index 92335529..e1aa115e 100644 --- a/hosts/containers/scrape/configuration.nix +++ b/hosts/containers/scrape/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, modulesPath, ... }: let freifunkNodes = { @@ -12,10 +12,10 @@ let }; in { imports = [ - - - - + (modulesPath + "/profiles/minimal.nix") + ../../../lib + ../../../lib/lxc-container.nix + ../../../lib/shared.nix ]; c3d2 = { diff --git a/hosts/glotzbert/configuration.nix b/hosts/glotzbert/configuration.nix index 617c5ded..3d2e0b35 100644 --- a/hosts/glotzbert/configuration.nix +++ b/hosts/glotzbert/configuration.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - imports = [ ]; + imports = [ ./hardware-configuration.nix ../../lib ]; c3d2 = { users.k-ot = true; diff --git a/hosts/glotzbert/hardware-configuration.nix b/hosts/glotzbert/hardware-configuration.nix index 162a8fe6..c61b5897 100644 --- a/hosts/glotzbert/hardware-configuration.nix +++ b/hosts/glotzbert/hardware-configuration.nix @@ -1,12 +1,10 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: { - imports = - [ - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.kernelModules = [ "kvm-intel" ]; diff --git a/hosts/pulsebert/configuration.nix b/hosts/pulsebert/configuration.nix index 9ac1b3c3..8c747b7a 100644 --- a/hosts/pulsebert/configuration.nix +++ b/hosts/pulsebert/configuration.nix @@ -5,10 +5,9 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - - ]; + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = false; diff --git a/hosts/server7/default.nix b/hosts/server7/default.nix index a0490694..8f8ae856 100644 --- a/hosts/server7/default.nix +++ b/hosts/server7/default.nix @@ -3,7 +3,6 @@ let yggaddr = import ../../lib/server7-yggaddr.nix; in { imports = [ - # ../../lib ../../lib/default-gateway.nix ./borgbackup.nix diff --git a/lib/lxc-container.nix b/lib/lxc-container.nix index e06881ce..a70daeda 100644 --- a/lib/lxc-container.nix +++ b/lib/lxc-container.nix @@ -1,10 +1,10 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, modulesPath, ... }: { - imports = - [ - - ]; + imports = [ + (modulesPath + "/profiles/minimal.nix") + (modulesPath + "/profiles/docker-container.nix") + ]; networking.networkmanager.dns = "unbound"; networking.useHostResolvConf = false;