diff --git a/hosts/snowhawk/configuration.nix b/hosts/snowhawk/configuration.nix index 3ce39cd..ac5bd97 100644 --- a/hosts/snowhawk/configuration.nix +++ b/hosts/snowhawk/configuration.nix @@ -17,11 +17,10 @@ # Set your time zone. time.timeZone = "America/Los_Angeles"; - boot.tmp.useTmpfs = true; - snowhawk = { wake-on-lan.enable = true; dwm.enable = true; + filesystem.enable = true; syncthing.enable = true; plymouth.enable = true; polkit.enable = true; @@ -31,12 +30,8 @@ # Enable CUPS to print documents. services.printing.enable = true; - services.envfs.enable = true; - hardware.keyboard.uhk.enable = true; - programs.dconf.enable = true; - # I think I need a gtk theme? gnome-keyring qt.platformTheme = "gtk2"; @@ -60,9 +55,6 @@ godot_4-mono ]; - # Enable trash:/// support - services.gvfs.enable = true; - # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.11"; # Did you read the comment? diff --git a/modules/filesystem.nix b/modules/filesystem.nix new file mode 100644 index 0000000..2e40701 --- /dev/null +++ b/modules/filesystem.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: + +# This module provides some filesystem functionality I expect to work out of the box +let + cfg = config.snowhawk.filesystem; +in +{ + options.snowhawk.filesystem = { + enable = lib.mkEnableOption "filesystem nixos module"; + }; + + config = lib.mkIf cfg.enable { + # Building nixos without this uses a ton of disk + # Needs to be disabled on low memory systems + boot.tmp.useTmpfs = true; + + # This makes shebangs work + services.envfs.enable = true; + + # So many things break without this + programs.dconf.enable = true; + + # Enable trash:/// support + services.gvfs.enable = true; + }; +}