Move many server modules to basic
This commit is contained in:
parent
36a04eada8
commit
7247e543c0
6 changed files with 7 additions and 7 deletions
6
modules/nixos/basics/automatic-garbage-collection.nix
Normal file
6
modules/nixos/basics/automatic-garbage-collection.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
}
|
||||
15
modules/nixos/basics/btrfs-scrub.nix
Normal file
15
modules/nixos/basics/btrfs-scrub.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (builtins) mapAttrs attrValues;
|
||||
inherit (lib) filterAttrs unique;
|
||||
btrfsFileSystems =
|
||||
filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems;
|
||||
btrfsDevices =
|
||||
unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems));
|
||||
in
|
||||
{
|
||||
services.btrfs.autoScrub = {
|
||||
enable = btrfsDevices != [ ];
|
||||
fileSystems = btrfsDevices;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
./zerotier.nix
|
||||
./tailscale.nix
|
||||
./automatic-garbage-collection.nix
|
||||
./btrfs-scrub.nix
|
||||
./distributed.nix
|
||||
./remote-deploy.nix
|
||||
./extended-registry.nix
|
||||
./fstrim.nix
|
||||
./fwupd.nix
|
||||
./remote-deploy.nix
|
||||
./tailscale.nix
|
||||
./zerotier.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
3
modules/nixos/basics/fstrim.nix
Normal file
3
modules/nixos/basics/fstrim.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.fstrim.enable = true;
|
||||
}
|
||||
3
modules/nixos/basics/fwupd.nix
Normal file
3
modules/nixos/basics/fwupd.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue