mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-12-16 07:07:14 +01:00
Compare commits
5 Commits
d74fd94f06
...
smartd-not
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb6520454d | ||
|
|
69f98933a4 | ||
|
|
bf2959c68d | ||
|
|
17f0268d12 | ||
|
|
ebce0eb67a |
@@ -10,9 +10,12 @@
|
|||||||
|
|
||||||
./services/acme.nix
|
./services/acme.nix
|
||||||
./services/auto-upgrade.nix
|
./services/auto-upgrade.nix
|
||||||
|
./services/irqbalance.nix
|
||||||
./services/logrotate.nix
|
./services/logrotate.nix
|
||||||
./services/nginx.nix
|
./services/nginx.nix
|
||||||
./services/openssh.nix
|
./services/openssh.nix
|
||||||
|
./services/postfix.nix
|
||||||
|
./services/smartd.nix
|
||||||
./services/thermald.nix
|
./services/thermald.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
25
base/nix.nix
25
base/nix.nix
@@ -1,8 +1,19 @@
|
|||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
{
|
{
|
||||||
nix.gc.automatic = true;
|
nix = {
|
||||||
nix.gc.options = "--delete-older-than 2d";
|
gc = {
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
automatic = true;
|
||||||
|
options = "--delete-older-than 2d";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
allow-dirty = true;
|
||||||
|
auto-optimise-store = true;
|
||||||
|
builders-use-substitutes = true;
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
log-lines = 50;
|
||||||
|
use-xdg-base-directories = true;
|
||||||
|
};
|
||||||
|
|
||||||
/* This makes commandline tools like
|
/* This makes commandline tools like
|
||||||
** nix run nixpkgs#hello
|
** nix run nixpkgs#hello
|
||||||
@@ -10,8 +21,10 @@
|
|||||||
** use the same channel the system
|
** use the same channel the system
|
||||||
** was built with
|
** was built with
|
||||||
*/
|
*/
|
||||||
nix.registry = {
|
registry = {
|
||||||
nixpkgs.flake = inputs.nixpkgs;
|
"nixpkgs".flake = inputs.nixpkgs;
|
||||||
|
"pvv-nix".flake = inputs.self;
|
||||||
|
};
|
||||||
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
};
|
};
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
||||||
}
|
}
|
||||||
4
base/services/irqbalance.nix
Normal file
4
base/services/irqbalance.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.irqbalance.enable = true;
|
||||||
|
}
|
||||||
23
base/services/postfix.nix
Normal file
23
base/services/postfix.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.postfix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.postfix = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
hostname = "${config.networking.hostName}.pvv.ntnu.no";
|
||||||
|
domain = "pvv.ntnu.no";
|
||||||
|
|
||||||
|
relayHost = "smtp.pvv.ntnu.no";
|
||||||
|
relayPort = 465;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
smtp_tls_wrappermode = "yes";
|
||||||
|
smtp_tls_security_level = "encrypt";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nothing should be delivered to this machine
|
||||||
|
destination = [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
8
base/services/smartd.nix
Normal file
8
base/services/smartd.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
services.smartd.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
environment.systemPackages = lib.optionals config.services.smartd.enable (with pkgs; [
|
||||||
|
smartmontools
|
||||||
|
]);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user