Use modulesPath where appropriate

This commit is contained in:
Ehmry - 2020-08-04 17:15:07 +02:00
parent 9b04ebedde
commit 7ce33808f2
12 changed files with 65 additions and 54 deletions

View File

@ -11,11 +11,28 @@
nixosConfigurations = { 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 { server7 = nixpkgs.lib.nixosSystem {
modules = [ modules = [ ./hosts/server7 hydra.nixosModules.hydra ];
./hosts/server7
hydra.nixosModules.hydra
];
system = "x86_64-linux"; system = "x86_64-linux";
}; };

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, modulesPath, ... }:
let let
coreAddress = "172.20.72.40"; coreAddress = "172.20.72.40";
@ -11,16 +11,15 @@ let
ddmeshNode = 51073; ddmeshNode = 51073;
ddmeshAddrPart = "200.74"; ddmeshAddrPart = "200.74";
rt_table = 7; rt_table = 7;
bmxd = import (toString <lib/pkgs/bmxd.nix>) { inherit pkgs; }; bmxd = import ../../../lib/pkgs/bmxd.nix { inherit pkgs; };
sysinfo-json = import <this-host/sysinfo-json.nix> { sysinfo-json =
inherit pkgs bmxd ddmeshNode; import ./sysinfo-json.nix { inherit pkgs bmxd ddmeshNode; };
};
in { in {
imports = [ imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
<lib> ../../../lib
<lib/lxc-container.nix> ../../../lib/lxc-container.nix
<lib/shared.nix> ../../../lib/shared.nix
]; ];
boot.tmpOnTmpfs = true; boot.tmpOnTmpfs = true;

View File

@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, modulesPath, ... }:
{ {
imports = [ imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
../../../lib ../../../lib
../../../lib/lxc-container.nix ../../../lib/lxc-container.nix
../../../lib/shared.nix ../../../lib/shared.nix

View File

@ -1,11 +1,11 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, modulesPath, ... }:
{ {
imports = [ imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
<lib> ../../../lib
<lib/lxc-container.nix> ../../../lib/lxc-container.nix
<lib/shared.nix> ../../../lib/shared.nix
]; ];
networking.hostName = "kibana"; networking.hostName = "kibana";

View File

@ -1,11 +1,11 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, modulesPath, ... }:
{ {
imports = [ imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
<lib> ../../../lib
<lib/lxc-container.nix> ../../../lib/lxc-container.nix
<lib/shared.nix> ../../../lib/shared.nix
]; ];
c3d2 = { c3d2 = {
@ -22,8 +22,7 @@
environment.systemPackages = [ pkgs.git ]; environment.systemPackages = [ pkgs.git ];
systemd.services.ledball = systemd.services.ledball =
let let pile = import ../../../lib/pkgs/pile.nix { inherit pkgs; };
pile = import (toString <lib/pkgs/pile.nix>) { inherit pkgs; };
in { in {
after = [ "network-online.target" ]; after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View File

@ -2,15 +2,15 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }: { config, pkgs, lib, modulesPath, ... }:
{ {
imports = imports = [
[ ../../lib/lxc-container.nix ../../lib/lxc-container.nix
../../lib/shared.nix ../../lib/shared.nix
../../lib/admins.nix ../../lib/admins.nix
<nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
]; ];
networking.hostName = "nixbert"; # Define your hostname. networking.hostName = "nixbert"; # Define your hostname.
networking.useNetworkd = false; networking.useNetworkd = false;

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, modulesPath, ... }:
let let
freifunkNodes = { freifunkNodes = {
@ -12,10 +12,10 @@ let
}; };
in { in {
imports = [ imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
<lib> ../../../lib
<lib/lxc-container.nix> ../../../lib/lxc-container.nix
<lib/shared.nix> ../../../lib/shared.nix
]; ];
c3d2 = { c3d2 = {

View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = [ <this-host/hardware-configuration.nix> <lib> ]; imports = [ ./hardware-configuration.nix ../../lib ];
c3d2 = { c3d2 = {
users.k-ot = true; users.k-ot = true;

View File

@ -1,12 +1,10 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];

View File

@ -5,10 +5,9 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [ # Include the results of the hardware scan.
[ # Include the results of the hardware scan. ./hardware-configuration.nix
<this-host/hardware-configuration.nix> ];
];
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = false; boot.loader.generic-extlinux-compatible.enable = false;

View File

@ -3,7 +3,6 @@
let yggaddr = import ../../lib/server7-yggaddr.nix; let yggaddr = import ../../lib/server7-yggaddr.nix;
in { in {
imports = [ imports = [
# <nixpkgs/nixos/modules/profiles/minimal.nix>
../../lib ../../lib
../../lib/default-gateway.nix ../../lib/default-gateway.nix
./borgbackup.nix ./borgbackup.nix

View File

@ -1,10 +1,10 @@
{ pkgs, lib, ... }: { pkgs, lib, modulesPath, ... }:
{ {
imports = imports = [
[ <nixpkgs/nixos/modules/profiles/minimal.nix> (modulesPath + "/profiles/minimal.nix")
<nixpkgs/nixos/modules/profiles/docker-container.nix> (modulesPath + "/profiles/docker-container.nix")
]; ];
networking.networkmanager.dns = "unbound"; networking.networkmanager.dns = "unbound";
networking.useHostResolvConf = false; networking.useHostResolvConf = false;