filesystem: extract nixos module

sh-initrd-on-root
Zynh Ludwig 2024-10-06 07:12:40 -07:00
parent c8fdfc2f3a
commit 1d40aae689
2 changed files with 27 additions and 9 deletions

View File

@ -17,11 +17,10 @@
# Set your time zone. # Set your time zone.
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
boot.tmp.useTmpfs = true;
snowhawk = { snowhawk = {
wake-on-lan.enable = true; wake-on-lan.enable = true;
dwm.enable = true; dwm.enable = true;
filesystem.enable = true;
syncthing.enable = true; syncthing.enable = true;
plymouth.enable = true; plymouth.enable = true;
polkit.enable = true; polkit.enable = true;
@ -31,12 +30,8 @@
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
services.envfs.enable = true;
hardware.keyboard.uhk.enable = true; hardware.keyboard.uhk.enable = true;
programs.dconf.enable = true;
# I think I need a gtk theme? gnome-keyring # I think I need a gtk theme? gnome-keyring
qt.platformTheme = "gtk2"; qt.platformTheme = "gtk2";
@ -60,9 +55,6 @@
godot_4-mono godot_4-mono
]; ];
# Enable trash:/// support
services.gvfs.enable = true;
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "23.11"; # Did you read the comment?

26
modules/filesystem.nix Normal file
View File

@ -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;
};
}