1
0

configuration.nix 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. { config, pkgs, lib, ... }:
  2. let
  3. user = "johron";
  4. storageRoot = "/storage";
  5. folders = [
  6. "Applications"
  7. "Documents"
  8. "Downloads"
  9. "Games"
  10. "Machines"
  11. "Music"
  12. "Pictures"
  13. "Projects"
  14. "Scripts"
  15. "Videos"
  16. "Wineprefixes"
  17. ];
  18. mkBindMount = folder: {
  19. name = "/home/${user}/${folder}";
  20. value = {
  21. device = "${storageRoot}/${folder}";
  22. options = [ "bind" "nofail" "x-systemd.automount" ];
  23. depends = [ storageRoot ];
  24. };
  25. };
  26. in
  27. {
  28. imports = [
  29. ./networking.nix
  30. ./hardware-configuration.nix
  31. ../../nixos/hardware/gpu/nvidia.nix
  32. ../../nixos/hardware/wifi/bcm4360.nix
  33. ../../nixos/hardware/sound
  34. ../../nixos/flavors/desktop/sway
  35. ../../nixos/flavors/desktop/sway/greeter-default.nix
  36. ../../nixos/features/system/basic.nix
  37. ../../nixos/features/system/users.nix
  38. ../../nixos/features/system/gaming.nix
  39. ];
  40. nixpkgs.config.allowUnfree = true;
  41. nix.settings.experimental-features = [ "nix-command" "flakes" ];
  42. fileSystems = lib.mkMerge [
  43. (builtins.listToAttrs (map mkBindMount folders))
  44. ];
  45. boot.loader.systemd-boot.enable = true;
  46. boot.loader.efi.canTouchEfiVariables = true;
  47. system.stateVersion = "25.11";
  48. }