Use modulesPath where appropriate

This commit is contained in:
Emery Hemingway 2020-08-04 17:15:07 +02:00
父節點 9b04ebedde
當前提交 7ce33808f2
共有 12 個檔案被更改,包括 65 行新增54 行删除

查看文件

@ -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";
};

查看文件

@ -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 <lib/pkgs/bmxd.nix>) { inherit pkgs; };
sysinfo-json = import <this-host/sysinfo-json.nix> {
inherit pkgs bmxd ddmeshNode;
};
bmxd = import ../../../lib/pkgs/bmxd.nix { inherit pkgs; };
sysinfo-json =
import ./sysinfo-json.nix { inherit pkgs bmxd ddmeshNode; };
in {
imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
<lib>
<lib/lxc-container.nix>
<lib/shared.nix>
(modulesPath + "/profiles/minimal.nix")
../../../lib
../../../lib/lxc-container.nix
../../../lib/shared.nix
];
boot.tmpOnTmpfs = true;

查看文件

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

查看文件

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

查看文件

@ -1,11 +1,11 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, modulesPath, ... }:
{
imports = [
<nixpkgs/nixos/modules/profiles/minimal.nix>
<lib>
<lib/lxc-container.nix>
<lib/shared.nix>
(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 <lib/pkgs/pile.nix>) { inherit pkgs; };
let pile = import ../../../lib/pkgs/pile.nix { inherit pkgs; };
in {
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];

查看文件

@ -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
<nixpkgs/nixos/modules/profiles/minimal.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;

查看文件

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

查看文件

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

查看文件

@ -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 =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];

查看文件

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

查看文件

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

查看文件

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