From a8adeadf311cf877d7f53b7e006e247fbda4a4a6 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 2 May 2023 19:01:08 -0700 Subject: profiles: move things around for btrfs --- profiles/btrfs.nix | 4 ++++ profiles/laptop.nix | 4 ++++ profiles/nas.nix | 14 ++++++++++++++ profiles/server.nix | 2 ++ profiles/workstation.nix | 1 + 5 files changed, 25 insertions(+) create mode 100644 profiles/btrfs.nix create mode 100644 profiles/nas.nix (limited to 'profiles') diff --git a/profiles/btrfs.nix b/profiles/btrfs.nix new file mode 100644 index 0000000..1b87165 --- /dev/null +++ b/profiles/btrfs.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + services.btrfs.autoScrub.enable = true; +} diff --git a/profiles/laptop.nix b/profiles/laptop.nix index 6b8211a..0d1c95f 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -1,5 +1,9 @@ { pkgs, config, lib, ... }: { + imports = [ + ./workstation.nix + ]; + services.thermald.enable = true; services.tlp.enable = true; services.tlp.settings = { diff --git a/profiles/nas.nix b/profiles/nas.nix new file mode 100644 index 0000000..9c25c22 --- /dev/null +++ b/profiles/nas.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./server.nix + ./btrfs.nix + ]; + + users.groups.nas.gid = 5000; + users.users.nas = { + uid = 5000; + group = "nas"; + isSystemUser = true; + }; +} diff --git a/profiles/server.nix b/profiles/server.nix index 27498d6..5a95dff 100644 --- a/profiles/server.nix +++ b/profiles/server.nix @@ -4,6 +4,8 @@ ./default.nix ]; + powerManagement.cpuFreqGovernor = "schedutil"; + console = { earlySetup = true; font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz"; diff --git a/profiles/workstation.nix b/profiles/workstation.nix index 151357c..f136c33 100644 --- a/profiles/workstation.nix +++ b/profiles/workstation.nix @@ -3,6 +3,7 @@ imports = [ ./default.nix ./documentation.nix + ./btrfs.nix ]; virtualisation.docker.enable = false; -- cgit v1.2.3