Compare commits

...

207 commits

Author SHA1 Message Date
Benson Chu
f1cbe21ec7 Oops, typo from dead code 2025-07-07 18:00:10 -05:00
cf978bc42e Gimme immich 2025-06-29 13:58:46 -05:00
bf73f861f3 Pull in my upstream changes! 2025-06-29 13:58:46 -05:00
Benson Chu
1556bc8aa4 Set toggle key 2025-06-25 16:15:58 -05:00
Benson Chu
3242c4d0a7 whoo! fastfetch! 2025-06-25 16:15:58 -05:00
Benson Chu
4b43756164 Gotta have unzip 2025-06-19 09:06:46 -05:00
Benson Chu
2122b500f9 Okay, sometimes a laptop has a moonlander attached 2025-06-19 08:47:13 -05:00
Benson Chu
dcf898f8db Make a dedicated resoures folder 2025-06-19 08:40:18 -05:00
Benson Chu
d53bab1e35 Don't need to specify --flake .#work anymore 2025-06-18 15:52:15 -05:00
Benson Chu
acf2afa63a Use the same emacs at work! 2025-06-18 15:37:14 -05:00
e580d3cc31 Oops, that's the one for development 2025-06-15 11:12:21 -05:00
Benson Chu
e152da7a94 Define emacs in one place 2025-06-15 11:06:50 -05:00
Benson Chu
fab03630a5 Interesting, emacs-overlay no longer uses flake-utils 2025-06-15 10:45:46 -05:00
Benson Chu
877b5cba3c huehuehue I am pestctrl *insert monologue* 2025-06-15 10:44:55 -05:00
Benson Chu
41e2d03c94 Get devenvs 2025-06-14 09:22:35 -05:00
Benson Chu
ec7d83bd84 Update emacs-overlay 2025-06-13 08:32:23 -05:00
Benson Chu
e967b164a4 Spotify 2025-06-08 18:46:11 -05:00
Benson Chu
7bcbbddbac Allow streaming of pulseaudio devices 2025-06-08 18:45:57 -05:00
Benson Chu
062f39c363 Musescore please! 2025-05-31 13:29:20 -05:00
Benson Chu
911b0e14c3 I believe gkraken is no longer supported 2025-05-31 13:29:09 -05:00
Benson Chu
3781b57761 I don't need wireless 2025-05-31 13:29:02 -05:00
Benson Chu
c809d3df1f Needed to update some packages 2025-05-19 15:38:31 -05:00
Benson Chu
37f1a53b24 Lemme have some wireshark 2025-05-19 15:38:23 -05:00
Benson Chu
c81151f6a9 coolercontrol is cool! 2025-05-01 18:34:42 -05:00
Benson Chu
a0ea11889a Haha, of course I have to have emacs! 2025-03-22 09:18:38 -05:00
Benson Chu
9bc5b49f63 That's a typo too 2025-03-22 09:17:32 -05:00
Benson Chu
a929b435e8 Oops, that's a typo 2025-03-22 08:07:34 -05:00
Benson Chu
f5b1854278 More packages 2025-03-22 08:01:48 -05:00
Benson Chu
a0995aa88e No longer using cvs account 2025-03-22 08:01:48 -05:00
Benson Chu
25ece388f7 Work magic 2025-03-22 08:01:48 -05:00
Benson Chu
8d68fa1f00 Updated unstable 2025-03-22 08:01:20 -05:00
Benson Chu
ca79e221ed More recent talosctl 2025-03-22 08:01:02 -05:00
Benson Chu
6765e5a5b2 Emacs min shell, so I don't have to remember how this works 2025-03-22 07:57:04 -05:00
Benson Chu
7734624fab Created new EFI partition 2025-03-15 11:49:35 -05:00
Benson Chu
b728abba62 Offline documentation 2025-03-15 11:49:35 -05:00
Benson Chu
0980b1132a I'm confident this is good
A devshell for my pdf->ledger conversion script.

Eventually I should package up my script as a derivation, but let's
leave this for now.
2025-03-02 03:06:22 -06:00
Benson Chu
204329b9da Let's rename this, to be more descriptive 2025-03-02 03:06:16 -06:00
Benson Chu
463f056139 Update packages 2025-02-28 14:44:57 -06:00
Benson Chu
01cb3177aa Added new font to the mix 2025-02-22 17:29:17 +08:00
Benson Chu
9d33294c23 Added chinese font to repo 2025-02-22 17:29:08 +08:00
Benson Chu
607143e9ed YES, I never have to know how xkb works ever again 2025-02-17 16:33:22 +08:00
Benson Chu
67eae97f5c 7zip 2025-02-17 16:33:22 +08:00
Benson Chu
b723a2fc1c Refactor to use config.xdg instead of config.home.file 2025-02-17 16:33:21 +08:00
Benson Chu
bea73b48fa Still need to figure out the conditional here
But it's a little better
2025-01-26 18:25:44 -06:00
Benson Chu
ff325014f1 God nix is cool 2025-01-26 18:25:36 -06:00
Benson Chu
e65bca4e3a Don't unilaterally disable this parameter. Use a bash alias 2025-01-26 18:14:43 -06:00
Benson Chu
bb514d8745 Alright, this is how it's done! 2025-01-23 18:39:00 -06:00
Benson Chu
af33017c36 Updating wezterm config 2025-01-23 18:02:54 -06:00
Benson Chu
c648a6479c Wow, what a painless upgrade to 24.11 2025-01-18 13:33:55 -06:00
Benson Chu
35af8219e6 More packages to update automatically 2025-01-18 12:57:37 -06:00
Benson Chu
038ddb90a1 Let's throw in a container with arch 2025-01-18 12:56:43 -06:00
Benson Chu
ef2d21b5b3 File for secrets 2025-01-14 13:20:32 -06:00
Benson Chu
5b1132a16e Image drawing programs 2025-01-12 12:12:56 -06:00
Benson Chu
66747ae9fd Updated updates 2025-01-12 12:12:50 -06:00
Benson Chu
a8d0bcd38f Clojure and overtone 2024-12-09 12:43:41 -06:00
Benson Chu
942c72c644 MQTT-browser 2024-11-28 11:22:46 -06:00
Benson Chu
9654fe0047 web api tester 2024-11-17 16:34:06 -06:00
Benson Chu
d8f045293e Should have a gui terminal installed 2024-11-17 16:33:44 -06:00
Benson Chu
3aeec76494 ffmpeg for yt-dlp 2024-11-16 07:52:08 -06:00
Benson Chu
13af0b44ab Upgrade postgres verison 2024-11-16 07:52:02 -06:00
Benson Chu
0b4de51814 Services refactor 2024-10-27 14:54:08 -05:00
Benson Chu
770e931f4b ACPI for laptop 2024-10-27 14:53:57 -05:00
Benson Chu
aa4231ab20 xkbcomp 2024-10-27 14:21:32 -05:00
Benson Chu
6e37adb8e7 Updated update 2024-10-22 10:52:34 -05:00
Benson Chu
16ff9a6910 Firefox redundancy 2024-10-22 10:52:22 -05:00
Benson Chu
6141c4aae7 hledger 2024-10-22 10:51:57 -05:00
Benson Chu
099fa7cb2b Base email address changed 2024-10-22 10:51:57 -05:00
Benson Chu
2570e46a02 Fava is pretty cool 2024-10-22 10:51:57 -05:00
Benson Chu
db36242132 Make use of flakeSubmodules 2024-10-22 08:51:11 -07:00
Benson Chu
a49951f492 Wezterm config! 2024-10-22 08:51:11 -07:00
Benson Chu
78b29dbf6a Wezterm! 2024-10-22 08:51:11 -07:00
Benson Chu
94fd5b6b05 Graphviz too please! 2024-10-08 08:48:09 -05:00
Benson Chu
9b82d55516 xdot for viewing dot files 2024-10-08 08:46:03 -05:00
Benson Chu
6ca13cf223 Ehhh, zfs support requires a hostid 2024-10-07 18:37:13 -05:00
Benson Chu
0b7c05dda0 Seafile is coming 2024-10-06 16:11:00 -05:00
Benson Chu
c012b3b8cb For testing kubernetes-related things 2024-10-06 08:10:52 -05:00
Benson Chu
7ac525b9b8 Various changes 2024-10-06 08:10:52 -05:00
Benson Chu
289c193cb4 Should support zfs always 2024-10-06 08:10:52 -05:00
Benson Chu
87ea2c8d65 Need postgresql for kubernetes-related things 2024-10-06 08:10:49 -05:00
Benson Chu
c243d26a15 sshfs 2024-10-06 08:10:42 -05:00
Benson Chu
adc3f572b8 Added SOPS for Kubernetes 2024-10-03 08:13:54 -05:00
Benson Chu
47685c1c51 zstd for common lisp development 2024-09-22 13:34:41 -05:00
Benson Chu
dfa3ad4185 Submodules updated 2024-09-14 12:04:18 -05:00
Benson Chu
aa2464ef12 Refactored this a bit 2024-09-14 12:04:18 -05:00
Benson Chu
3f02570d3c Tmux config 2024-09-12 07:17:55 -05:00
Benson Chu
d5dc0d3bf6 fzf! 2024-09-06 19:19:09 -05:00
Benson Chu
6d4e800ee3 Helpful hint for myself 2024-09-06 13:34:40 -05:00
Benson Chu
c19cb8b6cb Updated beets config 2024-09-06 13:33:14 -05:00
Benson Chu
df03398e78 I would like a cutting edge beets 2024-09-06 13:33:14 -05:00
Benson Chu
e405ca60c0 mps no longer has a NIX_CFLAGS_COMPILE 2024-09-06 13:33:13 -05:00
Benson Chu
da2fbf5f6c Updated where nixos config is on nixframe 2024-09-04 06:16:21 -05:00
Benson Chu
15c9d5f4ff Beets update 2024-09-02 14:08:14 -05:00
Benson Chu
2f17b6ee73 More specificity 2024-09-02 12:02:11 -05:00
Benson Chu
7bca4825ec Okay, warn if there's a problem 2024-09-02 11:29:54 -05:00
Benson Chu
488ec8ab62 GAH, finally it works 2024-09-02 11:20:58 -05:00
Benson Chu
9bce08c9ba Submodule symlink? 2024-09-02 11:20:58 -05:00
Benson Chu
314b110456 Warn about things not being set 2024-09-02 11:20:44 -05:00
Benson Chu
4984b2bcab Each machine can specify where the flake directory is 2024-09-02 10:36:52 -05:00
Benson Chu
965d060901 mp3 tag editting stuff 2024-08-31 22:09:45 -05:00
Benson Chu
0f4f1663f3 Appflowy? Notion replacement? 2024-08-31 10:00:16 -05:00
Benson Chu
7670ea3303 This is the correct way to do a password command 2024-08-31 10:00:16 -05:00
Benson Chu
6cafd621da Work magic 2024-08-29 16:00:01 -05:00
Benson Chu
ea7c2fb9f3 Emacs with treesit grammars at work 2024-08-29 15:57:48 -05:00
Benson Chu
0c845541e7 Don't enable bash config at work for now 2024-08-29 15:56:20 -05:00
Benson Chu
d1794cc29d Apparently this can't be used together with networkmanager?
Why does it work on NixDawn?
2024-08-29 08:40:34 -05:00
Benson Chu
db4512b0cf More likely to RDP on a laptop 2024-08-29 08:40:34 -05:00
Benson Chu
3c75f5acc8 Upgrading to 24.05 2024-08-29 08:40:29 -05:00
Benson Chu
4a8a7be5c1 PostExec! 2024-08-25 09:33:38 -05:00
Benson Chu
cdbd5afae7 Email? 2024-08-25 08:45:13 -05:00
Benson Chu
d5e1d319f3 Conditionals! 2024-08-25 08:45:13 -05:00
Benson Chu
8f2938da34 Fonts 2024-08-20 19:44:39 -05:00
Benson Chu
937afa0be9 with pkgs 2024-08-20 19:41:16 -05:00
Benson Chu
5532498aed zip 2024-08-20 17:25:06 -05:00
Benson Chu
cb332c5ec2 Added packages for work 2024-08-20 17:16:16 -05:00
Benson Chu
ed999982e1 Packages for home-manager 2024-08-17 22:50:43 -05:00
Benson Chu
ec7d8afdd4 cjk fonts for xelatex 2024-08-17 20:10:06 -05:00
Benson Chu
65eae705d1 Tarsnap for peter, for now 2024-08-17 15:41:10 -05:00
Benson Chu
f49e7be86c qemu 2024-08-17 15:41:10 -05:00
Benson Chu
8e9ad6c4f5 Same Emacs 2024-08-17 15:41:10 -05:00
Benson Chu
ed9c00e955 That's a bug 2024-08-04 20:39:53 -05:00
Benson Chu
fd7b6bc4fc Upgrade to 24.05? 2024-08-04 20:31:13 -05:00
Benson Chu
4f84bef212 Truecharts uses this? 2024-08-04 19:11:34 -05:00
Benson Chu
29d922b616 Move nvfetcher to root 2024-08-04 15:05:24 -05:00
Benson Chu
9e4cb88d75 UGH, registries, yet another thing 2024-08-04 14:25:49 -05:00
Benson Chu
14484714cb Kubernetes 2024-08-04 14:23:40 -05:00
Benson Chu
599953b4f0 Update comment 2024-08-04 06:44:35 -05:00
Benson Chu
5eb38ef711 More user-facing packages 2024-08-04 06:43:52 -05:00
Benson Chu
69d2a075ff RE tools 2024-08-02 21:49:26 -05:00
Benson Chu
807f74681f Consolidate network configuration 2024-08-02 09:41:41 -05:00
Benson Chu
d1ff60f81c exwm is finally stable enough to be across all user-facing machines 2024-08-02 08:22:13 -05:00
Benson Chu
1ae2c057ee Already in common/configuration.nix 2024-08-02 08:21:43 -05:00
Benson Chu
a81e9f750b Yeah screw the nixpkgs exwm
Roll my own. It's not that hard
2024-08-02 08:15:21 -05:00
Benson Chu
90fa38c575 Laptops probably want brightness control 2024-08-02 08:06:18 -05:00
Benson Chu
ca8ff4c369 THIS IS HOW YOU ENABLE STARTX
Before this, I couldn't startx on NixFrame without effectively
bricking the laptop (no keyboard or mouse).
2024-08-02 07:59:57 -05:00
Benson Chu
ffd362fc89 Grab all tree-sitter grammars 2024-08-02 07:59:48 -05:00
Benson Chu
29b3bb4414 Whitespace 2024-08-02 07:59:05 -05:00
Benson Chu
0a54c63960 Reorganized home-config 2024-08-02 07:59:05 -05:00
Benson Chu
2a664a2a65 Really this is what I should've changed 2024-07-25 07:51:51 -05:00
Benson Chu
d01043ddf3 How TF is emacs-git less stable than emacs-unstabled
This really is an unfortunate misnomer.
2024-07-21 19:54:19 -05:00
Benson Chu
a06d4cb2e3 Home manager using up-to-date emacs 2024-07-21 19:49:57 -05:00
Benson Chu
06a0e459fb Updated home-manager 2024-07-21 17:56:34 -05:00
Benson Chu
45c5c89589 Todo for me again 2024-07-21 11:37:15 -05:00
Benson Chu
e552b7fafa Okay, THIS is how you use an overlay
From configuration.nix. For my next trick (later), I'll do the exact
same thing from flake.nix
2024-07-21 11:27:05 -05:00
Benson Chu
5118300d20 Ugh, we're going back to this because of backwards compat
With nixos-rebuild using the NIX_PATH. I'm pretty sure it doesn't work
anyway, but whatever
2024-07-21 09:57:22 -05:00
Benson Chu
a6a89e9ab7 Maybe this will fix the <nixpkgs> inconsistency problems? 2024-07-21 09:57:21 -05:00
Benson Chu
b3644f6f70 Echo the configure command 2024-07-17 08:36:23 -05:00
Benson Chu
d74c0c8292 Don't warn about direnv taking a while 2024-07-17 08:29:10 -05:00
Benson Chu
143627af21 Configure flag for future reference 2024-07-14 18:27:01 -05:00
Benson Chu
057f67b4d9 Don't freeze my terminal please 2024-07-14 18:12:39 -05:00
Benson Chu
4d64ef3eea Comments 2024-07-14 18:12:36 -05:00
Benson Chu
d55ea4953e Don't strip! 2024-07-14 17:20:24 -05:00
Benson Chu
67e731c54b My first devshell 2024-07-14 14:14:08 -05:00
Benson Chu
ab9a08d510 Common configuration is now implicit from hosts perspective
This means I can now define overlays that everyone can access
2024-07-14 11:33:27 -05:00
Benson Chu
3e07b832c8 This seems to be one way to go about it 2024-07-13 18:13:27 -05:00
Benson Chu
f970fc1583 It's weird, but whatever, it works for now 2024-07-13 17:42:34 -05:00
Benson Chu
5e4a56b2f5 Ugh, my attempt at an impure solution.
Perhaps nvfetcher is the direction I should be moving in.
2024-07-13 17:35:46 -05:00
Benson Chu
831d304ece This is needed for rr 2024-07-12 19:01:03 -05:00
Benson Chu
317f76b50d Added valgrind 2024-07-11 09:38:48 -05:00
Benson Chu
9430d3cddb cli based browsers 2024-07-09 13:47:29 -05:00
Benson Chu
a325839c7e Come on man, gotta have bear for a development machine 2024-07-09 11:28:27 -05:00
Benson Chu
abcd8e5775 Install rr 2024-07-02 14:13:23 -05:00
Benson Chu
a4c74f5d82 How TF is Dawn NOT a dev machine 2024-07-01 12:30:46 -05:00
Benson Chu
d63ebb18bc Latex 2024-06-19 11:28:30 -05:00
Benson Chu
e886602417 Make printers work again 2024-06-14 17:31:28 -05:00
Benson Chu
27e43666ef Game Streaming 2024-05-26 20:17:55 -05:00
Benson Chu
b1851b7f7f Ledger utilities 2024-05-26 20:17:49 -05:00
Benson Chu
b9905075d3 Updating all nixpkgs inputs 2024-05-20 08:37:38 -05:00
Benson Chu
66d3fba278 racket! 2024-05-20 08:37:38 -05:00
Benson Chu
699a0fc71a This isn't available yet 2024-05-07 13:15:26 -05:00
Benson Chu
a3ac26c935 ip? 2024-05-07 12:59:08 -05:00
Benson Chu
8b70bfe18a apcupsd for sentinel 2024-05-07 12:55:38 -05:00
Benson Chu
23bf90b1c6 There we go 2024-05-06 18:24:55 -05:00
Benson Chu
ae6f9f243b Oops 2024-05-06 18:24:52 -05:00
Benson Chu
a3bd710316 Needs fixup 2024-05-06 18:22:58 -05:00
Benson Chu
0dd9f54216 Hostname changed 2024-05-06 18:18:00 -05:00
Benson Chu
7aa772234e NixSentinel flake 2024-05-06 18:17:12 -05:00
Benson Chu
3e7226c862 Enable docker and fwupd on nixdawn 2024-05-06 18:16:30 -05:00
Benson Chu
75ebbb7d86 Move more stuff to user-facing machines 2024-05-06 18:16:16 -05:00
Benson Chu
89130dd40c No need for this anymore 2024-05-06 18:16:07 -05:00
Benson Chu
108dfc5bf6 Added NixSentinel 2024-05-06 18:14:14 -05:00
Benson Chu
949cba853e docker! 2024-04-16 05:31:28 -05:00
Benson Chu
ba994115b4 Don't follow unstable for most stuff 2024-04-14 19:22:49 -05:00
Benson Chu
42c2a7f327 .gitignore 2024-04-14 19:06:49 -05:00
Benson Chu
6a77d14937 Updating the flake again 2024-04-14 19:06:36 -05:00
Benson Chu
dac2d8a230 Add nshields on nixgate 2024-04-13 19:52:05 -05:00
Benson Chu
54b995e47a xautolock and update flake 2024-04-09 17:01:03 -05:00
Benson Chu
dcbaaf4b26 Apparently that's not a real package? 2024-04-09 17:00:53 -05:00
Benson Chu
9192d5ab8b tftp 2024-04-06 15:13:40 -05:00
Benson Chu
bbcdf815a5 Home network has changed 2024-04-06 15:13:35 -05:00
Benson Chu
c6323c7959 Need samba too 2024-04-06 15:13:35 -05:00
Benson Chu
997f49100d Added nixos-hardware 2024-04-05 20:44:14 -05:00
Benson Chu
d163914d14 Screen for serial stuff 2024-04-05 20:44:04 -05:00
Benson Chu
f7a5c0696e fwupd 2024-03-29 15:41:47 -05:00
Benson Chu
42a6ae421e Traceroute 2024-03-27 19:15:55 -05:00
Benson Chu
271869ed66 This is now controlled by opnsense 2024-03-23 20:14:47 -05:00
Benson Chu
46f3666a67 Sleep computer after a while 2024-03-20 11:35:38 -05:00
Benson Chu
e57b7678a2 Add samba 2024-03-20 11:35:33 -05:00
Benson Chu
a3b501299a local paths 2024-03-17 15:13:23 -05:00
Benson Chu
fc63b2808d Virtualizer for NixGate 2024-03-17 07:23:30 -05:00
Benson Chu
d158c9b5bb Needed for filetags 2024-03-17 07:23:25 -05:00
Benson Chu
213b54b526 bitwarden 2024-03-16 11:00:06 -05:00
Benson Chu
4675bc13bc test refactor 2024-03-16 10:59:07 -05:00
Benson Chu
276d5c5bed Hosts 2024-03-16 10:58:59 -05:00
Benson Chu
686d3db098 Nix LSP 2024-03-16 10:58:09 -05:00
Benson Chu
e3241338d7 How could I forget this 2024-03-16 10:57:50 -05:00
Benson Chu
ecb7eb884b Laptops extend from user-facing, user-facing needs xorg 2024-03-14 06:11:16 -05:00
Benson Chu
d32b80a8ba no more advantage for now 2024-03-14 06:00:43 -05:00
38 changed files with 1158 additions and 316 deletions

1
.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
*.ttf filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
modules/secrets

9
.gitmodules vendored Normal file
View file

@ -0,0 +1,9 @@
[submodule "submodules/beets-config"]
path = submodules/beets-config
url = ssh://git@gitea.pestctrl.io:2223/pestctrl/beets-config.git
[submodule "submodules/tmux-config"]
path = submodules/tmux-config
url = git@github.com:pestctrl/tmux-config
[submodule "submodules/wezterm-config"]
path = submodules/wezterm-config
url = git@github.com:pestctrl/wezterm-config

View file

@ -1,6 +1,8 @@
{ pkgs }: with pkgs; [ { pkgs }: with pkgs; [
nix-index nix-index
home-manager home-manager
nil
nvfetcher
gcc gcc
git git
@ -10,12 +12,22 @@
tailscale tailscale
openvpn openvpn
samba
cifs-utils
nfs-utils nfs-utils
sshfs
myEmacs
unstable.emacs
notmuch mu isync notmuch mu isync
keychain ledger gnupg keychain ledger gnupg
ledger2beancount beancount fava
hledger
mailutils mailutils
pandoc texlive.combined.scheme-full
texlivePackages.noto
w3m lynx
fzf
# sendmail # sendmail
cmake cmake
@ -23,13 +35,17 @@
libtool libtool
pinentry-curses pinentry-curses
tmux tmux
screen
sqlite sqlite
docker-compose
file file
lynx lynx
wget wget
htop htop
bind bind
traceroute
nmap nmap
wol wol
iperf iperf
@ -38,6 +54,10 @@
usbutils # lsusb usbutils # lsusb
lm_sensors lm_sensors
parallel parallel
mtr
# tftp
zip
(python311.withPackages (pythonPackages: with pythonPackages; [ (python311.withPackages (pythonPackages: with pythonPackages; [
pymupdf pymupdf
@ -48,17 +68,12 @@
pycryptodome pycryptodome
pyacoustid pyacoustid
beets beets
clint
# chromaprint # chromaprint
lxml
])) ]))
(beets.override {
pluginOverrides = {
extrafiles = {
enable = true;
propagatedBuildInputs = [ beetsPackages.extrafiles ];
};
};
})
chromaprint chromaprint
ocrmypdf ocrmypdf

View file

@ -2,20 +2,53 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ inputs, config, pkgs, ... }: { inputs, config, pkgs, lib, ... }:
let
system = "x86_64-linux";
in
{ {
imports = [ imports = [
../modules/default.nix ../modules/default.nix
./flake-location.nix
]; ];
nix.settings.experimental-features = "nix-command flakes"; nixpkgs.overlays = [
(final: prev: {
unstable = import inputs.unstable {
inherit system;
config.allowUnfree = true;
};
})
(final: prev: {
update = import inputs.update {
inherit system;
config.allowUnfree = true;
};
})
] ++ import ./overlays.nix inputs ++ [
inputs.emacs-overlay.overlays.default
];
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. nix = {
settings.experimental-features = "nix-command flakes";
# Configure network proxy if necessary nixPath = [
# networking.proxy.default = "http://user:password@proxy:port/"; "/home/benson/.nix-defexpr/channels"
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; "nixpkgs=${inputs.nixpkgs}"
config.my.nixosConfigLocation
"/nix/var/nix/profiles/per-user/root/channels"];
# MY GOD, this is what is used for nix develop, nix run, etc.
registry = {
system = {
from = {
type = "indirect";
id = "system";
};
flake = inputs.nixpkgs;
};
};
};
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -63,6 +96,6 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View file

@ -1,8 +1,20 @@
{ inputs, config, pkgs, ... }: { inputs, config, pkgs, ... }:
{ {
environment.variables = {
# Valgrind like to use this instead of HOSTNAME
HOST = config.networking.hostName;
DIRENV_SKIP_TIMEOUT = "TRUE";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
sbcl sbcl
zstd.dev
zstd.out
devenv
racket
ninja ninja
gdb gdb
@ -11,7 +23,54 @@
lld lld
clang-tools_16 # clangd, clang-format clang-tools_16 # clangd, clang-format
llvmPackages_16.libllvm llvmPackages_16.libllvm
bear
rr
valgrind
xdot
graphviz
nodejs_21 # RE Tools
radare2
gcc-arm-embedded
rizin
cutter
nodejs_22
wireshark
minikube
kubectl
unstable.talosctl
k9s
(wrapHelm kubernetes-helm {
plugins = with pkgs.kubernetes-helmPlugins; [
# helm-secrets
helm-diff
helm-s3
helm-git
];
})
sops
postgresql_16
basez
zeal
# mps.overrideAttrs (old: {
# pname = "mps";
# version = "1.118.0";
# src = fetchFromGitHub {
# owner = "Ravenbrook";
# repo = "mps";
# rev = "refs/tags/release-${version}";
# hash = "sha256-3ql3jWLccgnQHKf23B1en+nJ9rxqmHcWd7aBr93YER0=";
# };
# })
]; ];
boot.kernel.sysctl = {
# "kernel.yama.ptrace_scope" = 0;
"kernel.perf_event_paranoid" = 1;
};
} }

View file

@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
picom picom
@ -7,17 +6,32 @@
networkmanagerapplet networkmanagerapplet
]; ];
services.xserver.windowManager.exwm = { services.xserver = {
enable = true;
enableDefaultConfig = false; windowManager.session = [{
name = "my-exwm";
start = ''
${pkgs.myEmacs}/bin/emacs -l /home/benson/.emacs.d/init.el
'';
}];
# gpg-agent = {
# enable = true;
# pinentryFlavor = "gtk2";
# };
};
services.displayManager = {
defaultSession = "none+my-exwm";
}; };
programs = { programs = {
nm-applet.enable = true; nm-applet.enable = true;
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
pinentryFlavor = "gtk2";
enableSSHSupport = true; enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gtk2;
}; };
}; };

24
common/flake-location.nix Normal file
View file

@ -0,0 +1,24 @@
{ inputs, config, lib, pkgs, ... }:
{
options = {
my.flakeLocation = lib.mkOption {
default = null;
description = "Location of nixos flake for config";
type = lib.types.nullOr lib.types.path;
};
my.nixosConfigLocation = lib.mkOption {
# default = "/etc/nixos/";
internal = true;
description = "Location of nixos configuration";
type = lib.types.path;
};
};
config = {
my.nixosConfigLocation =
if (config.my.flakeLocation != null)
then "${config.my.flakeLocation}/hosts/${config.networking.hostName}/configuration.nix"
else lib.warn "Didn't set 'my.flakeLocation', NIX_PATH functionality will degrade a little"
"${inputs.self}/hosts/${config.networking.hostName}/configuration.nix";
};
}

View file

@ -1,20 +1,41 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
services.logind = { imports = [
extraConfig = "HandlePowerKey=suspend"; ./user-facing.nix
lidSwitch = "suspend"; ];
};
hardware.bluetooth.enable = true; # enables support for Bluetooth hardware.bluetooth.enable = true; # enables support for Bluetooth
# Configure keymap in X11 services = {
services.xserver = { logind = {
layout = "us,us"; extraConfig = "HandlePowerKey=suspend";
xkbVariant = "dvorak,"; lidSwitch = "suspend";
xkbOptions = "grp:win_space_toggle"; };
# Configure keymap in X11
xserver = {
layout = lib.mkForce "neo_dvorak,us";
xkbOptions = "grp:ctrls_toggle";
xkb = {
extraLayouts = {
neo_dvorak = {
description = "Dvorak with Neo2 Extensions";
symbolsFile = ../res/xkb/symbols/neo_dvorak;
languages = [ "eng" ];
};
};
};
};
}; };
# Configure console keymap # Configure console keymap
console.keyMap = "dvorak"; console.keyMap = "dvorak";
environment.systemPackages = with pkgs; [
brightnessctl
remmina
acpi
];
} }

View file

@ -4,5 +4,6 @@
imports = [ imports = [
./sshd-home.nix ./sshd-home.nix
./printer.nix ./printer.nix
./hosts.nix
]; ];
} }

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
# networking.hosts = {
# "192.168.0.10" = [ "ProxFaith" "proxfaith.local" ];
# "192.168.0.102" = [ "TrueFaith" "truefaith.local" ];
# "192.168.0.100" = [ "FedoraFaith" "fedorafaith.local" ];
# };
}

View file

@ -16,12 +16,12 @@
# Enable auto-discovery of printers # Enable auto-discovery of printers
avahi = { avahi = {
enable = true; enable = true;
nssmdns = true; nssmdns4 = true;
openFirewall = true; openFirewall = true;
}; };
}; };
networking.hosts = { networking.hosts = {
"192.168.1.78" = [ "BRWDCE994530FB4.local" "BRWDCE994530FB4" ]; "10.0.11.2" = [ "BrotherPrinter4.local" "BrotherPrinter4" ];
}; };
} }

View file

@ -18,13 +18,7 @@
extraConfig = '' extraConfig = ''
ChallengeResponseAuthentication no ChallengeResponseAuthentication no
Match Address 192.168.1.0/24,!192.168.1.254 Match Address 10.0.0.0/8,!10.0.0.1
X11UseLocalhost yes
X11Forwarding yes
PasswordAuthentication yes
ChallengeResponseAuthentication yes
Match Address 192.168.0.0/24,!192.168.0.1
X11UseLocalhost yes X11UseLocalhost yes
X11Forwarding yes X11Forwarding yes
PasswordAuthentication yes PasswordAuthentication yes

22
common/overlays.nix Normal file
View file

@ -0,0 +1,22 @@
inputs:
[
(final: prev: {
mps-debug = prev.mps.overrideAttrs (old: {
pname = old.pname + "-debug";
# Need to do this to patch dwarf information. For some reason,
# stdenv copies the source into /build/source, and then builds
# from there, leaving all the dwarf information hanging.
env.NIX_CFLAGS_COMPILE = "-fdebug-prefix-map=/build/source=${old.src}";
dontStrip = true;
});
})
(final: prev: {
myEmacs =
((prev.emacsPackagesFor final.emacs-unstable)
.emacsWithPackages (epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
]));
})
]

View file

@ -1,47 +1,94 @@
{ inputs, config, pkgs, ... }: { inputs, config, pkgs, ... }:
{ {
nix.settings.experimental-features = "nix-command flakes"; imports = [
./exwm.nix
];
# Enable sound with pipewire. # Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default, pipewire = {
# no need to redefine it in your config for now) enable = true;
# media-session.enable = true; alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
# media-session.enable = true;
};
};
services.xserver = {
# Enable the X11 windowing system.
enable = true;
# Enable the KDE Plasma Desktop Environment.
desktopManager.plasma5.enable = true;
# Enable sddm and startx
displayManager = {
startx.enable = true;
};
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
};
services.displayManager = {
sddm.enable = true;
};
services.libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
};
}; };
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
roboto-mono roboto-mono
noto-fonts
noto-fonts-extra
noto-fonts-cjk-sans
noto-fonts-cjk-serif
commit-mono
]; ];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
unstable.firefox update.firefox
unstable.google-chrome update.google-chrome
bitwarden
vlc vlc
mpv mpv
obs-studio obs-studio
gparted gparted
audacity audacity
libreoffice
imagemagick
gimp
inkscape
qdirstat qdirstat
unstable.signal-desktop update.signal-desktop
parsec-bin parsec-bin
unstable.discord update.discord
unstable.telegram-desktop update.telegram-desktop
dunst dunst
shutter shutter
# unstable.rustdesk # update.rustdesk
docker
pcmanfm pcmanfm
libsForQt5.dolphin libsForQt5.dolphin
@ -49,12 +96,43 @@
libsForQt5.ffmpegthumbs libsForQt5.ffmpegthumbs
libsForQt5.kdegraphics-thumbnailers libsForQt5.kdegraphics-thumbnailers
p7zip
unzip
qemu
pavucontrol pavucontrol
xorg.xinit update.yt-dlp
sx ffmpeg
yt-dlp
dconf dconf
xfce.xfce4-terminal
# TODO: Re-enable extrafiles
(unstable.beets# .override {
# pluginOverrides = {
# extrafiles = {
# enable = true;
# propagatedBuildInputs = [ beetsPackages.extrafiles ];
# };
# };
# }
)
(gnuplot.override { withQt = true; })
appflowy
tageditor
easytag
seafile-client
wezterm
xorg.xkbcomp
insomnia
]; ];
} }

View file

@ -1,36 +1,18 @@
{ {
"nodes": { "nodes": {
"bashcfg-input": {
"flake": false,
"locked": {
"lastModified": 1704461224,
"narHash": "sha256-lbMvlgLwAgAytz/mmOFMYJu40bKGgtYGHWVG9T1Ypos=",
"owner": "pestctrl",
"repo": "bash-config",
"rev": "015ac81d3ee483ff0b3f13c5e9c912cf428dd745",
"type": "github"
},
"original": {
"owner": "pestctrl",
"ref": "master",
"repo": "bash-config",
"type": "github"
}
},
"emacs-overlay": { "emacs-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1703984610, "lastModified": 1750523034,
"narHash": "sha256-UMMRKB3qpm64rO3eVlDf2o7IHb68nRoWJE9LL9132A8=", "narHash": "sha256-4jYxNHn/9iyAANAXc3pkhhNeTyAJISshP3lgjH9l70o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "fae6a53b30177995da0262a1b539898c48071f4b", "rev": "7a26e0974d0a1dd5d295a80f533814206d78523f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -45,11 +27,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1710146030,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -65,59 +47,77 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1704099619, "lastModified": 1736373539,
"narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixos-hardware": {
"locked": {
"lastModified": 1722332872,
"narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "14c333162ba53c02853add87a0000cbd7aa230c2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1701539137, "lastModified": 1750330365,
"narHash": "sha256-nVO/5QYpf1GwjvtpXhyxx5M3U/WN0MwBro4Lsk+9mL0=", "narHash": "sha256-hJ7XMNVsTnnbV2NPmStCC07gvv5l2x7+Skb7hyUzazg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "933d7dc155096e7575d207be6fb7792bc9f34f6d", "rev": "d883b6213afa179b58ba8bace834f1419707d0ad",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-23.11", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1703467016, "lastModified": 1750330365,
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=", "narHash": "sha256-hJ7XMNVsTnnbV2NPmStCC07gvv5l2x7+Skb7hyUzazg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d02d818f22c777aa4e854efc3242ec451e5d462a", "rev": "d883b6213afa179b58ba8bace834f1419707d0ad",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"bashcfg-input": "bashcfg-input",
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"unstable": "unstable" "unstable": "unstable",
"update": "update"
} }
}, },
"systems": { "systems": {
@ -137,11 +137,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1709961763, "lastModified": 1746904237,
"narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=", "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3030f185ba6a4bf4f18b87f345f104e6a6961f34", "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -150,6 +150,22 @@
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
},
"update": {
"locked": {
"lastModified": 1746957726,
"narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a39ed32a651fdee6842ec930761e31d1f242cb94",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

158
flake.nix
View file

@ -1,102 +1,142 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
update.url = "github:nixos/nixpkgs/nixos-24.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable"; unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = { emacs-overlay = {
url = "github:nix-community/emacs-overlay/master"; url = "github:nix-community/emacs-overlay/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
bashcfg-input = {
url = "github:pestctrl/bash-config/master";
flake = false;
};
}; };
outputs = { self, nixpkgs, unstable, home-manager, ... }@inputs: outputs = { self, nixpkgs, update, unstable, home-manager, nixos-hardware, emacs-overlay, ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = import nixpkgs {
unstable-overlay = final: prev: { inherit system;
unstable = import unstable { overlays =
inherit system; [emacs-overlay.overlays.default] ++
config.allowUnfree = true; (import ./common/overlays.nix inputs);
};
}; };
# Perhaps this could've been presented as an overlay? mkSystem = h: {
# bashcfg-overlay = final: prev: { "${h}" = nixpkgs.lib.nixosSystem {
# };
in {
nixosConfigurations = {
NixFrame = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
# specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ nixpkgs.overlays = [ unstable-overlay ]; } (./. + "/hosts/${h}/configuration.nix")
./hosts/NixFrame/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.benson.imports = [ ./home/home.nix ]; home-manager.users.benson.imports = [ ./home/users/benson.nix ];
} }
]; ];
}; };
};
in {
NixDawn = nixpkgs.lib.nixosSystem { nixosConfigurations =
inherit system; (pkgs.lib.foldr (a: b: a // b) {}
# specialArgs = { inherit inputs; }; (map mkSystem ["NixDawn" "NixFrame"]))
modules = [
{ nixpkgs.overlays = [ unstable-overlay ]; }
./hosts/NixDawn/configuration.nix
home-manager.nixosModule
{
home-manager = {
extraSpecialArgs = { inherit inputs; };
useGlobalPkgs = true;
useUserPackages = true;
users.benson.imports = [ ./home/home.nix ];
};
}
];
};
// {
NixGate = nixpkgs.lib.nixosSystem { NixGate = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ nixpkgs.overlays = [ unstable-overlay ]; } ./common/configuration.nix
./hosts/NixGate/configuration.nix ./hosts/NixGate/configuration.nix
]; ];
}; };
NixAdvantage = nixpkgs.lib.nixosSystem { NixSentinel = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ nixpkgs.overlays = [ unstable-overlay ]; } ./common/configuration.nix
./hosts/NixAdvantage/configuration.nix ./hosts/NixSentinel/configuration.nix
];
};
# LenoNix = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [ ./hosts/NixFrame/configuration.nix ];
# };
};
packages."${system}" = {
mps-debug = pkgs.mps-debug;
};
devShells."${system}" = {
emacs-min = pkgs.mkShell {
packages = with pkgs; [
emacs
git
libtool
cmake gcc gnumake
roboto-mono ripgrep
];
};
emacs-devel = pkgs.mkShell {
# packages = with pkgs; [mps-debug];
# nativeBuildInputs = with pkgs; [ mps-debug ] ++ pkgs.emacs.nativeBuildInputs;
# buildInputs = pkgs.emacs.buildInputs;
# packages = with pkgs; [ mps-debug ];
inputsFrom = with pkgs; [ emacs ];
packages = with pkgs; [ mps ];
buildInputs = with pkgs; [ xorg.libXrandr ];
shellHook = ''
echo "MPS debug environment!"
set -x
export MPS_LIB="${pkgs.mps-debug}/lib"
export MPS_INC="${pkgs.mps-debug}/include"
unset EMACSLOADPATH
set +x
echo "Configure Command: "
echo -n ' LDFLAGS="-L$MPS_LIB" CFLAGS="-O0 -g3 -isystem $MPS_INC" '
echo './configure --with-mps=debug --with-native-compilation=no --enable-checking="yes,glyphs"'
'';
};
pymupdf = pkgs.mkShell {
venvDir = "./venv";
buildInputs = with pkgs.python312Packages; [
venvShellHook
python
pymupdf
icecream
]; ];
}; };
}; };
# nixosConfigurations.LenoNix = nixpkgs.lib.nixosSystem { homeConfigurations = {
# system = "x86_64-linux"; "benson" = home-manager.lib.homeManagerConfiguration {
# modules = [ ./hosts/NixFrame/configuration.nix ]; inherit pkgs;
# }; extraSpecialArgs = { inherit inputs; };
modules = [
./home/users/benson.nix
];
};
homeConfigurations."benson" = home-manager.lib.homeManagerConfiguration { "a0487752" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
modules = [ modules = [
./home/home.nix ./home/users/work.nix
]; ];
};
}; };
}; };
} }

View file

@ -2,24 +2,46 @@
let let
cfg = config.my.bash-config; cfg = config.my.bash-config;
bash-drv = pkgs.stdenv.mkDerivation { # bash-drv = pkgs.stdenv.mkDerivation {
name = "bash-config"; # name = "bash-config";
src = inputs.bashcfg-input; # src = inputs.bashcfg-input;
dontBuild = true; # dontBuild = true;
installPhase = '' # installPhase = ''
mkdir -p $out # mkdir -p $out
cp *.sh $out # cp *.sh $out
''; # '';
}; # };
bash-drv = (import ../../../nvfetch/_sources/generated.nix {
inherit (pkgs) fetchurl fetchgit fetchFromGitHub dockerTools;
}).bash-config.src;
in in
{ {
options.my.bash-config.enable = lib.mkEnableOption "Enable bash configuration file"; options = {
my.bash-config.enable = lib.mkEnableOption "Enable bash configuration file";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Why can't I do the following? # Why can't I do the following?
# home.file."${config.xdg.configHome}/bash-config/emacs.sh" # home.file."${config.xdg.configHome}/bash-config/emacs.sh"
xdg.configFile."bash-config/emacs.sh".source = "${bash-drv}/emacs.sh"; xdg.configFile."bash-config/emacs.sh".source = "${bash-drv}/emacs.sh";
home.file.".bashrc".source = "${bash-drv}/bashrc.sh"; # home.file.".bashrc".source = "${bash-drv}/bashrc.sh";
programs.bash = {
shellAliases = {
enable_gdb = "sudo sysctl kernel.yama.ptrace_scope=0";
disable_gdb = "sudo sysctl kernel.yama.ptrace_scope=3";
};
bashrcExtra = ''
source ${bash-drv}/bashrc.sh
# Need to figure out how to conditionally generate this
if [[ -n $(which kubectl) ]]; then
alias k=kubectl
source <(kubectl completion bash | sed s/kubectl/k/g)
fi
'';
};
}; };
} }

148
home/users/benson.nix Normal file
View file

@ -0,0 +1,148 @@
{ inputs, config, pkgs, lib, ... }@args:
{
imports = [
../modules
../../submodules
];
nixpkgs.overlays = [
inputs.emacs-overlay.overlays.default
];
my.beets-config.enable = true;
my.tmux-config.enable = true;
my.flakeLocation = lib.mkIf (builtins.hasAttr "osConfig" args) args.osConfig.my.flakeLocation;
# Home Manager needs a bit of information about you and the paths it should
# manage.
home = {
username = "benson";
homeDirectory = "/home/benson";
};
nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
registry.nixpkgs.flake = inputs.nixpkgs;
});
my.bash-config.enable = true;
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
roboto-mono
rizin radare2 cutter
ripgrep
git
cmake gnumake libtool gcc
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/benson/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
EDITOR = "emacsclient -n";
};
accounts.email.accounts = {
fastmail = {
primary = true;
realName = "Benson Chu";
address = "bensonchu@fastmail.com";
aliases = ["dev@mail.pestctrl.io" "me@mail.pestctrl.io" "bensonchu457@fastmail.com"];
flavor = "fastmail.com";
imap.host = "imap.fastmail.com";
smtp.host = "smtp.fastmail.com";
userName = "bensonchu@fastmail.com";
passwordCommand = ''${pkgs.myEmacs}/bin/emacsclient -e '(get-authinfo "imap.fastmail.com" "993" "bensonchu457@fastmail.com")' | ${pkgs.coreutils}/bin/tr -d '"' '';
mu.enable = true;
};
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
git = {
enable = true;
userName = "Benson Chu";
userEmail = "dev@mail.pestctrl.io";
extraConfig = {
core = {
editor = "emacsclient";
};
};
};
emacs = {
package = pkgs.myEmacs;
enable = true;
};
direnv = {
enable = true;
enableBashIntegration = true; # see note on other shells below
nix-direnv.enable = true;
};
bash.enable = true; # see note on other shells below
};
services = {
kdeconnect.enable = true;
mbsync = {
enable = true;
frequency = "*:0/10";
verbose = true;
postExec = "${pkgs.mu}/bin/mu index";
};
};
}

View file

@ -1,16 +1,24 @@
{ config, pkgs, ... }: { inputs, config, pkgs, lib, ... }:
{ {
imports = [ imports = [
./modules ../modules
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "benson"; # home.username = "cvs";
home.homeDirectory = "/home/benson"; # home.homeDirectory = "/home/cvs";
home.username = "a0487752";
home.homeDirectory = "/home/a0487752";
my.bash-config.enable = true; # my.bash-config.enable = true;
nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
registry.nixpkgs.flake = inputs.nixpkgs;
});
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release # compatible with. This helps avoid breakage when a new Home Manager release
@ -19,27 +27,28 @@
# You should not change this value, even if you update Home Manager. If you do # You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager # want to update the value, then make sure to first check the Home Manager
# release notes. # release notes.
home.stateVersion = "23.11"; # Please read the comment before changing. home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your # The home.packages option allows you to install Nix packages into your
# environment. # environment.
home.packages = [ home.packages = with pkgs; [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your # # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your # # configuration. For example, this adds a command 'my-hello' to your
# # environment: # # environment:
# (pkgs.writeShellScriptBin "my-hello" '' # (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!" # echo "Hello, ${config.home.username}!"
# '') # '')
roboto-mono
fastfetch
rizin radare2 cutter
ripgrep
git
cmatrix
cmake gnumake libtool roswell sbcl
dtc
]; ];
# Home Manager is pretty good at managing dotfiles. The primary way to manage # Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -73,7 +82,7 @@
# /etc/profiles/per-user/benson/etc/profile.d/hm-session-vars.sh # /etc/profiles/per-user/benson/etc/profile.d/hm-session-vars.sh
# #
home.sessionVariables = { home.sessionVariables = {
EDITOR = "emacsclient"; EDITOR = "emacsclient -n";
}; };
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
@ -82,7 +91,7 @@
git = { git = {
enable = true; enable = true;
userName = "Benson Chu"; userName = "Benson Chu";
userEmail = "bensonchu457@gmail.com"; userEmail = "b-chu1@ti.com";
extraConfig = { extraConfig = {
core = { core = {
editor = "emacsclient"; editor = "emacsclient";
@ -92,14 +101,13 @@
emacs = { emacs = {
enable = true; enable = true;
extraPackages = epkgs: with epkgs; [ package = pkgs.myEmacs;
mu4e
];
}; };
# bash.enable = true; # see note on other shells below
}; };
services = { services = {
kdeconnect.enable = true;
mbsync = { mbsync = {
enable = true; enable = true;
frequency = "*:0/10"; frequency = "*:0/10";

View file

@ -1,64 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
../../common/configuration.nix
../../common/moms-house
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.useOSProber = true;
networking.hostName = "NixAdvantage"; # Define your hostname.
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "dvorak";
};
# Configure console keymap
console.keyMap = "dvorak";
# Define a user account. Don't forget to set a password with passwd.
users.users.benson = {
isNormalUser = true;
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
firefox
kate
# thunderbird
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -6,18 +6,22 @@
{ {
imports = [ imports = [
../../common/configuration.nix ../../common/configuration.nix
../../common/user-facing.nix
../../common/development-machine.nix
../../common/lxd-setup.nix ../../common/lxd-setup.nix
../../common/moms-house ../../common/moms-house
../../common/exwm.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
my.flakeLocation = "/home/benson/nixos-config/";
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "NixDawn"; # Define your hostname. networking.hostName = "NixDawn"; # Define your hostname.
networking.hostId = "5640b87e";
fileSystems."/home/benson/workspace" = { fileSystems."/home/benson/workspace" = {
device = "/dev/disk/by-uuid/aa640eb6-0655-446a-8a12-5867eeef6638"; device = "/dev/disk/by-uuid/aa640eb6-0655-446a-8a12-5867eeef6638";
@ -32,11 +36,17 @@
description = "Benson Chu"; description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ packages = with pkgs; [
firefox
kate kate
steam steam
moonlight-qt
dolphin dolphin
breeze-icons breeze-icons
xautolock
unstable.mqtt-explorer
musescore
unstable.spotify
pulseaudio
immich-cli
]; ];
}; };
@ -49,6 +59,7 @@
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
}; };
coolercontrol.enable = true;
}; };
services = { services = {
@ -57,12 +68,21 @@
# appearance. # appearance.
# #
# picom.enable = true; # picom.enable = true;
pipewire.pulse.enable = true;
pcscd.enable = true; pcscd.enable = true;
tailscale.enable = true; tailscale.enable = true;
gvfs.enable = true; gvfs.enable = true;
udisks2.enable = true; udisks2.enable = true;
devmon.enable = true; devmon.enable = true;
tumbler.enable = true; tumbler.enable = true;
fwupd.enable = true;
logind = {
extraConfig = ''
IdleAction=hybrid-sleep
IdleActionSec=30min
'';
};
apcupsd = { apcupsd = {
enable = true; enable = true;
@ -85,27 +105,9 @@
xserver = { xserver = {
# Enable the X11 windowing system. # Enable the X11 windowing system.
enable = true;
exportConfiguration = true;
videoDrivers = [ "amdgpu" ]; videoDrivers = [ "amdgpu" ];
# Configure keymap in X11 exportConfiguration = true;
layout = "us";
xkbVariant = "";
libinput = {
enable = true;
touchpad = {
naturalScrolling = true;
};
};
displayManager = {
defaultSession = "none+exwm";
sddm.enable = true;
};
# Enable the KDE Plasma Desktop Environment.
desktopManager.plasma5.enable = true;
xrandrHeads = [ xrandrHeads = [
{ output = "HDMI-1"; primary = false; monitorConfig = "Option \"PreferredMode\" \"2560x2880\""; } { output = "HDMI-1"; primary = false; monitorConfig = "Option \"PreferredMode\" \"2560x2880\""; }
@ -118,13 +120,31 @@
}; };
}; };
virtualisation.virtualbox.host.enable = true; xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
};
virtualisation = {
virtualbox.host.enable = true;
docker.enable = true;
};
users.extraGroups.vboxusers.members = [ "benson" ]; users.extraGroups.vboxusers.members = [ "benson" ];
users.extraGroups.docker.members = [ "benson" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pavucontrol pavucontrol
unstable.rustdesk # unstable.rustdesk
gkraken tarsnap
# (pkgs.callPackage /home/benson/workspace/peter-nixos/mfcl2690dw/default.nix { } )
clasp
leiningen
supercollider-with-sc3-plugins
]; ];
hardware.gkraken.enable = true; hardware.gkraken.enable = true;
@ -139,7 +159,11 @@
]; ];
# Syncthing # Syncthing
allowedTCPPorts = [ 22000 ]; allowedTCPPorts = [
# vlc audio streaming
8888
22000
];
allowedUDPPorts = [ 22000 21027 ]; allowedUDPPorts = [ 22000 21027 ];
}; };
@ -147,12 +171,40 @@
boot.supportedFilesystems = [ "nfs" ]; boot.supportedFilesystems = [ "nfs" ];
services.rpcbind.enable = true; services.rpcbind.enable = true;
networking.hosts = {
"10.254.0.1" = ["test.pestctrl.io"];
};
systemd = {
targets.machines.enable = true;
nspawn."arch" = {
enable = true;
execConfig = {Boot = true;};
filesConfig = {
# Bind resolve.conf to get networking
BindReadOnly = ["/etc/resolv.conf:/etc/resolv.conf"];
# Bind any directories that you want to be shared
# Bind = ["/home/benson/"];
# BindUser = ["benson"];
};
networkConfig = {Private = false;};
};
services."systemd-nspawn@arch" = {
enable = true;
requiredBy = ["machines.target"];
overrideStrategy = "asDropin";
};
};
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View file

@ -1,29 +1,22 @@
{ config, pkgs, ... }: { config, pkgs, inputs, ... }:
{ {
imports = [ imports = [
# ./home-git-repos.nix # ./home-git-repos.nix
../../common/configuration.nix ../../common/configuration.nix
../../common/user-facing.nix
../../common/development-machine.nix ../../common/development-machine.nix
../../common/laptop-things.nix ../../common/laptop-things.nix
../../common/exwm.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
my.flakeLocation = "/home/benson/workspace/nixos-config";
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "NixFrame"; # Define your hostname. networking.hostName = "NixFrame"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
services.syncthing = { services.syncthing = {
enable = true; enable = true;
@ -32,13 +25,28 @@
dataDir = "/home/benson/.config/syncthing/db"; # Folder for Syncthing's database dataDir = "/home/benson/.config/syncthing/db"; # Folder for Syncthing's database
}; };
services.fwupd.enable = true;
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
# Syncthing
allowedTCPPorts = [ 22000 ];
allowedUDPPorts = [ 22000 21027 ];
};
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.benson = { users.users.benson = {
isNormalUser = true; isNormalUser = true;
description = "Benson Chu"; description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [ packages = with pkgs; [
firefox
kate kate
steam steam
]; ];
@ -57,6 +65,6 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View file

@ -19,7 +19,7 @@
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7CFD-742B"; { device = "/dev/disk/by-uuid/D289-46FB";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -7,7 +7,6 @@
{ {
imports = [ imports = [
../../common/moms-house ../../common/moms-house
../../common/configuration.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -18,11 +17,6 @@
boot.loader.grub.useOSProber = true; boot.loader.grub.useOSProber = true;
networking.hostName = "NixGate"; # Define your hostname. networking.hostName = "NixGate"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -51,6 +45,9 @@
xkbVariant = ""; xkbVariant = "";
}; };
# Virtualizer Agent
services.qemuGuest.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.benson = { users.users.benson = {
isNormalUser = true; isNormalUser = true;
@ -59,6 +56,19 @@
packages = with pkgs; []; packages = with pkgs; [];
}; };
users.users.nshields = {
isNormalUser = true;
description = "Nikolai Shields";
packages = with pkgs; [];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8O6W8B0w4JdCl+1AoHEQ861gVPkPxH0FWU1tM3JVxb"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOjlyVh1/GW3KTdGnzSDP6oii13NLIk61v6FFKuRcvz/"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINX5/yQ/mXI/qqWHWd0+lNt6rBnhDA9p5YgMBmfp3Xtk"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKtQOHXIfltnEVMxgHlxgUNB/o6Bey6vdMWtwSfo+U4q"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG90xfsjQSCH/nKyXlBujpJshZHb9yWzqDH8fLKKl9T2"
];
};
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -94,5 +104,5 @@
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View file

@ -0,0 +1,134 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
../../common/moms-house
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "NixSentinel"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Configure keymap in X11
services = {
# apcupsd = {
# enable = true;
# configText = ''
# UPSTYPE usb
# NISIP 127.0.0.1
# '';
# };
xserver = {
layout = "us";
xkbVariant = "";
};
};
# power.ups = {
# enable = true;
# mode = "netserver";
# ups."rack_ups" = {
# driver = "usbhid-ups";
# port = "auto";
# description = "Server UPS";
# };
# users.upsmon = {
# passwordFile = "/path/to/upsmon.password";
# upsmon = "master";
# };
# upsmon.monitor."rack_ups".user = "upsmon";
# };
# Define a user account. Don't forget to set a password with passwd.
users.users.benson = {
isNormalUser = true;
description = "Benson Chu";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
users.users.nshields = {
isNormalUser = true;
description = "Nikolai Shields";
packages = with pkgs; [];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA8O6W8B0w4JdCl+1AoHEQ861gVPkPxH0FWU1tM3JVxb"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOjlyVh1/GW3KTdGnzSDP6oii13NLIk61v6FFKuRcvz/"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINX5/yQ/mXI/qqWHWd0+lNt6rBnhDA9p5YgMBmfp3Xtk"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKtQOHXIfltnEVMxgHlxgUNB/o6Bey6vdMWtwSfo+U4q"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG90xfsjQSCH/nKyXlBujpJshZHb9yWzqDH8fLKKl9T2"
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -8,31 +8,35 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/88db2bfd-c26f-46c0-9772-a6646aa79210"; { device = "/dev/disk/by-uuid/479d8408-64ec-49d8-aeb3-486b0ac38f8a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7A70-B992"; { device = "/dev/disk/by-uuid/0599-A351";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ ]; swapDevices =
[ { device = "/dev/disk/by-uuid/451811a1-9038-4c41-be53-e7f5f547d0dc"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s21f0u2u2i5.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo2.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -0,0 +1,3 @@
{ inputs, config, pkgs, lib, ... }:
{
}

View file

@ -0,0 +1,22 @@
{
"bash-config": {
"cargoLocks": null,
"date": "2024-07-13",
"extract": null,
"name": "bash-config",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "pestctrl",
"repo": "bash-config",
"rev": "f88071e92523a271dd553a20e60c8afaaf2dae0b",
"sha256": "sha256-+gQ28icbsv2+Jmxvm02OYWKCuFqtUoAdjDmWt3YgjKI=",
"type": "github"
},
"version": "f88071e92523a271dd553a20e60c8afaaf2dae0b"
}
}

View file

@ -0,0 +1,16 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
{
bash-config = {
pname = "bash-config";
version = "f88071e92523a271dd553a20e60c8afaaf2dae0b";
src = fetchFromGitHub {
owner = "pestctrl";
repo = "bash-config";
rev = "f88071e92523a271dd553a20e60c8afaaf2dae0b";
fetchSubmodules = false;
sha256 = "sha256-+gQ28icbsv2+Jmxvm02OYWKCuFqtUoAdjDmWt3YgjKI=";
};
date = "2024-07-13";
};
}

5
nvfetch/nvfetcher.toml Normal file
View file

@ -0,0 +1,5 @@
[bash-config]
src.git = "https://github.com/pestctrl/bash-config"
src.branch = "master"
# fetch.git = "https://github.com/pestctrl/bash-config"
fetch.github = "pestctrl/bash-config"

1
res/xkb/set.sh Normal file
View file

@ -0,0 +1 @@
setxkbmap -I. neo_dvorak -option grp:ctrls_toggle -print | xkbcomp -I. - $DISPLAY

View file

@ -0,0 +1,67 @@
partial alphanumeric_keys
xkb_symbols "neo_dvorak_base" {
include "de(neo_base)"
key.type[Group1] = "EIGHT_LEVEL_WITH_LEVEL5_LOCK";
key <AD01> { [ apostrophe, quotedbl, NoSymbol, Greek_eta, NoSymbol, NoSymbol, U2135, NoSymbol ] };
key <AD02> { [ comma, less, NoSymbol, U03F1, NoSymbol, NoSymbol, U21D2, NoSymbol ] };
key <AD03> { [ period, greater, NoSymbol, U03D1, NoSymbol, NoSymbol, U21A6, NoSymbol ] };
key <AD11> { [ slash, question, NoSymbol, NoSymbol, NoSymbol, NoSymbol, union, NoSymbol ] };
key <AD12> { [ equal, plus, dead_stroke, dead_psili, dead_doubleacute, NoSymbol, dead_breve, NoSymbol] };
key <AC11> { [ minus, underscore, NoSymbol, U2011, NoSymbol, NoSymbol, hyphen, NoSymbol ] };
key <AB01> { [ semicolon, colon, NoSymbol, U03F5, NoSymbol, NoSymbol, intersection, NoSymbol ] };
key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK";
key <AE11> { [ sharp, U1E9E, NoSymbol, Greek_finalsmallsigma, NoSymbol, NoSymbol, jot, NoSymbol ] };
key <AD04> { [ p, P, NoSymbol, Greek_pi, NoSymbol, NoSymbol, Greek_PI, NoSymbol ] };
key <AD05> { [ y, Y, NoSymbol, Greek_upsilon, NoSymbol, NoSymbol, nabla, NoSymbol ] };
key <AD06> { [ f, F, NoSymbol, Greek_phi, NoSymbol, NoSymbol, Greek_PHI, NoSymbol ] };
key <AD07> { [ g, G, NoSymbol, Greek_gamma, NoSymbol, NoSymbol, Greek_GAMMA, NoSymbol ] };
key <AD08> { [ c, C, NoSymbol, Greek_chi, NoSymbol, NoSymbol, U2102, NoSymbol ] };
key <AD09> { [ r, R, NoSymbol, Greek_rho, NoSymbol, NoSymbol, U211D, NoSymbol ] };
key <AD10> { [ l, L, NoSymbol, Greek_lambda, NoSymbol, NoSymbol, Greek_LAMBDA, NoSymbol ] };
key <AC01> { [ a, A, NoSymbol, Greek_alpha, NoSymbol, NoSymbol, U2200, NoSymbol ] };
key <AC02> { [ o, O, NoSymbol, Greek_omicron, NoSymbol, NoSymbol, elementof, NoSymbol ] };
key <AC03> { [ e, E, NoSymbol, Greek_epsilon, NoSymbol, NoSymbol, U2203, NoSymbol ] };
key <AC04> { [ u, U, NoSymbol, NoSymbol, NoSymbol, NoSymbol, includedin, NoSymbol ] };
key <AC05> { [ i, I, NoSymbol, Greek_iota, NoSymbol, NoSymbol, integral, NoSymbol ] };
key <AC06> { [ d, D, NoSymbol, Greek_delta, NoSymbol, NoSymbol, Greek_DELTA, NoSymbol ] };
key <AC07> { [ h, H, NoSymbol, Greek_psi, NoSymbol, NoSymbol, Greek_PSI, NoSymbol ] };
key <AC08> { [ t, T, NoSymbol, Greek_tau, NoSymbol, NoSymbol, partialderivative, NoSymbol ] };
key <AC09> { [ n, N, NoSymbol, Greek_nu, NoSymbol, NoSymbol, U2115, NoSymbol ] };
key <AC10> { [ s, S, NoSymbol, Greek_sigma, NoSymbol, NoSymbol, Greek_SIGMA, NoSymbol ] };
key <AB02> { [ q, Q, NoSymbol, U03D5, NoSymbol, NoSymbol, U211A, NoSymbol ] };
key <AB03> { [ j, J, NoSymbol, Greek_theta, NoSymbol, NoSymbol, Greek_THETA, NoSymbol ] };
key <AB04> { [ k, K, NoSymbol, Greek_kappa, NoSymbol, NoSymbol, multiply, NoSymbol ] };
key <AB05> { [ x, X, NoSymbol, Greek_xi, NoSymbol, NoSymbol, Greek_XI, NoSymbol ] };
key <AB06> { [ b, B, NoSymbol, Greek_beta, NoSymbol, NoSymbol, U21D0, NoSymbol ] };
key <AB07> { [ m, M, NoSymbol, Greek_mu, NoSymbol, NoSymbol, ifonlyif, NoSymbol ] };
key <AB08> { [ w, W, NoSymbol, Greek_omega, NoSymbol, NoSymbol, Greek_OMEGA, NoSymbol ] };
key <AB09> { [ v, V, NoSymbol, NoSymbol, NoSymbol, NoSymbol, radical, NoSymbol ] };
key <AB10> { [ z, Z, NoSymbol, Greek_zeta, NoSymbol, NoSymbol, U2124, NoSymbol ] };
key <AE01> { [ 1, exclam, onesuperior, onesubscript, ordfeminine, NoSymbol, notsign, NoSymbol ] };
key <AE02> { [ 2, at, twosuperior, twosubscript, masculine, NoSymbol, logicalor, NoSymbol ] };
key <AE03> { [ 3, numbersign, threesuperior, threesubscript, numerosign, NoSymbol, logicaland, NoSymbol ] };
key <AE04> { [ 4, dollar, U203A, femalesymbol, NoSymbol, NoSymbol, U22A5, NoSymbol ] };
key <AE05> { [ 5, percent, U2039, malesymbol, periodcentered, NoSymbol, U2221, NoSymbol ] };
key <AE06> { [ 6, asciicircum, cent, U26A5, sterling, NoSymbol, U2225, NoSymbol ] };
key <AE07> { [ 7, ampersand, yen, U03F0, currency, NoSymbol, rightarrow, NoSymbol ] };
key <AE08> { [ 8, asterisk, singlelowquotemark, U27E8, Tab, ISO_Left_Tab, U221E, NoSymbol ] };
key <AE09> { [ 9, parenleft, leftsinglequotemark, U27E9, KP_Divide, KP_Divide, variation, NoSymbol ] };
key <AE10> { [ 0, parenright, rightsinglequotemark, zerosubscript, KP_Multiply, KP_Multiply, emptyset, NoSymbol ] };
};
default partial alphanumeric_keys modifier_keys keypad_keys
xkb_symbols "neo_dvorak" {
include "neo_dvorak(neo_dvorak_base)"
name[Group1]= "English (Neo, DVORAK)";
include "shift(both_capslock)"
include "level3(caps_switch)"
include "level3(bksl_switch)"
include "level5(lsgt_switch_lock)"
include "level5(ralt_switch_lock)"
};

@ -0,0 +1 @@
Subproject commit 69ed4fe876144b2d8cd3fc7edeaa7a4c98b0616d

63
submodules/default.nix Normal file
View file

@ -0,0 +1,63 @@
{ inputs, config, pkgs, lib, ... }@args:
let
beets-cfg = config.my.beets-config;
tmux-cfg = config.my.tmux-config;
mkIfFlakeLoc = condition: errorMsg: value:
(lib.mkIf (condition &&
!(config.my.flakeLocation == null &&
(lib.warn ("Didn't set 'my.flakeLocation', " + errorMsg) true)))
value);
flakeSubmodules = "${config.my.flakeLocation}/submodules";
in
{
options = {
my.flakeLocation = lib.mkOption {
default = null;
description = "Location of nixos flake for config";
type = lib.types.nullOr lib.types.path;
};
my.beets-config.enable = lib.mkEnableOption "Enable beets configuration file";
my.tmux-config.enable = lib.mkEnableOption "Enable tmux configuration file";
};
config = {
xdg = {
configFile = {
"beets/config.yaml" = (mkIfFlakeLoc beets-cfg.enable
"I won't symlink beets' config.yaml into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/beets-config/config.yaml";
# Recursive only applies to directories. If false, do one
# symlink (which is the directory). Otherwise, do every file
# recursively
#
# recursive = true;
});
"tmux/tmux.conf" = (mkIfFlakeLoc tmux-cfg.enable
"I won't symlink tmux's tmux.conf into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/tmux-config/tmux.conf";
});
"wezterm/" = (mkIfFlakeLoc beets-cfg.enable
"I won't symlink wezterm config folder into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${config.my.flakeLocation}/submodules/wezterm-config/";
});
};
dataFile = {
"fonts/.ttf" = (mkIfFlakeLoc true
"I won't symlink chinese fonts into place"
{
source = config.lib.file.mkOutOfStoreSymlink
"${flakeSubmodules}/fonts/.ttf";
});
};
};
};
}

BIN
submodules/fonts/王漢宗中明體注音.ttf (Stored with Git LFS) Normal file

Binary file not shown.

@ -0,0 +1 @@
Subproject commit e5aa35f4f8ed5aad24844d56d2782ba924a38c8a

@ -0,0 +1 @@
Subproject commit dfaad48b33fdd89eef3f88da00bcfd13dcd11074