dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
| 1 | # Home Manager: everything in your home directory. |
| 2 | { |
| 3 | config, |
| 4 | lib, |
| 5 | ... |
| 6 | }: |
| 7 | { |
| 8 | imports = [ |
| 9 | ./files.nix |
| 10 | ./desktop.nix |
| 11 | ./apps.nix |
| 12 | ./services.nix |
| 13 | ./shell.nix |
| 14 | ./theming.nix |
| 15 | ./packages.nix |
| 16 | ]; |
| 17 | |
| 18 | options.dot = { |
| 19 | repoPath = lib.mkOption { |
| 20 | type = lib.types.str; |
| 21 | default = "/git/dot"; |
| 22 | description = "Where this repo is checked out."; |
| 23 | }; |
| 24 | |
| 25 | liveConfig = lib.mkOption { |
| 26 | type = lib.types.bool; |
| 27 | default = true; |
| 28 | description = '' |
| 29 | Link the hand-edited configs that no module writes (scripts, Eww, |
| 30 | startup.lua, init.lua, stylesheets, themes) straight to the checkout at |
| 31 | repoPath, as the old symlink.sh did: an edit takes effect the next time |
| 32 | the program reads it, with no rebuild. Off, they are copied into the |
| 33 | Nix store and change only on a rebuild (the test VM does this, since it |
| 34 | has no checkout). |
| 35 | ''; |
| 36 | }; |
| 37 | }; |
| 38 | |
| 39 | config = { |
| 40 | # A file or directory of config/: linked to the checkout when liveConfig is |
| 41 | # on (edits apply at once), copied into the store otherwise. |
| 42 | lib.dot.link = |
| 43 | rel: |
| 44 | if config.dot.liveConfig then |
| 45 | config.lib.file.mkOutOfStoreSymlink "/config/" |
| 46 | else |
| 47 | ../../config + "/"; |
| 48 | |
| 49 | home = { |
| 50 | username = "vizie"; |
| 51 | homeDirectory = "/home/vizie"; |
| 52 | stateVersion = "26.05"; |
| 53 | }; |
| 54 | |
| 55 | xdg.enable = true; |
| 56 | xdg.userDirs = { |
| 57 | enable = true; |
| 58 | createDirectories = true; |
| 59 | extraConfig.XDG_PROJECTS_DIR = "/Projects"; |
| 60 | }; |
| 61 | |
| 62 | programs.home-manager.enable = true; |
| 63 | }; |
| 64 | } |