Compare commits

...

459 commits
0.1.1 ... prime

Author SHA1 Message Date
e3ad7a2528
feat(languages): enable tailwind language support 2025-07-17 15:17:46 +08:00
ab627ac919
refactor(flake-parts): consolidate modules into one file 2025-07-15 22:54:06 +08:00
e02411d563
feat(flake): add manifest input and module import 2025-07-15 22:51:00 +08:00
021dadfed8
Merge branch 'prime' of git.rrv.sh:rrvsh/pantheon into prime 2025-07-15 21:54:06 +08:00
084caa727b
feat(meta): use manifest to define system configurations 2025-07-15 21:54:00 +08:00
d9c41f1c61
feat(darwin): add chatgpt with homebrew 2025-07-15 18:24:39 +08:00
06e7b69f99
feat(darwin): add linear-linear with homebrew 2025-07-15 12:36:20 +08:00
96321d4026
feat(machine, secrets): add qmk and vial, export gemini key 2025-07-14 23:11:19 +08:00
399e049775
feat(darwin): add vial with homebrew 2025-07-14 21:46:18 +08:00
bee32b5b2b
feat(darwin): add admin as primary user 2025-07-14 20:15:17 +08:00
343f3d481f
feat(sudo): configure sudo with nix modules 2025-07-14 19:19:02 +08:00
79b83cfc70
feat(secrets): Add darwin sops config and gemini key access 2025-07-14 19:16:37 +08:00
f502810dae
fix(darwin): put aichat config in right place for darwin 2025-07-14 19:09:16 +08:00
fba46e0d0d
feat(darwin): enable sudo auth with touchid 2025-07-14 18:57:24 +08:00
ba4f32c4f9
feat(darwin): add telegram with homebrew 2025-07-14 18:42:26 +08:00
359707ffee
feat(darwin): add gitify with homebrew 2025-07-14 18:34:48 +08:00
e72a8a0586
feat(darwin): add brew to path 2025-07-14 15:22:45 +08:00
bebc1ed649
feat(homes/rafiq): add mise 2025-07-14 15:09:12 +08:00
59fb406eb9
feat(darwin): add homebrew apps 2025-07-14 14:54:26 +08:00
750f2efaa7
fix(darwin): set user shell 2025-07-14 14:32:59 +08:00
346ad74c5d
feat(darwin): add user ids 2025-07-14 14:20:57 +08:00
80c63d155d
fix(tailscale): Disable tailscale checks to allow build on darwin 2025-07-14 13:56:56 +08:00
74dcb8fed0
feat(tailscale): Enable tailscale on darwin and skip some tests 2025-07-14 13:53:49 +08:00
42ef2d6c01
fix(nvf): Disable csharp language server on darwin
WARN: This commit message assumes the reason for disabling is darwin.
2025-07-14 13:30:56 +08:00
16d4a9e9d1
feat(configs): Pass flake to nixosSystem and darwinSystem 2025-07-14 13:26:44 +08:00
25cb9a6ff8
feat(manifest): add hephaestus 2025-07-14 12:23:47 +08:00
7866bc5bc7
feat(darwin): Add machine platform config for darwin hosts 2025-07-14 08:48:38 +08:00
e5e365a1e0
feat(homes): Add darwin support for user shells configuration 2025-07-14 08:42:34 +08:00
e9edf5ad55
feat(homes): Move prismlauncher to nixos module 2025-07-14 03:19:11 +08:00
50a183a040
feat(homes): Move obs-studio config to nixos module 2025-07-14 02:49:24 +08:00
40b45c6c78
feat(homes): Move vlc from default.nix to nixos module 2025-07-14 02:48:14 +08:00
003a676da0
feat(homes): Move tor-browser to nixos module 2025-07-14 02:47:08 +08:00
7d9efe0b29
feat(homes): Move stremio to nixos.nix from default.nix 2025-07-14 02:43:31 +08:00
3f10cf6205
feat(unfree): Add darwin module to unfree predicate 2025-07-14 02:37:08 +08:00
ee522765b7
fix(homes): Move stremio unfree packages to default.nix 2025-07-14 02:35:59 +08:00
3af11b2519
fix(darwin): Rename homebrew primaryUser to user 2025-07-14 02:34:18 +08:00
3d64bf5a6e
fix(darwin): Use flake.admin.username for homebrew primaryUser 2025-07-14 02:32:31 +08:00
cf6917e56d
feat(darwin): Add primaryUser to homebrew config 2025-07-14 02:28:42 +08:00
92e6da3645
feat(homes): Move ghostty config to nixos and darwin modules 2025-07-14 02:26:30 +08:00
0f3694c82d
feat(homes): Move graphical nixos config to nixos.nix 2025-07-14 02:13:00 +08:00
b085f92226
feat(graphical): Enable graphical modules for darwin and nixos 2025-07-14 01:37:51 +08:00
26e21a4edd
feat(persist): conditionally persist home on linux only 2025-07-14 01:17:25 +08:00
331ab6a448
feat(darwin): disable allowUnsupportedSystem for darwin.nixpkgs 2025-07-14 01:06:57 +08:00
c1100a67eb
feat(darwin): Allow unsupported systems for darwin 2025-07-14 00:49:01 +08:00
a53868c454
feat(users): Set home directory for all users 2025-07-14 00:46:52 +08:00
9470ea2f90
feat(darwin): Add stylix and user modules 2025-07-14 00:18:04 +08:00
65659908cf
refactor(home-manage): hardcode homeVersion 2025-07-14 00:16:05 +08:00
cd984132ee
refactor(darwin): move tailscale to module 2025-07-14 00:09:24 +08:00
79eec8b971
refactor(nix): Use mkConfigurations for darwinConfigurations 2025-07-14 00:01:11 +08:00
1b3414549d
refactor(nix): Move darwin configurations to configurations.nix 2025-07-09 13:04:08 +08:00
45414c48b9
feat(nix): pass flake self to darwin modules and add revision 2025-07-09 09:35:56 +08:00
0f741cbb36
refactor(nix): Move modules to modules.<system>.default structure 2025-07-09 09:15:37 +08:00
9cb4542b05
feat(configurations): add darwin config support 2025-07-09 06:36:42 +08:00
c21f7efecd
feat(flake): add nix-darwin to flake
WARNING: This commit includes additions to flake.nix and flake.lock.
2025-07-09 06:25:15 +08:00
cc08a506c8
feat(keys): get gemini key from exret 2025-07-09 06:23:59 +08:00
5e01993093
feat(nix): add openrouter key and enable for server
WARNING: This commit includes new files and secrets modifications.
2025-07-09 04:58:29 +08:00
1c1c47d7a1
fix(nix): move podman and distrobox to virtualisation options 2025-07-09 04:51:07 +08:00
e9816ab8e2
feat(nix): enable fwupd, podman and distrobox for server 2025-07-09 04:45:38 +08:00
a6bd611c25
fix(nix): bring up to feature parity 2025-07-09 04:43:48 +08:00
738a7b95d2
build(flake): update flake.lock 2025-07-09 04:22:34 +08:00
08090fa25c
feat(nix): add scripts for zk, edit, commit and rebuild 2025-07-09 04:20:46 +08:00
782bbcbaa3
feat(configurations): use host config for monitor settings 2025-07-09 04:13:24 +08:00
79c7e495c8
feat(configurations): pass in host manifest config to home-manager 2025-07-09 03:57:16 +08:00
2710c71820
feat(nix): add rrv.sh module and enable for server 2025-07-09 03:50:34 +08:00
c026887236
feat(nix): add forgejo module and enable for server 2025-07-09 03:46:10 +08:00
9e77ea8e65
feat(nix): add librechat module and enable for server
WARNING: This commit includes new files and secrets modifications.
2025-07-09 03:42:33 +08:00
16fb62f03b
feat(nix): enable sd-webui-forge and comfy-ui for server 2025-07-09 03:30:41 +08:00
8db9ceb372
feat(nix): add comfy-ui module and enable it for server 2025-07-09 03:27:05 +08:00
fbd8a20036
fix(lib): rm infinite recursion somehow 2025-07-09 03:26:31 +08:00
e9a6649f6a
build(flake): add stable-diffusion 2025-07-09 03:25:54 +08:00
5f42498a39
feat(nix): add nginx reverse proxy to web-servers module
Adds nginx reverse proxy functionality with SSL support.
2025-07-09 02:59:31 +08:00
9657329282
feat(nix): add web-servers module and enable SSL certificates 2025-07-09 02:41:14 +08:00
c85db031dc
feat(nix): add dynamic DNS module using godns
Adds support for updating Cloudflare DNS records using godns.
2025-07-09 02:09:19 +08:00
774527379a
feat(nix): add database module and enable mongodb,mysql,pgsql 2025-07-09 01:57:41 +08:00
ea77bf62ad
feat(homes/rafiq): configure graphical modules for hyprland
Moves graphical configs into a nixos module and enables autologin.
2025-07-09 01:47:41 +08:00
5048f44559
feat(homes/rafiq): enable sunshine and fix modules for steam 2025-07-09 01:46:28 +08:00
3db3dc176c
feat(homes/rafiq): enable spotifyd and pass hostName to home 2025-07-09 01:44:06 +08:00
4507f4b113
feat(homes/rafiq): add hyprlock config and pam service fix 2025-07-09 01:39:00 +08:00
09b10869e6
feat(homes/rafiq): add steam and prism-launcher configs 2025-07-09 01:37:46 +08:00
96b5aa3fef
feat(nix): port over libs 2025-07-09 01:33:28 +08:00
03bac12a2d
feat(homes/rafiq): add stylix options and wallpaper 2025-07-09 01:17:54 +08:00
69d7bca0f6
feat(flake): add stylix and base16 theming flakes 2025-07-09 00:57:01 +08:00
2d90d32144
refactor(nix): port homes to homemanager module 2025-07-09 00:53:00 +08:00
2c6cd776ce
feat(nix): use module options instead of specialArgs for graphical 2025-07-09 00:14:55 +08:00
dd74ed210c
feat(nix): refine meta module options for users and hosts 2025-07-08 23:53:42 +08:00
df06e092d6
feat(nix): add graphical module, pass option to nixosSystem 2025-07-07 22:19:38 +08:00
c2bae8cd85
feat(homes/rafiq): import desktop configs 2025-07-07 22:03:14 +08:00
8166894b78
feat(nix): add desktop module and refactor machine options 2025-07-07 21:48:12 +08:00
4c82720251
feat(homes/rafiq): port over configs 2025-07-07 21:19:08 +08:00
aa06b5f6fd
feat(nixos): add sudo module and refactor user options 2025-07-07 19:30:04 +08:00
03fca8b28b
refactor(modules): clean up folder structure 2025-07-07 19:24:36 +08:00
d8aa7f62b4
feat(nixos): add networking module 2025-07-07 19:17:55 +08:00
7881c76f73
feat(nixos): add tailscale module 2025-07-07 19:13:16 +08:00
343c802e6d
feat(nixos/ssh): enable openssh and persist host keys 2025-07-07 19:09:07 +08:00
3bffa8760e
feat(nixos): add machine module with virtualisation and usb options 2025-07-07 19:04:17 +08:00
e097d3e688
feat(nixos): add bluetooth module 2025-07-07 18:44:24 +08:00
ce83834ef4
feat(nixos): add machine module 2025-07-07 18:42:26 +08:00
4cc2b50e15
feat(nixos): add podman module 2025-07-07 18:40:25 +08:00
b4dc19d65c
feat(nixos): add bootloader configuration module 2025-07-07 18:32:34 +08:00
09ab1ac5a6
feat(nixos): set default timezone and locale 2025-07-07 18:29:02 +08:00
294e8458e4
feat(nix/secrets): persist sops age key for home-manager 2025-07-07 18:27:56 +08:00
8fb620284d
feat(nixos/ssh): add ssh config to home-manager 2025-07-07 18:27:03 +08:00
1fe332c302
feat(nix/persist): add impermanence to home-manager 2025-07-07 18:25:43 +08:00
bf260096d5
refactor(nixos/ssh): add authorizedKeys to ssh module & rm from users 2025-07-07 18:18:57 +08:00
b63959f307
refactor(configurations): centralise home-manager config 2025-07-07 18:11:33 +08:00
b5772e4525
refactor(machine/root): centralise root drive cfg 2025-07-07 18:10:32 +08:00
fe91044c8b
refactor(nixos): move persisted ssh host keys to ssh module 2025-07-07 17:47:51 +08:00
4ff7b8e18f
feat(nixos): add user password secrets to sops
This commit adds the user password secrets to sops.
It leverages the `userListToAttrs` lib function.
2025-07-07 17:42:31 +08:00
782a4324a8
feat(lib): add userListToAttrs function 2025-07-07 17:42:31 +08:00
85f2cee212
feat(nixos): add sops module for secrets
Adds .sops.yaml file and sops module to nixos to manage secrets.
2025-07-07 17:42:31 +08:00
d7b8edd054
feat(nix): add sops-nix to flake inputs 2025-07-07 17:42:31 +08:00
5d24a11990
feat(lib): add admin user using custom lib function 2025-07-07 17:42:31 +08:00
da6fa1b9df
refactor(nix): rename lib.nix to meta.nix and add flake.root option 2025-07-07 17:42:31 +08:00
0c2b6b57d9
refactor(lib): remove references to top level lib 2025-07-07 17:42:31 +08:00
9403daff02
refactor(nix): move unfree packages module to options 2025-07-07 17:42:31 +08:00
8c2b1dfc6e
feat(nixos): move persist options to system and users modules 2025-07-07 17:42:31 +08:00
6d43b0db3b
feat(nixos): make persist options 2025-07-07 17:42:31 +08:00
4e74db3938
refactor(lib): add lib output to flake
This is needed so we can use subattributes of flake.lib
2025-07-07 17:42:31 +08:00
1dc3f4bf44
fix(nix): remove flattenAttrs
unfortunately modules don't like to be merged
2025-07-07 17:42:31 +08:00
9abcb6c85b
feat(nixos): add impermanence module for ephemeral roots 2025-07-07 17:42:31 +08:00
714c3b8940
feat(nixos): add disko module for declarative partitioning 2025-07-07 17:42:31 +08:00
06a3f024c5
feat(nixos): add gpu module for nvidia config 2025-07-07 17:42:30 +08:00
5a94f19922
feat(nix): add unfree-packages module 2025-07-07 17:42:30 +08:00
12b7a4b7e0
feat(debug): enable flake-parts debug 2025-07-07 17:42:30 +08:00
0b2f2100cc
feat(nixos): add platform module for different architectures 2025-07-07 17:42:30 +08:00
27161d6b13
refactor: rename modules/flake to flake-parts, hosts to configurations 2025-07-07 17:42:30 +08:00
f78770d4f1
feat(git): add git module, set user config 2025-07-07 17:42:30 +08:00
a71cbb544a
feat(hm): add git config to rafiq home, use forAllUsers' 2025-07-07 17:42:30 +08:00
46f631aab1
feat(shell): enable shell in home-manager module 2025-07-07 17:42:30 +08:00
0ca6436522
feat(users): add shell module, simplify users module 2025-07-07 17:42:30 +08:00
a3ed4c608d
feat(users): use forAllUsers' in nixos module 2025-07-07 17:42:30 +08:00
07413c4ac0
feat(nix): add forAllUsers' and docstrings to lib
Adds forAllUsers' function and docstrings to nix lib.
2025-07-07 17:42:30 +08:00
46cf93f69b
feat(nix): add system module, pass config to lib
This commit introduces a system module for NixOS and Home Manager,
and passes the configuration to the lib file.
2025-07-07 17:42:30 +08:00
b7358cd825
feat(hm): add sharedModules, move configurations.nix to hosts.nix 2025-07-07 17:42:30 +08:00
bd347b9889
refactor: move readme to docs dir, update nix file 2025-07-07 17:42:30 +08:00
c26c432890
feat(nixos): pass hostName to nixosSystem, move hm modules 2025-07-07 17:42:30 +08:00
f7873d54d3
refactor(nixos): simplify configurations.nix and lib
This commit refactors configurations.nix and lib/default.nix by removing the
extractConfigurations function and related code from lib/default.nix,
and moving the NixOS system building logic directly into configurations.nix.
It also changes the structure of hosts in manifest.nix to use a
hosts.nixos attribute.
2025-07-07 17:42:30 +08:00
99f984a523
refactor(users): move owner config to users config in manifest 2025-07-07 17:42:30 +08:00
51071f4107
build(flake): bump inputs 2025-07-07 17:42:30 +08:00
72f9fad9eb
feat(git): add .gitignore and pre-commit config to gitignore 2025-07-07 17:42:30 +08:00
52322afe1c
chore: remove pre-commit config symlink 2025-07-07 17:42:30 +08:00
fc477267ed
docs(readme): add acknowledgements and git links 2025-07-07 17:42:30 +08:00
95fea9184e
refactor(configurations): add default nixos module 2025-07-07 17:42:30 +08:00
aef828b713
feat(nixos): add owner config to manifest and users module 2025-07-07 17:42:30 +08:00
f670889e29
build(flake): add home-manager and example config 2025-07-07 17:42:30 +08:00
1fc8230bfc
refactor: move flake-parts modules to nix/modules/flake 2025-07-07 17:42:30 +08:00
0ea17b9fd8
refactor: rename nixos.nix to configurations.nix 2025-07-07 17:42:30 +08:00
c49beb7c57
refactor: rename hostSpec to manifest and update references 2025-07-07 17:42:30 +08:00
2dd8d0f73d
feat(readme): add structure section and update README.md 2025-07-07 17:42:30 +08:00
e884735f25
refactor: rename modules directory to nix 2025-07-07 17:42:30 +08:00
5501c39e31
feat(lib/mkSystem): add profile suppoet
This commit adds the mkSystem function to simplify nixosSystem
creation and merge profile configs.
2025-07-07 17:42:30 +08:00
90899b5d37
refactor(nixos): move nixosSystem config to lib
Moves the nixosSystem configuration logic to a library function for reuse.
2025-07-07 17:42:30 +08:00
c9636b0bfa
feat(nixos): pass flakeConfig to nixosSystem specialArgs 2025-07-07 17:42:30 +08:00
88318c2e39
feat(lib): add flattenAttrs helper 2025-07-07 17:42:30 +08:00
210ce03fff
feat(hostSpec): add apollo and nemesis hosts (WIP) 2025-07-07 17:42:30 +08:00
b984f5a084
feat(nixos): pass hostConfig to nixosSystem specialArgs 2025-07-07 17:42:30 +08:00
4baf606551
feat(nixos): add common nixos profile; move hostspec config 2025-07-07 17:42:30 +08:00
6a1aa5f30b
feat(hostSpec): add extraCfg to hostSpec and imports to nixosSystem 2025-07-07 17:42:30 +08:00
5ea055f053
feat: add nix-systems/default flake and remove systems module 2025-07-07 17:42:30 +08:00
691b925148
refactor: move docs/readme and docs/cheatsheet to flake-parts 2025-07-07 17:42:30 +08:00
03a43150a1
refactor(text): extract text helper to rrvsh/text.nix
This commit adds the rrvsh/text.nix flake to manage text generation.
It also removes the old text generation helpers module and updates the
README and flake.nix files to use the new flake.
2025-07-07 17:42:30 +08:00
e385783de2
feat(nixos): pass inputs and hostName as specialArgs to nixosSystem 2025-07-07 17:42:30 +08:00
b43476ccee
refactor(nixos): change hostSpec to define top level option 2025-07-07 17:42:30 +08:00
6aa5096172
feat(owner): add module to define owner metadata in flake 2025-07-07 17:42:29 +08:00
b370a9d7db
feat(hostSpec): add module to define hosts in flake 2025-07-07 17:42:29 +08:00
09f9a33620
feat(git-hooks): add more git-hooks and linters 2025-07-07 17:42:29 +08:00
2599d2e49c
feat(git-hooks): enable nixpkgs-fmt pre-commit hook 2025-07-07 17:42:29 +08:00
1b36bdc36d
chore(helpers/text): add TODO comment to extract into repo 2025-07-07 17:42:22 +08:00
b87595ccda
chore(readme): remove order attributes from readme module 2025-07-07 17:42:22 +08:00
9420f4b84c
feat(helpers/text): add support for unordered parts 2025-07-07 17:42:22 +08:00
2c77ff76ba
fix(files): remove TODO comment from files module 2025-07-07 17:42:22 +08:00
145200480d
feat(readme): add headings and descriptions to text.readme 2025-07-07 17:42:22 +08:00
9b54a02eaa
feat(helpers/text): add headings and descriptions 2025-07-07 17:42:22 +08:00
dd0ff1e6ac
feat(docs): add cheatsheet 2025-07-07 17:42:22 +08:00
6e7fc72d38
feat(files): generate list of generated files dynamically 2025-07-07 17:42:22 +08:00
63609ffa14
build(flake.lock,flake.nix): add git-hooks and dedupe_gitignore 2025-07-07 17:42:22 +08:00
295f5daba9
feat: add files module, text helper, and update readme generation 2025-07-07 17:42:22 +08:00
a19ede01a2
feat: basic flake-parts structure, make-shell, files and readme 2025-07-07 17:42:22 +08:00
6c59366f8f
feat: initial flake setup with flake-parts
Sets up a basic flake with flake-parts for modularity.
2025-07-07 17:42:22 +08:00
c81d8dfc9f
chore(tree-wide): rm everything for rebase 2025-07-07 17:42:20 +08:00
abfbb5aa09
feat: rework hostSpec to use providers and machine definitions 2025-07-07 17:41:47 +08:00
69d942a1be
feat: add rebuild package definition 2025-07-07 17:41:47 +08:00
670af2b207
refactor: use flake-parts, keep snowfall-lib for compatibility 2025-07-07 17:41:47 +08:00
66396761aa
docs: improve README structure, add headings 2025-07-07 17:41:47 +08:00
af256488f0
docs: add structure section to README 2025-07-07 17:41:47 +08:00
e24714a3c7
feat(nvf): add flake snippet to nvf snippets 2025-07-07 14:28:47 +08:00
6a7e64b268
fix(deps): update rrv.sh submodule in flake.lock 2025-07-05 21:27:51 +08:00
d082b03bf1
feat(web-apps): add comfy-ui web app, update stable-diffusion-webui 2025-07-05 01:50:15 +08:00
4dca26d81d
feat(homes/rafiq): make note script auto push 2025-07-05 01:04:03 +08:00
bd1a29f1a4
feat(commit): exit early if no staged changes exist 2025-07-05 00:46:41 +08:00
ce3443f692
fix(homes/rafiq): fix note script cd issues in zk cli 2025-07-05 00:26:54 +08:00
c1615bbb29
feat(homes/rafiq): enable auto updates for tealdeer 2025-07-05 00:19:00 +08:00
df65236c27
feat(homes/rafiq): add note bash script to zk notes cli 2025-07-05 00:16:35 +08:00
4b802b372e
feat(homes/rafiq): zk notes persist directory 2025-07-04 23:30:46 +08:00
c4151ec5cf
feat(homes/rafiq): add zk notes cli tool 2025-07-04 23:27:21 +08:00
e5a6cc9626
fix(homes/rafiq): use bare ghostty instead of -e 2025-07-04 21:15:36 +08:00
fad82fc781
refactor(homes/rafiq): clean up terminal settings 2025-07-04 21:11:52 +08:00
8eceb81ad9
feat(homes/rafiq): enable starship prompt in fish shell 2025-07-04 18:42:59 +08:00
9fffa1d295
feat(commit): improve commit message prompt guidelines 2025-07-03 21:17:14 +08:00
7be3efed4e
build(flake.lock): update flake inputs and remove hardtime-nvim 2025-07-02 21:16:45 +08:00
e30a623fec
feat(commit): improve commit message generation prompt 2025-07-02 17:56:34 +08:00
1f70a57e11
feat(homes/rafiq): switch to fish shell 2025-07-02 17:48:27 +08:00
b9ad8ac2ca
chore: clean up tree-wide 2025-07-02 06:02:47 +08:00
45afd6bea5
build(flake.lock): update flake inputs 2025-07-02 02:37:17 +08:00
fd19ac2c9d
build(flake.lock, flake.nix): optimise flake inputs 2025-07-02 02:29:46 +08:00
cb0923601b
feat(editor): enable undoFile in nvim config 2025-07-01 22:11:40 +08:00
a8a17d67f0
build(flake.lock, flake.nix): update flake inputs and stylix follows 2025-07-01 19:39:48 +08:00
0965dd312a
chore(tree-wide): remove snowfall-lib as dependency 2025-07-01 18:37:54 +08:00
5cf347812c
chore(homes/rafiq): remove email cuz dat shit dont work 2025-07-01 14:44:44 +08:00
8f3420493d
feat(starship): disable starship prompt in home config 2025-06-30 06:10:27 +08:00
81b7f07841
build(flake.lock): update flake inputs 2025-06-30 06:06:19 +08:00
d0738a9c1e
feat: various updates including nixspect removal, new aliases, and browser config 2025-06-30 05:54:14 +08:00
af6a3b6f2c
refactor(nvf): remove unused nvf modules and options 2025-06-30 05:19:20 +08:00
2b97ee96ca
feat(networking): use client-id and client-secret for tailscale auth 2025-06-30 03:43:37 +08:00
c3acffe2bc
docs: add instructions for installing with disko 2025-06-30 03:24:20 +08:00
b068149ffb
refactor(rrv.sh): change rrv.sh input to use github instead of forgejo 2025-06-30 03:14:58 +08:00
715f84ee83
feat(nvf): update nvf to use rrvsh fork with uv enabled 2025-06-29 17:08:41 +08:00
622b3da556
build(flake.lock): update flake inputs 2025-06-28 18:11:13 +08:00
92971a42a7
refactor(rrv.sh): change rrv.sh to use service module 2025-06-28 15:54:10 +08:00
7c633c124f
feat: add hostSpec.nix to define host-specific configurations 2025-06-28 11:04:52 +08:00
8d306915d9
feat(home): add email module for personal email setup 2025-06-28 09:30:37 +08:00
326e3e3c61
fix(rrv.sh): update flake.lock to pick up latest rrv.sh changes 2025-06-28 06:32:27 +08:00
f7e411541a
feat(home): set stylix wallpaper 2025-06-27 23:13:27 +08:00
8c42d27c8d
feat(home): persist stremio directory 2025-06-26 00:02:06 +08:00
a7361a2bf9
feat(hyprland): add togglefloating keybind without mouse 2025-06-25 11:53:36 +08:00
7739f03bff
refactor(rrv.sh): use rrv.sh flake instead of internal package 2025-06-24 21:19:25 +08:00
87f503352f
feat(forgejo): enable push create user and org, and set ssh signing format 2025-06-24 20:46:51 +08:00
08124bfb91
refactor(home): add zoxide, nix-index and ripgrep to home module 2025-06-23 16:01:08 +08:00
14881201ac
feat(hyprland): update flake.lock and hyprland module to use hyprwm/Hyprland flake 2025-06-23 05:30:34 +08:00
8a4f136d02
fix(nvf): remap harpoon mappings to use "mm" and "ml" 2025-06-23 05:20:07 +08:00
eab372bd11
feat(nvf): add avante-nvim ai assistant plugin 2025-06-22 23:57:54 +08:00
65e169e88b
feat(rrv.sh): add favicon to rrv.sh website 2025-06-22 20:01:33 +08:00
c79de25dce
feat(rrv.sh): add rrv.sh package and move website to package 2025-06-22 19:39:44 +08:00
5f7cfd5d24
feat(nixos/nginx): add pages option to nginx module 2025-06-22 19:28:55 +08:00
b3a5441e8b
feat(nixos/databases): add alphastory db and user to postgresql 2025-06-22 19:10:59 +08:00
e0202a9f87
feat(home): add uv.nvim plugin to nvf vim config 2025-06-22 19:10:59 +08:00
ce825fdc6c
feat(nvf): configure ruff and pyright for python, and prettierd for markdown 2025-06-22 19:10:59 +08:00
0521bb516d
feat(home): move starship config to its own module 2025-06-22 19:10:47 +08:00
aedb6d3cf6
feat(hyprland): replace launcher keybind with super 2025-06-22 13:51:38 +08:00
bfa119df31
feat(nixos/forgejo): open firewall if enabled 2025-06-20 08:26:01 +08:00
70a787f89c
fix(nixos/sd-webui-forge): enable listening by default 2025-06-20 07:38:45 +08:00
4a880481df
feat(nixos/forgejo): add sshPort option and enable ssh server 2025-06-20 04:43:09 +08:00
6c1cd15244
```
feat(nixos): add origin_pin_allowed to sunshine settings
```
2025-06-20 04:20:14 +08:00
3ca4bd3f4b
feat(nixos): add distrobox module 2025-06-20 02:04:31 +08:00
386c7b18ef
fix(nvf/snippets): add required ... to lambda params 2025-06-19 20:16:28 +08:00
f11377e0ca
feat(nixos): add podman module 2025-06-19 20:14:56 +08:00
2ff647abef
feat: update README with completed forgejo task 2025-06-19 11:42:46 +08:00
918b88e85b
```
feat(editor): add luasnip loaders option to nvf module
```
2025-06-19 10:58:59 +08:00
fe43d32cd2
feat(editor): configure otter-nvim with setup options for buffers and whitespace 2025-06-19 10:41:20 +08:00
aac18c1eca
feat(editor): add harpoon mappings and setup options 2025-06-19 06:32:51 +08:00
fad78517c9
feat(vesktop): enable vesktop and add empty settings 2025-06-19 06:01:50 +08:00
5ef754ecc4
feat(nixos): enable nix-ld and add empty libraries list 2025-06-19 05:38:19 +08:00
335cf06e59
feat(cli): add windows alias to reboot into Windows 2025-06-18 21:22:38 +08:00
32a4144c42
feat(nixos): add configurationLimit option to systemd-boot 2025-06-18 21:05:48 +08:00
3b5eefe456
feat(editor): remove standalone snippets package, move config to nvf module 2025-06-18 20:51:19 +08:00
50e0d971ae
feat(apollo): remove mattermost module from apollo system config 2025-06-18 03:33:42 +08:00
d26df1fafa
feat(mattermost): add matterbridge integration to mattermost module 2025-06-18 03:24:50 +08:00
506fdf8ad9
build(flake.lock): update flake inputs to reflect nvf repo changes 2025-06-18 02:32:47 +08:00
c8726325b9
docs: add nixos install tmpdir note 2025-06-17 18:25:54 +08:00
6eb6bb1106
build(flake.lock): update flake inputs to reflect nvf repo changes 2025-06-17 14:26:31 +08:00
ad0d5ed0f8
fix(snippets): move snippets configuration to nvf module 2025-06-17 13:45:19 +08:00
d0714f8bff
feat(snippets): fucking finally get working snippets 2025-06-17 13:26:25 +08:00
81de39561a
feat(nixos): add nvf cachix substituters and trusted keys 2025-06-17 11:10:59 +08:00
bd8c3d6a3d
feat(editor): add vscode and snipmate snippet loader 2025-06-17 10:37:13 +08:00
9c4fd69420
feat(nixos): move smb credentials to server module and add librechat secrets 2025-06-17 10:18:25 +08:00
8e9af60c16
build(flake.lock): update flake inputs 2025-06-16 20:55:50 +08:00
4258046ccf
refactor(nixos): move sunshine config to its own module 2025-06-16 20:08:10 +08:00
8165d96d7c
refactor(nixos): move hardware config options to machine nixos module 2025-06-16 19:59:45 +08:00
91c2790b62
refactor(nixos): move system config options to main nixos module 2025-06-16 19:17:47 +08:00
bf63f44875
refactor(nixos): move nvidia config to its own module 2025-06-16 18:45:05 +08:00
5f71bc8925
refactor(nixos): move networking config to its own module 2025-06-16 18:40:02 +08:00
b7e9cdf51d
refactor(nixos): move btrfs config to its own module 2025-06-16 18:31:56 +08:00
9f6b094daa
refactor(packages/snippets): reduce scope of empty module 2025-06-16 18:25:36 +08:00
59031cd01b
refactor(nixos): move usb config to its own module 2025-06-16 17:37:12 +08:00
a5d8bfcdd5
refactor(nixos): use mkWebApp module to simplify web app definitions 2025-06-16 14:55:00 +08:00
2292baecf6
feat(server): add mkWebApp module and glance web app 2025-06-16 14:22:19 +08:00
29c652e615
feat(server): enable ssh signature for forgejo repositories 2025-06-14 23:10:28 +08:00
7f06f204a8
feat(home): disable stylix css for waybar 2025-06-14 22:44:27 +08:00
3f4c051fe1
fix(server): set correct domain and root_url for forgejo 2025-06-14 22:42:00 +08:00
e994df5675
feat(server): add forgejo module 2025-06-14 22:34:35 +08:00
a7948ceda2
feat(home): add enableAutoUpdates option to tealdeer module 2025-06-14 21:01:46 +08:00
77d8ed7a13
refactor(nixos): use new persistDirs option and remove environment.persistence where possible 2025-06-14 19:59:42 +08:00
16b7f375bd
fix(hyprland): fix playerctl play-pause command to work with all players 2025-06-14 19:21:10 +08:00
e4437b8822
feat(server): remove prometheus and grafana modules 2025-06-14 19:17:32 +08:00
00e3ea65c8
feat(home): move cli config to homes and use home-manager modules 2025-06-14 19:15:48 +08:00
1a3ff4b92a
feat(home): move nvf config to homes and use home-manager modules 2025-06-14 18:52:44 +08:00
af7226d30e
feat(desktop): move prism-launcher and steam config to nixos gaming module 2025-06-14 18:35:28 +08:00
da52d32c91
feat(desktop): move tor-browser config to nixos module 2025-06-14 18:29:18 +08:00
f5a046cd58
feat(home): import desktop module using import-tree and move misc config to desktop module 2025-06-14 18:22:53 +08:00
2387ad9099
feat(cli): remove cli module and move zsh config to systems 2025-06-14 18:03:11 +08:00
527a166a86
feat(desktop): move desktop services config to nixos modules 2025-06-14 17:53:42 +08:00
3040105f9c
feat(desktop): enable stable-diffusion-webui-forge module on nemesis system 2025-06-14 17:30:57 +08:00
9167a54ace
feat(desktop): move window-manager config to homes and use home-manager modules 2025-06-14 16:02:58 +08:00
a04688d17b
feat(desktop): move terminal config to homes and use home-manager modules 2025-06-14 15:39:14 +08:00
ee2dfd8398
feat(desktop): move mainMonitor config to systems 2025-06-14 15:33:08 +08:00
2369c0d37e
feat(desktop): move status-bar config to homes and use home-manager modules 2025-06-14 15:30:42 +08:00
d09d6d37d7
fix(rebuild): exit rebuild script on error 2025-06-14 15:24:03 +08:00
60ee8b4544
feat(desktop): move notification-daemon config to homes and use home-manager modules 2025-06-14 15:23:03 +08:00
4a50de5eed
refactor(desktop): use optional instead of mkIf in firefox and media-player modules 2025-06-14 15:16:04 +08:00
88f0db3425
feat(desktop): add vlc configuration to homes and use home-manager modules 2025-06-14 14:22:30 +08:00
f1c2986c5c
feat(desktop): move media-player config to nixos modules 2025-06-14 14:10:33 +08:00
e6a60c257c
feat(desktop): move launcher config to homes and use home-manager modules 2025-06-14 13:59:41 +08:00
6d84bd00fe
feat(hyprland): set workspaces animation speed to 1 2025-06-14 13:38:58 +08:00
caf464c5df
feat(rebuild): add informational messages and error handling to rebuild script 2025-06-14 13:33:14 +08:00
d1c62bc67f
feat(rebuild): refactor rebuild script to use nh os for local and remote builds 2025-06-14 13:18:48 +08:00
8f493b68b0
fix(rebuild): use nh os switch instead of nixos-rebuild switch for remote hosts 2025-06-14 12:11:07 +08:00
71b3703c75
feat(desktop): move lockscreen config to homes and use home-manager modules 2025-06-14 12:02:58 +08:00
6897ad63c9
feat(desktop): move firefox config to homes and use home-manager modules 2025-06-14 11:52:50 +08:00
844e6b263e
fix(commit): add space after quit option prompt 2025-06-14 11:05:00 +08:00
809ca31362
feat(hardware): enable usb automounting 2025-06-14 11:03:43 +08:00
83886e4fcf
feat(home): persist more directories in /persist 2025-06-14 05:42:03 +08:00
cdc46d8b3a
feat(hardware): enable qmk keyboard support and add udev rules 2025-06-14 05:13:32 +08:00
a33f7062ba
feat(home): persist prism launcher directory and add package 2025-06-14 04:51:23 +08:00
d39cad5faa
feat(home): conditionally enable programs and packages based on desktop module 2025-06-14 04:21:35 +08:00
63b80b67ce
feat(nixos/desktop): enable desktop module by default 2025-06-14 04:15:28 +08:00
a654a6b9b6
refactor(nixos/desktop): move hyprlock config to nixos module 2025-06-13 21:46:18 +08:00
fba8f1bfdd
feat(desktop/firefox): add extension support to profiles 2025-06-13 21:30:28 +08:00
02c356494a
feat(desktop/firefox): add synced profile support and move desktop config 2025-06-13 21:09:43 +08:00
7e256c954d
feat(server/grafana,server/prometheus): add prometheus datasource and node exporter config 2025-06-13 20:27:28 +08:00
10661dda3b
feat(web-servers/nginx): enable recommended settings for nginx 2025-06-13 07:03:22 +08:00
662049ba4b
feat(packages/check): add check package with nginx config checker 2025-06-13 06:47:50 +08:00
127cc02ecc
feat(server/grafana): add proxy websocket support for live api 2025-06-13 06:36:01 +08:00
87c196e499
feat(packages/commit): make reroll prompt not require enter 2025-06-13 06:21:22 +08:00
66bc9f679d
fix(packages/rebuild): fix generation check logic 2025-06-13 06:14:43 +08:00
42b3a92d9b
feat(web-servers/nginx): allow proxy configuration to specify locations 2025-06-13 06:12:23 +08:00
887dff6840
feat(server/prometheus): add prometheus module and enable it on apollo 2025-06-13 05:54:46 +08:00
d9f2603f4b
feat(server/grafana): add grafana module and enable it on apollo 2025-06-13 05:50:34 +08:00
a668db89b3
feat(cli/nvf): add custom nix snippet for nvf 2025-06-13 05:39:39 +08:00
e65b478d21
chore(web-servers): remove staging letsencrypt server 2025-06-13 04:54:51 +08:00
40f526ce62
feat(web-servers/nginx): allow wildcard subdomains for letsencrypt certs 2025-06-13 04:46:11 +08:00
d539849088
fix(packages/rebuild): fix conditional logic for multiple hosts 2025-06-13 04:23:54 +08:00
ecad3fc68e
feat(server): move librechat webapp config to its own module 2025-06-13 04:20:43 +08:00
181e5d6ec8
refactor(server/ddns): make domains modular 2025-06-13 04:00:43 +08:00
83e7043eb5
feat(lib): add domain manipulation functions 2025-06-13 03:31:08 +08:00
1912666242
chore(web-servers): switch to staging letsencrypt 2025-06-13 02:03:58 +08:00
17dc383a97
feat(networking): disable ipv6 and add ssl check to proxy passes 2025-06-13 01:26:52 +08:00
d6da064163
refactor(modules/nginx): simplify ssl conditional logic and merge virtual hosts 2025-06-13 00:02:29 +08:00
23236b19cb
feat(packages/commit): add interactive mode to revise commit messages 2025-06-12 23:22:08 +08:00
d714cef3c3
fix(packages/rebuild): invert QUICK logic to disable prompts when set 2025-06-12 23:06:05 +08:00
5ba27ad3ae
feat(desktop): enable wayland utils when hyprland is enabled 2025-06-12 23:05:52 +08:00
9de4ef0ce6
feat(packages/rebuild): add quick mode to skip commit and reboot prompts 2025-06-12 22:57:37 +08:00
8ea093d939
feat(packages/rebuild): add prompt for commit and reboot, skip generation check option 2025-06-12 22:55:30 +08:00
e0887268bd
feat(packages): add commit script to automate commit message generation 2025-06-12 22:21:30 +08:00
e5f942acbe
feat: Refactor web-servers module and move common configuration to common.nix 2025-06-12 21:39:58 +08:00
7093a338f4
feat(packages/deploy): add deployment script 2025-06-12 17:37:07 +08:00
f2104f3192
feat(system/users): add pubkey to root 2025-06-12 15:51:22 +08:00
fdae75fee6
build(flake.lock): bump flake inputs 2025-06-12 14:12:47 +08:00
9dc1cca761
docs(README.md): update readme 2025-06-12 14:02:38 +08:00
3b57194a56
feat(mattermost): persist state directories 2025-06-12 13:58:44 +08:00
bd03642216
feat(postgresql): persist pgsql data directory 2025-06-12 13:53:25 +08:00
396925364b
feat(server/web-servers): change acme validation to DNS-01 2025-06-12 13:41:41 +08:00
e8ec88bd57
feat(server/web-apps): init mattermost 2025-06-12 12:57:31 +08:00
a7cc5e4705
feat(server/databases): add postgresql 2025-06-12 12:32:58 +08:00
93f0d568a1
chore(nvf): change markdown formatter to prettierd 2025-06-11 21:21:54 +08:00
e4b260ada1
feat(nginx): prevent other subdomains from being acccessed 2025-06-11 20:57:53 +08:00
97746093ed
refactor(nixosModules/hardware): move cpu config intondefault 2025-06-10 22:22:38 +08:00
e688519d02
fix(zellij): fix ssh issue 2025-06-09 23:51:12 +08:00
744ba98d0d
feat(hyprland): add mouse bindings 2025-06-08 23:46:15 +08:00
e4f11bc630
feat(nginx): point aenyrathia.wiki to helios 2025-06-07 14:37:52 +08:00
3aef240f5d
feat(librechat): provision apollo 2025-06-07 14:31:40 +08:00
91902fa4df
fix(sunshine): amend porting 2025-06-07 13:08:42 +08:00
2b15a62f54
feat(nixosModules/server): add smb shares 2025-06-06 22:43:32 +08:00
3dd00fedf0
feat(vlc): add play next extension 2025-06-06 19:12:57 +08:00
c908ee136b
feat(homeModules/desktop): add video players 2025-06-06 17:56:22 +08:00
264fa4d8a9
feat(homes/rafiq): persist sunshine state directory 2025-06-06 17:22:24 +08:00
73a9294508
feat(homes/rafiq): add tor browser 2025-06-06 17:21:54 +08:00
67b5913c24
feat(homeModules/desktop): make default timeout for mako 10 seconds 2025-06-05 19:21:32 +08:00
c51bf01f77
feat(homes/rafiq): add thunderbird 2025-06-05 19:14:39 +08:00
8dd23844f1
feat(users/rafiq): add email configuration 2025-06-05 18:37:12 +08:00
f1324f15ed
refactor(nginx): add proxies option 2025-06-05 16:23:32 +08:00
a157a41cca
feat(packages/rebuild): add support for --all flag 2025-06-05 08:30:01 +08:00
e2669f660c
fix(nginx): ensure https requests also go to the default 2025-06-04 21:30:45 +08:00
6a1fbf73f1
docs(README.md): add todos 2025-06-04 21:16:58 +08:00
2a01cfddc2
docs(README.md): remove 0.2.0 from README 2025-06-04 21:11:33 +08:00
639660637d
fix(packages/rebuild): fix array list indexing 2025-06-04 21:07:45 +08:00
17f814342c
chore(tree-wide): clean up for 0.2 2025-06-04 20:57:24 +08:00
5dfec647b0
feat(web-servers): add SSL support 2025-06-04 20:49:54 +08:00
5ba9667f4e
feat(nixosModules/server): add nginx 2025-06-04 20:31:37 +08:00
d478e9009f
style(tree-wide): apply linting 2025-06-04 07:49:31 +08:00
e3e8f88460
feat(nixosModules/databases): add mysql 2025-06-03 20:59:23 +08:00
b6da0aa2f1
feat(homes/rafiq): add stremio 2025-06-03 17:53:03 +08:00
648bb8f11f
fix(nvf): disable noice notify 2025-06-03 12:26:42 +08:00
65815ff11f
chore(nvf): slight revamp n cleanup 2025-06-03 08:37:27 +08:00
d30c748dc3
fix(yazi): change deprecated manager config section to mgr 2025-06-03 08:15:56 +08:00
cd426df883
feat(waybar): add pulseaudio module 2025-06-02 21:58:15 +08:00
7e751fa190
feat(waybar): add bottom padding 2025-06-02 21:43:29 +08:00
ed1bd1c5b6
feat(waybar): rice battery module 2025-06-02 21:32:33 +08:00
3c19c2a1c8
fix(packages/rebuild): fix remote host syntax 2025-06-02 21:28:36 +08:00
eb75c57653
feat(homes/rafiq): add pay-respects to replace thefuck 2025-06-02 21:21:01 +08:00
bd1b473190
build(flake.lock): bump flake inputs and rm thefuck (deprecated) 2025-06-02 21:18:06 +08:00
b2f9f5a253
feat(nixosModules/server): add librechat from my fork 2025-06-02 17:04:45 +08:00
fe29725772
feat(nemesis): point rrvsh/nixpkgs as inout 2025-06-02 15:31:01 +08:00
5103b02fff
feat(systems/x86_64-linux): add mellinoe mainMonitor config 2025-06-01 21:36:24 +08:00
00ca5f8b8d
feat(systems/x86_64-linux): add mellinoe 2025-06-01 21:07:52 +08:00
236ce0fd5b
feat(hyprland): add some decoration 2025-06-01 20:07:00 +08:00
1c355a30f5
feat(packages/rebuild): make test shell not open by default= 2025-06-01 20:01:14 +08:00
052bd8bbae
chore(hyprland): test config by setting border size to zero 2025-06-01 19:45:18 +08:00
d5dc280ff2
feat(waybar): add clock module 2025-06-01 19:42:12 +08:00
9c947d7992
feat(waybar): make background invisible 2025-06-01 19:07:03 +08:00
3a2a668028
fix(homeModules/desktop): make hyprland reload waybar on rebuild 2025-06-01 19:01:46 +08:00
a6259c7c99
feat(nixosModules/desktop): add font-awesome 2025-06-01 18:50:05 +08:00
a318f13bd0
feat(homeModules/desktop): add status-bar 2025-06-01 18:22:23 +08:00
rafiq
8b963e205e
Merge pull request #31 from rrvsh/refactor/librechat/simplify-env
Refactor/librechat/simplify env
2025-05-31 19:44:58 +08:00
c5ac2a86fc
feat(librechat): allow setting arbitrary environment variables from text and file 2025-05-31 19:43:10 +08:00
ff368be300
feat(librechat): add environment variable support 2025-05-31 15:39:25 +08:00
71fe7b5dd9
chore(librechat): rm all env vars 2025-05-31 15:04:30 +08:00
3947463e93
feat(librechat): add example settings= 2025-05-31 15:00:20 +08:00
b2f596e5b1
feat(librechat): add ability to define config settings in nix way 2025-05-31 14:41:13 +08:00
9f6f870d6c
feat(librechat): add option for email login and registration 2025-05-31 14:21:13 +08:00
c113b5d3ef
refactor(librechat): declare options nicely 2025-05-31 13:52:42 +08:00
e93a25d791
feat(nixosModules/system): add stylix (WIP) 2025-05-31 12:20:01 +08:00
13d8ef5c91
build(flake.lock): add stylix and bump inputs 2025-05-30 15:02:01 +08:00
b9e6129961
feat(nvf): slight rice WIP 2025-05-30 14:31:58 +08:00
3ce2f2f0e8
feat(nvf): change yazi nvim binding 2025-05-30 13:30:48 +08:00
4fb0f5a934
chore(nvf): revert to old config 2025-05-30 12:26:23 +08:00
9b6a92f9db
refactor(homeModules/cli): extract fzf to finder module= 2025-05-30 12:21:01 +08:00
42cfd252f8
feat(nvf): disable hjkl in all modes 2025-05-30 11:49:10 +08:00
c5008603c6
fix(sunshine): open firewall 2025-05-30 10:43:40 +08:00
650c78c74a
feat(zellij): make zellij autoattach andexit 2025-05-29 23:01:53 +08:00
28021098dd
feat(librechat): add port and host option 2025-05-29 22:56:02 +08:00
4a98b09875
fix(librechat): mkdir if the path option doesnt exist 2025-05-29 22:49:33 +08:00
2825ea7df5
refactor(nixosModules/server): move librechat to its own module 2025-05-29 22:28:22 +08:00
a24d727134
feat(nixosModules/server): add librechat service 2025-05-29 22:19:27 +08:00
0b2192986f
fix(nvf): disable gitsigns as it clashes with hop 2025-05-29 21:16:40 +08:00
2f23b952de
feat(nixosModules/server): add mongodb 2025-05-29 20:48:53 +08:00
68b200175f
feat(nixosModules/secrets): add secrets for librechat: 2025-05-29 20:15:31 +08:00
4c6097903f
feat(nixosModules/server): add nginx reverse proxy 2025-05-29 17:02:04 +08:00
8e12382f60
feat(packages/rebuild): add multi host rebuild to rebuild script 2025-05-29 16:47:22 +08:00
591c90db68
feat(nixosModules/server): add autoMounting helios 2025-05-29 16:28:31 +08:00
91ba03dfba
feat(nixosModules/secrets): add telegram_bot_token to secrets 2025-05-29 16:16:56 +08:00
6054778ed2
fix(homeModules/cli): fix zjstatus mode widget config 2025-05-29 15:48:19 +08:00
af072ad8fd
feat(nixosModules/server): add other sites to ddns 2025-05-29 15:22:53 +08:00
c0d02eea1d
feat(nixosModules/server): add godns dynamic dns 2025-05-29 15:10:57 +08:00
aa777bfa54
feat(homes/rafiq): add shell alias for easy fzf edit 2025-05-29 14:44:40 +08:00
4e316d893e
feat(nixosModules/secrets): add cloudflare api token 2025-05-28 15:44:22 +08:00
6c1a27d716
build(flake.nix): optimise flake inputs and bump them 2025-05-28 14:24:06 +08:00
497e624db9
feat(zellij): add hostname to title bar 2025-05-26 23:08:44 +08:00
1ba47d2e85
feat(screensaver): moddify cbonsai args 2025-05-26 22:51:11 +08:00
3c25b05e0c
docs(README.md): minor tweak 2025-05-26 22:42:05 +08:00
14dc971c46
feat(networking): persist tailscale directory instead of file 2025-05-26 22:33:12 +08:00
3c0890e20f
feat(nvf): add cursorline to nvim 2025-05-26 16:18:43 +08:00
39c52199a0
refactor: clean up tree wide 2025-05-26 07:48:07 +08:00
ad7c7056f9
feat(homeModules/desktop): add app launcher 2025-05-25 23:32:43 +08:00
2741493555
feat(nixosModules/boot): add linux firmware 2025-05-25 22:47:14 +08:00
fbec06178a
feat(packages/rebuild): improve rebuild script 2025-05-25 22:34:35 +08:00
70814354aa
feat(nixosModules/desktop): enable sunshine 2025-05-25 20:29:09 +08:00
1a45001401
feat(nixosModules/desktop): add alvr 2025-05-25 19:52:23 +08:00
5396f6dd63
feat(nixosModules/desktop): add steam 2025-05-25 19:19:56 +08:00
cd569cd72f
build(flake.lock): update flake inputs 2025-05-24 14:55:10 +08:00
936d9aa415
feat(homeModules/cli): add starship 2025-05-24 01:18:11 +08:00
a2e2003dc1
feat(zellij): adjust color 2025-05-24 00:42:04 +08:00
946b5aac27
feat(nvf): add some easy motions 2025-05-24 00:35:21 +08:00
2f2ec67116
feat(zellij): rice it some more 2025-05-24 00:26:29 +08:00
0b4b7bbf67
fix(nixosModules/hardware): fix typo in cudamaintainers bbinary cache link 2025-05-24 00:01:15 +08:00
d475cd4298
feat(zellij): rice zellij status bar 2025-05-24 00:00:17 +08:00
3a5d53def7
feat(homeModules/desktop): add spotifyd 2025-05-23 22:19:47 +08:00
56064adfff
feat(nvf): make  and  center cursor with zz 2025-05-23 17:47:03 +08:00
a5de30be51
build(systems/apollo): init apollo config 2025-05-23 11:41:28 +08:00
4f6d8cb424
docs(README.md): add plans in readme 2025-05-23 09:58:49 +08:00
125 changed files with 3424 additions and 1351 deletions

4
.gitignore vendored
View file

@ -1,2 +1,2 @@
result
*.qcow2
# gitignore
.pre-commit-config.*

View file

@ -1,7 +1,7 @@
keys:
- &admin age12l33pas8eptwjc7ewux3d8snyzfzwz0tn9qg5kw8le79fswmjgjqdjgyy6
- &rafiq age12l33pas8eptwjc7ewux3d8snyzfzwz0tn9qg5kw8le79fswmjgjqdjgyy6
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
- path_regex: \.(yaml)$
key_groups:
- age:
- *admin
- *rafiq

View file

@ -1,24 +0,0 @@
# Modules
The nixosModules and homeModules exposed by this flake are slightly out of the norm.
Option declarations for user specific configuration are kept to:
- homeModules for CLI
- nixosModules for desktop
System configurations, to this end, should include the window manager, lockscreen, terminal etc. for that system.
These desktop programs will be **configured** in home-manager for each user, but those configurations consult the osConfig variable passed in by home-manager.
# System Setup
The following files are **required** for system activation:
- /persist/home/${mainUser}/.ssh/id_ed25519
This private key will be used by sops-nix to decrypt the secrets in [[secrets/secrets.yaml]]. The secrets inside the yaml file should also be set, or otherwise removed alongside their declarations (in [[modules/nixos/system/secrets.nix]]) and references.
# Impermanence
System and user state is stored under /persist. Anything not declared under `{environment,home}.persistence` is deleted on system boot.

29
docs/README.md Normal file
View file

@ -0,0 +1,29 @@
# Pantheon
This flake serves as a monorepo for my systems (using IaC), dotfiles, and scripts.
It's hosted at https://git.rrv.sh/rrvsh/pantheon, and mirrored to https://github.com/rrvsh/pantheon.
## Structure
The system configurations are defined in [`flake.manifest`](nix/manifest.nix).
`flake.manifest.owner` provides the attributes for the administrator user, including username and pubkey.
`flake.manifest.hosts` provides the specifications for the system configurations that should be exposed by the flake as nixosConfigurations.
`flake.modules.nixos.*` provide NixOS options and configurations.
The attribute `flake.modules.nixos.default` provides options that will be applied to every system of that class.
You can use it as seen [here](nix/modules/flake/home-manager.nix):
```nix
flake.modules.nixos.default.imports = [ inputs.home-manager.nixosModules.default ];
```
The other attributes under `flake.modules.nixos` should be opt-in, i.e. provide options that will be set in the profiles.
`flake.profiles.nixos` provides profiles which use the options defined in `flake.modules.nixos` to define different roles for each system, such as graphical, laptop, headless, etc.
Options should not be defined here.
`flake.contracts.nixos.*` will provide contracts, such as reverse proxies or databases, which will configure options on the provider and receiver host.
## Acknowledgements
Thanks to the following for inspiring this configuration. I highly recommend you look through their writings and configurations.
- [ornicar](https://github.com/ornicar/dotfiles) which is where I first heard of NixOS
- [No Boilerplate](https://www.youtube.com/watch?v=CwfKlX3rA6E&pp=0gcJCfwAo7VqN5tD) for making me finally try the OS
- [ryan4yin](https://nixos-and-flakes.thiscute.world/) for being an amazing introduction to NixOS, home-manager, and flakes
- [NotAShelf](https://github.com/NotAShelf/) for their blog and for the wonderful [NVF](https://github.com/notashelf/nvf)
- [mightyiam](https://github.com/mightyiam/infra) for their infrastructure repo using flake-parts
- [drupol](https://not-a-number.io/2025/refactoring-my-infrastructure-as-code-configurations/) for this blog post which convinced me to rebase my infra to use flake-parts

2
docs/cheatsheet.md Normal file
View file

@ -0,0 +1,2 @@
# cheatsheet
`__curPos.file` will give the full evaluated path of the nix file it is called in. See [this issue](https://github.com/NixOS/nix/issues/5897#issuecomment-1012165198) for more information.

690
flake.lock generated
View file

@ -1,5 +1,142 @@
{
"nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1746562888,
"narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1748408240,
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"dedupe_flake-compat": {
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"dedupe_flake-utils": {
"inputs": {
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"dedupe_gitignore": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"dedupe_mnw": {
"locked": {
"lastModified": 1748710831,
"narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=",
"owner": "gerg-l",
"repo": "mnw",
"rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d",
"type": "github"
},
"original": {
"owner": "gerg-l",
"repo": "mnw",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
@ -7,11 +144,11 @@
]
},
"locked": {
"lastModified": 1747724474,
"narHash": "sha256-HG6DeCae97L0mYepwFedsLDueetX/KdihY3HvJqhwLk=",
"lastModified": 1751854533,
"narHash": "sha256-U/OQFplExOR1jazZY4KkaQkJqOl59xlh21HP9mI79Vc=",
"owner": "nix-community",
"repo": "disko",
"rev": "58e72c6ec29a9df611ed5cdef37db1081797a6e0",
"rev": "16b74a1e304197248a1bc663280f2548dbfcae3c",
"type": "github"
},
"original": {
@ -20,32 +157,49 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"files": {
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"lastModified": 1750263550,
"narHash": "sha256-EW/QJ8i/13GgiynBb6zOMxhLU1uEkRqmzbIDEP23yVA=",
"owner": "mightyiam",
"repo": "files",
"rev": "5f4ef1fd1f9012354a9748be093e277675d10f07",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"owner": "mightyiam",
"repo": "files",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1748383148,
"narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"lastModified": 1751413152,
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
"type": "github"
},
"original": {
@ -54,76 +208,62 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"flake-utils-plus": {
"git-hooks": {
"inputs": {
"flake-utils": "flake-utils_2"
"flake-compat": [
"dedupe_flake-compat"
],
"gitignore": [
"dedupe_gitignore"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"lastModified": 1750779888,
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"lastModified": 1748186689,
"narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"owner": "GNOME",
"ref": "48.2",
"repo": "gnome-shell",
"type": "github"
}
},
@ -134,11 +274,11 @@
]
},
"locked": {
"lastModified": 1747688838,
"narHash": "sha256-FZq4/3OtGV/cti9Vccsy2tGSUrxTO4hkDF9oeGRTen4=",
"lastModified": 1751990210,
"narHash": "sha256-krWErNDl9ggMLSfK00Q2BcoSk3+IRTSON/DiDgUzzMw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "45c2985644b60ab64de2a2d93a4d132ecb87cf66",
"rev": "218da00bfa73f2a61682417efe74549416c16ba6",
"type": "github"
},
"original": {
@ -162,44 +302,74 @@
"type": "github"
}
},
"mnw": {
"import-tree": {
"locked": {
"lastModified": 1747499976,
"narHash": "sha256-YTiSI4WLbk0CleXeBheYmKZV6iqKyBpyoh1e+vcQzu4=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "72433a144c4ac16931e9148f78db4a0e4c147441",
"lastModified": 1751399845,
"narHash": "sha256-iun7//YHeEFgEOcG4KKKoy3d2GWOYqokLFVU/zIs79Y=",
"owner": "vic",
"repo": "import-tree",
"rev": "e24a50ff9b5871d4bdd8900679784812eeb120ea",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "mnw",
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"nil": {
"make-shell": {
"inputs": {
"flake-utils": [
"nvf",
"flake-utils"
],
"nixpkgs": [
"nvf",
"nixpkgs"
],
"rust-overlay": "rust-overlay"
"flake-compat": [
"dedupe_flake-compat"
]
},
"locked": {
"lastModified": 1741118843,
"narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=",
"owner": "oxalica",
"repo": "nil",
"rev": "577d160da311cc7f5042038456a0713e9863d09e",
"lastModified": 1733933815,
"narHash": "sha256-9JjM7eT66W4NJAXpGUsdyAFXhBxFWR2Z9LZwUa7Hli0=",
"owner": "nicknovitski",
"repo": "make-shell",
"rev": "ffeceae9956df03571ea8e96ef77c2924f13a63c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "nil",
"owner": "nicknovitski",
"repo": "make-shell",
"type": "github"
}
},
"manifest": {
"locked": {
"lastModified": 1752588656,
"narHash": "sha256-clKPzQ43eDpukeiGHzXmd1hGb2s4N+MWXAzQ5u5+pHQ=",
"owner": "rrvsh",
"repo": "manifest",
"rev": "365902fba994f30469298dee0c98a5fc0f41ec38",
"type": "github"
},
"original": {
"owner": "rrvsh",
"repo": "manifest",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1751313918,
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
@ -210,11 +380,11 @@
]
},
"locked": {
"lastModified": 1747540584,
"narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=",
"lastModified": 1751774635,
"narHash": "sha256-DuOznGdgMxeSlPpUu6Wkq0ZD5e2Cfv9XRZeZlHWMd1s=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "ec179dd13fb7b4c6844f55be91436f7857226dce",
"rev": "85686025ba6d18df31cc651a91d5adef63378978",
"type": "github"
},
"original": {
@ -225,11 +395,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1747542820,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
"lastModified": 1751792365,
"narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
"rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb",
"type": "github"
},
"original": {
@ -239,72 +409,53 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1747542820,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixspect": {
"nur": {
"inputs": {
"nixpkgs": "nixpkgs_2"
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1747725629,
"narHash": "sha256-jEdIW5+SMfX6jVvx/MkMbpXLX9S2b+zsayIC1YJNAaY=",
"owner": "rrvsh",
"repo": "nixspect",
"rev": "28deacc6adeaef69f45af5c8139961a774e1600b",
"lastModified": 1752005241,
"narHash": "sha256-+7DH6wh2BYnLRJzYXEbVlA1ZuAR4MxZI/paknbAuzk4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "a2570fb4d0699fd34ebbbd52e2a763722601f6c6",
"type": "github"
},
"original": {
"owner": "rrvsh",
"repo": "nixspect",
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nvf": {
"inputs": {
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"mnw": "mnw",
"nil": "nil",
"flake-parts": [
"flake-parts"
],
"flake-utils": [
"dedupe_flake-utils"
],
"mnw": [
"dedupe_mnw"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1747525582,
"narHash": "sha256-oEZ6DV4bPcNZIuwW5Kcd+/zT3PMkXse2kX/3jHoomGk=",
"lastModified": 1752001027,
"narHash": "sha256-JgP8lW4QBr9v/U4ETaIOMvGCd/DAA1AjZ1lqjIwfWno=",
"owner": "notashelf",
"repo": "nvf",
"rev": "d3a0e7029ac57eef1120225973247851c5b967b5",
"rev": "c4d80273aaefeadaad96db97d077c647942b0e96",
"type": "github"
},
"original": {
@ -325,11 +476,11 @@
]
},
"locked": {
"lastModified": 1734836319,
"narHash": "sha256-h/Jiq852WJyyAL037sIxjPDScjeH8sUoZVZBWlciXaw=",
"lastModified": 1751898758,
"narHash": "sha256-8EmTPdfOymvvHhmHYWiyO3cwZ4gtLo5uBFm3CU5vySo=",
"owner": "Janrupf",
"repo": "python-flexseal",
"rev": "fdd313f7b9a5c9545c015acaf0729b01f708118a",
"rev": "af318e1fd047abbefcc68d0292a4d902179c95fe",
"type": "github"
},
"original": {
@ -340,59 +491,66 @@
},
"root": {
"inputs": {
"dedupe_flake-compat": "dedupe_flake-compat",
"dedupe_flake-utils": "dedupe_flake-utils",
"dedupe_gitignore": "dedupe_gitignore",
"dedupe_mnw": "dedupe_mnw",
"disko": "disko",
"files": "files",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"impermanence": "impermanence",
"import-tree": "import-tree",
"make-shell": "make-shell",
"manifest": "manifest",
"nix-darwin": "nix-darwin",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs",
"nixspect": "nixspect",
"nur": "nur",
"nvf": "nvf",
"snowfall-lib": "snowfall-lib",
"rrv-sh": "rrv-sh",
"rrvsh-nixpkgs": "rrvsh-nixpkgs",
"sops-nix": "sops-nix",
"stable-diffusion-webui-nix": "stable-diffusion-webui-nix"
"stable-diffusion-webui-nix": "stable-diffusion-webui-nix",
"stylix": "stylix",
"systems": "systems",
"text": "text"
}
},
"rust-overlay": {
"rrv-sh": {
"inputs": {
"nixpkgs": [
"nvf",
"nil",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741055476,
"narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "aefb7017d710f150970299685e8d8b549d653649",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736130495,
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
"lastModified": 1751721838,
"narHash": "sha256-702c0fbgpUuEuQsduGJ9I5bSrCLYEG88SPuZXcSQqTs=",
"owner": "rrvsh",
"repo": "rrv.sh",
"rev": "e00c1c2607b55f43ef74b5f555f62838f4fe5963",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"owner": "rrvsh",
"repo": "rrv.sh",
"type": "github"
}
},
"rrvsh-nixpkgs": {
"locked": {
"lastModified": 1750146550,
"narHash": "sha256-vFNbONVWIdYBqlKZoJScDRjnQ/euDmVqgCL2ebnsu7U=",
"owner": "rrvsh",
"repo": "nixpkgs",
"rev": "d7fa95990fd890bbd17ca8361f5d4e4935512c75",
"type": "github"
},
"original": {
"owner": "rrvsh",
"ref": "librechat-module",
"repo": "nixpkgs",
"type": "github"
}
},
@ -403,11 +561,11 @@
]
},
"locked": {
"lastModified": 1747603214,
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=",
"lastModified": 1751606940,
"narHash": "sha256-KrDPXobG7DFKTOteqdSVeL1bMVitDcy7otpVZWDE6MA=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd",
"rev": "3633fc4acf03f43b260244d94c71e9e14a2f6e0d",
"type": "github"
},
"original": {
@ -418,27 +576,68 @@
},
"stable-diffusion-webui-nix": {
"inputs": {
"flake-utils": "flake-utils_3",
"flake-utils": [
"dedupe_flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"python-flexseal": "python-flexseal"
},
"locked": {
"lastModified": 1746840548,
"narHash": "sha256-NjKmOjkSMVx+z35L4lTEhYg/eJaNrRqaKwAEdnRJusY=",
"owner": "Janrupf",
"lastModified": 1751899247,
"narHash": "sha256-bh6xwc24Rv0YE4grKXvj+kmXmydns+OrlWn4WLnJSY4=",
"owner": "janrupf",
"repo": "stable-diffusion-webui-nix",
"rev": "74a71ad10cc6525bc0dbb90ae47a19715a316344",
"rev": "d5ba5dccd190b0ded17f9c4a23dc7665c6dc2eae",
"type": "github"
},
"original": {
"owner": "Janrupf",
"ref": "main",
"owner": "janrupf",
"repo": "stable-diffusion-webui-nix",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": [
"flake-parts"
],
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": [
"nur"
],
"systems": [
"systems"
],
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1751995939,
"narHash": "sha256-C5CSTv+b8XSbqJwqTP8SGkZEK3YCCJnmvRbg209ql5w=",
"owner": "nix-community",
"repo": "stylix",
"rev": "8f3259dbc57c8ee871492fde80f77468826bbd63",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -454,48 +653,99 @@
"type": "github"
}
},
"systems_2": {
"text": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"lastModified": 1751819711,
"narHash": "sha256-Emci++Hknzr2FEZRUbRDD7prI5JwwGsACO/GaU9Pmxg=",
"owner": "rrvsh",
"repo": "text.nix",
"rev": "00ba1e616ef3b761a52d5f7ac32892715cc4bcd1",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"owner": "rrvsh",
"repo": "text.nix",
"type": "github"
}
},
"systems_3": {
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"systems_4": {
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1748180480,
"narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1748740859,
"narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "57d5f9683ff9a3b590643beeaf0364da819aedda",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1725758778,
"narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "122c9e5c0e6f27211361a04fae92df97940eccf9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
}

169
flake.nix
View file

@ -1,45 +1,134 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
snowfall-lib.url = "github:snowfallorg/lib";
snowfall-lib.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nvf.url = "github:notashelf/nvf";
nvf.inputs.nixpkgs.follows = "nixpkgs";
nixspect.url = "github:rrvsh/nixspect";
stable-diffusion-webui-nix.url = "github:Janrupf/stable-diffusion-webui-nix/main";
stable-diffusion-webui-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
snowfall.namespace = "pantheon";
overlays = with inputs; [
stable-diffusion-webui-nix.overlays.default
];
systems.modules.nixos = with inputs; [
disko.nixosModules.disko
impermanence.nixosModules.impermanence
sops-nix.nixosModules.sops
];
homes.modules = with inputs; [
impermanence.homeManagerModules.impermanence
nix-index-database.hmModules.nix-index
nvf.homeManagerModules.default
];
outputs-builder = channels: {
formatter = channels.nixpkgs.nixfmt-rfc-style;
{ self, ... }@inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
(inputs.import-tree ./nix)
// {
systems = import inputs.systems;
flake = {
inherit self;
paths.root = ./.;
};
}
);
inputs = {
### SYSTEM ###
# systems provides a list of supported nix systems.
systems.url = "github:nix-systems/default";
# nixos-unstable provides a binary cache for all packages.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# My fork for random shit
rrvsh-nixpkgs.url = "github:rrvsh/nixpkgs/librechat-module";
# home-manager manages our user packages and dotfiles
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix darwin provides declarative mac configuration
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# the nix user repository for mainly firefox extensions
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
# impermanence provides a nice abstraction over linking files from /persist
impermanence.url = "github:nix-community/impermanence";
# flake-parts lets us define flake modules.
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
# disko provides declarative drive partitioning
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# sops-nix lets us version control secrets like passwords and api keys
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
systems.follows = "systems";
nur.follows = "nur";
};
};
### FLAKE PARTS MODULES ###
# import-tree imports all nix files in a given directory.
import-tree.url = "github:vic/import-tree";
# files lets us write text files and automatically add checks for them
files.url = "github:mightyiam/files";
# text.nix lets us easily define markdown text to pass to files
text.url = "github:rrvsh/text.nix";
# manifest lets us define all hosts in one file
manifest.url = "github:rrvsh/manifest";
# make-shells.<name> creates devShells and checks
make-shell = {
url = "github:nicknovitski/make-shell";
inputs.flake-compat.follows = "dedupe_flake-compat";
};
# git-hooks ensures nix flake check is ran before commits
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs = {
flake-compat.follows = "dedupe_flake-compat";
nixpkgs.follows = "nixpkgs";
gitignore.follows = "dedupe_gitignore";
};
};
### FLAKES ###
# nix-index-database indexes the nixpkgs binaries for use with comma
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# nvf provides modules to wrap neovim
nvf = {
url = "github:notashelf/nvf";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
systems.follows = "systems";
flake-utils.follows = "dedupe_flake-utils";
mnw.follows = "dedupe_mnw";
};
};
# provides comfy ui and sdwebui services
stable-diffusion-webui-nix = {
url = "github:janrupf/stable-diffusion-webui-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "dedupe_flake-utils";
};
# my website :)
rrv-sh = {
url = "github:rrvsh/rrv.sh";
inputs.nixpkgs.follows = "nixpkgs";
};
### DEDUPE ###
dedupe_flake-compat.url = "github:edolstra/flake-compat";
dedupe_flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
dedupe_mnw.url = "github:gerg-l/mnw";
dedupe_gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

View file

@ -1,50 +0,0 @@
{
pkgs,
inputs,
...
}:
{
cli.shell = "zsh";
cli.screensaver.enable = true;
cli.screensaver.timeout = "100";
cli.screensaver.command = "cbonsai -S";
cli.editor = "nvf";
cli.file-browser = "yazi";
cli.multiplexer = "zellij";
cli.fetch = "hyfetch";
cli.git.name = "Mohammad Rafiq";
cli.git.email = "rafiq@rrv.sh";
cli.git.defaultBranch = "prime";
home.shellAliases = {
v = "nvim";
};
home.packages = with pkgs; [
cbonsai
ripgrep
devenv
pantheon.rebuild
pantheon.edit
inputs.nixspect.packages."x86_64-linux".nixspect
];
home.persistence."/persist/home/rafiq".directories = [ "repos" ];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
programs = {
thefuck.enable = true;
tealdeer.enable = true;
tealdeer.settings.updates.auto_update = true;
fzf = {
enable = true;
enableZshIntegration = true;
};
nh.enable = true;
};
}

View file

@ -1,7 +0,0 @@
{ lib, ... }:
{
mkStrOption = lib.mkOption {
type = lib.types.str;
default = "";
};
}

View file

@ -1,60 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
options.cli = {
shell = lib.pantheon.mkStrOption;
screensaver.enable = lib.mkEnableOption "";
screensaver.timeout = lib.pantheon.mkStrOption;
screensaver.command = lib.pantheon.mkStrOption;
editor = lib.pantheon.mkStrOption;
nvf.snippets = lib.mkOption {
type = lib.types.listOf lib.types.attrs;
default = { };
};
file-browser = lib.pantheon.mkStrOption;
multiplexer = lib.pantheon.mkStrOption;
fetch = lib.pantheon.mkStrOption;
git = {
name = lib.pantheon.mkStrOption;
email = lib.pantheon.mkStrOption;
defaultBranch = lib.pantheon.mkStrOption;
};
};
config = lib.mkMerge [
{
home.shell.enableShellIntegration = true;
programs.ssh = {
enable = true;
extraConfig = ''
Host *
SetEnv TERM=xterm-256color
'';
};
programs.zoxide.enable = true;
home.shellAliases.cd = "z";
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
".local/share/zoxide"
];
}
{
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
}
{
home.shellAliases.ai = "aichat -r %shell% -e";
home.packages = with pkgs; [ aichat ];
xdg.configFile."aichat/config.yaml".text = ''
model: gemini:gemini-2.0-flash
clients:
- type: gemini
'';
}
];
}

View file

@ -1,26 +0,0 @@
{
hardtime-nvim = {
enable = true;
setupOpts = {
disabled_keys = {
"<Up>" = [
"n"
"x"
];
"<Down>" = [
"n"
"x"
];
"<Left>" = [
"n"
"x"
];
"<Right>" = [
"n"
"x"
];
};
};
};
whichKey.enable = true;
}

View file

@ -1,6 +0,0 @@
{
enable = true;
#FIXME: List doenst work for some reason
registers = "unnamedplus";
providers.wl-copy.enable = true;
}

View file

@ -1,38 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.cli.editor == "nvf") {
home.sessionVariables.EDITOR = "nvim";
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
".local/share/nvf"
];
programs.nvf = {
enable = true;
settings.vim = {
hideSearchHighlight = true;
syntaxHighlighting = true;
telescope.enable = true;
searchCase = "ignore";
undoFile.enable = true;
fzf-lua.enable = true;
git.enable = true;
autocomplete = import ./autocomplete.nix { inherit lib; };
autopairs.nvim-autopairs.enable = true;
binds = import ./binds.nix;
clipboard = import ./clipboard.nix;
diagnostics = import ./diagnostics.nix;
keymaps = import ./keymaps.nix;
languages = import ./languages.nix;
lsp = import ./lsp.nix;
navigation = import ./navigation.nix;
notes = import ./notes.nix;
options = import ./options.nix;
notify = import ./notify.nix;
snippets = import ./snippets.nix;
treesitter = import ./treesitter.nix;
ui = import ./ui.nix;
utility = import ./utility.nix;
visuals = import ./visuals.nix;
};
};
};
}

View file

@ -1,6 +0,0 @@
{
nvim-lint = {
enable = true;
lint_after_save = true;
};
}

View file

@ -1,16 +0,0 @@
[
{
desc = "";
key = "f";
mode = "n";
action = ":FzfLua files<CR>";
silent = true;
}
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
]

View file

@ -1,9 +0,0 @@
{
enable = true;
formatOnSave = true;
inlayHints.enable = true;
lightbulb.enable = true;
lspkind.enable = true;
null-ls.enable = true;
otter-nvim.enable = true;
}

View file

@ -1,5 +0,0 @@
{
harpoon = {
enable = true;
};
}

View file

@ -1,3 +0,0 @@
{
todo-comments.enable = true;
}

View file

@ -1,2 +0,0 @@
{
}

View file

@ -1,9 +0,0 @@
{
autoindent = true;
smartindent = true;
expandtab = true;
tabstop = 2;
shiftwidth = 2;
updatetime = 0;
backspace = "indent,eol,start";
}

View file

@ -1,6 +0,0 @@
{
luasnip = {
enable = true;
setupOpts.enable_autosnippets = true;
};
}

View file

@ -1,7 +0,0 @@
{
autotagHtml = true;
fold = true;
context.enable = true;
indent.disable = [ "markdown" ];
textobjects.enable = true;
}

View file

@ -1,15 +0,0 @@
{
borders = {
enable = true;
globalStyle = "double";
};
breadcrumbs = {
enable = true;
navbuddy.enable = true;
};
colorizer.enable = true;
illuminate.enable = true;
noice.enable = true;
nvim-ufo.enable = true;
smartcolumn.enable = true;
}

View file

@ -1,17 +0,0 @@
{
direnv.enable = true;
leetcode-nvim.enable = true;
mkdir.enable = true;
motion.leap.enable = true;
motion.leap.mappings.leapForwardTo = "s";
motion.leap.mappings.leapBackwardTo = "S";
vim-wakatime.enable = true;
yazi-nvim = {
enable = true;
mappings = {
openYazi = "t";
openYaziDir = "T";
};
setupOpts.open_for_directories = true;
};
}

View file

@ -1,31 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkMerge [
(lib.mkIf (config.cli.fetch == "hyfetch") {
home.packages = [ pkgs.fastfetch ];
home.sessionVariables.FETCH = "hyfetch";
home.shellAliases.fetch = "hyfetch";
programs.hyfetch = {
enable = true;
settings = {
preset = "bisexual";
mode = "rgb";
light_dark = "dark";
lightness = 0.5;
color_align = {
mode = "horizontal";
custom_colors = [ ];
fore_back = null;
};
backend = "fastfetch";
};
};
})
];
}

View file

@ -1,10 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.cli.file-browser == "yazi") {
home.sessionVariables.FILE_BROWSER = "yazi";
programs.yazi = {
enable = true;
shellWrapperName = "t";
};
};
}

View file

@ -1,18 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.cli.multiplexer == "zellij") {
home.sessionVariables.MULTIPLEXER = "zellij";
programs.zellij = {
enable = true;
enableZshIntegration = true;
attachExistingSession = true;
exitShellOnExit = true;
settings = {
default_layout = "compact";
pane_frames = false;
show_startup_tips = false;
show_release_notes = false;
};
};
};
}

View file

@ -1,38 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.cli.shell == "zsh") {
home.sessionVariables.SHELL = "zsh";
programs.zsh = {
enable = true;
enableVteIntegration = true;
syntaxHighlighting.enable = true;
historySubstringSearch.enable = true;
history = {
append = true;
extended = true;
ignoreDups = true;
ignoreSpace = true;
save = 10000;
share = true;
size = 10000;
};
};
programs.zsh.initContent = lib.mkIf config.cli.screensaver.enable (
lib.mkOrder 1200
# zsh
''
precmd() {
TMOUT=${config.cli.screensaver.timeout}
}
TRAPALRM() {
TMOUT=1
${config.cli.screensaver.command}
# If we exit, assume the previous command was exited out of
TMOUT=${config.cli.screensaver.timeout}
zle reset-prompt
}
''
);
};
}

View file

@ -1,3 +0,0 @@
{
imports = [ ./git.nix ];
}

View file

@ -1,12 +0,0 @@
{ osConfig, lib, ... }:
{
config = lib.mkIf (osConfig.desktop.browser == "firefox") {
home.persistence."/persist/home/rafiq".directories = [ ".mozilla/firefox" ];
home.sessionVariables.BROWSER = "firefox";
programs.firefox = {
enable = true;
profiles.rafiq.id = 0;
profiles.test.id = 1;
};
};
}

View file

@ -1,17 +0,0 @@
{
config,
lib,
osConfig,
pkgs,
...
}:
{
config = lib.mkMerge [
(lib.mkIf (osConfig.hardware.gpu == "nvidia") {
home.packages = [ pkgs.stable-diffusion-webui.forge.cuda ];
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
".local/share/stable-diffusion-webui"
];
})
];
}

View file

@ -1,47 +0,0 @@
{
osConfig,
lib,
...
}:
{
config = lib.mkMerge [
(lib.mkIf (osConfig.desktop.lockscreen == "hyprlock") {
home.sessionVariables.LOCKSCREEN = "hyprlock";
programs.hyprlock = {
enable = true;
settings = {
general.hide_cursor = true;
general.ignore_empty_input = true;
background = {
blur_passes = 5;
blur_size = 5;
};
label = {
text = ''hi, $USER.'';
font_size = 32;
halign = "center";
valign = "center";
position = "0, 0";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
input-field = {
fade_on_empty = true;
size = "200, 45";
halign = "center";
valign = "center";
position = "0, -5%";
placeholder_text = "";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
};
};
})
];
}

View file

@ -1,12 +0,0 @@
{ osConfig, lib, ... }:
{
config = lib.mkMerge [
(lib.mkIf (osConfig.desktop.notification-daemon == "mako") {
home.sessionVariables.NOTIFICATION_DAEMON = "mako";
services.mako = {
enable = true;
settings = { };
};
})
];
}

View file

@ -1,23 +0,0 @@
{
osConfig,
lib,
pkgs,
...
}:
{
config = lib.mkMerge [
(lib.mkIf (osConfig.desktop.terminal == "kitty") {
home.packages = with pkgs; [ kitty ];
home.sessionVariables.TERMINAL = "kitty";
})
(lib.mkIf (osConfig.desktop.terminal == "ghostty") {
home.sessionVariables.TERMINAL = "ghostty -e";
programs.ghostty = {
enable = true;
settings = {
confirm-close-surface = false;
};
};
})
];
}

View file

@ -1,3 +0,0 @@
{
animation = [ "workspaces, 0" ];
}

View file

@ -1,38 +0,0 @@
{
pkgs,
lib,
osConfig,
...
}:
let
mainMonitor = osConfig.desktop.mainMonitor;
in
{
config = lib.mkIf (osConfig.desktop.windowManager == "hyprland") {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
settings = lib.mkMerge [
{
ecosystem.no_update_news = true;
monitor = [
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
", preferred, auto, 1"
];
exec-once = [
"uwsm app -- $LOCKSCREEN"
"uwsm app -- $NOTIFICATION_DAEMON"
];
}
(import ./decoration.nix)
(import ./keybinds.nix { inherit pkgs; })
];
};
xdg.configFile."uwsm/env".text = # sh
''
'';
};
}

View file

@ -1,12 +0,0 @@
{ config, ... }:
{
home.persistence."/persist/home/${config.snowfallorg.user.name}" = {
directories = [
".ssh"
".config/sops/age"
];
allowOther = true;
};
home.stateVersion = "24.11";
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
options.cli = { };
config = lib.mkMerge [
{
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = [ "/share/zsh" ]; # enables completion
}
];
}

View file

@ -1,20 +0,0 @@
{ lib, ... }:
{
imports = [
./windowManager.nix
];
options.desktop = {
mainMonitor = {
id = lib.pantheon.mkStrOption;
scale = lib.pantheon.mkStrOption;
resolution = lib.pantheon.mkStrOption;
refresh-rate = lib.pantheon.mkStrOption;
};
windowManager = lib.pantheon.mkStrOption;
lockscreen = lib.pantheon.mkStrOption;
browser = lib.pantheon.mkStrOption;
terminal = lib.pantheon.mkStrOption;
notification-daemon = lib.pantheon.mkStrOption;
};
}

View file

@ -1,8 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
(lib.mkIf (config.desktop.lockscreen == "hyprlock") {
security.pam.services.hyprlock = { };
})
];
}

View file

@ -1,23 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
(lib.mkIf (config.desktop.windowManager == "hyprland") {
environment.loginShellInit = # sh
''
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
if uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
fi
'';
environment.variables = {
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";
};
programs.hyprland = {
enable = true;
withUWSM = true;
};
})
];
}

View file

@ -1,9 +0,0 @@
{ config, ... }:
{
config = {
services.pipewire = {
enable = true;
pulse.enable = true;
};
};
}

View file

@ -1,104 +0,0 @@
{ lib, config, ... }:
let
cfg = config.hardware.drives.btrfs;
in
{
config = lib.mkIf (cfg.enable) (
lib.mkMerge [
{
boot.initrd.kernelModules = [ "dm-snapshot" ];
disko.devices.disk.main = {
device = cfg.drive;
type = "disk";
content.type = "gpt";
content.partitions = {
boot.name = "boot";
boot.size = "1M";
boot.type = "EF02";
esp.name = "ESP";
esp.size = "500M";
esp.type = "EF00";
esp.content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
swap.size = "4G";
swap.content = {
type = "swap";
resumeDevice = true;
};
root.name = "root";
root.size = "100%";
root.content = {
type = "lvm_pv";
vg = "root_vg";
};
};
};
disko.devices.lvm_vg.root_vg = {
type = "lvm_vg";
lvs.root.size = "100%FREE";
lvs.root.content.type = "btrfs";
lvs.root.content.extraArgs = [ "-f" ];
lvs.root.content.subvolumes = {
"/root".mountpoint = "/";
"/persist".mountpoint = "/persist";
"/persist".mountOptions = [
"subvol=persist"
"noatime"
];
"/nix".mountpoint = "/nix";
"/nix".mountOptions = [
"subvol=nix"
"noatime"
];
};
};
}
(lib.mkIf (cfg.ephemeralRoot) {
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/root_vg/root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
programs.fuse.userAllowOther = true;
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/var/lib/systemd"
"/var/lib/nixos"
];
files = [
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/machine-id"
];
};
})
]
);
}

View file

@ -1,9 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
(lib.mkIf (config.hardware.platform == "amd") {
hardware.cpu.amd.updateMicrocode = true;
boot.kernelModules = [ "kvm-amd" ];
})
];
}

View file

@ -1,28 +0,0 @@
{ lib, ... }:
{
imports = [
./btrfs.nix
./nvidia.nix
./audio.nix
./cpu.nix
./networking.nix
];
options.hardware = {
drives.btrfs = {
enable = lib.mkEnableOption "";
drive = lib.pantheon.mkStrOption;
ephemeralRoot = lib.mkEnableOption "";
};
gpu = lib.pantheon.mkStrOption;
platform = lib.pantheon.mkStrOption;
};
config = {
services.fwupd.enable = true;
hardware.bluetooth = {
enable = true;
settings.General.Experimental = true;
};
};
}

View file

@ -1,23 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
{
networking.useDHCP = lib.mkDefault true;
networking.hostName = config.system.hostname;
networking.networkmanager.enable = true;
services.openssh = {
enable = true;
settings = {
PrintMotd = true;
};
};
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets."keys/tailscale".path;
};
environment.persistence."/persist".files = [ "/var/lib/tailscale/tailscaled.state" ];
}
];
}

View file

@ -1,28 +0,0 @@
{
lib,
config,
pkgs,
...
}:
{
config = lib.mkIf (config.hardware.gpu == "nvidia") {
hardware.graphics.enable = true;
hardware.graphics.extraPackages = with pkgs; [
nvidia-vaapi-driver
];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.open = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
nixpkgs.config.allowUnfree = true;
environment.variables = {
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct";
};
nix.settings.substituters = [ "cuda-maintainers.cachix.org" ];
nix.settings.trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
};
}

View file

@ -1,19 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
{
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.loader.efi.canTouchEfiVariables = true;
}
(lib.mkIf (config.system.bootloader == "systemd-boot") {
boot.loader.systemd-boot.enable = true;
})
];
}

View file

@ -1,21 +0,0 @@
{ config, lib, ... }:
{
imports = [
./boot.nix
./users.nix
./localisation.nix
./nix-config.nix
./secrets.nix
];
options.system = {
hostname = lib.pantheon.mkStrOption;
mainUser.name = lib.pantheon.mkStrOption;
mainUser.publicKey = lib.pantheon.mkStrOption;
bootloader = lib.pantheon.mkStrOption;
};
config = {
system.stateVersion = "25.05"; # Did you read the comment?
};
}

View file

@ -1,9 +0,0 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
{
time.timeZone = "Asia/Singapore";
i18n.defaultLocale = "en_US.UTF-8";
}
];
}

View file

@ -1,17 +0,0 @@
{ config, inputs, ... }:
{
config = {
nixpkgs.config.allowUnfree = true;
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
"pipe-operators"
];
trusted-users = [ "@wheel" ];
};
};
}

View file

@ -1,20 +0,0 @@
{ lib, config, ... }:
{
sops = {
defaultSopsFile = lib.snowfall.fs.get-file "secrets/secrets.yaml";
age.sshKeyPaths = [ "/persist/home/rafiq/.ssh/id_ed25519" ];
secrets = {
"keys/tailscale" = { };
"keys/gemini" = { };
"keys/cvt-jira" = { };
"misc/cvt-jira-link" = { };
"rafiq/hashedPassword".neededForUsers = true;
};
};
environment.shellInit = # sh
''
export GEMINI_API_KEY=$(sudo cat ${config.sops.secrets."keys/gemini".path})
export CVT_JIRA_KEY=$(sudo cat ${config.sops.secrets."keys/cvt-jira".path})
export CVT_JIRA_LINK=$(sudo cat ${config.sops.secrets."misc/cvt-jira-link".path})
'';
}

View file

@ -1,26 +0,0 @@
{
config,
lib,
...
}:
{
config = lib.mkMerge [
{
users.mutableUsers = false;
users.groups.users = {
gid = 100;
members = [ "${config.system.mainUser.name}" ];
};
users.users."${config.system.mainUser.name}" = {
linger = true;
uid = 1000;
isNormalUser = true;
hashedPasswordFile = config.sops.secrets."${config.system.mainUser.name}/hashedPassword".path;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [ config.system.mainUser.publicKey ];
};
services.getty.autologinUser = config.system.mainUser.name;
security.sudo.wheelNeedsPassword = false;
}
];
}

62
nix/configurations.nix Normal file
View file

@ -0,0 +1,62 @@
{
config,
lib,
inputs,
...
}:
let
inherit (lib) nixosSystem;
inherit (inputs.nix-darwin.lib) darwinSystem;
inherit (lib.lists) optional;
inherit (lib.attrsets) mapAttrs;
inherit (cfg.lib.modules) forAllUsers';
inherit (config.manifest) hosts;
cfg = config.flake;
globalCfg = hostName: hostConfig: {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit hostName hostConfig; };
sharedModules = [ cfg.modules.homeManager.default ];
users = forAllUsers' (name: _: cfg.modules.homeManager.${name});
};
mkConfigurations =
class: hosts:
mapAttrs (
name: value:
if class == "nixos" then
nixosSystem {
specialArgs = {
inherit (config.flake) self;
hostName = name;
hostConfig = value;
};
modules = [
cfg.modules.nixos.default
inputs.home-manager.nixosModules.home-manager
{ home-manager = globalCfg name value; }
(value.extraCfg or { })
] ++ optional value.graphical cfg.modules.nixos.graphical;
}
else if class == "darwin" then
darwinSystem {
specialArgs = {
inherit (config.flake) self;
hostName = name;
hostConfig = value;
};
modules = [
cfg.modules.darwin.default
inputs.home-manager.darwinModules.home-manager
{ home-manager = globalCfg name value; }
(value.extraCfg or { })
] ++ optional value.graphical cfg.modules.darwin.graphical;
}
else
{ }
) hosts;
in
{
imports = [ inputs.home-manager.flakeModules.home-manager ];
flake.nixosConfigurations = mkConfigurations "nixos" hosts.nixos;
flake.darwinConfigurations = mkConfigurations "darwin" hosts.darwin;
}

18
nix/files/cheatsheet.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, config, ... }:
let
inherit (builtins) concatStringsSep;
inherit (lib.lists) singleton;
in
{
text.cheatsheet = concatStringsSep "\n" [
"`__curPos.file` will give the full evaluated path of the nix file it is called in. See [this issue](https://github.com/NixOS/nix/issues/5897#issuecomment-1012165198) for more information."
];
perSystem =
{ pkgs, ... }:
{
files.files = singleton {
path_ = "docs/cheatsheet.md";
drv = pkgs.writeText "cheatsheet.md" config.text.cheatsheet;
};
};
}

13
nix/files/gitignore.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, ... }:
{
perSystem =
{ pkgs, ... }:
{
files.files = [
{
path_ = ".gitignore";
drv = pkgs.writeText ".gitignore" config.text.gitignore;
}
];
};
}

54
nix/files/readme.nix Normal file
View file

@ -0,0 +1,54 @@
{ config, ... }:
{
text.readme = {
heading = "Pantheon";
description = # markdown
''
This flake serves as a monorepo for my systems (using IaC), dotfiles, and scripts.
It's hosted at https://git.rrv.sh/rrvsh/pantheon, and mirrored to https://github.com/rrvsh/pantheon.
'';
order = [
"Structure"
"Acknowledgements"
];
parts."Acknowledgements" = # markdown
''
Thanks to the following for inspiring this configuration. I highly recommend you look through their writings and configurations.
- [ornicar](https://github.com/ornicar/dotfiles) which is where I first heard of NixOS
- [No Boilerplate](https://www.youtube.com/watch?v=CwfKlX3rA6E&pp=0gcJCfwAo7VqN5tD) for making me finally try the OS
- [ryan4yin](https://nixos-and-flakes.thiscute.world/) for being an amazing introduction to NixOS, home-manager, and flakes
- [NotAShelf](https://github.com/NotAShelf/) for their blog and for the wonderful [NVF](https://github.com/notashelf/nvf)
- [mightyiam](https://github.com/mightyiam/infra) for their infrastructure repo using flake-parts
- [drupol](https://not-a-number.io/2025/refactoring-my-infrastructure-as-code-configurations/) for this blog post which convinced me to rebase my infra to use flake-parts
'';
parts."Structure" = # markdown
''
The system configurations are defined in [`flake.manifest`](nix/manifest.nix).
`manifest.owner` provides the attributes for the administrator user, including username and pubkey.
`manifest.hosts` provides the specifications for the system configurations that should be exposed by the flake as nixosConfigurations.
`flake.modules.nixos.*` provide NixOS options and configurations.
The attribute `flake.modules.nixos.default` provides options that will be applied to every system of that class.
You can use it as seen [here](nix/modules/flake/home-manager.nix):
```nix
flake.modules.nixos.default.imports = [ inputs.home-manager.nixosModules.default ];
```
The other attributes under `flake.modules.nixos` should be opt-in, i.e. provide options that will be set in the profiles.
`flake.profiles.nixos` provides profiles which use the options defined in `flake.modules.nixos` to define different roles for each system, such as graphical, laptop, headless, etc.
Options should not be defined here.
`flake.contracts.nixos.*` will provide contracts, such as reverse proxies or databases, which will configure options on the provider and receiver host.
'';
};
perSystem =
{ pkgs, ... }:
{
files.files = [
{
path_ = "docs/README.md";
drv = pkgs.writeText "README.md" config.text.readme;
}
];
};
}

28
nix/flake-parts/files.nix Normal file
View file

@ -0,0 +1,28 @@
{
inputs,
withSystem,
lib,
config,
...
}:
let
inherit (builtins) map head;
inherit (lib.lists) concatStringsSep;
mkListEntry = x: "- [" + x.path_ + "](" + x.path_ + ")";
listOfGeneratedFiles = withSystem (head config.systems) (psArgs: psArgs.config.files.files);
in
{
imports = [ inputs.files.flakeModules.default ];
perSystem = psArgs: {
make-shells.default.packages = [ psArgs.config.files.writer.drv ];
};
text.readme.parts."Generated Files" = concatStringsSep "\n" (
[
"This flake uses the [files flake-parts module](https://flake.parts/options/files.html) to generate documentation."
"The list of generated files are:"
]
++ (map mkListEntry listOfGeneratedFiles)
);
}

View file

@ -0,0 +1,10 @@
{ inputs, ... }:
{
debug = true;
imports = [
inputs.make-shell.flakeModules.default
inputs.manifest.flakeModules.default
inputs.flake-parts.flakeModules.modules
inputs.text.flakeModules.default
];
}

View file

@ -0,0 +1,24 @@
{ inputs, ... }:
{
imports = [ inputs.git-hooks.flakeModule ];
text.gitignore = ".pre-commit-config.*";
perSystem = psArgs: {
pre-commit.settings.hooks = {
# Nix Linters
deadnix.enable = true;
statix.enable = true;
nil.enable = true;
nixfmt-rfc-style.enable = true;
# Flake Health Checks
flake-checker.enable = true;
# Misc
mixed-line-endings.enable = true;
trim-trailing-whitespace.enable = true;
#TODO: figure out vale
#TODO: make nix develop work
#TODO: add nix flake check
#TODO: add write-files
};
make-shells.default.shellHook = psArgs.config.pre-commit.installationScript;
};
}

View file

@ -3,34 +3,23 @@
blink-cmp = {
enable = true;
friendly-snippets.enable = true;
mappings = {
next = "<Down>"; # FIXME: results in the menu appearing when navigating
previous = "<Up>";
};
sourcePlugins = {
emoji.enable = true;
ripgrep.enable = true;
spell.enable = true;
};
sourcePlugins.ripgrep.enable = true;
setupOpts = {
completion.documentation.auto_show_delay_ms = 0;
signature.enabled = true;
# Disable completion in markdown files
# TODO: Disable completion when in comments
enabled =
lib.generators.mkLuaInline
# lua
''
--- Disable completion for markdown
function()
return not vim.tbl_contains({"markdown"}, vim.bo.filetype)
and vim.bo.buftype ~= "prompt"
and vim.b.completion ~= false
end
'';
cmdline = {
enabled = true;
sources = null;
completion.menu.auto_show = false;
};
completion.documentation.auto_show_delay_ms = 0;
# Show e.g. function parameters
signature.enabled = true;
};
};
}

View file

@ -0,0 +1,3 @@
{
whichKey.enable = true;
}

View file

@ -4,22 +4,30 @@
enableTreesitter = true;
bash.enable = true;
clang.enable = true;
csharp.enable = true;
# broken on macos
# csharp.enable = true;
css.enable = true;
go.enable = true;
html.enable = true;
lua.enable = true;
markdown.enable = true;
markdown.extensions.markview-nvim.enable = true;
markdown = {
enable = true;
extensions.markview-nvim.enable = true;
format.type = "prettierd";
};
nix = {
enable = true;
format.type = "nixfmt";
lsp.server = "nil";
};
python.enable = true;
python.lsp.server = "python-lsp-server";
python = {
enable = true;
format.type = "ruff";
lsp.server = "pyright";
};
rust.enable = true;
rust.crates.enable = true;
tailwind.enable = true;
ts.enable = true;
ts.extensions.ts-error-translator.enable = true;
typst.enable = true;

View file

@ -0,0 +1,17 @@
{
enable = true;
# Show virtual text hints
inlayHints.enable = true;
lightbulb.enable = true;
# Show icons for lsp actions
lspkind.enable = true;
null-ls.enable = true;
otter-nvim = {
enable = true;
setupOpts = {
buffers.set_filetype = true;
buffers.write_to_disk = true;
handle_leading_whitespace = true;
};
};
}

View file

@ -0,0 +1,9 @@
{
harpoon = {
enable = true;
mappings.listMarks = "<leader>ml";
mappings.markFile = "<leader>mm";
setupOpts.defaults.save_on_toggle = true;
setupOpts.defaults.sync_on_ui_close = true;
};
}

View file

@ -0,0 +1,28 @@
{ pkgs }:
{
luasnip = {
enable = true;
setupOpts.enable_autosnippets = true;
providers = with pkgs.vimPlugins; [ vim-snippets ];
loaders = "require('luasnip.loaders.from_vscode').lazy_load()";
customSnippets.snipmate = {
nix = [
{
trigger = "mod";
description = "empty module";
body = # nix
''
{config, lib, ...}:
let
cfg = config.$1;
in
{
options.$1 = { $2 };
config = $3;
}
'';
}
];
};
};
}

View file

@ -0,0 +1,10 @@
{
lualine = {
enable = true;
refresh = {
statusline = 10;
winbar = 10;
};
#TODO: rice lualine
};
}

View file

@ -0,0 +1,16 @@
{
borders = {
enable = true;
globalStyle = "rounded";
};
breadcrumbs.enable = true;
# Show color values e.g. #ffffff
colorizer.enable = true;
# Highlight matching symbols
illuminate.enable = true;
noice.enable = true;
noice.setupOpts.notify.enabled = false;
# Make folds look nicer
nvim-ufo.enable = true;
smartcolumn.enable = true;
}

View file

@ -0,0 +1,11 @@
{
motion.hop.enable = true;
yazi-nvim = {
enable = true;
mappings = {
openYazi = "<leader>tt";
openYaziDir = "<leader>TT";
};
setupOpts.open_for_directories = true;
};
}

View file

@ -1,8 +1,7 @@
{
indent-blankline.enable = true;
fidget-nvim.enable = true;
# fidget-nvim.setupOpts.notification.override_vim_notify = true;
nvim-cursorline.enable = true;
fidget-nvim.setupOpts.notification.override_vim_notify = true;
nvim-web-devicons.enable = true;
rainbow-delimiters.enable = true;
}

View file

@ -0,0 +1,71 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "commit" # bash
''
if git diff-index --quiet HEAD --; then exit 0; fi
PROMPT="Please generate a commit message for this diff."
GUIDELINES="1. Use conventional commit syntax, following the context. 2. Cap the commit message at 80 characters, preferably less. You must not go beyond this limit. 3. Do not include backticks. Only generate the raw text. 4. Be as succint as possible. Each commit should be atomic. You may throw a warning if it is not."
NUM_ANCESTORS=0
PUSH=false
# Parse arguments
while [[ $# -gt 0 ]]; do
case "$1" in
--num-ancestors | -n)
NUM_ANCESTORS="$2"
shift 2
;;
--push | -u)
PUSH=true
shift
;;
*)
echo "Unrecognised argument: $1. Exiting..."
exit 1
;;
esac
done
# Get context and diff
CONTEXT=$(git --no-pager log -n 10)
DIFF=$(git --no-pager diff HEAD~$NUM_ANCESTORS)
# Generate initial response
RESPONSE=$(aichat "$PROMPT\nGuidelines: $GUIDELINES\nContext from git log:\n$CONTEXT\nDiff from git diff HEAD:\n$DIFF")
while true; do
echo "$RESPONSE"
echo
echo "Choose an action:"
read -p "Options: [y]es, [r]eroll, [e]dit, [q]uit? " -n 1 -r choice
echo
case "$choice" in
y | yes)
git commit -am "$RESPONSE"
echo "Committed successfully."
if $PUSH; then
git push
echo "Pushed successfully."
fi
exit 0
;;
r | reroll)
RESPONSE=$(aichat "$PROMPT\nGuidelines: $GUIDELINES\nContext from git log:\n$CONTEXT\nDiff from git diff HEAD:\n$DIFF")
;;
e | edit)
echo "$RESPONSE" > /tmp/commit_msg.txt
"$EDITOR" /tmp/commit_msg.txt
RESPONSE=$(cat /tmp/commit_msg.txt)
rm /tmp/commit_msg.txt
;;
q | quit | "")
echo "Aborted."
exit 1
;;
*)
echo "Invalid choice. Please choose again."
;;
esac
done
''

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "note" # bash
''
zk edit -i
pushd ~/notebook > /dev/null
git add .
commit -u
popd > /dev/null
''

View file

@ -0,0 +1,148 @@
{ pkgs }:
let
inherit (pkgs.lib) getExe;
in
pkgs.writeShellScriptBin "rebuild" # sh
''
QUICK=false
NO_GENERATION_CHECK=false
TEST_SHELL=false
REMOTE_HOSTS=()
REBUILDING_ALL=false
# ANSI color codes
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
RED='\033[0;31m'
NC='\033[0m'
info() {
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
echo -e "''${GREEN}''${timestamp} INFO: $1''${NC}"
}
warn() {
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
echo -e "''${ORANGE}''${timestamp} WARN: $1''${NC}"
}
err() {
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
echo -e "''${RED}''${timestamp} ERROR: $1''${NC}"
}
prompt() {
local PROMPT="$1"
shift
read -p "$PROMPT? (y/n) [n]: " -n 1 -r REPLY
echo
if [[ "$REPLY" =~ ^[Yy]$ ]]; then
"$*"
else
info "$PROMPT aborted."
fi
}
spawn_test_shell() {
info "Spawning test shell on $1..."
(export PS1="Test shell> "
exec ${pkgs.bash}/bin/bash ssh "$1") || {
${pkgs.cowsay}/bin/cowsay "You aborted."
exit 1
}
}
rebuild_remote() {
local args=(".#nixosConfigurations.$1" "--target-host" "$1")
local CURRENT_GENERATION=$(ssh "$1" readlink /nix/var/nix/profiles/system | cut -d- -f2)
if "$TEST_SHELL"; then
info "Testing $1..."
${getExe pkgs.nh} os test "''${args[@]}" || exit 1
git diff HEAD --color=always --stat --patch
spawn_test_shell "$1"
info "Rebuilding $1..."
${getExe pkgs.nh} os boot "''${args[@]}" || exit 1
else
info "Rebuilding $1 on $HOSTNAME..."
${getExe pkgs.nh} os switch "''${args[@]}" || exit 1
fi
if ! "$NO_GENERATION_CHECK"; then
local NEW_GENERATION=$(ssh "$1" readlink /nix/var/nix/profiles/system | cut -d- -f2)
info "$1 - New generation is $NEW_GENERATION. Current is $CURRENT_GENERATION."
if [ ! $NEW_GENERATION -gt $CURRENT_GENERATION ]; then
warn "New config was not added to bootloader."
fi
fi
}
info "Starting rebuild script."
if [ ! -f "flake.nix" ]; then
err "flake.nix not found in the current directory. Exiting."
exit 1 # Indicate an error
fi
while [[ $# -gt 0 ]]; do
case "$1" in
--quick | -q)
QUICK=true
shift
;;
--no-generation-check | -n)
NO_GENERATION_CHECK=true
shift
;;
--test-shell | -t)
TEST_SHELL=true
shift
;;
--all | -a)
reachable_hosts=()
hostnames=$(nix flake show --all-systems --json | , jq -r '.nixosConfigurations | keys | .[]')
for host in ''${hostnames[@]}; do
info "Checking if $host is reachable..."
if ping -c 1 -W 1 "$host" > /dev/null 2>&1 ; then
info "$host is reachable."
reachable_hosts+=("$host")
else
warn "$host is unreachable."
fi
done
REMOTE_HOSTS=(''${reachable_hosts[@]})
REBUILDING_ALL=true
shift
;;
*)
if [ !REBUILDING_ALL ]; then
if ping -c 1 -W 1 "$1" > /dev/null 2>&1 ; then
REMOTE_HOSTS+=("$1")
else
err "$1 is unreachable. Exiting."
exit 1
fi
fi
shift
;;
esac
done
if [ ''${#REMOTE_HOSTS[@]} == 0 ]; then
info "No hostnames provided."
REMOTE_HOSTS=("$HOSTNAME")
fi
git add .
for host in "''${REMOTE_HOSTS[@]}"; do
rebuild_remote $host
done
if ! "$QUICK"; then
prompt "Commit changes" commit
prompt "Reboot system" sudo systemctl reboot
fi
info "Rebuild script completed successfully."
exit 0
''

View file

@ -0,0 +1,21 @@
{ lib, ... }:
let
inherit (lib.modules) mkIf;
in
{
flake.modules.homeManager.rafiq =
{
pkgs,
config,
hostName,
hostConfig,
...
}:
mkIf (pkgs.system == "aarch64-darwin" || pkgs.system == "x86_64-darwin") {
home.file."Library/Application Support/aichat/config.yaml".text = ''
model: gemini:gemini-2.0-flash
clients:
- type: gemini
'';
};
}

146
nix/homes/rafiq/default.nix Normal file
View file

@ -0,0 +1,146 @@
{ lib, inputs, ... }:
let
inherit (lib.strings) concatStrings;
in
{
flake.modules.homeManager.rafiq =
{ pkgs, ... }:
{
imports = [
inputs.nvf.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
];
persistDirs = [
".local/share/zoxide"
"notebook"
];
xdg.configFile."aichat/config.yaml".text = ''
model: gemini:gemini-2.0-flash
clients:
- type: gemini
'';
home = {
sessionVariables = {
EDITOR = "nvim";
FETCH = "hyfetch";
FILE_BROWSER = "yazi";
SHELL = "fish";
};
shellAliases = {
fetch = "hyfetch";
windows = "sudo systemctl reboot --boot-loader-entry=auto-windows";
v = "$EDITOR";
e = "edit";
cd = "z"; # zoxide
ai = "aichat -r %shell% -e";
};
packages = with pkgs; [
fastfetch
ripgrep
aichat
(import ./_scripts/edit.nix { inherit pkgs; })
(import ./_scripts/commit.nix { inherit pkgs; })
(import ./_scripts/note.nix { inherit pkgs; })
(import ./_scripts/rebuild.nix { inherit pkgs; })
];
};
programs = {
mise.enable = true;
nvf.enable = true;
nvf.settings.vim = {
syntaxHighlighting = true;
hideSearchHighlight = true;
searchCase = "ignore";
undoFile.enable = true;
telescope.enable = true;
fzf-lua.enable = true;
git.enable = true;
autopairs.nvim-autopairs.enable = true;
autocomplete = import ./_nvf/autocomplete.nix { inherit lib; };
binds = import ./_nvf/binds.nix;
languages = import ./_nvf/languages.nix;
lsp = import ./_nvf/lsp.nix;
navigation = import ./_nvf/navigation.nix;
notes.todo-comments.enable = true;
options = {
autoindent = true;
backspace = "indent,eol,start";
cursorline = true;
expandtab = true;
shiftwidth = 2;
smartindent = true;
tabstop = 2;
};
snippets = import ./_nvf/snippets.nix { inherit pkgs; };
statusline = import ./_nvf/statusline.nix;
treesitter = {
autotagHtml = true;
fold = true;
indent.disable = [ "markdown" ];
textobjects.enable = true;
};
ui = import ./_nvf/ui.nix;
utility = import ./_nvf/utility.nix;
visuals = import ./_nvf/visuals.nix;
};
zk = {
enable = true;
settings.notebook.dir = "~/notebook";
};
hyfetch = {
enable = true;
settings = {
preset = "bisexual";
mode = "rgb";
light_dark = "dark";
lightness = 0.5;
color_align = {
# Flag color alignment
mode = "horizontal";
fore_back = null;
};
backend = "fastfetch";
};
};
tealdeer.enable = true;
tealdeer.enableAutoUpdates = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
zoxide.enable = true;
nix-index.enable = true;
nix-index-database.comma.enable = true;
fzf.enable = true;
fzf.enableZshIntegration = true;
yazi = {
enable = true;
shellWrapperName = "t";
settings.mgr.sort_by = "natural";
};
fish.enable = true;
starship = {
enable = true;
settings = {
add_newline = false;
format = concatStrings [
# First Line
## Left Prompt
"$hostname$directory"
"$fill"
## Right Prompt
"$all"
# Second Line
## Left Prompt
"$character"
];
git_branch.format = "[$symbol$branch(:$remote_branch)]($style) ";
shlvl.disabled = false;
username.disabled = true;
fill.symbol = " ";
};
};
};
};
}

View file

@ -0,0 +1,14 @@
{
animation = [ "workspaces, 1, 1, default" ];
general = {
border_size = 2;
gaps_in = 0;
gaps_out = 0;
resize_on_border = true;
};
decoration = {
rounding = 10;
rounding_power = 2;
inactive_opacity = 0.9;
};
}

View file

@ -6,10 +6,12 @@
"$hypr, Q, exec, uwsm stop"
"SUPER, W, killactive"
"SUPER, return, exec, uwsm app -- $TERMINAL $MULTIPLEXER"
"SUPER, return, exec, uwsm app -- $TERMINAL"
"SUPER, O, exec, uwsm app -- $BROWSER"
"SUPER, Escape, exec, uwsm app -- $LOCKSCREEN"
#TODO:add file browser
#TODO: make it directional
"SUPER, H, cyclenext, visible"
"SUPER, L, cyclenext, visible prev"
"SUPER_ALT, H, movewindow, l"
@ -24,15 +26,31 @@
"SUPER_CTRL, L, workspace, r+1"
"$hypr, H, movetoworkspace, r-1"
"$hypr, L, movetoworkspace, r+1"
"$hypr, V, togglefloating"
];
bindr = [
# Activates on SUPER without any other modifier
"SUPER, Super_L, exec, uwsm app -- $($LAUNCHER --launch-prefix=\"uwsm app -- \")"
];
bindle = [
"SUPER, 6, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
"SUPER, 6, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
"SUPER, 7, exec, ${pkgs.playerctl}/bin/playerctl previous"
"SUPER, 8, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
"SUPER, 8, exec, ${pkgs.playerctl}/bin/playerctl -a play-pause"
"SUPER, 9, exec, ${pkgs.playerctl}/bin/playerctl next"
"SUPER, 0, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
"$meh, mouse_up, resizeactive, 10% 10%"
"$meh, mouse_down, resizeactive, -10% -10%"
"SUPER, 0, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
"ALT, mouse_up, resizeactive, 10% 10%"
"ALT, mouse_down, resizeactive, -10% -10%"
];
bindm = [
"ALT, mouse:272, movewindow"
"ALT, mouse:273, resizeactive"
];
bindc = [
"ALT, mouse:272, togglefloating"
];
}

View file

@ -0,0 +1,37 @@
{ config, ... }:
let
inherit (config.manifest) admin;
in
{
flake.modules.darwin.graphical.homebrew = {
enable = true;
user = admin.username;
onActivation.cleanup = "uninstall";
brews = [
"mise"
"docker"
];
casks = [
"ghostty"
"slack"
"gitify"
"telegram"
"vial"
"linear-linear"
"chatgpt"
];
};
flake.modules.homeManager.rafiq = {
# make sure brew is on the path for M1
programs.zsh.initContent = ''
if [[ $(uname -m) == 'arm64' ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
'';
programs.fish.shellInit = ''
if test (uname -m) = "arm64"
eval (/opt/homebrew/bin/brew shellenv)
end
'';
};
}

View file

@ -0,0 +1,61 @@
{ lib, inputs, ... }:
{
flake.modules.homeManager.rafiq =
{ pkgs, config, ... }:
let
inherit (lib.modules) mkIf;
inherit (builtins) map listToAttrs;
inherit (lib.lists) findFirstIndex;
inherit (inputs.nur.legacyPackages.${pkgs.stdenv.hostPlatform.system}.repos.rycee) firefox-addons;
profiles = listToAttrs (
map (name: {
inherit name;
# If there are duplicate profile names, findFirstIndex will cause issues.
value = profileCfg (findFirstIndex (x: x == name) null syncedProfiles);
}) syncedProfiles
);
syncedProfiles = [
"rafiq"
"test"
];
profileCfg = id: {
inherit id;
settings."extensions.autoDisableScopes" = 0; # Auto enable extensions
extensions = {
force = true;
packages = with firefox-addons; [
darkreader
gesturefy
sponsorblock
ublock-origin
];
};
};
in
mkIf config.graphical {
stylix = {
image = ./wallpaper.png;
targets = {
firefox.colorTheme.enable = true;
firefox.profileNames = syncedProfiles;
};
};
home = {
sessionVariables = {
BROWSER = "firefox";
TERMINAL = "ghostty";
};
};
programs = {
vesktop.enable = true;
thunderbird.enable = true;
thunderbird.profiles.rafiq.isDefault = true;
# ghostty is broken on nix-darwin
ghostty.settings.confirm-close-surface = false;
firefox = {
enable = true;
inherit profiles;
};
};
};
}

View file

@ -0,0 +1,232 @@
{ lib, config, ... }:
let
inherit (config.manifest) admin;
in
{
allowedUnfreePackages = [
"stremio-shell"
"stremio-server"
"steam"
"steam-unwrapped"
];
flake.modules.nixos.graphical =
{ config, pkgs, ... }:
{
fonts.packages = [ pkgs.font-awesome ];
services.getty.autologinUser = admin.username;
# Start Hyprland at boot only if not connecting through SSH
environment.loginShellInit = # sh
''
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
if uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
fi
'';
environment.variables = {
# Get Electron apps to use Wayland
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = "1";
};
programs = {
hyprland = {
enable = true;
# Use UWSM to have each process controlled by systemd init
withUWSM = true;
};
steam = {
enable = true;
gamescopeSession.enable = true;
};
};
security.pam.services.hyprlock = { };
services.sunshine = {
enable = true;
capSysAdmin = true;
openFirewall = true;
settings = {
sunshine_name = config.networking.hostName;
origin_pin_allowed = "wan";
origin_web_ui_allowed = "wan";
};
applications = { };
};
# spotifyd
networking.firewall.allowedTCPPorts = [ 5353 ];
networking.firewall.allowedUDPPorts = [ 5353 ];
};
flake.modules.homeManager.rafiq =
{
pkgs,
config,
hostName,
hostConfig,
...
}:
let
inherit (lib.modules) mkMerge mkIf;
in
mkIf (config.graphical && pkgs.system == "x86_64-linux") {
stylix.targets.waybar.addCss = false;
persistDirs = [
"docs"
"repos"
"vids"
"tmp"
".cache/Smart Code ltd/Stremio"
".local/share/Smart Code ltd/Stremio"
".mozilla/firefox"
".tor project"
".local/share/Steam"
".local/share/PrismLauncher"
".config/sunshine"
];
home = {
packages = with pkgs; [
wl-clipboard-rs
stremio
tor-browser
vlc
prismlauncher
];
sessionVariables = {
LAUNCHER = "fuzzel";
LOCKSCREEN = "hyprlock";
NOTIFICATION_DAEMON = "mako";
STATUS_BAR = "waybar";
};
};
# xdg.configFile."uwsm/env".text = # sh
# ''
# # Force apps to scale right with Wayland
# export GDK_SCALE=${mainMonitor.scale}
# export STEAM_FORCE_DESKTOPUI_SCALING=${mainMonitor.scale}
# '';
# xdg.configFile."uwsm/env-hyprland".text = # sh
# ''
# export GDK_SCALE=${mainMonitor.scale}
# export STEAM_FORCE_DESKTOPUI_SCALING=${mainMonitor.scale}
# '';
wayland.windowManager.hyprland = {
enable = true;
# This is needed for UWSM
systemd.enable = false;
# Null the packages since we use them system wide
package = null;
portalPackage = null;
settings = mkMerge [
(import ./_hyprland/decoration.nix)
(import ./_hyprland/keybinds.nix { inherit pkgs; })
{
ecosystem.no_update_news = true;
xwayland.force_zero_scaling = true;
monitor =
let
mainMonitor = hostConfig.machine.monitors.main;
in
[
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
", preferred, auto, 1"
];
exec-once = [
"uwsm app -- $LOCKSCREEN"
"uwsm app -- $NOTIFICATION_DAEMON"
"uwsm app -- $STATUS_BAR"
];
}
];
};
services = {
spotifyd.enable = true;
spotifyd.settings.global = {
device_name = "${hostName}";
device_type = "computer";
zeroconf_port = 5353;
};
mako.enable = true;
mako.settings.default-timeout = 10000;
};
programs = {
obs-studio.enable = true;
fuzzel.enable = true;
ghostty.enable = true;
waybar = {
enable = true;
settings = [
{
layer = "top";
modules-left = [
"pulseaudio"
];
modules-right = [
"battery"
"clock"
];
"pulseaudio" = {
format = "{icon} {volume}%";
format-muted = "";
format-icons.default = [
""
""
];
on-click = "${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
};
"clock" = {
interval = 1;
format = "{:%F %T}";
};
"battery" = {
interval = 1;
bat-compatibility = true;
};
}
];
style = # css
''
window#waybar {
background-color: rgba(0, 0, 0, 0);
}
#pulseaudio,
#battery,
#clock {
padding-top: 5px;
padding-bottom: 5px;
padding-right: 5px;
color: #ffffff;
}
'';
};
hyprlock = {
enable = true;
settings = {
general.hide_cursor = true;
general.ignore_empty_input = true;
background.blur_passes = 5;
background.blur_size = 5;
label = {
text = ''hi, $USER.'';
font_size = 32;
position = "0, 0";
halign = "center";
valign = "center";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
input-field = {
placeholder_text = "";
fade_on_empty = true;
size = "200, 45";
position = "0, -5%";
halign = "center";
valign = "center";
zindex = 1;
shadow_passes = 5;
shadow_size = 5;
};
};
};
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -1,22 +1,18 @@
{ config, ... }:
{
config = {
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
flake.modules.homeManager.rafiq = {
home.shellAliases = {
gs = "git status";
gc = "git commit";
gcam = "git commit -am";
gu = "git push";
gy = "git pull";
gdh = "git diff HEAD";
};
programs.git = {
enable = true;
userName = config.cli.git.name;
userEmail = config.cli.git.email;
signing.key = "~/.ssh/id_ed25519.pub";
signing.signByDefault = true;
extraConfig = {
init.defaultBranch = config.cli.git.defaultBranch;
init.defaultBranch = "prime";
push.autoSetupRemote = true;
pull.rebase = false;
core.editor = "$EDITOR";

54
nix/lib/attrsets.nix Normal file
View file

@ -0,0 +1,54 @@
{ lib, ... }:
let
inherit (builtins) attrNames head;
inherit (lib.trivial) pipe;
inherit (lib.attrsets) filterAttrs;
in
{
flake.lib.attrsets = {
/**
`firstAttrNameMatching pred set` filters an attribute set `set` based on a predicate `pred`
and returns the *first* attribute name that satisfies the predicate.
# Example
```nix
let
mySet = {
a = { value = 1; };
b = { value = 2; };
c = { value = 3; };
};
isGreaterThanOne = name: value: value.value > 1;
result = firstAttrNameMatching isGreaterThanOne mySet;
in
result
# Output: "b"
```
# Type
```
firstAttrNameMatching :: (String -> Any -> Bool) -> AttrSet -> String
```
# Arguments
pred
: A function that takes an attribute name and its value and returns a boolean.
set
: The attribute set to filter.
*/
firstAttrNameMatching =
pred: set:
pipe set [
(filterAttrs pred)
attrNames
head
];
};
}

13
nix/lib/lists.nix Normal file
View file

@ -0,0 +1,13 @@
let
inherit (builtins) length tail;
in
{
flake.lib.lists = rec {
shortenList =
count: list:
let
len = length list;
in
if len <= count then list else (shortenList count (tail list));
};
}

100
nix/lib/modules.nix Normal file
View file

@ -0,0 +1,100 @@
{ lib, config, ... }:
let
inherit (builtins) foldl' attrNames;
inherit (lib.attrsets) mapAttrs;
in
{
flake.lib.modules = {
/**
Fold over the users list and create an attribute set.
# Inputs
`f`
: A function that takes the name of a user and returns an attribute set.
# Type
```
userListToAttrs :: (String -> AttrSet) -> AttrSet
```
# Examples
:::{.example}
## `userListToAttrs` usage example
```nix
flake.manifest.users.rafiq = { ... };
flake.modules.homeManager.users = userListToAttrs (name: {
${name}.home.username = name;
});
=> flake.modules.homeManager.default.users.rafiq.home.username = "rafiq";
```
:::
*/
userListToAttrs = f: foldl' (acc: elem: acc // (f elem)) { } (attrNames config.manifest.users);
/**
Return an attribute set for use with a option that needs to be used for all users.
# Inputs
`attrset`
: An attribute set to apply to all the users.
# Type
```
forAllUsers :: AttrSet -> AttrSet
```
# Examples
:::{.example}
## `forAllUsers` usage example
```nix
flake.manifest.users.rafiq = { ... };
flake.modules.nixos.default.users = forAllUsers {
isNormalUser = true;
};
=> flake.modules.nixos.default.users.rafiq.isNormalUser = true;
```
:::
*/
forAllUsers = attrset: mapAttrs (_: _: attrset) config.manifest.users;
/**
Like forAllUsers, but passes in the name and value from the manifest.
# Inputs
`f`
: A function that takes an attribute name and its value, and returns the new value for the attribute.
# Type
```
forAllUsers' :: (String -> Any -> Any) -> AttrSet
```
# Examples
:::{.example}
## `forAllUsers'` usage example
```nix
flake.manifest.users.rafiq = { ... };
flake.modules.homeManager.users = forAllUsers' (name: value: {
home.username = name;
});
=> flake.modules.homeManager.default.users.rafiq.home.username = "rafiq";
```
:::
*/
forAllUsers' = f: mapAttrs f config.manifest.users;
};
}

45
nix/lib/options.nix Normal file
View file

@ -0,0 +1,45 @@
{ lib, ... }:
let
inherit (lib.options) mkOption;
inherit (lib.types)
str
path
int
port
attrs
;
in
{
flake.lib.options = {
mkStrOption =
default:
mkOption {
inherit default;
type = str;
};
mkAttrOption =
default:
mkOption {
inherit default;
type = attrs;
};
mkIntOption =
default:
mkOption {
inherit default;
type = int;
};
mkPortOption =
default:
mkOption {
type = port;
inherit default;
};
mkPathOption =
default:
mkOption {
type = path;
inherit default;
};
};
}

69
nix/lib/services.nix Normal file
View file

@ -0,0 +1,69 @@
{ config, lib, ... }:
let
inherit (builtins) length concatStringsSep;
inherit (lib.options) mkEnableOption;
inherit (lib.strings) splitString;
inherit (lib.lists) singleton;
inherit (lib.modules) mkMerge mkIf;
inherit (cfg.lib.options) mkStrOption mkPortOption mkAttrOption;
inherit (cfg.lib.lists) shortenList;
cfg = config.flake;
in
{
flake.lib.services = rec {
splitDomain = domain: splitString "." domain;
isRootDomain = domain: length (splitDomain domain) <= 2;
mkRootDomain = domain: concatStringsSep "." (shortenList 2 (splitDomain domain));
mkWildcardDomain = rootDomain: concatStringsSep "." ((singleton "*") ++ (splitDomain rootDomain));
mkHost = domain: if isRootDomain domain then domain else mkWildcardDomain (mkRootDomain domain);
mkWebApp =
{
config,
name,
defaultPort,
persistDirs ? [ ],
extraOptions ? { },
extraConfig ? { },
}:
let
cfg = config.server.web-apps.${name};
networkingConfig =
{
config,
cfg,
name,
}:
mkIf (cfg.domain != "") {
assertions = singleton {
assertion = config.server.web-servers.nginx.enable;
message = "You must enable a web server if you want to set server.web-apps.${name}.domain.";
};
server.ddns.domains = singleton (mkRootDomain cfg.domain);
server.web-servers.nginx.proxies = singleton {
source = cfg.domain;
target = "http://${config.networking.hostName}:${toString cfg.port}";
};
};
in
{
options.server.web-apps.${name} = {
enable = mkEnableOption "";
port = mkPortOption defaultPort;
domain = mkStrOption "";
openFirewall = mkEnableOption "";
extraCfg = mkAttrOption { };
} // extraOptions;
config = mkIf cfg.enable (mkMerge [
{
inherit persistDirs;
networking.firewall = mkIf cfg.openFirewall { allowedTCPPorts = singleton cfg.port; };
}
(networkingConfig { inherit config cfg name; })
extraConfig
]);
};
};
}

104
nix/manifest.nix Normal file
View file

@ -0,0 +1,104 @@
{
manifest = {
users.rafiq = {
primary = true;
name = "Mohammad Rafiq";
email = "rafiq@rrv.sh";
shell = "fish";
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
};
hosts = {
darwin = {
venus = {
graphical = true;
machine.platform = "intel";
};
hephaestus = {
graphical = true;
machine.platform = "apple-silicon";
};
};
nixos = {
nemesis = {
graphical = true;
machine = {
platform = "amd";
gpu = "nvidia";
root.drive = "/dev/disk/by-id/nvme-CT2000P3SSD8_2325E6E77434";
monitors.main = {
id = "desc:OOO AN-270W04K";
resolution = "3840x2160";
refresh-rate = "60";
scale = "2";
};
};
extraCfg = {
machine = {
bluetooth.enable = true;
usb.automount = true;
usb.qmk.enable = true;
virtualisation = {
podman.enable = true;
podman.distrobox.enable = true;
};
};
server.web-apps = {
comfy-ui.enable = true;
sd-webui-forge.enable = true;
};
};
};
apollo = {
graphical = false;
machine = {
platform = "intel";
root.drive = "/dev/disk/by-id/nvme-eui.002538d221b47b01";
};
extraCfg.server = {
ddns = {
enable = true;
domains = [
"aenyrathia.wiki"
"slayment.com"
];
};
web-servers = {
enableSSL = true;
nginx = {
enable = true;
proxies = [
{
source = "aenyrathia.wiki";
target = "http://helios:5896";
}
{
source = "il.bwfiq.com";
target = "http://helios:2283";
}
];
};
};
databases = {
mongodb.enable = true;
mysql.enable = true;
postgresql.enable = true;
};
web-apps = {
librechat = {
enable = true;
domain = "chat.bwfiq.com";
};
forgejo = {
enable = true;
domain = "git.rrv.sh";
openFirewall = true;
};
rrv-sh.enable = true;
rrv-sh.domain = "rrv.sh";
};
};
};
};
};
};
}

31
nix/meta.nix Normal file
View file

@ -0,0 +1,31 @@
{
lib,
config,
inputs,
...
}:
let
inherit (lib.options) mkOption;
inherit (lib.types) path lazyAttrsOf raw;
inherit (inputs.flake-parts.lib) mkSubmoduleOptions;
cfg = config.flake;
in
{
options.flake = mkSubmoduleOptions {
self = mkOption { type = raw; };
lib = mkOption {
type = lazyAttrsOf raw;
default = { };
};
paths = {
root = mkOption { type = path; };
secrets = mkOption {
type = path;
readOnly = true;
};
};
};
config.flake = {
paths.secrets = cfg.paths.root + "/secrets";
};
}

17
nix/modules/cli/git.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, ... }:
let
inherit (config.manifest) users;
in
{
flake.modules.homeManager.default =
{ config, ... }:
{
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
programs.git = {
enable = true;
userName = users.${config.home.username}.name;
userEmail = users.${config.home.username}.email;
signing.key = "~/.ssh/id_ed25519.pub";
};
};
}

13
nix/modules/cli/nix.nix Normal file
View file

@ -0,0 +1,13 @@
{
flake.modules.nixos.default.nix.settings.experimental-features = [
"nix-command"
"flakes"
];
flake.modules.darwin.default = {
nix.enable = false;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
};
}

36
nix/modules/cli/shell.nix Normal file
View file

@ -0,0 +1,36 @@
{ config, lib, ... }:
let
cfg = config.flake;
inherit (config.manifest) users;
inherit (cfg.lib.modules) forAllUsers';
inherit (lib.attrsets) mapAttrs';
in
{
flake.modules = {
nixos.default =
{ pkgs, ... }:
{
programs = mapAttrs' (name: value: {
name = value.shell;
value.enable = true;
}) users;
users.users = forAllUsers' (_: value: { shell = pkgs.${value.shell}; });
};
darwin.default =
{ pkgs, ... }:
{
programs = mapAttrs' (name: value: {
name = value.shell;
value.enable = true;
}) users;
users.users = forAllUsers' (_: value: { shell = pkgs.${value.shell}; });
environment.shells = [ pkgs.fish ];
};
homeManager.default =
{ config, ... }:
{
programs.${users.${config.home.username}.shell}.enable = true;
home.shell.enableShellIntegration = true;
};
};
}

View file

@ -0,0 +1,17 @@
{ lib, ... }:
let
inherit (lib.options) mkEnableOption;
in
{
flake.modules = {
nixos.graphical = {
home-manager.sharedModules = [ { graphical = true; } ];
services.pipewire = {
enable = true;
pulse.enable = true;
};
};
homeManager.default.options.graphical = mkEnableOption "";
darwin.graphical.home-manager.sharedModules = [ { graphical = true; } ];
};
}

View file

@ -0,0 +1,20 @@
{ inputs, ... }:
{
# needs to be default because the options get
# evaluated even if graphical is set to false
flake.modules.nixos.default =
{ pkgs, ... }:
{
imports = [ inputs.stylix.nixosModules.stylix ];
stylix.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
};
flake.modules.darwin.default =
{ pkgs, ... }:
{
imports = [ inputs.stylix.darwinModules.stylix ];
stylix.enable = true;
#TODO: move into manifest
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
};
}

View file

@ -0,0 +1,18 @@
{
flake.modules.nixos.default.boot = {
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
loader.efi.canTouchEfiVariables = true;
#TODO: disable for mbp?
loader.systemd-boot = {
enable = true;
configurationLimit = 5;
};
};
}

View file

@ -0,0 +1,58 @@
{ lib, ... }:
let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf mkMerge;
in
{
flake.modules.nixos.default =
{
config,
modulesPath,
pkgs,
...
}:
let
cfg = config.machine;
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
options.machine = {
bluetooth.enable = mkEnableOption "";
usb.automount = mkEnableOption "";
usb.qmk.enable = mkEnableOption "";
};
config = mkMerge [
(mkIf cfg.usb.automount {
services.udisks2.enable = true;
home-manager.sharedModules = [
{
services.udiskie = {
enable = true;
automount = true;
notify = true;
};
}
];
})
(mkIf cfg.usb.qmk.enable {
hardware.keyboard.qmk.enable = true;
services.udev = {
packages = with pkgs; [
vial
qmk
qmk-udev-rules
qmk_hid
];
};
})
(mkIf cfg.bluetooth.enable {
persistDirs = [ "/var/lib/bluetooth" ];
hardware.bluetooth = {
enable = true;
settings.General.Experimental = true;
};
})
];
};
}

View file

@ -0,0 +1,37 @@
{
allowedUnfreePackages = [
"nvidia-x11"
"nvidia-settings"
];
flake.modules.nixos.default =
{
config,
pkgs,
hostConfig,
...
}:
let
inherit (hostConfig.machine) gpu;
in
if gpu == "nvidia" then
{
hardware = {
graphics.enable = true;
graphics.extraPackages = [ pkgs.nvidia-vaapi-driver ];
nvidia.open = true;
nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest;
};
services.xserver.videoDrivers = [ "nvidia" ];
environment.variables = {
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct";
};
nix.settings.substituters = [ "https://cuda-maintainers.cachix.org" ];
nix.settings.trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
}
else
{ };
}

View file

@ -0,0 +1,23 @@
{
flake.modules.nixos.default =
{ hostConfig, ... }:
let
inherit (hostConfig.machine) platform;
arch = if platform == "amd" || platform == "intel" then "x86_64" else "aarch64";
in
{
hardware.cpu.${platform}.updateMicrocode = true;
boot.kernelModules = [ "kvm-${platform}" ];
nixpkgs.hostPlatform = "${arch}-linux";
};
flake.modules.darwin.default =
{ hostConfig, ... }:
let
inherit (hostConfig.machine) platform;
arch = if platform == "intel" then "x86_64" else "aarch64";
in
{
nixpkgs.hostPlatform = "${arch}-darwin";
};
}

View file

@ -0,0 +1,95 @@
{ lib, inputs, ... }:
let
inherit (lib.modules) mkMerge mkIf mkAfter;
in
{
flake.modules.nixos.default =
{ hostConfig, ... }:
let
inherit (hostConfig.machine) root;
in
{
imports = [ inputs.disko.nixosModules.disko ];
config = mkMerge [
{
# BTRFS - may add more later on
boot.initrd.kernelModules = [ "dm-snapshot" ];
disko.devices.disk.main = {
device = root.drive;
content.type = "gpt";
content.partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "4G";
content = {
type = "swap";
resumeDevice = true;
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "root_vg";
};
};
};
};
disko.devices.lvm_vg.root_vg = {
type = "lvm_vg";
lvs.root = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root".mountpoint = "/";
"/persist" = {
mountpoint = "/persist";
mountOptions = [
"subvol=persist"
"noatime"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"subvol=nix"
"noatime"
];
};
};
};
};
};
}
# Ephemeral by default - assumes btrfs
(mkIf root.ephemeral {
boot.initrd.postDeviceCommands = mkAfter ''
mkdir /btrfs_tmp
mount /dev/root_vg/root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
btrfs subvolume delete "/btrfs_tmp/root"
fi
'';
})
];
};
}

Some files were not shown because too many files have changed in this diff Show more