summaryrefslogtreecommitdiff
path: root/modules/pc.nix
diff options
context:
space:
mode:
authorSimon Parri <simonparri@ganzeria.com>2025-05-09 17:54:45 -0500
committerSimon Parri <simonparri@ganzeria.com>2025-05-09 17:54:45 -0500
commit4ea08b3976188eb01a74548d68b227a7794b4caa (patch)
tree505c0df98ed00ed592be15895b8ed3eb7aa9e2c3 /modules/pc.nix
downloadnixos-config-4ea08b3976188eb01a74548d68b227a7794b4caa.tar.gz
nixos-config-4ea08b3976188eb01a74548d68b227a7794b4caa.zip
Add current configuration
Diffstat (limited to 'modules/pc.nix')
-rw-r--r--modules/pc.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/modules/pc.nix b/modules/pc.nix
new file mode 100644
index 0000000..0b31149
--- /dev/null
+++ b/modules/pc.nix
@@ -0,0 +1,39 @@
+{ lib, config, pkgs, ... }:
+
+let cfg = config.this.pc;
+in
+{
+ imports = [
+ ./locales.nix
+ ./syslog.nix
+ ./overlays
+ ];
+
+ options = {
+ this.pc.enable = lib.mkEnableOption "PC-specific settings";
+ this.pc.minimal = lib.mkEnableOption "limited set of features";
+ };
+
+ config = lib.mkIf cfg.enable {
+ networking.networkmanager.enable = true;
+ networking.firewall.enable = false;
+
+ services.openssh.enable = true;
+
+ services.chrony.enable = !cfg.minimal;
+ services.atd.enable = !cfg.minimal;
+ this.syslog.enable = !cfg.minimal;
+ this.envfs.enable = !cfg.minimal;
+
+ services.locate = {
+ enable = !cfg.minimal;
+ pruneBindMounts = true;
+ package = pkgs.plocate;
+ localuser = null;
+ };
+
+ this.overlays.emacs.enable = !cfg.minimal;
+
+ this.locales.dictionaries.enable = !cfg.minimal;
+ };
+}