mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 05:59:42 +00:00
Add some more services
This commit is contained in:
parent
238d9008fe
commit
801030ec1b
|
@ -1,5 +1,9 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [
|
imports = [
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
|
./fwupd.nix
|
||||||
|
./logrotate.nix
|
||||||
|
./oomd.nix
|
||||||
|
./thermald.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
7
system/services/fwupd.nix
Normal file
7
system/services/fwupd.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{config, ...}: {
|
||||||
|
# firmware updater for machine hardware
|
||||||
|
services.fwupd = {
|
||||||
|
enbale = true;
|
||||||
|
daemonSettings.EspLocation = config.boot.loader.efi.efiSysMountPoint;
|
||||||
|
};
|
||||||
|
}
|
24
system/services/logrotate.nix
Normal file
24
system/services/logrotate.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs, lib, ... }: {
|
||||||
|
services.logrotate.settings.header = {
|
||||||
|
# general
|
||||||
|
global = true;
|
||||||
|
dateext = true;
|
||||||
|
dateformat = "-%Y-%m-%d";
|
||||||
|
nomail = true;
|
||||||
|
missingok = true;
|
||||||
|
copytruncate = true;
|
||||||
|
|
||||||
|
# rotation frequency
|
||||||
|
priority = 1;
|
||||||
|
frequency = "weekly";
|
||||||
|
rotate = 7; # special value, means 7 days
|
||||||
|
minage = 7; # avoid rotating files that are less than 7 days old
|
||||||
|
|
||||||
|
# compression
|
||||||
|
compress = true; # compress logs to save space
|
||||||
|
compresscmd = "${lib.getExe' pkgs.zstd "zstd"}";
|
||||||
|
compressoptions = " -Xcompression-level 10";
|
||||||
|
compressext = "zst";
|
||||||
|
uncompresscmd = "${lib.getExe' pkgs.zstd "unzstd}";
|
||||||
|
};
|
||||||
|
}
|
4
system/services/thermald.nix
Normal file
4
system/services/thermald.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
# monitor and control temperature
|
||||||
|
services.thermald.enable = true;
|
||||||
|
}
|
Loading…
Reference in a new issue