Compare commits

...

71 Commits

Author SHA1 Message Date
c4510abf88 refactor: simplify apps.colmena 2026-02-24 15:00:45 +01:00
0c4cdd2d1e feat: add golang module to work host 2026-02-24 14:47:27 +01:00
c1418e1402 chore: update lockfile 2026-02-24 14:47:27 +01:00
ab59c50520 fix: add wrapper util for home manager modules 2026-02-24 14:47:27 +01:00
624a56e948 fix: remove pnpm bash config 2026-02-24 14:47:27 +01:00
fb269c0265 fix: update 'work' host modules 2026-02-24 14:47:27 +01:00
2a07ecef61 feat: add 'nodejs' module (and use on 'work' host) 2026-02-24 14:47:27 +01:00
aa830fc795 feat: set up 'opencode' on work host 2026-02-24 14:47:27 +01:00
227a4fe53d feat: add 'vscode' module to work host 2026-02-24 14:47:27 +01:00
99dfe10ebf fix: add pdf support to pandoc module 2026-02-24 14:47:27 +01:00
c002741419 fix: remove default packages 2026-02-23 19:35:24 +01:00
448b3e5ef0 feat: set up 'tlp' for laptop mode on 'astyanax' 2026-02-23 18:15:19 +01:00
fafadf4034 feat: add notifier plugin to opencode 2026-02-23 18:11:29 +01:00
a5845fb847 fix :resolve 'andromache' syntax error 2026-02-23 18:11:24 +01:00
757d5e5c81 feat: set up 'storage' module 2026-02-22 16:43:15 +01:00
7b13880be2 fix: resolve nix build warnings 2026-02-22 16:40:20 +01:00
b895e85953 chore: disable syncthing module 2026-02-22 16:22:55 +01:00
ee3b95d986 fix: remove 'nix.settings' from 'hecuba' host 2026-02-22 16:20:52 +01:00
f5ed623d53 refactor: extract 'pandoc' module 2026-02-22 16:16:17 +01:00
d30fa3922b docs: update readme 2026-02-22 14:37:09 +01:00
1c20cc3326 feat: add basic 'gaming' module to 'andromache' 2026-02-22 14:08:43 +01:00
e7a36abd8c refactor: extract 'nvidia' module 2026-02-22 14:08:43 +01:00
635583669f refactor: add home 'allowedUnfree' option 2026-02-22 14:08:43 +01:00
dec73a74d8 refactor: remove unused 'colmena' input 2026-02-22 14:08:43 +01:00
ac23d88ca9 fix: deny opencode access to nix secret paths 2026-02-22 13:22:19 +01:00
85df2e7886 fix: temporarily disable 'ly' on desktop 2026-02-22 12:42:43 +01:00
7bb0f6fca4 feat: set up openscad lsp 2026-02-22 12:34:34 +01:00
486e273b97 fix: update 'ncspot' config 2026-02-22 12:34:05 +01:00
e7756a2959 chore: remove redundant 'update-vim' script 2026-02-22 12:19:39 +01:00
68fa0d8c89 chore: update lockfile 2026-02-22 12:16:35 +01:00
b9c7c099e7 fix: enable colortheme for firefox-based browsers 2026-02-22 12:16:07 +01:00
e62790f2c7 fix: update 'sb-pomo' script to match 'pomo' script 2026-02-22 12:11:58 +01:00
3d36eb305e docs: update readme 2026-02-22 00:28:39 +01:00
0952bfd827 chore: remove unused vpn module 2026-02-21 22:07:06 +01:00
c6671fea4e fix: add 'lib' as default module 2026-02-21 22:02:57 +01:00
55b3fde362 feat: add home manager audio module (pulsemixer) 2026-02-21 22:02:38 +01:00
18f2e4d93a fix: add 'lib' module to astyanax host 2026-02-21 17:49:01 +01:00
dbac0fd1b9 fix: color niri workspaces in waybar 2026-02-21 14:31:44 +01:00
26760d27a4 chore: update lockfile 2026-02-21 13:52:12 +01:00
eec5d54f59 chore: remove 'phone' config (skip 'nix-on-droid' for now) 2026-02-21 13:51:01 +01:00
1a0c85ec97 feat: set up 'eetion-02' raspberry pi host 2026-02-21 13:51:01 +01:00
0037ba2e54 flake.lock: Update
Flake lock file updates:

• Updated input 'firefox-addons':
    'gitlab:rycee/nur-expressions/c7794d3f46304de5234008c31b5b28a9d5709184?dir=pkgs/firefox-addons&narHash=sha256-0iGDl/ct3rW%2Bh6%2BsLq4RZaze/U/aQo2L5sLLuyjuVTk%3D' (2026-02-04)
  → 'gitlab:rycee/nur-expressions/65d59f814068d04e532cad2773d281e4951acd95?dir=pkgs/firefox-addons&narHash=sha256-%2BFHN9EthS%2BkHxnMoSDZEiGLoxwiIuij6ltK3aTmlLMA%3D' (2026-02-07)
• Updated input 'home-manager':
    'github:nix-community/home-manager/04e5203db66417d548ae1ff188a9f591836dfaa7?narHash=sha256-R1WFtIvp38hS9x63dnijdJw1KyIiy30KGea6e6N7LHs%3D' (2026-02-05)
  → 'github:nix-community/home-manager/6cee0821577643e0b34e2c5d9a90d0b1b5cdca70?narHash=sha256-cyxgVsNfHnJ4Zn6G1EOzfTXbjTy7Ds9zMOsZaX7VZWs%3D' (2026-02-07)
• Updated input 'nvim':
    'path:./dots/.config/nvim'
  → 'path:./dots/.config/nvim'
2026-02-21 13:51:00 +01:00
846112cd25 feat: add (but disable for now) uptime kuma module for 'hecuba' 2026-02-21 13:50:39 +01:00
6233bd0867 refactor: resolve warnings/errors in checks 2026-02-21 13:50:38 +01:00
6ba7fd28d5 fix: simplify syncthing module 2026-02-21 13:49:53 +01:00
c75724de68 feat: set up 'stylix' 2026-02-17 20:30:32 +01:00
04f33a92ea test: try taskwarrior hooks to track slots 2026-02-17 20:09:24 +01:00
3cc69cf68d fix: make 'colmena' available 2026-02-17 20:09:24 +01:00
5f5e5f8d4d test: see if this fixes auto upgrades 2026-02-17 19:53:51 +01:00
2c5a115bf9 feat: set up 'stylix' 2026-02-17 19:51:08 +01:00
323fbe15c8 feat: colorize 'kubectl' output 2026-02-17 18:08:21 +01:00
f8b0f62606 chore: gitignore '.pre-commit-config.yaml' 2026-02-16 20:14:11 +01:00
0a222ed225 feat(bluetooth): add 'mpris-proxy' service 2026-02-16 20:14:11 +01:00
a846849a80 fix: improve 'ai-tools' module (host-specific options) 2026-02-16 17:58:51 +01:00
092a4b47e6 chore: disable 'm_taskwarrior_d.nvim' 2026-02-16 17:58:50 +01:00
385fcb3ee1 refactor(nixGL): extract 'nixGL' wrapper 2026-02-16 17:58:41 +01:00
833d999027 feat: add 'bruno' module 2026-02-16 17:58:41 +01:00
0df8cdb354 chore: remove redundant backup files after nixification 2026-02-14 16:27:21 +01:00
23a89dab30 feat: add 'bak' script 2026-02-14 15:22:38 +01:00
7ae0c01e8d chore: update lockfile 2026-02-14 13:18:08 +01:00
a975d9fb6c fix: add 'ai-tools' module to 'andromache' 2026-02-14 02:02:31 +01:00
6684e2e7fe feat: set up git hooks 2026-02-07 14:25:39 +01:00
7f0726f443 fix: add ssh keys to agent for all hosts 2026-02-07 14:25:39 +01:00
cb8ac3b848 fix: resolve proxmark firmware flashing issues 2026-02-07 14:25:38 +01:00
3a1997f0c4 fix: set up ipv4 forwarding 2026-02-07 14:25:08 +01:00
a2a7c3c5a0 feat: add 'brightnessctl' to niri desktop 2026-02-07 14:25:08 +01:00
ce6940b048 flake.lock: Update
Flake lock file updates:

• Updated input 'firefox-addons':
    'gitlab:rycee/nur-expressions/4f827ff035c6ddc58d04c45abe5b777d356b926a?dir=pkgs/firefox-addons&narHash=sha256-9Sqq/hxq8ZDLRSzu%2Bedn0OfWG%2BFAPWFpwMKaJobeLec%3D' (2026-02-03)
  → 'gitlab:rycee/nur-expressions/c7794d3f46304de5234008c31b5b28a9d5709184?dir=pkgs/firefox-addons&narHash=sha256-0iGDl/ct3rW%2Bh6%2BsLq4RZaze/U/aQo2L5sLLuyjuVTk%3D' (2026-02-04)
• Updated input 'home-manager':
    'github:nix-community/home-manager/984708c34d3495a518e6ab6b8633469bbca2f77a?narHash=sha256-gj1yP3spUb1vGtaF5qPhshd2j0cg4xf51pklDsIm19Q%3D' (2026-02-01)
  → 'github:nix-community/home-manager/04e5203db66417d548ae1ff188a9f591836dfaa7?narHash=sha256-R1WFtIvp38hS9x63dnijdJw1KyIiy30KGea6e6N7LHs%3D' (2026-02-05)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/cb369ef2efd432b3cdf8622b0ffc0a97a02f3137?narHash=sha256-VKS4ZLNx4PNrABoB0L8KUpc1fE7CLpQXQs985tGfaCU%3D' (2026-02-02)
  → 'github:nixos/nixpkgs/00c21e4c93d963c50d4c0c89bfa84ed6e0694df2?narHash=sha256-AYqlWrX09%2BHvGs8zM6ebZ1pwUqjkfpnv8mewYwAo%2BiM%3D' (2026-02-04)
• Updated input 'nvim':
    'path:./dots/.config/nvim'
  → 'path:./dots/.config/nvim'
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f990b0a334e96d3ef9ca09d4bd92778b42fd84f9?narHash=sha256-NUVGVtYBTC96WhPh4Y3SVM7vf0o1z5W4uqRBn9v1pfo%3D' (2026-02-03)
  → 'github:Mic92/sops-nix/17eea6f3816ba6568b8c81db8a4e6ca438b30b7c?narHash=sha256-ktjWTq%2BD5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY%3D' (2026-02-03)
2026-02-07 14:25:08 +01:00
e21411c2f9 feat: add helm plugins declaratively 2026-02-07 14:20:28 +01:00
dcb525cce2 feat: set up 'music' module 2026-02-07 14:20:27 +01:00
dc630fe984 refactor: simplify keyboard module 2026-02-07 14:20:04 +01:00
ce90493654 feat: add 'direnv' module 2026-02-07 14:20:04 +01:00
108 changed files with 1703 additions and 1031 deletions

2
.gitignore vendored
View File

@@ -8,3 +8,5 @@ result
result-* result-*
nixos-efi-vars.fd nixos-efi-vars.fd
/.pre-commit-config.yaml

View File

@@ -1,15 +1,27 @@
# NixOS flake # NixOS flake
## Set up virtual machine ([`disko`](https://github.com/nix-community/disko/blob/master/docs/interactive-vm.md)) ## hosts
1. Build the virtual machine ### NixOS
```
nixos-rebuild switch --flake .#<hostname>
```
### home manager
```
home-manager switch --flake .#work
```
### virtual machines
``` ```
nix build -L '.#nixosConfigurations.vm.config.system.build.vmWithDisko' nix build -L '.#nixosConfigurations.vm.config.system.build.vmWithDisko'
```
2. Run the virtual machine
```
./result/bin/disko-vm ./result/bin/disko-vm
``` ```
## docs
* [deploy using colmena](./deploy/README.md)
* [SD installer images](./images/README.md)

View File

@@ -17,7 +17,7 @@ in
inputs.colmena.lib.makeHive { inputs.colmena.lib.makeHive {
meta = { meta = {
nixpkgs = import inputs.nixpkgs { nixpkgs = import inputs.nixpkgs {
system = "x86_64-linux"; localSystem = "x86_64-linux";
}; };
nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations; nodeNixpkgs = builtins.mapAttrs (_: v: v.pkgs) self.nixosConfigurations;

View File

@@ -103,13 +103,6 @@ if [[ -z "${SSH_CONNECTION}" ]]; then
fi fi
# }}} # }}}
# pnpm
export PNPM_HOME="/home/h/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# Codi # Codi
# Usage: codi [filetype] [filename] # Usage: codi [filetype] [filename]

32
dots/.bin/bak Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# back up a file by copying it to a new file with a .bak extension
# reference: https://askubuntu.com/questions/962489/is-there-any-way-to-create-backup-copy-of-a-file-without-type-its-name-twice
usage() {
echo "Usage: bak [-t|--timestamp] <file to back up>"
exit 1
}
timestamp=false
while [[ $# -gt 0 ]]; do
case $1 in
-t|--timestamp)
timestamp=true
shift
;;
*)
break
;;
esac
done
[ $# -eq 1 ] || usage
if $timestamp; then
date="$(date +%Y-%m-%d_%H-%M-%S)"
cp -vpn "$1"{,."$date".bak}
else
cp -vpn "$1"{,.bak}
fi

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Back up my $HOME folder to OneDrive using `restic`.
#
# Adds extra flags needed for using `rclone` with sharepoint WebDav I.e. add
# `--ignore-size --ignore-checksum --update` to the default `rclone.args`.
#
# Select directory in repo using -r rclone:<repo>:<directory>
#
# Runs `backup` command on $HOME and ignore what is listed in `.resticexclude`
#
# ```/etc/restic-env
# export B2_ACCOUNT_ID=
# export B2_ACCOUNT_KEY=
# ```
#
# `restic -r b2:desktop-arch init`
source /etc/restic-env
restic -r "$RESTIC_REPOSITORY:$HOSTNAME" backup \
--tag "hektor" \
--one-file-system \
--files-from="$HOME/.resticinclude" \
--exclude-file="$HOME/.resticexclude" \
--exclude-if-present=".nobackup" \
--verbose=3

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
[ -f "/tmp/pomo" ] && cat /tmp/pomo || echo "" [ -f "/home/h/.local/share/pomo" ] && cat /home/h/.local/share/pomo || echo ""

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env bash
# Tiny Vim update helper
nvim +PlugUpgrade +PlugUpdate +CocUpdate

View File

@@ -163,5 +163,4 @@ map cmd+q
#: }}} #: }}}
include ./themes/zenwritten_dark.conf
include ./nvim.conf include ./nvim.conf

View File

@@ -1,49 +0,0 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_dark
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_dark.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #BBBBBB
background #191919
selection_foreground #BBBBBB
selection_background #404040
# Cursor colors
cursor #C9C9C9
cursor_text_color #191919
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #BBBBBB
active_tab_background #65435E
inactive_tab_foreground #BBBBBB
inactive_tab_background #303030
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #191919
color8 #3D3839
# red
color1 #DE6E7C
color9 #E8838F
# green
color2 #819B69
color10 #8BAE68
# yellow
color3 #B77E64
color11 #D68C67
# blue
color4 #6099C0
color12 #61ABDA
# magenta
color5 #B279A7
color13 #CF86C1
# cyan
color6 #66A5AD
color14 #65B8C1
# white
color7 #BBBBBB
color15 #8E8E8E
# You can set the remaining 240 colors as color16 to color255.

View File

@@ -1,49 +0,0 @@
# This file is auto-generated by shipwright.nvim
# vim:ft=kitty
## name: zenwritten_light
## author: Michael Chris Lopez
## license: MIT
## upstream: https://github.com/mcchrish/zenbones.nvim/raw/main/extras/kitty/zenwritten_light.conf
## blurb: A zenbones variant with zero hue and saturation.
foreground #353535
background #EEEEEE
selection_foreground #353535
selection_background #D7D7D7
# Cursor colors
cursor #353535
cursor_text_color #EEEEEE
# URL underline color when hovering with mouse
# kitty window border colors
# OS Window titlebar colors
# Tab bar colors
active_tab_foreground #353535
active_tab_background #DEB9D6
inactive_tab_foreground #353535
inactive_tab_background #CFCFCF
# Colors for marks (marked text in the terminal)
# The basic 16 colors
# black
color0 #EEEEEE
color8 #C6C3C3
# red
color1 #A8334C
color9 #94253E
# green
color2 #4F6C31
color10 #3F5A22
# yellow
color3 #944927
color11 #803D1C
# blue
color4 #286486
color12 #1D5573
# magenta
color5 #88507D
color13 #7B3B70
# cyan
color6 #3B8992
color14 #2B747C
# white
color7 #353535
color15 #5C5C5C
# You can set the remaining 240 colors as color16 to color255.

View File

@@ -1,5 +1,6 @@
default_keybindings = false default_keybindings = false
flip_status_indicators = true flip_status_indicators = true
library_tabs = ["tracks", "albums", "artists", "playlists", "browse"] # remove podcasts tab
[keybindings] [keybindings]
"Enter" = "play" "Enter" = "play"
@@ -24,11 +25,10 @@ flip_status_indicators = true
"c" = "clear" "c" = "clear"
"=" = "volup 1" "=" = "volup 1"
"-" = "voldown 1" "-" = "voldown 1"
"/" = "focus search"
"Q" = "focus queue"
"L" = "focus library"
"1" = "focus queue" "1" = "focus queue"
"2" = "focus library" "2" = "focus search"
"3" = "focus library"
"4" = "focus cover"
"h" = "move left 1" "h" = "move left 1"
"j" = "move down 1" "j" = "move down 1"
"k" = "move up 1" "k" = "move up 1"
@@ -41,26 +41,5 @@ flip_status_indicators = true
"Y" = "share selected" "Y" = "share selected"
"U" = "update" "U" = "update"
[theme]
primary="#aaaaaa"
secondary="#555555"
background="1a1a1a"
title="#cccccc"
title_secondary="#aaaaaa"
playing="#ffffff"
playing_bg="1a1a1a"
playing_selected="#ffffff"
highlight="#cccccc"
highlight_bg="#333333"
error="#ffffff"
error_bg="#333333"
statusbar="#cccccc"
statusbar_bg="#1a1a1a"
statusbar_progress="#cccccc"
statusbar_progress_bg="#1a1a1a"
cmdline="#cccccc"
cmdline_bg="#1a1a1a"
search_match="#ffffff"
backend="pipe" backend="pipe"
notify="false" notify="false"

View File

@@ -1,3 +0,0 @@
username = 'hektor.misplon@gmail.com'
auth_type = 0
auth_data = 'KDEzMzc9PXRydTMpPzo='

View File

@@ -85,6 +85,7 @@ local servers = {
}, },
}, },
}, },
openscad_ls = {},
pyright = {}, pyright = {},
-- tsserver = {}, -- tsserver = {},
svelte = { svelte = {

View File

@@ -1,9 +1,9 @@
require("m_taskwarrior_d").setup() -- require("m_taskwarrior_d").setup()
--
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, { -- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("TWTask", { clear = true }), -- group = vim.api.nvim_create_augroup("TWTask", { clear = true }),
pattern = "*.md", -- pattern = "*.md",
callback = function() -- callback = function()
vim.cmd("TWSyncTasks") -- vim.cmd("TWSyncTasks")
end, -- end,
}) -- })

View File

@@ -42,11 +42,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1769578476, "lastModified": 1770584904,
"narHash": "sha256-4+KbiBcC6hQ3sh0UbPXjy6TOfLh9yhskRlfPzyZ2FH4=", "narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "48f8be4bdafccfa19ceaaf08071a15eca36fdb1d", "rev": "538fdde784d2909700d97a8ef307783b33a86fb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -73,11 +73,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1769740369, "lastModified": 1770843696,
"narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=", "narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6308c3b21396534d8aaeac46179c14c439a89b8a", "rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -119,22 +119,6 @@
"type": "github" "type": "github"
} }
}, },
"plugins-m-taskwarrior-d-nvim": {
"flake": false,
"locked": {
"lastModified": 1767960157,
"narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github"
},
"original": {
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"type": "github"
}
},
"plugins-mcphub-nvim": { "plugins-mcphub-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -206,7 +190,6 @@
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim", "plugins-helm-ls-nvim": "plugins-helm-ls-nvim",
"plugins-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",
"plugins-nvimkit-nvim": "plugins-nvimkit-nvim", "plugins-nvimkit-nvim": "plugins-nvimkit-nvim",
"plugins-shipwright-nvim": "plugins-shipwright-nvim", "plugins-shipwright-nvim": "plugins-shipwright-nvim",

View File

@@ -8,10 +8,10 @@
url = "github:rktjmp/shipwright.nvim"; url = "github:rktjmp/shipwright.nvim";
flake = false; flake = false;
}; };
plugins-m-taskwarrior-d-nvim = { # plugins-m-taskwarrior-d-nvim = {
url = "github:huantrinh1802/m_taskwarrior_d.nvim"; # url = "github:huantrinh1802/m_taskwarrior_d.nvim";
flake = false; # flake = false;
}; # };
plugins-beancount-nvim = { plugins-beancount-nvim = {
url = "github:polarmutex/beancount.nvim"; url = "github:polarmutex/beancount.nvim";
flake = false; flake = false;
@@ -37,7 +37,6 @@
outputs = outputs =
{ {
self,
nixpkgs, nixpkgs,
nixCats, nixCats,
... ...
@@ -50,7 +49,7 @@
mkDependencyOverlays = system: [ mkDependencyOverlays = system: [
(utils.standardPluginOverlay inputs) (utils.standardPluginOverlay inputs)
(final: prev: { (_final: _prev: {
mcp-hub = inputs.mcp-hub.packages.${system}.default; mcp-hub = inputs.mcp-hub.packages.${system}.default;
}) })
]; ];
@@ -164,7 +163,7 @@
kitty-scrollback-nvim kitty-scrollback-nvim
fidget-nvim fidget-nvim
rustaceanvim rustaceanvim
pkgs.neovimPlugins.m-taskwarrior-d-nvim # pkgs.neovimPlugins.m-taskwarrior-d-nvim
claude-code-nvim claude-code-nvim
]; ];
}; };

View File

@@ -2,10 +2,10 @@ local autocmd = vim.api.nvim_create_autocmd
autocmd("BufNewFile", { autocmd("BufNewFile", {
pattern = "shell.nix", pattern = "shell.nix",
command = "0r ~/.config/nvim/skeletons/shell.nix", command = "0r ~/.config/nvim/skeletons/shell.nix.skeleton",
}) })
autocmd("BufNewFile", { autocmd("BufNewFile", {
pattern = "flake.nix", pattern = "flake.nix",
command = "0r ~/.config/nvim/skeletons/flake.nix", command = "0r ~/.config/nvim/skeletons/flake.nix.skeleton",
}) })

View File

@@ -1 +0,0 @@
set -g status-style bg=default

View File

@@ -1 +1 @@
set -g status-style bg=blue,fg=black; set -g status-style bg=colour12,fg=colour0

View File

@@ -1,22 +0,0 @@
# This file is based on the one provided by shipwright.nvim
set -g @FG '#dddddd'
set -g @BG '#111111'
set -g status-left ' #[fg=#{@FG},bold]#{s/root//:client_key_table} '
set -g status-right '#[fg=#{@FG},bold] [#S]#[fg=#{@FG},bold] [%d/%m] #[fg=#{@FG},bold][%I:%M%p] '
set -g status-style fg='#{@FG}',bg='#{@BG}'
set -g window-status-current-style fg='#{@FG}',bg='#{@BG}',bold
set -g pane-border-style fg='#{@FG}'
set -g pane-active-border-style fg='#{@FG}'
set -g message-style fg='#{@FG}',bg='#{@FG}'
set -g display-panes-active-colour '#{@FG}'
set -g display-panes-colour '#{@FG}'
set -g clock-mode-colour '#{@FG}'
set -g mode-style fg='#{@FG}',bg='#{@FG}'

View File

@@ -1,22 +0,0 @@
# This file is based on the one provided by shipwright.nvim
set -g @FG '#111111'
set -g @BG '#dddddd'
set -g status-left ' #[fg=#{@FG},bold]#{s/root//:client_key_table} '
set -g status-right '#[fg=#{@FG},bold] [#S]#[fg=#{@FG},bold] [%d/%m] #[fg=#{@FG},bold][%I:%M%p] '
set -g status-style fg='#{@FG}',bg='#{@BG}'
set -g window-status-current-style fg='#{@FG}',bg='#{@BG}',bold
set -g pane-border-style fg='#{@FG}'
set -g pane-active-border-style fg='#{@FG}'
set -g message-style fg='#{@FG}',bg='#{@FG}'
set -g display-panes-active-colour '#{@FG}'
set -g display-panes-colour '#{@FG}'
set -g clock-mode-colour '#{@FG}'
set -g mode-style fg='#{@FG}',bg='#{@FG}'

View File

@@ -68,18 +68,7 @@ set -g status-left '#h '
set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d' set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S %p %Y-%m-%d'
%endif %endif
# theming set -g default-terminal "tmux-256color"
%if "#{==:#{host},desktop-arch}"
set -g default-terminal "tmux-256color"
setw -g window-status-style fg=colour244,bg=default
setw -g window-status-current-style fg=colour232,bg=default,bold
set -g message-style fg=colour232,bg=default
setw -g clock-mode-colour colour235
set -g status-style bg=default
set -g pane-border-style fg=#cccccc
set -g pane-active-border-style fg=#555555
set -g message-style bg=#cccccc,fg=#000000
%endif
set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.ssh.conf" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.regular.conf"' set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.ssh.conf" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.regular.conf"'

View File

@@ -1 +0,0 @@
set -g status-style bg=default

3
dots/.gitignore vendored
View File

@@ -84,6 +84,9 @@ dkms.conf
# Dotenv # Dotenv
.env .env
.envrc
.direnv/
.pre-commit-config.yaml
# Prevent module files from being ignored (e.g. NestJS) # Prevent module files from being ignored (e.g. NestJS)
!*.module* !*.module*

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python3
import sys
import json
SLOTS_FILE = "/home/h/.local/share/task/add_slots"
def get_slots():
try:
with open(SLOTS_FILE, "r") as f:
return int(f.read().strip())
except:
return 0
slots = get_slots()
if slots <= 0:
print(f"Cannot add task: No slots available (0/{slots}).")
print("Delete or complete a task first to earn an add slot.")
sys.exit(1)
with open(SLOTS_FILE, "w") as f:
f.write(str(slots - 1))
print(f"Task added. Slots remaining: {slots - 1}")
for line in sys.stdin:
task = json.loads(line)
print(json.dumps(task))
sys.exit(0)

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
import sys
import json
SLOTS_FILE = "/home/h/.local/share/task/add_slots"
def get_slots():
try:
with open(SLOTS_FILE, "r") as f:
return int(f.read().strip())
except:
return 0
data = sys.stdin.read().strip().split("\n")
if len(data) < 2:
for line in data:
if line:
print(line)
sys.exit(0)
old_task = json.loads(data[0])
new_task = json.loads(data[1])
was_pending = old_task.get("status") == "pending"
is_not_pending = new_task.get("status") in ("completed", "deleted")
if was_pending and is_not_pending:
slots = get_slots() + 1
with open(SLOTS_FILE, "w") as f:
f.write(str(slots))
print(f"Slot earned! Total slots: {slots}")
print(json.dumps(new_task))
sys.exit(0)

View File

@@ -1,44 +0,0 @@
# Restic ignore
# General
.trash
Trash
.cache
cache
Cache
CachedData
CachedExtension
CacheStorage
__pycache__
GPUCache
ShaderCache
build
.git
node_modules
venv
env
# Specifics
$HOME/.android
$HOME/.atom
$HOME/.build
$HOME/.cabal
$HOME/.cargo
$HOME/.conda
$HOME/.config/BraveSoftware/Brave-Browser/Default/Local Storage
$HOME/.config/BraveSoftware/Brave-Browser/Default/Local Extension Settings
$HOME/.config/nvm/versions
$HOME/.config/devcert
$HOME/.espressif
$HOME/.local/share/torbrowser
$HOME/.mozilla
$HOME/.nvm
$HOME/.npm
$HOME/.nuget
$HOME/.yarn
$HOME/.config/yarn
$HOME/doc/disk-images
$HOME/.stremio-server
$HOME/Games
!$HOME/Games/*/drive_c/users/h/AppData
!$HOME/Games/rhino

View File

@@ -1,3 +0,0 @@
/etc
/boot
/home

549
flake.lock generated
View File

@@ -1,5 +1,73 @@
{ {
"nodes": { "nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1755819240,
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1765809053,
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1760703920,
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
"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"
}
},
"colmena": { "colmena": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -53,11 +121,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1770091431, "lastModified": 1771732978,
"narHash": "sha256-9Sqq/hxq8ZDLRSzu+edn0OfWG+FAPWFpwMKaJobeLec=", "narHash": "sha256-o7gZh/eXFkEEmzwlBdIbgCJhmdlqQhOhVjudqgsIefg=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "4f827ff035c6ddc58d04c45abe5b777d356b926a", "rev": "18226106e18bc40cce99d436ee741a946f1888f6",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -67,6 +135,22 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1764873433,
"narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -83,6 +167,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@@ -105,6 +205,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1767609335,
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
@@ -138,6 +259,84 @@
"type": "github" "type": "github"
} }
}, },
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1771857445,
"narHash": "sha256-NCrhxU9wq5+4jQG1fvRbyTnH8GSbH6LovreVoH2fOL4=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "3d7a52f678227930ab089f5d9b384f2d50f7d534",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"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"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"host": "gitlab.gnome.org",
"lastModified": 1767737596,
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
"type": "gitlab"
},
"original": {
"host": "gitlab.gnome.org",
"owner": "GNOME",
"ref": "gnome-49",
"repo": "gnome-shell",
"type": "gitlab"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -145,11 +344,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769978395, "lastModified": 1771851181,
"narHash": "sha256-gj1yP3spUb1vGtaF5qPhshd2j0cg4xf51pklDsIm19Q=", "narHash": "sha256-gFgE6mGUftwseV3DUENMb0k0EiHd739lZexPo5O/sdQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "984708c34d3495a518e6ab6b8633469bbca2f77a", "rev": "9a4b494b1aa1b93d8edf167f46dc8e0c0011280c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -177,29 +376,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": "nmd",
"nmt": "nmt"
},
"locked": {
"lastModified": 1705252799,
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -221,34 +397,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-on-droid": {
"inputs": {
"home-manager": [
"home-manager"
],
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-docs": "nixpkgs-docs",
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd_2"
},
"locked": {
"lastModified": 1720396533,
"narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nix-secrets": { "nix-secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -269,11 +417,11 @@
}, },
"nixCats": { "nixCats": {
"locked": { "locked": {
"lastModified": 1769578476, "lastModified": 1770584904,
"narHash": "sha256-4+KbiBcC6hQ3sh0UbPXjy6TOfLh9yhskRlfPzyZ2FH4=", "narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nixCats-nvim", "repo": "nixCats-nvim",
"rev": "48f8be4bdafccfa19ceaaf08071a15eca36fdb1d", "rev": "538fdde784d2909700d97a8ef307783b33a86fb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -305,11 +453,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1769302137, "lastModified": 1771423359,
"narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=", "narHash": "sha256-yRKJ7gpVmXbX2ZcA8nFi6CMPkJXZGjie2unsiMzj3Ig=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8", "rev": "740a22363033e9f1bb6270fbfb5a9574067af15b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -321,11 +469,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1770019141, "lastModified": 1771369470,
"narHash": "sha256-VKS4ZLNx4PNrABoB0L8KUpc1fE7CLpQXQs985tGfaCU=", "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cb369ef2efd432b3cdf8622b0ffc0a97a02f3137", "rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -335,38 +483,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-docs": {
"locked": {
"lastModified": 1705957679,
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1743689281, "lastModified": 1743689281,
@@ -383,58 +499,29 @@
"type": "github" "type": "github"
} }
}, },
"nmd": { "nur": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_2": {
"inputs": { "inputs": {
"nixpkgs": [ "flake-parts": [
"nix-on-droid", "stylix",
"nixpkgs-docs" "flake-parts"
], ],
"scss-reset": "scss-reset" "nixpkgs": [
"stylix",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1705050560, "lastModified": 1767810917,
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=", "narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=",
"owner": "~rycee", "owner": "nix-community",
"repo": "nmd", "repo": "NUR",
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3", "rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4",
"type": "sourcehut" "type": "github"
}, },
"original": { "original": {
"owner": "~rycee", "owner": "nix-community",
"repo": "nmd", "repo": "NUR",
"type": "sourcehut" "type": "github"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
} }
}, },
"nvim": { "nvim": {
@@ -446,7 +533,6 @@
], ],
"plugins-beancount-nvim": "plugins-beancount-nvim", "plugins-beancount-nvim": "plugins-beancount-nvim",
"plugins-helm-ls-nvim": "plugins-helm-ls-nvim", "plugins-helm-ls-nvim": "plugins-helm-ls-nvim",
"plugins-m-taskwarrior-d-nvim": "plugins-m-taskwarrior-d-nvim",
"plugins-mcphub-nvim": "plugins-mcphub-nvim", "plugins-mcphub-nvim": "plugins-mcphub-nvim",
"plugins-nvimkit-nvim": "plugins-nvimkit-nvim", "plugins-nvimkit-nvim": "plugins-nvimkit-nvim",
"plugins-shipwright-nvim": "plugins-shipwright-nvim", "plugins-shipwright-nvim": "plugins-shipwright-nvim",
@@ -494,22 +580,6 @@
"type": "github" "type": "github"
} }
}, },
"plugins-m-taskwarrior-d-nvim": {
"flake": false,
"locked": {
"lastModified": 1767960157,
"narHash": "sha256-ov0qi4LhIlwqrBzSbTJ6APC5qjl2d/vlKWJfW5ZiDrg=",
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"rev": "107247387cd81823046bc2b8e71150c8edf041d3",
"type": "github"
},
"original": {
"owner": "huantrinh1802",
"repo": "m_taskwarrior_d.nvim",
"type": "github"
}
},
"plugins-mcphub-nvim": { "plugins-mcphub-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -579,30 +649,15 @@
"colmena": "colmena", "colmena": "colmena",
"disko": "disko", "disko": "disko",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-on-droid": "nix-on-droid",
"nix-secrets": "nix-secrets", "nix-secrets": "nix-secrets",
"nixgl": "nixgl", "nixgl": "nixgl",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nvim": "nvim", "nvim": "nvim",
"sops-nix": "sops-nix" "sops-nix": "sops-nix",
} "stylix": "stylix"
},
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -612,11 +667,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770110318, "lastModified": 1771735105,
"narHash": "sha256-NUVGVtYBTC96WhPh4Y3SVM7vf0o1z5W4uqRBn9v1pfo=", "narHash": "sha256-MJuVJeszZEziquykEHh/hmgIHYxUcuoG/1aowpLiSeU=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "f990b0a334e96d3ef9ca09d4bd92778b42fd84f9", "rev": "d7755d820f5fa8acf7f223309c33e25d4f92e74f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -641,6 +696,40 @@
"type": "github" "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_2",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1771787992,
"narHash": "sha256-Vg4bGwwenNYI8p3nJTl9FRyeIyrjATeZrZr+GyUSDrw=",
"owner": "danth",
"repo": "stylix",
"rev": "30054cca073b49b42a71289edec858f535b27fe9",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -655,6 +744,102 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1767710407,
"narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1767489635,
"narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1767488740,
"narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -3,6 +3,10 @@
nixpkgs = { nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable"; url = "github:nixos/nixpkgs/nixos-unstable";
}; };
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = { nixos-hardware = {
url = "github:NixOS/nixos-hardware/master"; url = "github:NixOS/nixos-hardware/master";
}; };
@@ -22,11 +26,6 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nixgl = { nixgl = {
url = "github:nix-community/nixGL"; url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -43,6 +42,10 @@
url = "github:zhaofengli/colmena"; url = "github:zhaofengli/colmena";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
@@ -50,8 +53,8 @@
self, self,
nixpkgs, nixpkgs,
home-manager, home-manager,
nix-on-droid,
nixgl, nixgl,
git-hooks,
... ...
}@inputs: }@inputs:
let let
@@ -61,6 +64,10 @@
hostDirNames = utils.dirNames ./hosts; hostDirNames = utils.dirNames ./hosts;
system = "x86_64-linux"; system = "x86_64-linux";
dotsPath = ./dots; dotsPath = ./dots;
gitHooks = import ./git-hooks.nix {
inherit nixpkgs git-hooks system;
src = ./.;
};
in in
{ {
nix.nixPath = [ nix.nixPath = [
@@ -70,23 +77,36 @@
(lib.genAttrs hostDirNames ( (lib.genAttrs hostDirNames (
host: host:
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = import ./hosts/${host}/system.nix; modules = [
modules = [ ./hosts/${host} ]; ./hosts/${host}
{ nixpkgs.hostPlatform = import ./hosts/${host}/system.nix; }
];
specialArgs = { specialArgs = {
inherit inputs outputs dotsPath; inherit inputs outputs dotsPath;
}; };
} }
)) ))
// { // {
sd-image-aarch64 = nixpkgs.lib.nixosSystem { sd-image-orange-pi-aarch64 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./images/sd-image-aarch64.nix ./images/sd-image-orange-pi-aarch64.nix
{ {
nixpkgs.crossSystem = { nixpkgs.buildPlatform = "x86_64-linux";
system = "aarch64-linux"; nixpkgs.hostPlatform = "aarch64-linux";
}; }
];
specialArgs = {
inherit inputs outputs dotsPath;
};
};
sd-image-raspberry-pi-aarch64 = nixpkgs.lib.nixosSystem {
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./images/sd-image-raspberry-pi-aarch64.nix
{
nixpkgs.buildPlatform = "x86_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";
} }
]; ];
specialArgs = { specialArgs = {
@@ -94,6 +114,7 @@
}; };
}; };
}; };
homeConfigurations = { homeConfigurations = {
work = home-manager.lib.homeManagerConfiguration { work = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { pkgs = import nixpkgs {
@@ -106,28 +127,25 @@
}; };
}; };
}; };
# https://github.com/nix-community/nix-on-droid/blob/master/templates/advanced/flake.nix
nixOnDroidConfigurations = {
pixel = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [ ./phone ];
extraSpecialArgs = {
inherit inputs outputs dotsPath;
};
pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [ nix-on-droid.overlays.default ];
};
home-manager-path = home-manager.outPath;
};
};
colmenaHive = import ./deploy/colmena.nix { apps.${system}.colmena = inputs.colmena.apps.${system}.default;
colmena = import ./deploy/colmena.nix {
inherit inherit
self self
inputs inputs
; ;
}; };
images.sd-image-aarch64 = self.nixosConfigurations.sd-image-aarch64.config.system.build.sdImage; checks.${system} = gitHooks.checks;
formatter.${system} = gitHooks.formatter;
devShells.${system} = gitHooks.devShells;
legacyPackages.${system} = {
sd-image-orange-pi-aarch64 =
self.nixosConfigurations.sd-image-orange-pi-aarch64.config.system.build.sdImage;
sd-image-raspberry-pi-aarch64 =
self.nixosConfigurations.sd-image-raspberry-pi-aarch64.config.system.build.sdImage;
};
}; };
} }

47
git-hooks.nix Normal file
View File

@@ -0,0 +1,47 @@
{
nixpkgs,
git-hooks,
system,
src,
}:
let
pkgs = nixpkgs.legacyPackages.${system};
pre-commit-check = git-hooks.lib.${system}.run {
inherit src;
hooks = {
nixfmt = {
enable = true;
package = pkgs.nixfmt;
};
statix.enable = true;
deadnix.enable = true;
};
};
in
{
checks = {
inherit pre-commit-check;
};
formatter =
let
inherit (pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script;
devShells = {
default =
let
inherit (pre-commit-check) shellHook enabledPackages;
in
pkgs.mkShell {
inherit shellHook;
buildInputs = enabledPackages;
};
};
}

View File

@@ -1,6 +1,5 @@
{ {
lib, lib,
inputs,
config, config,
pkgs, pkgs,
... ...
@@ -11,14 +10,20 @@ let
in in
{ {
imports = [ imports = [
../../modules
../../modules/ai-tools.nix
../../modules/audio
../../modules/cloud ../../modules/cloud
../../modules/comms ../../modules/comms
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/direnv
../../modules/3d ../../modules/3d
../../modules/git ../../modules/git
../../modules/k8s/k9s.nix ../../modules/k8s/k9s.nix
../../modules/kitty.nix ../../modules/kitty.nix
../../modules/music
../../modules/nvim.nix ../../modules/nvim.nix
../../modules/pandoc.nix
../../modules/ssh.nix ../../modules/ssh.nix
../../modules/taskwarrior.nix ../../modules/taskwarrior.nix
../../modules/keepassxc.nix ../../modules/keepassxc.nix
@@ -37,10 +42,12 @@ in
xdg.userDirs.createDirectories = false; xdg.userDirs.createDirectories = false;
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
ai-tools.opencode.enable = true;
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true; cloud.hetzner.enable = true;
comms.signal.enable = true; comms.signal.enable = true;
github.enable = true; github.enable = true;
pandoc.enable = true;
shell.bash = { shell.bash = {
enable = true; enable = true;

View File

@@ -9,16 +9,21 @@ let
in in
{ {
imports = [ imports = [
../../modules
../../modules/ai-tools.nix ../../modules/ai-tools.nix
../../modules/audio
../../modules/anki.nix ../../modules/anki.nix
../../modules/cloud ../../modules/cloud
../../modules/comms ../../modules/comms
../../modules/direnv
../../modules/desktop/niri ../../modules/desktop/niri
../../modules/git ../../modules/git
../../modules/k8s/k9s.nix ../../modules/k8s/k9s.nix
../../modules/kitty.nix ../../modules/kitty.nix
../../modules/music
../../modules/nfc ../../modules/nfc
../../modules/nvim.nix ../../modules/nvim.nix
../../modules/pandoc.nix
../../modules/ssh.nix ../../modules/ssh.nix
../../modules/taskwarrior.nix ../../modules/taskwarrior.nix
../../modules/keepassxc.nix ../../modules/keepassxc.nix
@@ -35,11 +40,13 @@ in
xdg.userDirs.createDirectories = false; xdg.userDirs.createDirectories = false;
xdg.userDirs.download = "${config.home.homeDirectory}/dl"; xdg.userDirs.download = "${config.home.homeDirectory}/dl";
ai-tools.opencode.enable = true;
browser.primary = "librewolf"; browser.primary = "librewolf";
cloud.hetzner.enable = true; cloud.hetzner.enable = true;
comms.signal.enable = true; comms.signal.enable = true;
github.enable = true; github.enable = true;
nfc.proxmark3.enable = true; nfc.proxmark3.enable = true;
pandoc.enable = true;
shell.bash = { shell.bash = {
enable = true; enable = true;

View File

@@ -6,17 +6,12 @@ with pkgs;
entr entr
feh feh
fzf fzf
haskellPackages.pandoc-crossref
htop htop
jq jq
nixfmt-rfc-style
nmap nmap
nodejs_24
nvimpager nvimpager
pandoc
parallel parallel
pass pass
pnpm
ripgrep ripgrep
silver-searcher silver-searcher
sops sops

View File

@@ -11,20 +11,31 @@ in
{ {
imports = [ imports = [
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
../../modules
../../modules/stylix.nix
../../modules/ai-tools.nix ../../modules/ai-tools.nix
../../modules/cloud ../../modules/cloud
../../modules/comms ../../modules/comms
../../modules/desktop/niri
../../modules/dconf.nix ../../modules/dconf.nix
../../modules/direnv
../../modules/docker ../../modules/docker
../../modules/git ../../modules/git
../../modules/go
../../modules/k8s ../../modules/k8s
../../modules/k9s.nix ../../modules/k8s/k9s.nix
../../modules/keepassxc.nix ../../modules/keepassxc.nix
../../modules/kitty.nix ../../modules/kitty.nix
../../modules/nvim.nix ../../modules/nvim.nix
../../modules/pandoc.nix
../../modules/browser ../../modules/browser
../../modules/shell ../../modules/shell
../../modules/music
../../modules/nodejs.nix
../../modules/taskwarrior.nix ../../modules/taskwarrior.nix
../../modules/bruno.nix
../../modules/pandoc.nix
../../modules/vscode.nix
]; ];
sops = { sops = {
@@ -37,14 +48,29 @@ in
taskwarrior_sync_encryption_secret = { }; taskwarrior_sync_encryption_secret = { };
anki_sync_user = { }; anki_sync_user = { };
anki_sync_key = { }; anki_sync_key = { };
opencode_api_key = { };
}; };
templates."taskrc.d/sync" = { templates = {
content = '' "taskrc.d/sync" = {
sync.server.url=${config.sops.placeholder.taskwarrior_sync_server_url} content = ''
sync.server.client_id=${config.sops.placeholder.taskwarrior_sync_server_client_id} sync.server.url=${config.sops.placeholder.taskwarrior_sync_server_url}
sync.encryption_secret=${config.sops.placeholder.taskwarrior_sync_encryption_secret} sync.server.client_id=${config.sops.placeholder.taskwarrior_sync_server_client_id}
''; sync.encryption_secret=${config.sops.placeholder.taskwarrior_sync_encryption_secret}
'';
};
"opencode/auth.json" = {
path = "${config.home.homeDirectory}/.local/share/opencode/auth.json";
content = ''
{
"zai-coding-plan": {
"type": "api",
"key": "${config.sops.placeholder.opencode_api_key}"
}
}
'';
};
}; };
}; };
@@ -66,8 +92,13 @@ in
cloud.azure.enable = true; cloud.azure.enable = true;
comms.signal.enable = true; comms.signal.enable = true;
comms.teams.enable = true; comms.teams.enable = true;
ai-tools = {
claude-code.enable = true;
opencode.enable = true;
};
github.enable = true; github.enable = true;
gitlab.enable = true; gitlab.enable = true;
pandoc.enable = true;
shell.bash.enable = true; shell.bash.enable = true;
starship.enable = true; starship.enable = true;

View File

@@ -1,40 +1,89 @@
{ {
lib,
config,
pkgs, pkgs,
... ...
}: }:
let
cfg = config.ai-tools;
rtk-version = "0.18.1";
in
{ {
config = { options.ai-tools = {
home.packages = with pkgs; [ claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
aider-chat opencode.enable = lib.mkEnableOption "opencode";
(pkgs.stdenv.mkDerivation {
name = "ccline";
src = pkgs.fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = with pkgs.lib; {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
# claude-code
# (config.lib.nixGL.wrap code-cursor)
# github-copilot-cli
mcp-nixos
opencode
];
}; };
config = lib.mkMerge [
(lib.mkIf cfg.claude-code.enable {
home.packages = with pkgs; [
claude-code
(pkgs.stdenv.mkDerivation {
name = "ccline";
src = pkgs.fetchurl {
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp ccline $out/bin/
chmod +x $out/bin/ccline
'';
meta = with pkgs.lib; {
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
homepage = "https://github.com/Haleclipse/CCometixLine";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
(pkgs.stdenv.mkDerivation {
name = "rtk-${rtk-version}";
version = rtk-version;
src = pkgs.fetchurl {
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
};
unpackPhase = ''
tar xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp rtk $out/bin/
chmod +x $out/bin/rtk
'';
meta = with pkgs.lib; {
description = "RTK - AI coding tool enhancer";
homepage = "https://www.rtk-ai.app";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
};
})
mcp-nixos
];
})
(lib.mkIf cfg.opencode.enable {
home.packages = with pkgs; [
opencode
];
home.file.".config/opencode/opencode.json".text = builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
permission = {
external_directory = {
"/run/secrets/" = "deny";
"~/.config/sops/age/keys.txt" = "deny";
};
};
plugin = [ "@mohak34/opencode-notifier@latest" ];
};
})
];
} }

View File

@@ -0,0 +1,5 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ pulsemixer ];
}

View File

@@ -1,7 +1,9 @@
{ {
config, config,
inputs, inputs,
lib,
pkgs, pkgs,
...
}: }:
let let
@@ -23,8 +25,10 @@ in
"extensions.autoDisableScopes" = 0; "extensions.autoDisableScopes" = 0;
}; };
extensions = { extensions = {
packages = with inputs.firefox-addons.packages.${pkgs.system}; [ force = true;
packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
duckduckgo-privacy-essentials duckduckgo-privacy-essentials
firefox-color
istilldontcareaboutcookies istilldontcareaboutcookies
libredirect libredirect
keepassxc-browser keepassxc-browser

View File

@@ -11,6 +11,13 @@
programs.firefox = { programs.firefox = {
enable = true; enable = true;
} }
// (import ./firefox-base.nix { inherit config inputs pkgs; }); // (import ./firefox-base.nix {
inherit
config
inputs
lib
pkgs
;
});
}; };
} }

View File

@@ -13,6 +13,13 @@
programs.librewolf = { programs.librewolf = {
enable = true; enable = true;
} }
// (import ./firefox-base.nix { inherit config inputs pkgs; }); // (import ./firefox-base.nix {
inherit
config
inputs
lib
pkgs
;
});
}; };
} }

7
home/modules/bruno.nix Normal file
View File

@@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
config = {
home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.bruno "--no-sandbox")) ];
};
}

View File

@@ -4,10 +4,9 @@
pkgs, pkgs,
... ...
}: }:
{ {
config = lib.mkIf config.comms.signal.enable { config = lib.mkIf config.comms.signal.enable {
home.packages = with pkgs; [ home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.signal-desktop "--no-sandbox")) ];
(if config.lib ? nixGL then config.lib.nixGL.wrap signal-desktop else signal-desktop)
];
}; };
} }

View File

@@ -7,8 +7,6 @@
{ {
config = lib.mkIf config.comms.teams.enable { config = lib.mkIf config.comms.teams.enable {
home.packages = with pkgs; [ home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.teams-for-linux "--no-sandbox")) ];
(if config.lib ? nixGL then config.lib.nixGL.wrap teams-for-linux else teams-for-linux)
];
}; };
} }

24
home/modules/default.nix Normal file
View File

@@ -0,0 +1,24 @@
{ config, lib, ... }:
{
options.nixgl.wrap = lib.mkOption {
type = lib.types.functionTo lib.types.package;
default = if config.lib ? nixGL then config.lib.nixGL.wrap else lib.id;
readOnly = true;
};
options.wrapApp = lib.mkOption {
type = lib.types.raw;
default =
pkg: flags:
if config.lib ? nixGL then
pkg.overrideAttrs (old: {
postInstall = (old.postInstall or "") + ''
wrapProgram $out/bin/${pkg.meta.mainProgram} --add-flags "${flags}"
'';
})
else
pkg;
readOnly = true;
};
}

View File

@@ -11,6 +11,7 @@
home = { home = {
file.".config/niri/config.kdl".source = ./config.kdl; file.".config/niri/config.kdl".source = ./config.kdl;
packages = with pkgs; [ packages = with pkgs; [
brightnessctl
wl-clipboard wl-clipboard
wlsunset wlsunset
]; ];

View File

@@ -0,0 +1,7 @@
{
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
}

View File

@@ -3,22 +3,9 @@
enable = true; enable = true;
settings = { settings = {
main = { main = {
font = "Iosevka Term SS08";
horizontal-pad = 0; horizontal-pad = 0;
vertical-pad = 0; vertical-pad = 0;
}; };
colors = {
background = "ccccccff";
text = "111111ff";
prompt = "ccccccff";
placeholder = "aaaaaaff";
input = "111111ff";
selection = "eeeeeeff";
selection-text = "111111ff";
selection-match = "333333ff";
counter = "111111ff";
border = "111111ff";
};
border = { border = {
width = 2; width = 2;
radius = 0; radius = 0;

View File

@@ -21,6 +21,6 @@
}; };
programs.gh.enable = config.github.enable; programs.gh.enable = config.github.enable;
home.packages = with pkgs; lib.optionals (config.gitlab.enable) [ glab ]; home.packages = lib.optionals config.gitlab.enable [ pkgs.glab ];
}; };
} }

View File

@@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
{
options.go = {
enable = lib.mkEnableOption "go language";
};
config = lib.mkIf config.go.enable {
home.packages = with pkgs; [
go
gopls
];
};
}

View File

@@ -7,12 +7,19 @@
k3d k3d
kubectl kubectl
kubernetes kubernetes
kubernetes-helm
kustomize kustomize
minikube minikube
opentofu opentofu
upbound upbound
]; ];
imports = [ ./k9s.nix ]; programs.kubecolor = {
enable = true;
enableAlias = true;
};
imports = [
./helm.nix
./k9s.nix
];
} }

15
home/modules/k8s/helm.nix Normal file
View File

@@ -0,0 +1,15 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(wrapHelm kubernetes-helm {
plugins = with kubernetes-helmPlugins; [
helm-diff
helm-git
helm-schema
helm-secrets
helm-unittest
];
})
];
}

View File

@@ -1,5 +1,3 @@
{ pkgs, ... }:
{ {
programs.keepassxc = { programs.keepassxc = {
enable = true; enable = true;

View File

@@ -1,23 +1,22 @@
{ pkgs, config, lib, dotsPath, ... }: {
pkgs,
config,
dotsPath,
...
}:
{ {
config = { config = {
home.packages = [
(if config.lib ? nixGL
then config.lib.nixGL.wrap pkgs.kitty
else pkgs.kitty)
];
programs.bash.shellAliases = { programs.bash.shellAliases = {
icat = "kitty +kitten icat"; icat = "kitty +kitten icat";
}; };
home.file = { programs.kitty = {
".config/kitty/kitty.conf".source = dotsPath + "/.config/kitty/kitty.conf"; enable = true;
".config/kitty/nvim.conf".source = dotsPath + "/.config/kitty/nvim.conf"; package = config.nixgl.wrap pkgs.kitty;
".config/kitty/themes/zenwritten_light.conf".source = extraConfig = builtins.readFile (dotsPath + "/.config/kitty/kitty.conf");
dotsPath + "/.config/kitty/themes/zenwritten_light.conf";
".config/kitty/themes/zenwritten_dark.conf".source =
dotsPath + "/.config/kitty/themes/zenwritten_dark.conf";
}; };
home.file.".config/kitty/nvim.conf".source = dotsPath + "/.config/kitty/nvim.conf";
}; };
} }

View File

@@ -0,0 +1,27 @@
{
dotsPath,
pkgs,
...
}:
let
spotifyWithWayland = pkgs.symlinkJoin {
name = "spotify";
paths = [ pkgs.spotify ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/spotify \
--add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland"
'';
};
in
{
home.packages = with pkgs; [
spotifyWithWayland
];
programs.ncspot = {
enable = true;
settings = builtins.fromTOML (builtins.readFile (dotsPath + "/.config/ncspot/config.toml"));
};
}

View File

@@ -15,7 +15,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = [ home.packages = [
pkgs.proxmark3 (pkgs.proxmark3.override { withGeneric = true; })
]; ];
}; };
} }

26
home/modules/nodejs.nix Normal file
View File

@@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}:
{
options.nodejs = {
enable = lib.mkEnableOption "nodejs (and related packages)";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.nodejs_24;
};
};
config = lib.mkIf config.nodejs.enable {
home.packages = with pkgs; [
config.nodejs.package
pnpm
yarn
biome
tsx
];
};
}

View File

@@ -3,7 +3,7 @@
{ {
config = { config = {
home.packages = [ home.packages = [
inputs.nvim.packages.${pkgs.system}.nvim inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
]; ];
}; };
} }

19
home/modules/pandoc.nix Normal file
View File

@@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
...
}:
{
options.pandoc = {
enable = lib.mkEnableOption "pandoc";
};
config = lib.mkIf config.pandoc.enable {
home.packages = with pkgs; [
haskellPackages.pandoc-crossref
pandoc
texliveSmall
];
};
}

View File

@@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
dotsPath, dotsPath,
... ...
}: }:

View File

@@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: }:
{ {

View File

@@ -18,20 +18,25 @@ in
enable = true; enable = true;
enableDefaultConfig = false; enableDefaultConfig = false;
matchBlocks = lib.genAttrs hostsWithKeys ( matchBlocks =
hostname: lib.genAttrs hostsWithKeys (
let hostname:
hostConfig = outputs.nixosConfigurations.${hostname}.config; let
publicHostname = hostConfig.ssh.publicHostname; hostConfig = outputs.nixosConfigurations.${hostname}.config;
targetUser = hostConfig.ssh.username; inherit (hostConfig.ssh) publicHostname username;
in in
{ {
host = hostname; host = hostname;
user = targetUser; user = username;
} }
// lib.optionalAttrs (publicHostname != "") { // lib.optionalAttrs (publicHostname != "") {
hostname = publicHostname; hostname = publicHostname;
} }
); )
// {
"*" = {
addKeysToAgent = "yes";
};
};
}; };
} }

45
home/modules/stylix.nix Normal file
View File

@@ -0,0 +1,45 @@
{
config,
inputs,
pkgs,
...
}:
let
theme = import ../../modules/stylix/theme.nix { inherit pkgs; };
in
{
imports = [ inputs.stylix.homeModules.stylix ];
stylix = {
enable = true;
inherit (theme)
polarity
base16Scheme
override
image
;
fonts = {
monospace = theme.monospaceFont;
serif = config.stylix.fonts.monospace;
sansSerif = config.stylix.fonts.monospace;
emoji = config.stylix.fonts.monospace;
};
targets = {
firefox = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
librewolf = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
gnome.enable = false;
gtk.enable = false;
kitty = {
variant256Colors = true;
};
nixvim.enable = false;
};
};
}

View File

@@ -39,6 +39,14 @@ in
".local/share/task/hooks/on-exit.sync.py" = { ".local/share/task/hooks/on-exit.sync.py" = {
source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py"; source = dotsPath + "/.local/share/task/hooks/on-exit.sync.py";
}; };
".local/share/task/hooks/on-add.limit.py" = {
source = dotsPath + "/.local/share/task/hooks/on-add.limit.py";
executable = true;
};
".local/share/task/hooks/on-modify.limit.py" = {
source = dotsPath + "/.local/share/task/hooks/on-modify.limit.py";
executable = true;
};
".local/share/task/scripts/sync-and-notify.sh" = { ".local/share/task/scripts/sync-and-notify.sh" = {
source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh"; source = dotsPath + "/.local/share/task/scripts/sync-and-notify.sh";
executable = true; executable = true;

View File

@@ -1,25 +1,19 @@
{ { pkgs, dotsPath, ... }:
pkgs,
dotsPath,
...
}:
{ {
config = { config = {
home.packages = with pkgs; [ home.packages = with pkgs; [
tmux
tmuxp tmuxp
reptyr reptyr
]; ];
programs.tmux = {
enable = true;
extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf");
};
home.file = { home.file = {
".config/tmux/tmux.conf".source = dotsPath + "/.config/tmux/tmux.conf";
".config/tmux/tmux.regular.conf".source = dotsPath + "/.config/tmux/tmux.regular.conf";
".config/tmux/themes/zenwritten_light.tmux".source =
dotsPath + "/.config/tmux/themes/zenwritten_light.tmux";
".config/tmux/themes/zenwritten_dark.tmux".source =
dotsPath + "/.config/tmux/themes/zenwritten_dark.tmux";
".config/tmux/hooks/tmux.ssh.conf".source = dotsPath + "/.config/tmux/hooks/tmux.ssh.conf"; ".config/tmux/hooks/tmux.ssh.conf".source = dotsPath + "/.config/tmux/hooks/tmux.ssh.conf";
".config/tmux/hooks/tmux.regular.conf".source = dotsPath + "/.config/tmux/hooks/tmux.regular.conf";
}; };
}; };
} }

7
home/modules/vscode.nix Normal file
View File

@@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
config = {
home.packages = [ (config.nixgl.wrap (config.wrapApp pkgs.vscode "--disable-gpu-sandbox")) ];
};
}

View File

@@ -1,57 +0,0 @@
[
{
"height": 16,
"spacing": 4,
"modules-left": ["niri/workspaces"],
"modules-right": [
"pulseaudio",
"memory",
"cpu",
"network",
"clock",
"battery",
],
"clock": {
"format": "W{:%V %d %b %H:%M}",
"tooltip-format": "{calendar}",
"format-alt": "{:%Y-%m-%d %H:%M:%S}",
},
"battery": {
"bat": "BAT0",
"adapter": "ADP1",
"interval": 5,
"full-at": 99,
"states": {
"good": 80,
"warning": 20,
"critical": 10,
},
"format": "{capacity}%--",
"format-charging": "{capacity}%++",
"format-plugged": "{capacity}%",
"format-alt": "{time} {power}W",
},
"pulseaudio": {
"format": "VOL {volume}%",
"format-muted": "muted",
"on-click": "pavucontrol",
},
"memory": {
"interval": 2,
"format": "RAM {percentage}%",
"format-alt": "RAM {used:0.1f}G/{total:0.1f}G",
},
"cpu": {
"interval": 2,
"format": "CPU {usage}%",
"format-alt": "CPU {avg_frequency}GHz",
},
"network": {
"interval": 5,
"format-wifi": "{ifname} {ipaddr} {essid}",
"format-ethernet": "{ifname} {ipaddr}",
"format-disconnected": "{ifname} disconnected",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
},
},
]

View File

@@ -1,8 +1,68 @@
{
lib,
...
}:
{ {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
settings = [
{
height = 16;
spacing = 4;
modules-left = [ "niri/workspaces" ];
modules-right = [
"pulseaudio"
"memory"
"cpu"
"network"
"clock"
"battery"
];
clock = {
format = "W{:%V %d %b %H:%M}";
tooltip-format = "{calendar}";
format-alt = "{:%Y-%m-%d %H:%M:%S}";
};
battery = {
bat = "BAT0";
adapter = "ADP1";
interval = 5;
full-at = 99;
states = {
good = 80;
warning = 20;
critical = 10;
};
format = "{capacity}%--";
format-charging = "{capacity}%++";
format-plugged = "{capacity}%";
format-alt = "{time} {power}W";
};
pulseaudio = {
format = "VOL {volume}%";
format-muted = "muted";
on-click = "pavucontrol";
};
memory = {
interval = 2;
format = "RAM {percentage}%";
format-alt = "RAM {used:0.1f}G/{total:0.1f}G";
};
cpu = {
interval = 2;
format = "CPU {usage}%";
format-alt = "CPU {avg_frequency}GHz";
};
network = {
interval = 5;
format-wifi = "{ifname} {ipaddr} {essid}";
format-ethernet = "{ifname} {ipaddr}";
format-disconnected = "{ifname} disconnected";
tooltip-format = "{ifname}: {ipaddr}/{cidr}";
};
}
];
style = lib.readFile ./style.css;
}; };
home.file.".config/waybar/config.jsonc".source = ./config.jsonc;
home.file.".config/waybar/style.css".source = ./style.css;
} }

View File

@@ -1,8 +1,4 @@
* { * {
font-family:
Iosevka Term SS08,
monospace;
font-size: 12px;
border-radius: 0px; border-radius: 0px;
} }
@@ -22,21 +18,22 @@ window#waybar.hidden {
} }
#workspaces button { #workspaces button {
color: @base07;
padding: 0; padding: 0;
background-color: transparent; background-color: transparent;
} }
#workspaces button:hover { #workspaces button:hover {
background: #000000; background: @base00;
} }
#workspaces button.focused, #workspaces button.focused,
#workspaces button.active { #workspaces button.active {
background-color: #111111; background-color: @base01;
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: #eb4d4b; background-color: @base08;
} }
#clock, #clock,
@@ -46,8 +43,8 @@ window#waybar.hidden {
#cpu, #cpu,
#network { #network {
padding: 0 4px; padding: 0 4px;
color: #ffffff; color: @base07;
background-color: #111111; background-color: @base01;
} }
#window, #window,

View File

@@ -1,11 +1,11 @@
{ {
lib, lib,
inputs, inputs,
outputs,
config, config,
pkgs, pkgs,
... ...
}: }:
let let
username = "h"; username = "h";
hostName = "andromache"; hostName = "andromache";
@@ -28,6 +28,7 @@ in
../../modules/desktops/niri ../../modules/desktops/niri
../../modules/backups ../../modules/backups
../../modules/bluetooth ../../modules/bluetooth
../../modules/gaming
../../modules/keyboard ../../modules/keyboard
(import ../../modules/networking { inherit hostName; }) (import ../../modules/networking { inherit hostName; })
../../modules/users ../../modules/users
@@ -35,9 +36,12 @@ in
../../modules/localization ../../modules/localization
../../modules/fonts ../../modules/fonts
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
../../modules/storage
../../modules/stylix
(import ../../modules/secrets { inherit lib inputs config; }) (import ../../modules/secrets { inherit lib inputs config; })
../../modules/docker ../../modules/docker
../../modules/syncthing ../../modules/syncthing
../../modules/nvidia
]; ];
home-manager.users.${username} = import ../../home/hosts/andromache { home-manager.users.${username} = import ../../home/hosts/andromache {
@@ -79,59 +83,24 @@ in
}; };
}; };
hardware = { hardware.cpu.intel.updateMicrocode = true;
cpu.intel.updateMicrocode = true;
graphics.enable = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
environment.systemPackages = [ environment.systemPackages = [
inputs.colmena.packages.${pkgs.system}.colmena inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena
]; ];
services = { services = {
xserver = { locate = {
videoDrivers = [ "nvidia" ]; enable = true;
package = pkgs.plocate;
}; };
openssh = { openssh = {
enable = true; enable = true;
harden = true; harden = true;
}; };
locate = {
enable = true;
package = pkgs.plocate;
};
};
my.syncthing = {
enable = true;
deviceNames = [
"boox"
"astyanax"
];
folders = {
readings = {
path = "/home/h/doc/readings";
id = "readings";
devices = [
{
device = "boox";
type = "receiveonly";
}
"astyanax"
];
};
};
}; };
networking = { networking = {

View File

@@ -4,7 +4,6 @@
{ {
config, config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }:

View File

@@ -1,7 +1,6 @@
{ {
lib, lib,
inputs, inputs,
outputs,
config, config,
pkgs, pkgs,
... ...
@@ -36,10 +35,11 @@ in
../../modules/localization ../../modules/localization
../../modules/fonts ../../modules/fonts
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
# ../../modules/vpn/wireguard.nix ../../modules/storage
../../modules/stylix
(import ../../modules/secrets { inherit lib inputs config; }) (import ../../modules/secrets { inherit lib inputs config; })
../../modules/docker ../../modules/docker
../../modules/syncthing ../../modules/nfc
]; ];
home-manager.users.${username} = import ../../home/hosts/astyanax { home-manager.users.${username} = import ../../home/hosts/astyanax {
@@ -58,6 +58,8 @@ in
secrets.username = username; secrets.username = username;
docker.user = username; docker.user = username;
nfc.user = username;
desktop.ly.enable = true;
nix.settings.secret-key-files = [ config.sops.secrets.nix_signing_key_astyanax.path ]; nix.settings.secret-key-files = [ config.sops.secrets.nix_signing_key_astyanax.path ];
@@ -79,7 +81,7 @@ in
}; };
environment.systemPackages = [ environment.systemPackages = [
inputs.colmena.packages.${pkgs.system}.colmena inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "wol-andromache"; name = "wol-andromache";
runtimeInputs = [ pkgs.wakeonlan ]; runtimeInputs = [ pkgs.wakeonlan ];
@@ -102,33 +104,24 @@ in
enable = true; enable = true;
harden = true; harden = true;
}; };
};
my.syncthing = {
enable = true;
deviceNames = [
"boox"
"andromache"
];
folders = {
readings = {
path = "/home/h/doc/readings";
id = "readings";
devices = [
{
device = "boox";
type = "receiveonly";
}
"andromache"
];
};
};
};
services = {
locate = { locate = {
enable = true; enable = true;
package = pkgs.plocate; package = pkgs.plocate;
}; };
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 20;
};
};
}; };
} }

View File

@@ -4,7 +4,6 @@
{ {
config, config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }:

View File

@@ -0,0 +1,86 @@
{ pkgs, ... }:
# Raspberry Pi 3
# See <https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_3>
let
username = "h";
hostName = "eetion-02";
in
{
imports = [
./hard.nix
../../modules/ssh/hardened-openssh.nix
];
ssh = {
inherit username;
publicHostname = "eetion-02";
authorizedHosts = [
"andromache"
"astyanax"
];
};
boot = {
kernelParams = [
"console=ttyS1,115200n8"
];
kernel.sysctl."net.ipv4.ip_forward" = 1;
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
hardware.enableRedistributableFirmware = true;
networking = {
inherit hostName;
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
80
443
];
};
};
users.users = {
root.hashedPassword = "!";
${username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
};
security.sudo.wheelNeedsPassword = false;
services = {
openssh = {
enable = true;
harden = true;
};
};
environment.systemPackages = with pkgs; [
vim
git
];
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
};
system.stateVersion = "26.05";
}

24
hosts/eetion-02/hard.nix Normal file
View File

@@ -0,0 +1,24 @@
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd.availableKernelModules = [ ];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@@ -0,0 +1 @@
"aarch64-linux"

View File

@@ -13,28 +13,34 @@ in
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
]; ];
ssh.username = username; ssh = {
ssh.publicHostname = "eetion"; inherit username;
ssh.authorizedHosts = [ publicHostname = "eetion";
"andromache" authorizedHosts = [
"astyanax" "andromache"
]; "astyanax"
];
};
boot.loader = { boot.loader = {
grub.enable = false; grub.enable = false;
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
}; };
networking.hostName = hostName; networking = {
networking.networkmanager.enable = true; inherit hostName;
networking.firewall = { networkmanager.enable = true;
enable = true; firewall = {
allowedTCPPorts = [ enable = true;
80 allowedTCPPorts = [
443 80
]; 443
];
};
}; };
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
users.users = { users.users = {
root.hashedPassword = "!"; root.hashedPassword = "!";
${username} = { ${username} = {
@@ -45,52 +51,54 @@ in
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
services.openssh = { services = {
enable = true; openssh = {
harden = true; enable = true;
harden = true;
};
paperless = {
enable = true;
passwordFile = "/etc/paperless-admin-pass";
settings = {
PAPERLESS_URL = "http://paperless.eetion";
};
};
# added (OPNSense) domain override to make this work on LAN
#
# host: eetion
# domain: <domain (e.g. lan)>
# ip address: <eetion-ip>
#
# host: paperless
# domain: eetion
# ip address: <eetion-ip>
nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"eetion" = {
default = true;
locations."/" = {
proxyPass = "http://127.0.0.1:5006";
};
};
"paperless.eetion" = {
locations."/" = {
proxyPass = "http://127.0.0.1:28981";
};
};
};
};
}; };
environment.etc."paperless-admin-pass".text = "admin"; environment.etc."paperless-admin-pass".text = "admin";
services.paperless = {
enable = true;
passwordFile = "/etc/paperless-admin-pass";
settings = {
PAPERLESS_URL = "http://paperless.eetion";
};
};
# added (OPNSense) domain override to make this work on LAN
#
# host: eetion
# domain: <domain (e.g. lan)>
# ip address: <eetion-ip>
#
# host: paperless
# domain: eetion
# ip address: <eetion-ip>
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"eetion" = {
default = true;
locations."/" = {
proxyPass = "http://127.0.0.1:5006";
};
};
"paperless.eetion" = {
locations."/" = {
proxyPass = "http://127.0.0.1:28981";
};
};
};
};
virtualisation = { virtualisation = {
podman.enable = true; podman.enable = true;
oci-containers = { oci-containers = {

View File

@@ -5,10 +5,12 @@
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ ]; boot = {
boot.initrd.kernelModules = [ ]; initrd.availableKernelModules = [ ];
boot.kernelModules = [ ]; initrd.kernelModules = [ ];
boot.extraModulePackages = [ ]; kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD"; device = "/dev/disk/by-label/NIXOS_SD";

View File

@@ -1,8 +1,5 @@
{ {
lib,
inputs, inputs,
outputs,
config,
pkgs, pkgs,
... ...
}: }:
@@ -20,18 +17,23 @@ in
./hard.nix ./hard.nix
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
../../modules/docker ../../modules/docker
../../modules/uptime-kuma
]; ];
networking.hostName = hostName; networking.hostName = hostName;
ssh.username = username; ssh = {
ssh.publicHostname = "server.hektormisplon.xyz"; inherit username;
ssh.authorizedHosts = [ publicHostname = "server.hektormisplon.xyz";
"andromache" authorizedHosts = [
"astyanax" "andromache"
]; "astyanax"
];
};
docker.user = username; docker.user = username;
my.uptime-kuma.enable = false;
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
fsType = "ext4"; fsType = "ext4";
@@ -81,15 +83,4 @@ in
enable = true; enable = true;
harden = true; harden = true;
}; };
nix.settings = {
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"astyanax:JY2qJkZUFSax47R3c1nq53AZ8GnLfNqz6mSnJ60cLZ4="
"andromache:XM4VLrEw63RB/3v/56OxzH/Yw+kKXKMBLKCb7UGAXzo="
];
auto-optimise-store = true;
keep-derivations = false;
keep-outputs = false;
};
} }

View File

@@ -2,9 +2,7 @@
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ {
config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }:

View File

@@ -1,7 +1,6 @@
{ {
lib, lib,
inputs, inputs,
outputs,
config, config,
pkgs, pkgs,
... ...
@@ -26,6 +25,7 @@ in
../../modules/x ../../modules/x
../../modules/fonts ../../modules/fonts
../../modules/ssh/hardened-openssh.nix ../../modules/ssh/hardened-openssh.nix
../../modules/storage
(import ../../modules/secrets { (import ../../modules/secrets {
inherit lib inputs config; inherit lib inputs config;
}) })

View File

@@ -2,9 +2,7 @@
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ {
config,
lib, lib,
pkgs,
modulesPath, modulesPath,
... ...
}: }:

15
images/README.md Normal file
View File

@@ -0,0 +1,15 @@
# building SD Images
## Raspberry Pi 3B+
```bash
nix build .#images.sd-image-raspberry-pi-aarch64
nix-shell -p zstd --run "zstdcat result/sd-image/*.img.zst | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync"
```
## Orange Pi Zero2 H616
```bash
nix build .#images.sd-image-orange-pi-aarch64
nix-shell -p zstd --run "zstdcat result/sd-image/*.img.zst | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync"
sudo dd if=~/dl/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
```

View File

@@ -0,0 +1,73 @@
# see <https://nixos.wiki/wiki/NixOS_on_ARM#Build_your_own_image_natively>
# see <https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_3>
# ```
# nix build .#images.sd-image-raspberry-pi-aarch64
# nix-shell -p zstd --run "zstdcat result/sd-image/*.img.zst | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync"
# ```
{ pkgs, ... }:
let
username = "h";
in
{
imports = [
../modules/ssh/hardened-openssh.nix
];
ssh.username = username;
ssh.authorizedHosts = [
"andromache"
"astyanax"
];
boot.kernelParams = [
"console=ttyS1,115200n8"
];
boot.kernelModules = [
"bcm2835-v4l2"
];
hardware.enableRedistributableFirmware = true;
services.pulseaudio.enable = true;
networking.wireless.enable = true;
systemd.services.btattach = {
before = [ "bluetooth.service" ];
after = [ "dev-ttyAMA0.device" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bluez}/bin/btattach -B /dev/ttyAMA0 -P bcm -S 3000000";
};
};
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
users.users = {
root.initialPassword = "nixos";
${username} = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "nixos";
};
};
security.sudo.wheelNeedsPassword = false;
services.openssh = {
enable = true;
harden = true;
};
environment.systemPackages = with pkgs; [
libraspberrypi
];
system.stateVersion = "26.05";
}

View File

@@ -1,6 +1,9 @@
_:
{ {
nixpkgs.allowedUnfree = [
"spotify"
"spotify-unwrapped"
];
security.rtkit.enable = true; security.rtkit.enable = true;
services = { services = {
pulseaudio.enable = false; pulseaudio.enable = false;

View File

@@ -28,23 +28,25 @@ in
}; };
config = { config = {
sops.secrets.b2_bucket_name = { }; sops = {
secrets.b2_bucket_name = { };
sops.templates."restic/repo-${config.networking.hostName}" = { templates."restic/repo-${config.networking.hostName}" = {
content = "b2:${config.sops.placeholder."b2_bucket_name"}:${config.networking.hostName}"; content = "b2:${config.sops.placeholder."b2_bucket_name"}:${config.networking.hostName}";
}; };
sops.templates."restic/b2-env-${config.networking.hostName}" = { templates."restic/b2-env-${config.networking.hostName}" = {
content = '' content = ''
B2_ACCOUNT_ID=${config.sops.placeholder."b2_account_id"} B2_ACCOUNT_ID=${config.sops.placeholder."b2_account_id"}
B2_ACCOUNT_KEY=${config.sops.placeholder."b2_account_key"} B2_ACCOUNT_KEY=${config.sops.placeholder."b2_account_key"}
''; '';
};
}; };
services.restic.backups.home = { services.restic.backups.home = {
repositoryFile = config.sops.templates."restic/repo-${config.networking.hostName}".path; repositoryFile = config.sops.templates."restic/repo-${config.networking.hostName}".path;
passwordFile = cfg.passwordFile; inherit (cfg) passwordFile;
paths = cfg.paths; inherit (cfg) paths;
timerConfig = { timerConfig = {
OnCalendar = "daily"; OnCalendar = "daily";
Persistent = true; Persistent = true;

View File

@@ -1,3 +1,5 @@
{ pkgs, ... }:
{ {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
@@ -12,4 +14,14 @@
}; };
}; };
}; };
systemd.user.services.mpris-proxy = {
description = "Mpris proxy";
after = [
"network.target"
"sound.target"
];
wantedBy = [ "default.target" ];
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
};
} }

View File

@@ -2,54 +2,66 @@
inputs, inputs,
outputs, outputs,
dotsPath, dotsPath,
config,
... ...
}: }:
let
inherit (inputs.nixpkgs) lib;
in
{ {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];
system.stateVersion = "25.05"; options.nixpkgs.allowedUnfree = lib.mkOption {
type = lib.types.listOf lib.types.str;
nix.settings.experimental-features = [ default = [ ];
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs outputs dotsPath;
};
}; };
nix = { config = {
optimise = { system.stateVersion = "25.05";
automatic = true;
dates = [ "05:00" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
system.autoUpgrade = { nix = {
enable = true; optimise = {
flake = inputs.self.outPath; automatic = true;
operation = "switch"; dates = [ "05:00" ];
flags = [ };
"--recreate-lock-file" gc = {
"--commit-lock-file" automatic = true;
"--print-build-logs" dates = "weekly";
]; options = "--delete-older-than 30d";
dates = "05:00"; };
randomizedDelaySec = "45min"; settings.experimental-features = [
allowReboot = false; "nix-command"
"flakes"
];
};
system.autoUpgrade = {
enable = true;
flags = [
"--recreate-lock-file"
"--commit-lock-file"
"--print-build-logs"
"--refresh"
];
dates = "05:00";
randomizedDelaySec = "45min";
allowReboot = false;
};
nixpkgs.config.allowUnfreePredicate =
pkg: builtins.elem (lib.getName pkg) config.nixpkgs.allowedUnfree;
environment.defaultPackages = lib.mkForce [ ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs outputs dotsPath;
};
};
}; };
} }

View File

@@ -1,5 +1,3 @@
{ config, pkgs, ... }:
{ {
services.xserver = { services.xserver = {
displayManager.gdm.enable = true; displayManager.gdm.enable = true;

View File

@@ -1,16 +1,32 @@
{ config, lib, ... }:
let
cfg = config.desktop;
in
{ {
programs.niri.enable = true; options.desktop = {
ly = {
services = { enable = lib.mkOption {
dbus.enable = true; type = lib.types.bool;
logind.settings.Login = { default = false;
HandleLidSwitch = "suspend"; };
IdleAction = "suspend";
IdleActionSec = 1800;
}; };
};
displayManager.ly = { config = {
enable = true; programs.niri.enable = true;
services = {
dbus.enable = true;
logind.settings.Login = {
HandleLidSwitch = "suspend";
IdleAction = "suspend";
IdleActionSec = 1800;
};
displayManager.ly = lib.mkIf cfg.ly.enable {
enable = true;
};
}; };
}; };
} }

View File

@@ -0,0 +1,12 @@
{
nixpkgs.allowedUnfree = [
"steam"
"steam-unwrapped"
];
programs.steam = {
enable = true;
remotePlay.openFirewall = false;
dedicatedServer.openFirewall = false;
};
}

View File

@@ -1,13 +1,16 @@
{ pkgs, ... }: { pkgs, ... }:
with pkgs;
let
tools = interception-tools;
inherit (interception-tools-plugins) caps2esc;
in
{ {
services.interception-tools = { services.interception-tools = {
enable = true; enable = true;
plugins = [ plugins = [ caps2esc ];
pkgs.interception-tools-plugins.caps2esc
];
udevmonConfig = '' udevmonConfig = ''
- JOB: ${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc -m 1 | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE - JOB: ${tools}/bin/intercept -g $DEVNODE | ${caps2esc}/bin/caps2esc -m 1 | ${tools}/bin/uinput -d $DEVNODE
DEVICE: DEVICE:
EVENTS: EVENTS:
EV_KEY: [KEY_CAPSLOCK] EV_KEY: [KEY_CAPSLOCK]

16
modules/nfc/default.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, lib, ... }:
let
cfg = config.nfc;
in
{
options.nfc = {
user = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
};
};
config = lib.mkIf (cfg.user != null) {
users.users.${cfg.user}.extraGroups = [ "dialout" ];
};
}

View File

@@ -0,0 +1,22 @@
{ config, ... }:
{
nixpkgs.allowedUnfree = [
"nvidia-x11"
"nvidia-persistenced"
"nvidia-settings"
];
hardware.graphics.enable = true;
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
services.xserver.videoDrivers = [ "nvidia" ];
}

View File

@@ -1,5 +1,3 @@
{ pkgs, ... }:
{ {
# services.avahi = { # services.avahi = {
# enable = true; # enable = true;

View File

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

View File

@@ -0,0 +1,49 @@
{
config,
inputs,
pkgs,
...
}:
let
theme = import ./theme.nix { inherit pkgs; };
in
{
imports = [ inputs.stylix.nixosModules.stylix ];
stylix = {
enable = true;
inherit (theme)
polarity
base16Scheme
override
image
;
fonts = {
monospace = theme.monospaceFont;
serif = config.stylix.fonts.monospace;
sansSerif = config.stylix.fonts.monospace;
emoji = config.stylix.fonts.monospace;
};
autoEnable = true;
};
home-manager.sharedModules = [
{
stylix.targets = {
firefox = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
librewolf = {
profileNames = [ "default" ];
colorTheme.enable = true;
};
kitty.variant256Colors = true;
gnome.enable = false;
gtk.enable = false;
nixvim.enable = false;
};
}
];
}

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