Browse Source

nixos-module/server/defaults: enable IPMI monitoring with collectd from nixpkgs-master

master
Astro 2 months ago
parent
commit
5a012418dc
  1. 16
      flake.lock
  2. 4
      flake.nix
  3. 9
      nix/nixos-module/server/defaults.nix

16
flake.lock

@ -16,9 +16,25 @@
"type": "github"
}
},
"nixpkgs-master": {
"locked": {
"lastModified": 1629897889,
"narHash": "sha256-YoY/umk+NUtLFJgvTJkup6nLJb+sGEZ21hrupKTp7EI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6248814b6892af7dc0cf973b49690fd102088e02",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"zentralwerk-network-key": "zentralwerk-network-key"
}
},

4
flake.nix

@ -3,12 +3,13 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-21.05";
nixpkgs-master.url = "github:NixOS/nixpkgs";
# `nix flake update --override-flake zentralwerk-network-key git+file:///...`
# to provide the GPG secret key
zentralwerk-network-key.url = "git+https://gitea.c3d2.de/zentralwerk/network.git?dir=nix/key";
};
outputs = inputs@{ self, nixpkgs, zentralwerk-network-key }:
outputs = inputs@{ self, nixpkgs, nixpkgs-master, zentralwerk-network-key }:
let
system = "x86_64-linux";
systems = [ system ];
@ -22,6 +23,7 @@
specialArgs.lib = self.lib;
specialArgs.self = self;
specialArgs.inputs = inputs;
specialArgs.nixpkgs-master = nixpkgs-master;
};
in {
# Config, and utilities

9
nix/nixos-module/server/defaults.nix

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, nixpkgs-master, ... }:
{
boot.kernelModules = [ "kvm-intel" "pppoe" ];
boot.kernelParams = [ "nomodeset" ];
@ -12,4 +12,11 @@
];
services.openssh.enable = true;
services.openssh.permitRootLogin = "prohibit-password";
# additional config for bare metal
services.collectd = {
plugins.ipmi = "";
# FIXME: IPMI is only available with nixpkgs-21.11 onwards
package = nixpkgs-master.legacyPackages.${pkgs.system}.collectd;
};
}

Loading…
Cancel
Save