forked from colonelpanic/dotfiles
Compare commits
547 Commits
railbird-s
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f2ca4f3530 | |||
| 62cc99e951 | |||
| 049d0ca45c | |||
| 7a55c32da2 | |||
| d2a0b86024 | |||
| f79e7a527c | |||
| b2230c993a | |||
| 91e8fcb06a | |||
| 03356b9280 | |||
| c3f4f92a09 | |||
| 8799310710 | |||
| 493bd42966 | |||
| d98e7ae597 | |||
| bfd4a53b85 | |||
| 643096d98c | |||
| 32cd05a2b8 | |||
| 23afe4a8b6 | |||
| acf683f334 | |||
| 4b7fdcd68f | |||
| 9ecb62e13d | |||
| ce9910daed | |||
| cb2598af14 | |||
| ea4a577076 | |||
| 7d15907ee3 | |||
| 9c5dab9ecc | |||
| 8b9c71b77e | |||
| b3c3a7249c | |||
| 82f3a0eda3 | |||
| 7d603e3d4f | |||
| 612c0ef78d | |||
| db7e115542 | |||
| 7c25d8d578 | |||
| 37070171c2 | |||
| 5dc82b90e2 | |||
| 2cc0a54e07 | |||
| f9d7375f7b | |||
| 4d714d4416 | |||
| 96f35ab9d6 | |||
| f092bc782e | |||
| e84d333ea6 | |||
| 05ab80c13f | |||
| 8a972a72f3 | |||
| 01081d25c7 | |||
| 25a1afa317 | |||
| 17efe79dfa | |||
| 90f7a5dc90 | |||
| 6dc320ff1c | |||
| ff4c9c8e9a | |||
| 2bcd5dc9bd | |||
| e130df3c70 | |||
| 307710e7a5 | |||
| 4349671e14 | |||
| 33e4758389 | |||
| 0004a1d715 | |||
| abfc369407 | |||
| 9d61a15337 | |||
| 733beb094b | |||
| 4848a20a8d | |||
| 24346c9e88 | |||
| bb3ba5d702 | |||
| 77d0a8504e | |||
| 6ec03f7821 | |||
| d4db3b81a8 | |||
| 69f982526d | |||
| c952702742 | |||
| 5963113964 | |||
| 4cc07c65ae | |||
| 5c2b810a4f | |||
| 33ca6d490a | |||
| 2acc6d25c7 | |||
| a74e5ab4b6 | |||
| 39af365839 | |||
| 973c5dc134 | |||
| a244ee2223 | |||
| 1eaf5166d9 | |||
| a081f743a5 | |||
| aa19cc3204 | |||
| 8d92c45ffe | |||
| 96c74ac95e | |||
| b5ffc833fb | |||
| e18c41cf90 | |||
| 291e77b4b4 | |||
| 5cbf3ac32e | |||
| e7d06c8b91 | |||
| 07a367dc67 | |||
| a0e6ecd222 | |||
| 331ce9eec5 | |||
| 3ed35fd553 | |||
| 2df1d71367 | |||
| 5341a75a08 | |||
| d33fc584d0 | |||
| 375a7ed910 | |||
| 81e88f6610 | |||
| 3da6262856 | |||
| f8cb82fd60 | |||
| 3a3dbad845 | |||
| 017d47ca41 | |||
| 78046685f9 | |||
| 2046f360a6 | |||
| e70146fd1d | |||
| ea9d4145d4 | |||
| d1814a3072 | |||
| 08db2c3a75 | |||
| 2c384fb003 | |||
| 8ae53c14bd | |||
| b189e1fa3e | |||
| 107d3cfdb3 | |||
| e31f684f7b | |||
| ab87bb325f | |||
| fd9ceb1dda | |||
| 6fe2f72025 | |||
| 94e3c08f88 | |||
| 7138b67f59 | |||
| 1958d2ebf7 | |||
| a744a8fc2d | |||
| 30d50d72ec | |||
| a938447b8a | |||
| 9408eeff52 | |||
| 947eaad2f1 | |||
| eb6f67559e | |||
| 166c3a24ea | |||
| 3f3de17097 | |||
| d7ceec572f | |||
| 50bb8561d8 | |||
| 6ece92b75d | |||
| accb330589 | |||
| 9d8777e85c | |||
| 6b7a428145 | |||
| 6278da83fa | |||
| bf5009fdd4 | |||
| 4f573be120 | |||
| aba47c6ce9 | |||
| 14d24534f9 | |||
| e1752368b4 | |||
| ce9c752cbe | |||
| 0b1591642b | |||
| 998099ae10 | |||
| d01659c1b0 | |||
| 251f03838b | |||
| 2a303c445c | |||
| 7515a871a7 | |||
| 1ead310c05 | |||
| 76253e34ef | |||
| bbb0017bee | |||
| 718cf756b9 | |||
| 05e135d61d | |||
| 9a66f3fc5a | |||
| 0d3b15c072 | |||
| ebc7c2ede5 | |||
| 8035ae008b | |||
| a6d9bdb7a9 | |||
| 4f4168768d | |||
| eb61989a59 | |||
| 3dcb49fc1b | |||
| 442ed2aca4 | |||
| 5df6c5aecf | |||
| 884a8b31ae | |||
| fef852f4bf | |||
| 8453cc92b6 | |||
| e273e34662 | |||
| b681e4b5b4 | |||
| 24c5bb3ec6 | |||
| 70c5c011f8 | |||
| fcae542755 | |||
| 0e20737cb3 | |||
| 58ea719bed | |||
| 15ffb7355e | |||
| ca1b22ba98 | |||
| d2add34317 | |||
| 5da32bceea | |||
| 92c2d613af | |||
| c1a2c404e9 | |||
| 5b3915ad27 | |||
| 2d4c1df31f | |||
| 0f1895c5d2 | |||
| 990b7f0180 | |||
| a895c2471d | |||
| 8fd220c919 | |||
| 626d719e16 | |||
| 7873981341 | |||
| fca6d487f0 | |||
| e297235517 | |||
| 29ab9150f8 | |||
| 953d57be15 | |||
| 7b63af8aae | |||
| 697d216397 | |||
| 794f3c1eb8 | |||
| 4a8e077b5d | |||
| 7d76728651 | |||
| 957b94e1cc | |||
| 2445e6e7d6 | |||
| f5ddd2e4c5 | |||
| f071068e6d | |||
| c8ffe51c66 | |||
| e12d261a9f | |||
| 2557a2b538 | |||
| ea3cfe9604 | |||
| 8f3802a010 | |||
| 4d42e5c89d | |||
| b8872e957f | |||
| fe8b6caf3c | |||
| 3f0311b127 | |||
| 0b56680911 | |||
| 9fbdead63f | |||
| 5db03a0695 | |||
| c697b5684a | |||
| 95bd8dd280 | |||
| aa9d7b2d88 | |||
| a1b5f3838d | |||
| fe710dac80 | |||
| 18aee952be | |||
| 728e5ee02f | |||
| cb9f478cbc | |||
| 6654470109 | |||
| 4913622bad | |||
| ed9bed85d9 | |||
| 8881b704ca | |||
| 89bd7e9a4c | |||
| 354b54b772 | |||
| 7e445e7fd3 | |||
| a0f75a0f4d | |||
| 04b7672f0e | |||
| b643092237 | |||
| f4b753d750 | |||
| 0d14cc41a8 | |||
| 3904b09b8c | |||
| 36e43c3f27 | |||
| e178958e4f | |||
| e89501f139 | |||
| 7f3fe70cac | |||
| 8acb093f34 | |||
| d2ff285109 | |||
| 80c6ec0080 | |||
| af706c8f40 | |||
| 01d2d1d31b | |||
| df045e44b5 | |||
| 1c8def8999 | |||
| f40788cd15 | |||
| f077cc647b | |||
| 6428ec9f2a | |||
| a97cd99394 | |||
| 27258da627 | |||
| ce962bad1a | |||
| 1b29407793 | |||
| 81f9cb6cf9 | |||
| 37d1109bc3 | |||
| 5cb32ff923 | |||
| f972642cfa | |||
| 3e774e37f9 | |||
| 574885f327 | |||
| 46899bf76a | |||
| f7af858e16 | |||
| 5e3452c091 | |||
| bb87510a0c | |||
| 4d554f50c1 | |||
| 4d72cbc1b4 | |||
| 88d85f11b2 | |||
| be7448b710 | |||
| b742fc78cb | |||
| b703588b79 | |||
| 8e4d8ac662 | |||
| 27888a7a3e | |||
| 0d6624bc09 | |||
| 50c28d68c2 | |||
| 7e301c1452 | |||
| ad73cfebde | |||
| 2ba7a7f805 | |||
| 867ebad8ea | |||
| ebf91de2d8 | |||
| e6832e3c1e | |||
| 15499b292a | |||
| 1af9a5497b | |||
| a7b24c0fa4 | |||
| 661a6b6c2f | |||
| d4faa061dc | |||
| a2bbd4e04e | |||
| 7e62881c4d | |||
| 9f69f16471 | |||
| 5525fda4bf | |||
| ee7c0ed11c | |||
| e2875e1741 | |||
| 57e13b8319 | |||
| 1d31f870c5 | |||
| 9f3f835253 | |||
| 066902e37a | |||
| d790bc9e25 | |||
| 1ea8333994 | |||
| e464d8fec5 | |||
| 14a32c151c | |||
| bfdf5f221e | |||
| ae29832dbc | |||
| ae6ce6b19c | |||
| 8e1abde359 | |||
| c25cd05b15 | |||
| 5deba06fb0 | |||
| 7dcc785da6 | |||
| 5eb3654d0c | |||
|
|
cbcf03c784 | ||
|
|
a9d5ee5eb0 | ||
|
|
8402c6f1d2 | ||
|
|
da8b6b3b75 | ||
|
|
526bf6e2a9 | ||
|
|
04870cd682 | ||
|
|
46108ab249 | ||
|
|
a8e23460f9 | ||
|
|
a88018fe47 | ||
|
|
5757681ce0 | ||
|
|
6c393b3837 | ||
|
|
618f927cb9 | ||
|
|
bb259bf358 | ||
|
|
3f7de563db | ||
|
|
6ae5f4c503 | ||
|
|
e6c3d55fc8 | ||
|
|
36331ea60c | ||
|
|
6b18d0accf | ||
|
|
9a764fc7c8 | ||
|
|
9100167e4d | ||
|
|
e0e98bc237 | ||
|
|
4c989fcda3 | ||
|
|
35f8c10e7c | ||
|
|
ac49823b4c | ||
| daaead9c1e | |||
|
|
c5c86145b1 | ||
|
|
32755e1411 | ||
|
|
de27a133e7 | ||
|
|
f89155e4d2 | ||
|
|
f345cf8f18 | ||
|
|
4cb9c006d7 | ||
| 1dd54ba638 | |||
| 517c2f333e | |||
| d850ba999d | |||
| dd9f5ccf88 | |||
| 59da59c74f | |||
| 1f36c4942b | |||
| eaa46e7034 | |||
| f00d9bdb12 | |||
| 1003c33dee | |||
| a493a530be | |||
| 01361b7217 | |||
| cdd8ed60e9 | |||
| fd033ba72c | |||
| 9aae7c0c16 | |||
| aa9be16abf | |||
| 342fc4f4c6 | |||
| d62d538562 | |||
| ffb55c157b | |||
| cd7698bebf | |||
| 700cccfd60 | |||
| 814966b172 | |||
| c4a9a60112 | |||
| 9b9da29b7a | |||
| 6cced9dad4 | |||
| 50542d9b24 | |||
| 701e8d7d82 | |||
| 10b8f61d27 | |||
| 58432fe908 | |||
| 79908fae93 | |||
| b597b6e239 | |||
| 9e8cd58d7f | |||
| 6643428fca | |||
| 10a732ad75 | |||
| e6a75734fb | |||
| eb22968ab4 | |||
| b12f84c007 | |||
| 54645ba497 | |||
| 6cb9597df7 | |||
| 51e6116100 | |||
| 4fd99eae63 | |||
| b8f2452d11 | |||
| ddb4a257cf | |||
| 3a6c9fbb49 | |||
| f3b8a769c6 | |||
| 4a27118f24 | |||
| 7ddc215dcc | |||
| 3559edb3a5 | |||
| 0e611dbb57 | |||
| 3a71c8600c | |||
| 280debd530 | |||
| e34248ede3 | |||
| ea3ba8e2d6 | |||
| 69411c14f6 | |||
| f560d87aa3 | |||
| e188936253 | |||
| f91ff8c987 | |||
| f4b87c40eb | |||
| 26fb168ec5 | |||
| 16e6b980ba | |||
| 204569fff1 | |||
| fb671d1401 | |||
| a18188d3b1 | |||
| 4515ea2e05 | |||
| 60e1947dd8 | |||
| 0305fa4683 | |||
| 84a1f22326 | |||
| 4cb057109f | |||
| 51d2863cdc | |||
| 0c1cd15391 | |||
| cef3b04ebd | |||
| b9f87ac490 | |||
| 3b55c26a2c | |||
| dcd38e777a | |||
| 2116f650f7 | |||
| 00139ef2fe | |||
| 2af8204750 | |||
| cd64244bd8 | |||
| 4cc68dedea | |||
| 77fe614b7b | |||
| 6bbe7f186a | |||
| 77fc296e9e | |||
| 807944f182 | |||
| 97c2779d1b | |||
| 9d900057f6 | |||
| 86b545761f | |||
| a8a66916f4 | |||
| 32d68061a5 | |||
| 94e7e738fb | |||
| 77cf8d46a3 | |||
| b5fb07519c | |||
| 0f7e3596de | |||
| 7aeed13a34 | |||
| 7f87156a58 | |||
| 8a7cec11cf | |||
| da865671ad | |||
| 3004f57c1a | |||
| f82c4fb659 | |||
| a4d6664b77 | |||
| dd256a24f4 | |||
| 03829b74ce | |||
| 29e68d1714 | |||
| c0c51f571d | |||
| 9c54be10e1 | |||
| eb69712a7c | |||
| b86cce1c12 | |||
| 1b44c66902 | |||
| b54cb9fceb | |||
| 5fae69b391 | |||
| b8d4cf59b8 | |||
| 9ab7b41780 | |||
| 4f37050c1c | |||
| 49d98cbca1 | |||
| 47ecc2a0c4 | |||
| 149de8faae | |||
| 487aae9a58 | |||
| fde42131d2 | |||
| ddbe91c669 | |||
| 74a6e98e90 | |||
| 1aaeeaedf0 | |||
| e66a48a311 | |||
| ce1ba6dd90 | |||
| 165646b395 | |||
| 4de88f623c | |||
| c656ebf8dc | |||
| 4c3ec2a29b | |||
| 6157a2b047 | |||
| d149bc7755 | |||
| 4f669db603 | |||
| eccceb0d31 | |||
| 277432379c | |||
| 4e3e75c3e2 | |||
| b2bf550aa0 | |||
| fdc4bda993 | |||
| 23a4d50b4a | |||
| 96012de10c | |||
| 83940416d2 | |||
| 6e0427d4e0 | |||
| 6f2f2c54a7 | |||
| 3d121c8908 | |||
| 66842d545a | |||
| dc0dea2695 | |||
| 3017ea1b63 | |||
| ef7e685007 | |||
| 4700030548 | |||
| 45fd9aadef | |||
| b034f12adc | |||
| 2458cb6081 | |||
| 2f49c3f86b | |||
| e7d536417c | |||
| 61752b600d | |||
| 00cfd236ab | |||
| 88937e9acc | |||
| 30146f4fdb | |||
| 737167fe3f | |||
| 5809b012c5 | |||
| 90952a3dc0 | |||
| d8dee1504e | |||
| b744be3b00 | |||
| 8b83c429d1 | |||
| 0c685bee88 | |||
| 830499c7d6 | |||
| 18ef010bf1 | |||
| a75824ee2a | |||
| 0f65575a35 | |||
| c9638dbbcd | |||
| aff5aff63f | |||
| 0dd9976a38 | |||
| a98b45590a | |||
| 6f1242b02c | |||
| 1eea8c61e7 | |||
| f0d35c59dd | |||
| e36ba46f34 | |||
| 08ef11f1ec | |||
| fa9466dadd | |||
| 0aa212b83d | |||
| 6b8789d566 | |||
| 1db30187cb | |||
| e425d5c1f6 | |||
| 98b49c63d4 | |||
| f933f5527d | |||
| 8c49d47324 | |||
| 42015c284a | |||
| 58b9a395d7 | |||
| b102fd2b85 | |||
| 4a7edcda75 | |||
| d3f552afda | |||
| e8095c2081 | |||
| f810880d90 | |||
| 4b71ea64fe | |||
| 5692999aa1 | |||
| 2c0fd64edd | |||
| ced8c34823 | |||
| b99998823c | |||
| df196fe337 | |||
| dc47f00c81 | |||
| eecea47276 | |||
| 3243829f1f | |||
| 7595aaf174 | |||
| 9f8cc149ef | |||
| 8f20c46aac | |||
| a5ba4c9cc3 | |||
| 9bdd9868be | |||
| bad70fb304 | |||
| 8d358a2cd8 | |||
| 295ed619ff | |||
| f9042e8e80 | |||
| 4ef82e4b02 | |||
| 8b07fdc391 | |||
| f09cef4606 | |||
| 627596a2fa | |||
| 310383bfa3 | |||
| 90c073deea | |||
| 6459fc06df | |||
| 0727fb807d | |||
| cc29e3b841 | |||
| 5666080f11 | |||
| a351adb4ed | |||
| f4f3e9f8be | |||
| 2abde807aa |
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,12 +1,12 @@
|
||||
[submodule "dotfiles/config/taffybar/taffybar"]
|
||||
path = dotfiles/config/taffybar/taffybar
|
||||
url = ../../taffybar/taffybar.git
|
||||
url = git@github.com:taffybar/taffybar.git
|
||||
[submodule "dotfiles/xmonad/xmonad"]
|
||||
path = dotfiles/config/xmonad/xmonad
|
||||
url = ../xmonad.git
|
||||
url = git@github.com:xmonad/xmonad.git
|
||||
[submodule "dotfiles/xmonad/xmonad-contrib"]
|
||||
path = dotfiles/config/xmonad/xmonad-contrib
|
||||
url = ../xmonad-contrib.git
|
||||
url = git@github.com:xmonad/xmonad-contrib.git
|
||||
[submodule "dotfiles/config/alacritty/themes"]
|
||||
path = dotfiles/config/alacritty/themes
|
||||
url = https://github.com/alacritty/alacritty-theme
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
language: generic
|
||||
|
||||
script: bash ./gen-gh-pages/deploy.sh
|
||||
env:
|
||||
global:
|
||||
- ENCRYPTION_LABEL: "73e6c870aa87"
|
||||
- COMMIT_AUTHOR_EMAIL: "IvanMalison@gmail.com"
|
||||
- COMMIT_AUTHOR_NAME: "Ivan Malison"
|
||||
16
dotfiles/config/alacritty/alacritty.toml
Normal file
16
dotfiles/config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[general]
|
||||
import = ["~/.config/alacritty/themes/themes/dracula.toml"]
|
||||
|
||||
[font]
|
||||
size = 8
|
||||
|
||||
[scrolling]
|
||||
history = 10000
|
||||
multiplier = 3
|
||||
|
||||
[window]
|
||||
decorations = "full"
|
||||
|
||||
[window.padding]
|
||||
x = 10
|
||||
y = 10
|
||||
@@ -1,34 +0,0 @@
|
||||
scrolling:
|
||||
# How many lines of scrollback to keep,
|
||||
# '0' will disable scrolling.
|
||||
history: 10000
|
||||
|
||||
# Number of lines the viewport will move for every line
|
||||
# scrolled when scrollback is enabled (history > 0).
|
||||
multiplier: 3
|
||||
|
||||
# Faux Scrolling
|
||||
#
|
||||
# The `faux_multiplier` setting controls the number
|
||||
# of lines the terminal should scroll when the alternate
|
||||
# screen buffer is active. This is used to allow mouse
|
||||
# scrolling for applications like `man`.
|
||||
#
|
||||
# To disable this completely, set `faux_multiplier` to 0.
|
||||
faux_multiplier: 3
|
||||
|
||||
# Automatically scroll to the bottom when new text is written
|
||||
# to the terminal.
|
||||
auto_scroll: false
|
||||
|
||||
font:
|
||||
size: 8
|
||||
|
||||
window:
|
||||
padding:
|
||||
x: 10
|
||||
y: 10
|
||||
decorations: full
|
||||
|
||||
import:
|
||||
- ~/.config/alacritty/themes/themes/dracula.yaml
|
||||
20
dotfiles/config/autorandr/strixy-minaj-240hz-solo/config
Normal file
20
dotfiles/config/autorandr/strixy-minaj-240hz-solo/config
Normal file
@@ -0,0 +1,20 @@
|
||||
output DP-0
|
||||
off
|
||||
output DP-1
|
||||
off
|
||||
output HDMI-0
|
||||
off
|
||||
output DP-3
|
||||
off
|
||||
output DP-4
|
||||
off
|
||||
output DP-5
|
||||
off
|
||||
output DP-6
|
||||
off
|
||||
output DP-2
|
||||
crtc 0
|
||||
mode 2560x1600
|
||||
pos 0x0
|
||||
rate 240.00
|
||||
x-prop-non_desktop 0
|
||||
1
dotfiles/config/autorandr/strixy-minaj-240hz-solo/setup
Normal file
1
dotfiles/config/autorandr/strixy-minaj-240hz-solo/setup
Normal file
@@ -0,0 +1 @@
|
||||
DP-2 00ffffffffffff0009e5580c0000000001210104b527187803bbc5ae503fb7250c515500000001010101010101010101010101010101c07200a0a040c8603020360084f21000001a000000fd0c30f0b1b176010a202020202020000000fe00424f452043510a202020202020000000fc004e4531383051444d2d4e4d310a029602030f00e3058080e606050195731000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa702079020021001d280f7409000a400680dd2a511824b249120e023554b060ec64662a1378220014ffed1185ff099f002f001f003f06c700020005002b000c27003cef00002700303b0000810015741a0000030b30f0006095107310f0000000008d00000000000000000000000000000000000000000000000000000000bc90
|
||||
@@ -1,63 +0,0 @@
|
||||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
htop_version=3.2.2
|
||||
config_reader_min_version=3
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=1
|
||||
hide_running_in_container=0
|
||||
shadow_other_users=0
|
||||
show_thread_names=0
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_deleted_exe=1
|
||||
shadow_distribution_path_prefix=0
|
||||
highlight_megabytes=1
|
||||
highlight_threads=0
|
||||
highlight_changes=0
|
||||
highlight_changes_delay_secs=5
|
||||
find_comm_in_cmdline=1
|
||||
strip_exe_from_cmdline=1
|
||||
show_merged_command=0
|
||||
header_margin=1
|
||||
screen_tabs=0
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_one=1
|
||||
show_cpu_usage=1
|
||||
show_cpu_frequency=0
|
||||
show_cpu_temperature=0
|
||||
degree_fahrenheit=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=0
|
||||
color_scheme=0
|
||||
enable_mouse=1
|
||||
delay=15
|
||||
hide_function_bar=0
|
||||
header_layout=two_50_50
|
||||
column_meters_0=AllCPUs Memory Swap
|
||||
column_meter_modes_0=1 1 1
|
||||
column_meters_1=Tasks LoadAverage Uptime
|
||||
column_meter_modes_1=2 2 2
|
||||
tree_view=0
|
||||
sort_key=46
|
||||
tree_sort_key=46
|
||||
sort_direction=-1
|
||||
tree_sort_direction=-1
|
||||
tree_view_always_by_pid=0
|
||||
all_branches_collapsed=0
|
||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||
.sort_key=PERCENT_CPU
|
||||
.tree_sort_key=PERCENT_CPU
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=-1
|
||||
.all_branches_collapsed=0
|
||||
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
|
||||
.sort_key=IO_RATE
|
||||
.tree_sort_key=PID
|
||||
.tree_view=0
|
||||
.tree_view_always_by_pid=0
|
||||
.sort_direction=-1
|
||||
.tree_sort_direction=1
|
||||
.all_branches_collapsed=0
|
||||
294
dotfiles/config/hypr/hyprland.conf
Normal file
294
dotfiles/config/hypr/hyprland.conf
Normal file
@@ -0,0 +1,294 @@
|
||||
# Hyprland Configuration
|
||||
# Based on XMonad configuration from xmonad.hs
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = alacritty
|
||||
$fileManager = dolphin
|
||||
$menu = rofi -show drun -show-icons
|
||||
$runMenu = rofi -show run
|
||||
|
||||
# Environment variables
|
||||
env = XCURSOR_SIZE,24
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
env = GDK_DPI_SCALE,1.25
|
||||
env = QT_FONT_DPI,120
|
||||
|
||||
# Input configuration
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = no
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
# General settings
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
border_size = 2
|
||||
col.active_border = rgba(edb443ee) rgba(33ccffee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
layout = master
|
||||
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
# Decoration
|
||||
decoration {
|
||||
rounding = 10
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
}
|
||||
}
|
||||
|
||||
# Animations
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
# Layout configuration
|
||||
dwindle {
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
mfact = 0.25
|
||||
orientation = left
|
||||
}
|
||||
|
||||
# Misc
|
||||
misc {
|
||||
force_default_wallpaper = 0
|
||||
disable_hyprland_logo = true
|
||||
}
|
||||
|
||||
# Scratchpad-like windows
|
||||
windowrule = float, title:^(htop)$
|
||||
windowrule = size 80% 80%, title:^(htop)$
|
||||
|
||||
# Chrome specific rules
|
||||
windowrule = float, class:^(chrome)$,title:^(.*@gmail.com.*Gmail.*)$
|
||||
windowrule = float, class:^(chrome)$,title:^(Messages)$
|
||||
windowrule = size 90% 90%, class:^(chrome)$,title:^(.*@gmail.com.*Gmail.*)$
|
||||
windowrule = size 90% 90%, class:^(chrome)$,title:^(Messages)$
|
||||
|
||||
# ===== KEY BINDINGS =====
|
||||
# Based on XMonad configuration
|
||||
|
||||
# Main modifier key (Super/Windows key equivalent to mod4Mask)
|
||||
$mainMod = SUPER
|
||||
|
||||
# Mod+Alt combination (equivalent to modalt in XMonad)
|
||||
$modAlt = SUPER_ALT
|
||||
|
||||
# Hyper key (equivalent to mod3Mask in XMonad)
|
||||
$hyper = ALT_R
|
||||
|
||||
# Program launching
|
||||
bind = $mainMod, P, exec, $menu
|
||||
bind = $mainMod SHIFT, P, exec, $runMenu
|
||||
bind = $mainMod SHIFT, Return, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod SHIFT, C, killactive,
|
||||
bind = $mainMod SHIFT, Q, exit,
|
||||
bind = $mainMod, E, exec, emacsclient -c
|
||||
bind = $mainMod, V, exec, xclip -o | xdotool type --file -
|
||||
|
||||
# Chrome/Browser launching (equivalent to bindBringAndRaise)
|
||||
bind = $modAlt, C, exec, google-chrome-stable
|
||||
|
||||
# Scratchpad equivalents (toggle special workspaces)
|
||||
bind = $modAlt, E, togglespecialworkspace, element
|
||||
bind = $modAlt, G, togglespecialworkspace, gmail
|
||||
bind = $modAlt, H, togglespecialworkspace, htop
|
||||
bind = $modAlt, M, togglespecialworkspace, messages
|
||||
bind = $modAlt, K, togglespecialworkspace, slack
|
||||
bind = $modAlt, S, togglespecialworkspace, spotify
|
||||
bind = $modAlt, T, togglespecialworkspace, transmission
|
||||
bind = $modAlt, V, togglespecialworkspace, volume
|
||||
|
||||
# Move windows to special workspaces
|
||||
bind = $modAlt SHIFT, E, movetoworkspace, special:element
|
||||
bind = $modAlt SHIFT, G, movetoworkspace, special:gmail
|
||||
bind = $modAlt SHIFT, H, movetoworkspace, special:htop
|
||||
bind = $modAlt SHIFT, M, movetoworkspace, special:messages
|
||||
bind = $modAlt SHIFT, K, movetoworkspace, special:slack
|
||||
bind = $modAlt SHIFT, S, movetoworkspace, special:spotify
|
||||
bind = $modAlt SHIFT, T, movetoworkspace, special:transmission
|
||||
bind = $modAlt SHIFT, V, movetoworkspace, special:volume
|
||||
|
||||
# Directional navigation (WASD keys as in XMonad)
|
||||
bind = $mainMod, W, movefocus, u
|
||||
bind = $mainMod, S, movefocus, d
|
||||
bind = $mainMod, A, movefocus, l
|
||||
bind = $mainMod, D, movefocus, r
|
||||
|
||||
# Move windows directionally
|
||||
bind = $mainMod SHIFT, W, movewindow, u
|
||||
bind = $mainMod SHIFT, S, movewindow, d
|
||||
bind = $mainMod SHIFT, A, movewindow, l
|
||||
bind = $mainMod SHIFT, D, movewindow, r
|
||||
|
||||
# Resize windows
|
||||
bind = $mainMod CTRL, W, resizeactive, 0 -50
|
||||
bind = $mainMod CTRL, S, resizeactive, 0 50
|
||||
bind = $mainMod CTRL, A, resizeactive, -50 0
|
||||
bind = $mainMod CTRL, D, resizeactive, 50 0
|
||||
|
||||
# Layout control
|
||||
bind = $mainMod, Space, exec, hyprctl dispatch layoutmsg cyclenext
|
||||
bind = $mainMod CTRL, Space, fullscreen, 0
|
||||
bind = $mainMod, slash, exec, hyprctl dispatch layoutmsg orientationcycle left top
|
||||
bind = $mainMod, F, fullscreen, 0
|
||||
bind = $mainMod SHIFT, F, fullscreen, 1
|
||||
bind = $mainMod, T, togglefloating,
|
||||
bind = $mainMod SHIFT, Y, pseudo, # dwindle pseudotile
|
||||
bind = $mainMod, J, togglesplit, # dwindle split direction
|
||||
bind = $mainMod, comma, exec, hyprctl dispatch splitratio -0.05
|
||||
bind = $mainMod, period, exec, hyprctl dispatch splitratio +0.05
|
||||
bind = $mainMod, N, exec, hyprctl dispatch layoutmsg addmaster
|
||||
bind = $mainMod SHIFT, N, exec, hyprctl dispatch layoutmsg removemaster
|
||||
|
||||
# Focus manipulation
|
||||
bind = $mainMod, Tab, exec, hyprctl dispatch focuswindow "class:$(hyprctl activewindow -j | jq -r '.class')"
|
||||
bind = $mainMod, M, exec, hyprctl dispatch focuswindow "class:master"
|
||||
|
||||
# Monitor/Screen control
|
||||
bind = $mainMod, Z, focusmonitor, +1
|
||||
bind = $mainMod SHIFT, Z, movewindow, mon:+1
|
||||
|
||||
# Window management
|
||||
bind = $mainMod, G, exec, hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0) | "\(.title) - \(.class)"' | rofi -dmenu -i -p "Go to window" | head -1 | xargs -I {} hyprctl dispatch focuswindow "title:{}"
|
||||
bind = $mainMod, B, exec, SELECTION=$(hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0) | "\(.title) - \(.class) [\(.address)]"' | rofi -dmenu -i -p "Bring window"); if [ -n "$SELECTION" ]; then ADDRESS=$(echo "$SELECTION" | sed 's/.*\[\(.*\)\]/\1/'); hyprctl dispatch movetoworkspace "$(hyprctl activeworkspace -j | jq -r '.id')",address:"$ADDRESS"; fi
|
||||
bind = $mainMod SHIFT, B, exec, hyprctl clients -j | jq -r '.[] | select(.workspace.id >= 0) | "\(.title) - \(.class)"' | rofi -dmenu -i -p "Replace window" | head -1 | xargs -I {} hyprctl dispatch swapwindow "title:{}"
|
||||
bind = $mainMod, M, exec, hyprctl dispatch togglespecialworkspace minimized
|
||||
bind = $mainMod SHIFT, M, exec, hyprctl dispatch movetoworkspace special:minimized
|
||||
bind = $mainMod SHIFT, H, exec, EMPTY_WS=$(hyprctl workspaces -j | jq -r 'map(select(.windows == 0)) | .[0].id // empty'); if [ -z "$EMPTY_WS" ]; then EMPTY_WS=$(hyprctl workspaces -j | jq -r 'max_by(.id).id + 1'); fi; hyprctl dispatch movetoworkspace $EMPTY_WS && hyprctl dispatch workspace $EMPTY_WS
|
||||
bind = $mainMod, X, exec, hyprctl dispatch movetoworkspace special:NSP
|
||||
|
||||
# Workspace switching
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move windows to workspaces
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Move and follow to workspace
|
||||
bind = $mainMod CTRL, 1, movetoworkspace, 1
|
||||
bind = $mainMod CTRL, 2, movetoworkspace, 2
|
||||
bind = $mainMod CTRL, 3, movetoworkspace, 3
|
||||
bind = $mainMod CTRL, 4, movetoworkspace, 4
|
||||
bind = $mainMod CTRL, 5, movetoworkspace, 5
|
||||
bind = $mainMod CTRL, 6, movetoworkspace, 6
|
||||
bind = $mainMod CTRL, 7, movetoworkspace, 7
|
||||
bind = $mainMod CTRL, 8, movetoworkspace, 8
|
||||
bind = $mainMod CTRL, 9, movetoworkspace, 9
|
||||
bind = $mainMod CTRL, 0, movetoworkspace, 10
|
||||
|
||||
# Media keys and volume control
|
||||
bind = , XF86AudioRaiseVolume, exec, set_volume --unmute --change-volume +5
|
||||
bind = , XF86AudioLowerVolume, exec, set_volume --unmute --change-volume -5
|
||||
bind = , XF86AudioMute, exec, set_volume --toggle-mute
|
||||
bind = $mainMod, I, exec, set_volume --unmute --change-volume +5
|
||||
bind = $mainMod, K, exec, set_volume --unmute --change-volume -5
|
||||
bind = $mainMod, U, exec, set_volume --toggle-mute
|
||||
|
||||
# Media player controls
|
||||
bind = $mainMod, semicolon, exec, playerctl play-pause
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioPause, exec, playerctl play-pause
|
||||
bind = $mainMod, L, exec, playerctl next
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = $mainMod, J, exec, playerctl previous
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
# Brightness control
|
||||
bind = , XF86MonBrightnessUp, exec, brightness.sh 5
|
||||
bind = , XF86MonBrightnessDown, exec, brightness.sh -5
|
||||
|
||||
# Utility bindings
|
||||
bind = $hyper, V, exec, rofi_clipit.sh
|
||||
bind = $hyper, Y, exec, rofi-pass
|
||||
bind = $hyper, H, exec, rofi_shutter
|
||||
bind = $hyper, C, exec, shell_command.sh
|
||||
bind = $hyper, X, exec, rofi_command.sh
|
||||
bind = $hyper SHIFT, L, exec, dm-tool lock
|
||||
bind = $hyper, K, exec, rofi_kill_process.sh
|
||||
bind = $hyper SHIFT, K, exec, rofi_kill_all.sh
|
||||
bind = $hyper, R, exec, rofi-systemd
|
||||
bind = $hyper, 9, exec, start_synergy.sh
|
||||
bind = $hyper, slash, exec, toggle_taffybar
|
||||
bind = $hyper, Space, exec, skippy-xd
|
||||
bind = $hyper, I, exec, rofi_select_input.hs
|
||||
bind = $hyper, O, exec, rofi_paswitch
|
||||
bind = $mainMod, apostrophe, exec, load_default_map
|
||||
bind = $modAlt, apostrophe, exec, load_xkb_map
|
||||
bind = $mainMod, R, exec, hyprctl reload
|
||||
|
||||
# Workspace cycling
|
||||
bind = $mainMod, backslash, workspace, previous
|
||||
bind = $mainMod, Tab, workspace, previous
|
||||
|
||||
# Mouse bindings
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Special workspaces for "scratchpad" applications
|
||||
exec-once = [workspace special:element silent] element-desktop
|
||||
exec-once = [workspace special:gmail silent] google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox
|
||||
exec-once = [workspace special:htop silent] alacritty --title htop -e htop
|
||||
exec-once = [workspace special:messages silent] google-chrome-stable --new-window https://messages.google.com/web/conversations
|
||||
exec-once = [workspace special:slack silent] slack
|
||||
exec-once = [workspace special:spotify silent] spotify
|
||||
exec-once = [workspace special:transmission silent] transmission-gtk
|
||||
exec-once = [workspace special:volume silent] pavucontrol
|
||||
390
dotfiles/config/taffybar/flake.lock
generated
Normal file
390
dotfiles/config/taffybar/flake.lock
generated
Normal file
@@ -0,0 +1,390 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-ignore-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762808025,
|
||||
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"ref": "master",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"weeder-nix",
|
||||
"pre-commit-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"
|
||||
}
|
||||
},
|
||||
"gtk-sni-tray": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760550917,
|
||||
"narHash": "sha256-oELopLiVb7D1fzYHAiw/cbfNPHLQcOJ3Rz/I1gbk8IY=",
|
||||
"owner": "taffybar",
|
||||
"repo": "gtk-sni-tray",
|
||||
"rev": "f6d1bf5dd64ac0f532b03ae01f5e1cc051116f09",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taffybar",
|
||||
"ref": "master",
|
||||
"repo": "gtk-sni-tray",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gtk-strut": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760550944,
|
||||
"narHash": "sha256-S0saDsCA3aosU23jO5+jSXkbyrv7/C48o8GjsZrqF0I=",
|
||||
"owner": "taffybar",
|
||||
"repo": "gtk-strut",
|
||||
"rev": "5e0bf7f4b93b931a9c4b4a48b5d39de3ca8f02ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taffybar",
|
||||
"ref": "master",
|
||||
"repo": "gtk-strut",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1764252443,
|
||||
"narHash": "sha256-U4G4dUSYWZYKtrF7/ozebD1B96at08SIhY4R9OaK1nw=",
|
||||
"owner": "colonelpanic8",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e1fc6c25b91d3d49dd02a156237721f12dbd86b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "colonelpanic8",
|
||||
"ref": "remove-gi-gtk-hs-patch",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1730768919,
|
||||
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1666603677,
|
||||
"narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "074da18a72269cc5a6cf444dce42daea5649b2fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1764230294,
|
||||
"narHash": "sha256-Z63xl5Scj3Y/zRBPAWq1eT68n2wBWGCIEF4waZ0bQBE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0d59e0290eefe0f12512043842d7096c4070f30e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747372754,
|
||||
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"taffybar": "taffybar",
|
||||
"xmonad": "xmonad"
|
||||
}
|
||||
},
|
||||
"status-notifier-item": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641783528,
|
||||
"narHash": "sha256-wJymJfYPFj4/r1e4kT/wt9FEsyCXo5JkkcOoozpuhag=",
|
||||
"owner": "taffybar",
|
||||
"repo": "status-notifier-item",
|
||||
"rev": "f4f9c66ab57fc42eeed0de8cfac9f5f9d30d9dc7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taffybar",
|
||||
"repo": "status-notifier-item",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"taffybar": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"gtk-sni-tray": "gtk-sni-tray",
|
||||
"gtk-strut": "gtk-strut",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"status-notifier-item": "status-notifier-item",
|
||||
"weeder-nix": "weeder-nix",
|
||||
"xmonad": [
|
||||
"xmonad"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760591109,
|
||||
"narHash": "sha256-O21ayp5v2eccXdcwNjTK5ZB99ruK0Zt9CUaw5Rye42g=",
|
||||
"owner": "taffybar",
|
||||
"repo": "taffybar",
|
||||
"rev": "b256a711416036ca124fc9b3f89e7c957535e465",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taffybar",
|
||||
"ref": "master",
|
||||
"repo": "taffybar",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1764242076,
|
||||
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"weeder-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"taffybar",
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748252779,
|
||||
"narHash": "sha256-kSyD/VDUX2m9c2vcuLBT2wnpYiVSHHlP9vuDTtsAtD8=",
|
||||
"owner": "NorfairKing",
|
||||
"repo": "weeder-nix",
|
||||
"rev": "388df7a6f00220d1960118e1ad37cd86150d2c5a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NorfairKing",
|
||||
"repo": "weeder-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xmonad": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"git-ignore-nix": "git-ignore-nix",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"unstable": "unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763949843,
|
||||
"narHash": "sha256-aJXmGPWKjXs7cagVzUE3fd2Fpc+sXnknM446AxHgvH0=",
|
||||
"owner": "xmonad",
|
||||
"repo": "xmonad",
|
||||
"rev": "97edef37a3ae10012272d692b5e1bc9b7013fc14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "xmonad",
|
||||
"ref": "master",
|
||||
"repo": "xmonad",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -1,12 +1,30 @@
|
||||
{
|
||||
inputs = {
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
xmonad.url = github:xmonad/xmonad/master;
|
||||
taffybar.url = path:./taffybar;
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:colonelpanic8/nixpkgs/remove-gi-gtk-hs-patch";
|
||||
xmonad.url = "github:xmonad/xmonad/master";
|
||||
taffybar = {
|
||||
url = "github:taffybar/taffybar/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.xmonad.follows = "xmonad";
|
||||
};
|
||||
};
|
||||
outputs = { self, flake-utils, taffybar, nixpkgs, xmonad }:
|
||||
let
|
||||
hoverlay = final: prev: hself: hsuper: {
|
||||
hoverlay = final: prev: hself: hsuper:
|
||||
{
|
||||
taffybar = prev.haskell.lib.overrideCabal hsuper.taffybar (oa: {
|
||||
doHaddock = false;
|
||||
doCheck = false;
|
||||
# Fix for GHC 9.4 where liftA2 is not in Prelude
|
||||
postPatch = (oa.postPatch or "") + ''
|
||||
substituteInPlace src/System/Taffybar/DBus/Client/Util.hs \
|
||||
--replace-fail "import Control.Monad (forM)" \
|
||||
"import Control.Monad (forM)
|
||||
import Control.Applicative (liftA2)"
|
||||
'';
|
||||
});
|
||||
# gi-gtk-hs patching is now handled by taffybar's fixVersionNamePackages overlay
|
||||
imalison-taffybar = prev.haskell.lib.addPkgconfigDepends (
|
||||
hself.callCabal2nix "imalison-taffybar"
|
||||
(
|
||||
@@ -31,12 +49,12 @@
|
||||
};
|
||||
defComp = { compiler = "ghc94"; };
|
||||
overlay = xmonad.lib.fromHOL hoverlay defComp;
|
||||
overlays = [ taffybar.overlay overlay ];
|
||||
overlayList = [ taffybar.overlays.default overlay ];
|
||||
in flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
|
||||
let pkgs = import nixpkgs { inherit system; overlays = overlayList; config.allowBroken = true; };
|
||||
hpkgs = pkgs.lib.attrsets.getAttrFromPath (xmonad.lib.hpath defComp) pkgs;
|
||||
in
|
||||
rec {
|
||||
{
|
||||
devShell = hpkgs.shellFor {
|
||||
packages = p: [ p.imalison-taffybar p.taffybar ];
|
||||
nativeBuildInputs = with hpkgs; [
|
||||
@@ -45,5 +63,11 @@
|
||||
];
|
||||
};
|
||||
defaultPackage = hpkgs.imalison-taffybar;
|
||||
}) // { inherit overlay overlays; } ;
|
||||
}) // {
|
||||
inherit overlay;
|
||||
overlays = {
|
||||
default = overlay;
|
||||
taffybar = taffybar.overlays.default;
|
||||
};
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ executable taffybar
|
||||
, containers
|
||||
, directory
|
||||
, filepath
|
||||
, gi-gtk
|
||||
, gi-gtk3
|
||||
, gtk-sni-tray
|
||||
, gtk-strut
|
||||
, haskell-gi-base
|
||||
|
||||
Submodule dotfiles/config/taffybar/taffybar updated: 067e0bff51...a7a7e620da
@@ -218,7 +218,7 @@ main = do
|
||||
[ ( "uber-loaner"
|
||||
, baseConfig { endWidgets = laptopEndWidgets }
|
||||
)
|
||||
, ( "adele"
|
||||
, ( "adell"
|
||||
, baseConfig { endWidgets = laptopEndWidgets }
|
||||
)
|
||||
, ( "stevie-nixos"
|
||||
@@ -226,12 +226,14 @@ main = do
|
||||
, startWidgets = [myWorkspaces, myLayout]
|
||||
}
|
||||
)
|
||||
, ( "strixi-minaj"
|
||||
, baseConfig { endWidgets = laptopEndWidgets }
|
||||
)
|
||||
, ( "jay-lenovo"
|
||||
, baseConfig { endWidgets = laptopEndWidgets }
|
||||
),
|
||||
( "nixquick"
|
||||
, baseConfig { endWidgets = [ myTray , myMpris ]
|
||||
}
|
||||
)
|
||||
, ( "nixquick"
|
||||
, baseConfig { endWidgets = [ myTray , myMpris ] }
|
||||
)
|
||||
|
||||
]
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
in flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
|
||||
in
|
||||
rec {
|
||||
{
|
||||
devShell = pkgs.haskellPackages.shellFor {
|
||||
packages = p: [ p.imalison-xmonad p.xmonad-contrib ];
|
||||
buildInputs = with pkgs.haskellPackages; [
|
||||
|
||||
Submodule dotfiles/config/xmonad/xmonad updated: 5c2ba06902...8113e0fe55
Submodule dotfiles/config/xmonad/xmonad-contrib updated: b5ef6265b8...1a8da46855
@@ -1059,8 +1059,8 @@ addKeys conf@XConfig { modMask = modm } =
|
||||
, ((hyper .|. shiftMask, xK_q), spawn "toggle_mute_current_window.sh")
|
||||
, ((hctrl, xK_q), spawn "toggle_mute_current_window.sh only")
|
||||
|
||||
, ((0, xF86XK_MonBrightnessUp), spawn "brightness.sh 5")
|
||||
, ((0, xF86XK_MonBrightnessDown), spawn "brightness.sh -5")
|
||||
, ((0, xF86XK_MonBrightnessUp), spawn "brightness.sh up")
|
||||
, ((0, xF86XK_MonBrightnessDown), spawn "brightness.sh down")
|
||||
|
||||
] ++
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
(setq mc/cmds-to-run-for-all
|
||||
'(
|
||||
TeX-insert-backslash
|
||||
align
|
||||
backward-sexp
|
||||
beginning-of-buffer
|
||||
beginning-of-visual-line
|
||||
@@ -54,12 +55,14 @@
|
||||
sp-remove-active-pair-overlay
|
||||
sp-splice-sexp
|
||||
sp-splice-sexp-killing-backward
|
||||
string-inflection-all-cycle
|
||||
string-inflection-toggle
|
||||
tern-ac-dot-complete
|
||||
transpose-sexps
|
||||
transpose-words
|
||||
undo-redo
|
||||
universal-argument-minus
|
||||
upcase-region
|
||||
wdired-finish-edit
|
||||
yaml-electric-backspace
|
||||
yaml-electric-dash-and-dot
|
||||
@@ -83,6 +86,7 @@
|
||||
imalison:multiple-cursors-hydra/mc/mark-previous-like-this
|
||||
imalison:multiple-cursors-hydra/nil
|
||||
isearch-delete-char
|
||||
lsp-ui-doc--handle-mouse-movement
|
||||
make-frame
|
||||
overwrite-mode
|
||||
smex
|
||||
|
||||
@@ -1138,7 +1138,8 @@ I keep it around just in case I need it.
|
||||
*** frame-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar imalison:use-frame-mode
|
||||
(s-contains? "xmonad" (shell-command-to-string "wmctrl -m")))
|
||||
(or (s-contains? "xmonad" (shell-command-to-string "wmctrl -m"))
|
||||
(s-contains? "Hyprland" (shell-command-to-string "wmctrl -m"))))
|
||||
|
||||
(use-package frame-mode
|
||||
:if imalison:use-frame-mode
|
||||
@@ -1514,20 +1515,26 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
|
||||
(advice-add 'company-call-frontends :before #'fci-on-off-fci-before-company)
|
||||
(add-hook 'prog-mode-hook 'fci-mode)))
|
||||
#+END_SRC
|
||||
** highlight-indent-guides
|
||||
If the load-theme hook from this package starts causing trouble check for
|
||||
custom-set-faces in your custom file.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package highlight-indent-guides
|
||||
:commands highlight-indent-guides-mode
|
||||
:diminish highlight-indent-guides-mode
|
||||
:preface
|
||||
(progn
|
||||
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode))
|
||||
** indent-bars
|
||||
#+begin_src emacs-lisp
|
||||
(use-package indent-bars
|
||||
:disabled t
|
||||
:straight (indent-bars :type git :host github :repo "jdtsmith/indent-bars")
|
||||
:config
|
||||
(progn
|
||||
(setq highlight-indent-guides-method 'fill)))
|
||||
#+END_SRC
|
||||
(require 'indent-bars-ts) ; not needed with straight
|
||||
:custom
|
||||
(indent-bars-treesit-support t)
|
||||
(indent-bars-treesit-ignore-blank-lines-types '("module"))
|
||||
;; Add other languages as needed
|
||||
(indent-bars-treesit-scope '((python function_definition class_definition for_statement
|
||||
if_statement with_statement while_statement)))
|
||||
;; wrap may not be needed if no-descend-list is enough
|
||||
;; (indent-bars-treesit-wrap '((python argument_list parameters ; for python, as an example
|
||||
;; list list_comprehension
|
||||
;; dictionary dictionary_comprehension
|
||||
;; parenthesized_expression subscript)))
|
||||
:hook ((prog-mode) . indent-bars-mode))
|
||||
#+end_src
|
||||
** man-mode
|
||||
Man page escape sequences aren't properly handled by emacs pager. This function
|
||||
fixes that, but for now, it needs to be run manually, since I haven't figured
|
||||
@@ -1785,7 +1792,8 @@ bind-key and global-set-key forms.
|
||||
|
||||
(defun imalison:do-rg-default-directory (&rest args)
|
||||
(interactive)
|
||||
(apply 'consult-ripgrep default-directory args))
|
||||
(let ((consult-ripgrep-args (concat consult-ripgrep-args " --no-ignore" " --hidden")))
|
||||
(apply 'consult-ripgrep default-directory args)))
|
||||
|
||||
(emit-prefix-selector imalison:do-rg
|
||||
consult-ripgrep
|
||||
@@ -2240,26 +2248,26 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
||||
#+END_SRC
|
||||
* flycheck
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package flycheck
|
||||
:commands flycheck-mode
|
||||
:init (add-hook 'prog-mode-hook 'flycheck-mode)
|
||||
:config
|
||||
(progn
|
||||
(use-package flycheck-package
|
||||
:disabled t
|
||||
:config (flycheck-package-setup))
|
||||
(use-package flycheck
|
||||
:commands flycheck-mode
|
||||
:init (add-hook 'prog-mode-hook 'flycheck-mode)
|
||||
:config
|
||||
(progn
|
||||
(use-package flycheck-package
|
||||
:disabled t
|
||||
:config (flycheck-package-setup))
|
||||
|
||||
(use-package flycheck-cask
|
||||
:after flycheck
|
||||
:config
|
||||
(add-hook 'flycheck-mode-hook #'flycheck-cask-setup))
|
||||
(use-package flycheck-cask
|
||||
:after flycheck
|
||||
:config
|
||||
(add-hook 'flycheck-mode-hook #'flycheck-cask-setup))
|
||||
|
||||
(add-to-list 'flycheck-emacs-lisp-checkdoc-variables
|
||||
'sentence-end-double-space)
|
||||
(setq-default flycheck-disabled-checkers '(rust-cargo rust rust-clippy))
|
||||
(setq flycheck-display-errors-delay 10000)
|
||||
(global-flycheck-mode))
|
||||
:diminish flycheck-mode)
|
||||
(add-to-list 'flycheck-emacs-lisp-checkdoc-variables
|
||||
'sentence-end-double-space)
|
||||
(setq-default flycheck-disabled-checkers '(rust-cargo rust rust-clippy))
|
||||
(setq flycheck-display-errors-delay 10000)
|
||||
(global-flycheck-mode))
|
||||
:diminish flycheck-mode)
|
||||
#+END_SRC
|
||||
* straight
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
@@ -2316,6 +2324,13 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
||||
(unbind-key "C-j" python-mode-map)
|
||||
(add-hook 'python-mode-hook #'imalison:python-mode)))
|
||||
#+END_SRC
|
||||
*** ruby
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ruby-mode
|
||||
:config
|
||||
(setf (alist-get 'ruby-ts-mode apheleia-mode-alist)
|
||||
'(rubocop)))
|
||||
#+end_src
|
||||
*** go
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package go-mode
|
||||
@@ -2509,11 +2524,6 @@ Reduce indentation for some functions
|
||||
:config
|
||||
(progn (setq edebug-trace t)))
|
||||
#+END_SRC
|
||||
**** overseer
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package overseer
|
||||
:defer t)
|
||||
#+END_SRC
|
||||
**** Misc
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun imenu-elisp-sections ()
|
||||
@@ -2622,6 +2632,13 @@ eval-last-sexp.
|
||||
(shell-command-to-string "nix eval -I \"$NIX_PATH\" --expr '<nixpkgs>' --impure"))))
|
||||
:config
|
||||
(progn
|
||||
(use-package apheleia
|
||||
:demand t
|
||||
:config
|
||||
(progn
|
||||
(add-to-list 'apheleia-formatters '(alejandra . ("alejandra")))
|
||||
(setf (alist-get 'nix-mode apheleia-mode-alist)
|
||||
'(alejandra))))
|
||||
(setq nix-indent-function 'nix-indent-line)))
|
||||
|
||||
(use-package lsp-nix
|
||||
@@ -2885,6 +2902,14 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
||||
:defer t
|
||||
:mode ("\\.kt\\'"))
|
||||
#+END_SRC
|
||||
*** swift
|
||||
#+begin_src emacs-lisp
|
||||
(use-package swift-mode)
|
||||
#+end_src
|
||||
*** groovy
|
||||
#+begin_src emacs-lisp
|
||||
(use-package groovy-mode)
|
||||
#+end_src
|
||||
*** vala
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package vala-mode
|
||||
@@ -2931,6 +2956,10 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
||||
(use-package protobuf-mode
|
||||
:defer t)
|
||||
#+END_SRC
|
||||
*** graphql
|
||||
#+begin_src emacs-lisp
|
||||
(use-package graphql-mode)
|
||||
#+end_src
|
||||
*** json-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package json-mode
|
||||
@@ -2947,6 +2976,10 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
||||
:mode (("\\.yaml\\'" . yaml-mode)
|
||||
("\\.yml\\'" . yaml-mode)))
|
||||
#+END_SRC
|
||||
*** just-mode
|
||||
#+begin_src emacs-lisp
|
||||
(use-package just-mode)
|
||||
#+end_src
|
||||
*** es-mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package es-mode
|
||||
@@ -2967,6 +3000,11 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
||||
(use-package toml-mode
|
||||
:mode (("\\.toml\\'" . toml-mode)))
|
||||
#+end_src
|
||||
*** terraform
|
||||
#+begin_src emacs-lisp
|
||||
(use-package terraform-mode
|
||||
:mode (("\\.tf\\'" . terraform-mode)))
|
||||
#+end_src
|
||||
** Document
|
||||
*** org
|
||||
My org-mode configuration now lives in its own file org-config.org.
|
||||
@@ -3111,10 +3149,32 @@ My org-mode configuration now lives in its own file org-config.org.
|
||||
(unbind-key "C-j" magit-hunk-section-map)
|
||||
(unbind-key "C-j" magit-file-section-map)
|
||||
(unbind-key "C-j" magit-diff-section-base-map)
|
||||
(remove-hook 'magit-status-headers-hook 'magit-insert-tags-header)
|
||||
(setq magit-revision-insert-related-refs nil)
|
||||
(remove-hook 'magit-status-sections-hook 'magit-insert-unpulled-from-upstream)
|
||||
(remove-hook 'magit-status-sections-hook 'magit-insert-unpushed-to-upstream-or-recent)
|
||||
(setq magit-last-seen-setup-instructions "1.4.0"
|
||||
magit-display-buffer-function
|
||||
'magit-display-buffer-same-window-except-diff-v1)
|
||||
(magit-auto-revert-mode)
|
||||
(dir-locals-set-class-variables
|
||||
'huge-git-repository
|
||||
'((nil
|
||||
. ((magit-refresh-buffers . nil)
|
||||
(magit-revision-insert-related-refs . nil)))
|
||||
(magit-status-mode
|
||||
. ((eval . (magit-disable-section-inserter 'magit-insert-tags-header))
|
||||
(eval . (magit-disable-section-inserter 'magit-insert-recent-commits))
|
||||
(eval . (magit-disable-section-inserter 'magit-insert-unpushed-to-pushremote))
|
||||
(eval . (magit-disable-section-inserter 'magit-insert-unpushed-to-upstream-or-recent))
|
||||
(eval . (magit-disable-section-inserter 'magit-insert-unpulled-from-pushremote))
|
||||
(eval . (magit-disable-section-inserter 'magit-insert-unpulled-from-pushremote))
|
||||
(eval . (magit-disable-section-inserter 'magit-insert-unpulled-from-upstream))
|
||||
))
|
||||
))
|
||||
|
||||
(dir-locals-set-directory-class
|
||||
"/home/imalison/Projects/nixpkgs" 'huge-git-repository)
|
||||
|
||||
(add-to-list 'org-show-context-detail '(magit-goto . lineage))
|
||||
(advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)
|
||||
@@ -3146,7 +3206,21 @@ My org-mode configuration now lives in its own file org-config.org.
|
||||
:defer t
|
||||
:config
|
||||
(progn
|
||||
(setq git-link-use-commit t)))
|
||||
(setq git-link-use-commit t)
|
||||
(defun git-link-commit-gitea (hostname dirname commit)
|
||||
(format "https://%s/%s/commit/%s"
|
||||
hostname
|
||||
dirname
|
||||
commit))
|
||||
(defun git-link-gitea (hostname dirname filename branch commit start end)
|
||||
(format "https://%s/%s/src/commit/%s/%s#L%s"
|
||||
hostname
|
||||
dirname
|
||||
commit
|
||||
filename
|
||||
start))
|
||||
(add-to-list 'git-link-remote-alist '("dev.railbird.ai" git-link-gitea))
|
||||
(add-to-list 'git-link-commit-remote-alist '("dev.railbird.ai" git-link-gitea))))
|
||||
#+END_SRC
|
||||
** magit-gitflow
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
@@ -3269,10 +3343,15 @@ emr (emacs refactor) provides support for refactoring in many programming langua
|
||||
#+END_SRC
|
||||
** language-server-protocol (lsp)
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar imalison:use-lsp nil)
|
||||
(use-package lsp-mode
|
||||
:defer 3
|
||||
:commands lsp
|
||||
:preface
|
||||
(defun imalison:lsp-deferred-when-enabled ()
|
||||
(add-hook 'hack-local-variables-hook
|
||||
(lambda ()
|
||||
(when imalison:use-lsp
|
||||
(lsp-deferred))) nil t))
|
||||
(defun imalison:nix-develop-lsp-wrapper-function (argv)
|
||||
(append
|
||||
(append (list "nix" "develop" "-I" "." "--impure" "--command")
|
||||
@@ -3283,10 +3362,35 @@ emr (emacs refactor) provides support for refactoring in many programming langua
|
||||
(use-package lsp-ui
|
||||
:config
|
||||
(progn
|
||||
(add-hook 'prog-mode-hook 'imalison:lsp-deferred-when-enabled)
|
||||
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
|
||||
(setq lsp-ui-doc-position 'bottom)))))
|
||||
#+END_SRC
|
||||
* Utility
|
||||
** eat
|
||||
#+begin_src emacs-lisp
|
||||
(use-package eat
|
||||
:preface
|
||||
(progn
|
||||
(defun imalison:avy-eat (arg)
|
||||
(interactive "P")
|
||||
(eat-emacs-mode)
|
||||
(imalison:avy arg)))
|
||||
:bind
|
||||
(:map eat-mode-map
|
||||
("C-c C-k" . eat-semi-char-mode)
|
||||
:map eat-semi-char-mode-map
|
||||
("C-c C-j" . eat-emacs-mode)
|
||||
("C-j" . imalison:avy-eat))
|
||||
:config
|
||||
(progn
|
||||
(setq eat--install-path
|
||||
(file-name-directory
|
||||
(file-truename (imalison:join-paths eat--install-path "eat.el"))))
|
||||
(eat-compile-terminfo)
|
||||
(setq eat-term-shell-integration-directory
|
||||
(imalison:join-paths eat--install-path "integration"))))
|
||||
#+end_src
|
||||
** term
|
||||
The main thing I do here is restore a bunch of keybindings that are eliminated
|
||||
in term-mode. This makes term-mode 1000% more useful
|
||||
@@ -3368,6 +3472,12 @@ in term-mode. This makes term-mode 1000% more useful
|
||||
term-projectile-switch)
|
||||
:config
|
||||
(progn
|
||||
(use-package term-manager-eat
|
||||
:demand t
|
||||
:straight
|
||||
(term-manager-eat :type git :files ("term-manager-eat.el")
|
||||
:host github :repo "colonelpanic8/term-manager"))
|
||||
(setq term-projectile-term-manager (term-projectile :build-term 'term-manager-eat-build-term))
|
||||
(emit-prefix-selector imalison:term
|
||||
term-projectile-forward
|
||||
term-projectile-create-new)
|
||||
@@ -3459,9 +3569,18 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
|
||||
:config
|
||||
(progn
|
||||
(add-to-list 'gptel-directives '(finish-code . "You are a large language model and a careful programmer. Provide code that completes what is provided and only code as output without any additional text, prompt or note."))
|
||||
;; (setq gptel-model "gpt-4")
|
||||
(setq gptel-model "gpt-4")
|
||||
))
|
||||
#+end_src
|
||||
** claude-code-ide
|
||||
#+begin_src emacs-lisp
|
||||
(use-package claude-code-ide
|
||||
:straight (:type git :host github :repo "manzaltu/claude-code-ide.el")
|
||||
:bind ("C-c C-'" . claude-code-ide-menu)
|
||||
:config
|
||||
(claude-code-ide-emacs-tools-setup)
|
||||
(setq claude-code-ide-terminal-backend 'eat))
|
||||
#+end_src
|
||||
* Cooperation
|
||||
** togetherly
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
@@ -3563,15 +3682,6 @@ I had to disable this mode because something that it does messes with coding set
|
||||
(progn
|
||||
(setq dtrt-indent-active-mode-line-info " [⟼]")))
|
||||
#+END_SRC
|
||||
** indent-guide
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package indent-guide
|
||||
:disabled t
|
||||
:config
|
||||
(progn
|
||||
(indent-guide-global-mode -1)
|
||||
(setq indent-guide-delay 0.1)))
|
||||
#+END_SRC
|
||||
** rainbow-delimiters
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package rainbow-delimiters
|
||||
@@ -3580,24 +3690,10 @@ I had to disable this mode because something that it does messes with coding set
|
||||
(progn
|
||||
(add-hook 'prog-mode-hook (lambda () (rainbow-delimiters-mode t)))))
|
||||
#+END_SRC
|
||||
** undo-tree
|
||||
Disabled because it makes it hard to redo things
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package undo-tree
|
||||
:disabled t
|
||||
:bind (("C--" . undo-redo)
|
||||
("C-c u" . undo-tree-visualize)
|
||||
("C-c r" . undo-tree-redo))
|
||||
:config
|
||||
(diminish 'undo-tree-mode)
|
||||
:init
|
||||
(progn
|
||||
;;(setq undo-tree-visualizer-diff t) ;; This causes performance problems
|
||||
(setq undo-limit (expt 2 25)
|
||||
undo-strong-limit (expt 2 25))
|
||||
(global-undo-tree-mode)
|
||||
(setq undo-tree-visualizer-timestamps t)))
|
||||
#+END_SRC
|
||||
** vundo
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vundo)
|
||||
#+end_src
|
||||
** recentf
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package recentf
|
||||
@@ -4056,7 +4152,12 @@ This also adds syntax highlighting for gradle
|
||||
#+END_SRC
|
||||
** evil
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package evil :commands (evil-mode))
|
||||
(use-package evil
|
||||
:commands (evil-mode)
|
||||
:config
|
||||
(use-package evil-collection
|
||||
:config
|
||||
(with-eval-after-load 'eat (evil-collection-eat-setup))))
|
||||
#+END_SRC
|
||||
** hackernews
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
(use-package org
|
||||
:straight
|
||||
(org :type git :host github :repo "colonelpanic8/org-mode" :local-repo "org"
|
||||
:branch "my-main"
|
||||
:branch "my-main-2025"
|
||||
:depth full :pre-build (straight-recipes-org-elpa--build) :build
|
||||
(:not autoloads) :files
|
||||
(:defaults "lisp/*.el" ("etc/styles/" "etc/styles/*")))
|
||||
|
||||
@@ -58,41 +58,11 @@ This makes evil-mode play nice with org-fc
|
||||
(file+datetree "~/org/weekly_reviews.org")
|
||||
(file "~/org/weekly_review_template.org")))))
|
||||
#+end_src
|
||||
|
||||
** Daily Journal Entries
|
||||
** Journal
|
||||
#+begin_src emacs-lisp
|
||||
(defun imalison:journal-filepath-for-date (&optional date)
|
||||
(interactive (list (org-read-date)))
|
||||
(let ((date-str (or date (format-time-string "%Y-%m-%d"))))
|
||||
(imalison:join-paths
|
||||
org-directory "journal" (concat date-str ".org"))))
|
||||
|
||||
(defun imalison:open-todays-org-journal ()
|
||||
(interactive)
|
||||
(imalison:open-org-journal (format-time-string "%Y-%m-%d")))
|
||||
|
||||
(defun imalison:get-journal-template ()
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (imalison:join-paths org-directory "templates" "daily-journal-template.org"))
|
||||
(buffer-string)))
|
||||
|
||||
(defun imalison:open-org-journal (&optional date)
|
||||
(interactive (list (org-read-date nil nil nil "Select a date:")))
|
||||
(let* ((filepath (imalison:journal-filepath-for-date date))
|
||||
(file-existed (file-exists-p filepath))
|
||||
(date-str (or date (format-time-string "%Y-%m-%d")))
|
||||
(time-vals (append '(0 0 0) (nthcdr 3 (parse-time-string date-str))))
|
||||
(original-format-time-string (symbol-function 'format-time-string)))
|
||||
(find-file filepath)
|
||||
(when (not file-existed)
|
||||
(cl-letf (((symbol-function 'format-time-string)
|
||||
(lambda (format-string &optional _time _universal)
|
||||
(funcall original-format-time-string format-string (apply #'encode-time time-vals)))))
|
||||
(insert (org-capture-fill-template (imalison:get-journal-template)))))))
|
||||
|
||||
(bind-key "C-c j" 'imalison:open-todays-org-journal)
|
||||
(setq imalison:journal-template-filepath
|
||||
(imalison:join-paths org-directory "templates" "daily-journal-template.org"))
|
||||
#+end_src
|
||||
|
||||
** Insert a link to a task selected from agenda
|
||||
#+begin_src emacs-lisp
|
||||
(defun imalison:insert-link-to-agenda ()
|
||||
@@ -157,3 +127,50 @@ This makes evil-mode play nice with org-fc
|
||||
(setf (alist-get 'python-ts-mode apheleia-mode-alist)
|
||||
(alist-get 'python-mode apheleia-mode-alist))))
|
||||
#+end_src
|
||||
|
||||
* Packages
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-drill)
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
(package-initialize)
|
||||
|
||||
#+end_src
|
||||
|
||||
* Disable wild notifactions
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-wild-notifier-day-wide-alert-times nil)
|
||||
#+end_src
|
||||
|
||||
* Swift
|
||||
#+begin_src emacs-lisp
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
(package-initialize)
|
||||
|
||||
(unless (package-installed-p 'swift-mode)
|
||||
(package-refresh-contents)
|
||||
(package-install 'swift-mode))
|
||||
|
||||
(unless (package-installed-p 'lsp-mode)
|
||||
(package-refresh-contents)
|
||||
(package-install 'lsp-mode))
|
||||
|
||||
;; Swift Mode
|
||||
(require 'swift-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.swift\\'" . swift-mode))
|
||||
|
||||
;; LSP Mode
|
||||
(require 'lsp-mode)
|
||||
(add-hook 'swift-mode-hook #'lsp)
|
||||
|
||||
;; Set the path to SourceKit-LSP if it's not in your PATH
|
||||
(setq lsp-sourcekit-executable "/path/to/sourcekit-lsp")
|
||||
|
||||
;; Optional: Set the path to your Swift toolchain if necessary
|
||||
(setq lsp-sourcekit-executable-args '("-toolchain" "/path/to/swift-toolchain"))
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
91
dotfiles/emacs.d/org-api.el
Normal file
91
dotfiles/emacs.d/org-api.el
Normal file
@@ -0,0 +1,91 @@
|
||||
(let ((current-dir (if load-file-name (file-name-directory load-file-name) "~/.emacs.d/")))
|
||||
(load (expand-file-name "init.el" current-dir)))
|
||||
|
||||
(use-package simple-httpd
|
||||
:demand t)
|
||||
|
||||
(require 'simple-httpd)
|
||||
|
||||
(defun org-api-get-todo-elements-from-filepath (filepath)
|
||||
(let ((todo-elements nil))
|
||||
(with-current-buffer (find-file-noselect filepath)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward org-todo-regexp nil t)
|
||||
(let* ((element (org-element-at-point))
|
||||
(type (org-element-type element)))
|
||||
(when (eq type 'headline)
|
||||
(let ((todo (org-element-property :todo-keyword element)))
|
||||
(when todo
|
||||
(push element todo-elements))))))))
|
||||
todo-elements))
|
||||
|
||||
(defun org-api-get-agenda-todos ()
|
||||
(let* ((today (calendar-gregorian-from-absolute (org-today))))
|
||||
(mapcan 'org-api-get-todo-elements-from-filepath org-agenda-files)))
|
||||
|
||||
(defun org-api-get-element-json (element)
|
||||
(let ((todo (org-element-property :todo-keyword element))
|
||||
(title (org-element-property :raw-value element))
|
||||
(tags (org-element-property :tags element))
|
||||
(level (org-element-property :level element))
|
||||
(scheduled (org-element-property :scheduled element))
|
||||
(deadline (org-element-property :deadline element)))
|
||||
`(("todo" . ,todo)
|
||||
("title" . ,title)
|
||||
("tags" . ,tags)
|
||||
("level" . ,level)
|
||||
("scheduled" . ,(when scheduled (org-format-timestamp scheduled "%Y-%m-%dT%H:%M:%SZ")))
|
||||
("deadline" . ,(when deadline (org-format-timestamp deadline "%Y-%m-%dT%H:%M:%SZ"))))))
|
||||
|
||||
(defun org-api-item-json (item)
|
||||
(let* ((todo (get-text-property 0 'todo-state item))
|
||||
(title (substring-no-properties item))
|
||||
(tags (get-text-property 0 'tags item))
|
||||
(s (get-text-property 0 'ts-date item))
|
||||
(scheduled (when s
|
||||
(org-format-timestamp (org-time-from-absolute s) "%Y-%m-%dT%H:%M:%SZ") )))
|
||||
`(("todo" . ,todo)
|
||||
("title" . ,title)
|
||||
("tags" . ,tags))))
|
||||
|
||||
|
||||
(defun org-api-get-scheduled-or-deadlined (day filepath)
|
||||
(with-current-buffer (find-file-noselect filepath)
|
||||
(org-dlet ((date day))
|
||||
(setf org-agenda-current-date date)
|
||||
(nconc (org-agenda-get-deadlines) (org-agenda-get-scheduled)))))
|
||||
|
||||
(defun org-api-get-today-agenda ()
|
||||
(let ((day (calendar-current-date)))
|
||||
(mapcan (lambda (filepath) (org-api-get-scheduled-or-deadlined day filepath))
|
||||
org-agenda-files)))
|
||||
|
||||
(defservlet get-all-todos application/json ()
|
||||
(insert (json-encode (mapcar 'org-api-get-element-json (org-api-get-agenda-todos)))))
|
||||
|
||||
(defservlet get-todays-agenda application/json ()
|
||||
(insert
|
||||
(json-encode
|
||||
(mapcar 'org-api-item-json
|
||||
(org-api-get-today-agenda)))))
|
||||
|
||||
(defservlet create-todo application/json (a b c)
|
||||
(org-api-capture (gethash "title" (json-parse-string (cadr (assoc "Content" c))))))
|
||||
|
||||
(cl-defun org-api-build-capture-template
|
||||
(content &key (character "d") (heading "Dynamic"))
|
||||
`(,character ,heading entry (file "~/org/inbox.org")
|
||||
(function (lambda ()
|
||||
(imalison:make-org-todo-template :content content)))
|
||||
:immediate-finish t))
|
||||
|
||||
(defun org-api-capture (content)
|
||||
(let* ((org-capture-templates (list (org-api-build-capture-template content))))
|
||||
(org-capture nil "d")))
|
||||
|
||||
|
||||
(message "Starting http server")
|
||||
(setq httpd-port 2025)
|
||||
(httpd-start)
|
||||
(message "Finished starting http server")
|
||||
@@ -62,6 +62,11 @@ We're going to use this to write separate parts of our config to different secti
|
||||
(imalison:join-paths imalison:shared-org-dir "ivan_orgzly.org")
|
||||
(imalison:join-paths imalison:org-dir "orgzly.org")))
|
||||
|
||||
(defvar imalison:repeating-org-files
|
||||
(list imalison:org-habits-file imalison:shared-habits-file imalison:shared-repeating-file))
|
||||
|
||||
(defvar imalison:include-repeating-in-agenda nil)
|
||||
|
||||
(defun imalison:add-to-org-agenda-files (incoming-files)
|
||||
(setq org-agenda-files
|
||||
(delete-dups
|
||||
@@ -199,6 +204,35 @@ We're going to use this to write separate parts of our config to different secti
|
||||
((current-time (&rest args) time))
|
||||
(funcall fn)))
|
||||
#+end_src
|
||||
** Reschedule Past Items to Today
|
||||
This function finds all incomplete items in the agenda files that are scheduled
|
||||
in the past and reschedules them to today. Useful for catching up on tasks that
|
||||
have slipped past their original scheduled date.
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(defun imalison:reschedule-past-to-today ()
|
||||
"Reschedule all incomplete items scheduled in the past to today.
|
||||
Iterates through all org-agenda files and reschedules any TODO items
|
||||
that have a SCHEDULED date before today to the current date."
|
||||
(interactive)
|
||||
(let* ((today-time (org-time-string-to-time (format-time-string "<%Y-%m-%d>")))
|
||||
(rescheduled-count 0))
|
||||
(org-map-entries
|
||||
(lambda ()
|
||||
(let* ((scheduled (org-entry-get nil "SCHEDULED"))
|
||||
(scheduled-time (when scheduled (org-time-string-to-time scheduled))))
|
||||
(when (and scheduled-time
|
||||
(not (org-entry-is-done-p))
|
||||
(time-less-p scheduled-time today-time))
|
||||
(org-schedule nil ".")
|
||||
(cl-incf rescheduled-count))))
|
||||
nil
|
||||
'agenda)
|
||||
(message "Rescheduled %d items to today" rescheduled-count)))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: imalison:reschedule-past-to-today
|
||||
|
||||
** Miscellaneous
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(add-to-list 'org-show-context-detail '(org-goto . lineage))
|
||||
@@ -366,12 +400,13 @@ We're going to use this to write separate parts of our config to different secti
|
||||
*** Agenda Files
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(imalison:add-to-org-agenda-files
|
||||
(nconc (list imalison:org-gtd-file imalison:org-habits-file
|
||||
imalison:org-calendar-file imalison:org-inbox-file
|
||||
imalison:shared-org-gtd-file imalison:shared-habits-file
|
||||
imalison:shared-calendar-file imalison:shared-shopping-file
|
||||
imalison:shared-repeating-file)
|
||||
(nconc (list imalison:org-gtd-file imalison:org-calendar-file
|
||||
imalison:org-inbox-file imalison:shared-org-gtd-file
|
||||
imalison:shared-calendar-file imalison:shared-shopping-file)
|
||||
imalison:orgzly-files))
|
||||
|
||||
(when imalison:include-repeating-in-agenda
|
||||
(imalison:add-to-org-agenda-files imalison:repeating-org-files))
|
||||
#+end_src
|
||||
*** Predicates
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
@@ -588,6 +623,43 @@ specific time, they should appear in the agenda at that time!
|
||||
(defun imalison:make-org-linked-todo-template ()
|
||||
(imalison:make-org-todo-template "[#C] %? %A"))
|
||||
#+end_src
|
||||
*** Journal
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(defun imalison:journal-filepath-for-date (&optional date)
|
||||
(interactive (list (org-read-date)))
|
||||
(let ((date-str (or date (format-time-string "%Y-%m-%d"))))
|
||||
(imalison:join-paths
|
||||
org-directory "journal" (concat date-str ".org"))))
|
||||
|
||||
(defun imalison:open-todays-org-journal ()
|
||||
(interactive)
|
||||
(imalison:open-org-journal (format-time-string "%Y-%m-%d")))
|
||||
|
||||
(defvar imalison:journal-template-filepath
|
||||
(imalison:join-paths org-directory "capture-templates" "journal.org"))
|
||||
|
||||
(defun imalison:get-journal-template ()
|
||||
(with-temp-buffer
|
||||
(insert-file-contents imalison:journal-template-filepath)
|
||||
(buffer-string)))
|
||||
|
||||
(defun imalison:open-org-journal (&optional date)
|
||||
(interactive (list (org-read-date nil nil nil "Select a date:")))
|
||||
(let* ((filepath (imalison:journal-filepath-for-date date))
|
||||
(file-existed (file-exists-p filepath))
|
||||
(date-str (or date (format-time-string "%Y-%m-%d")))
|
||||
(time-vals (append '(0 0 0) (nthcdr 3 (parse-time-string date-str))))
|
||||
(original-format-time-string (symbol-function 'format-time-string)))
|
||||
(find-file filepath)
|
||||
(when (not file-existed)
|
||||
(cl-letf (((symbol-function 'format-time-string)
|
||||
(lambda (format-string &optional _time _universal)
|
||||
(funcall original-format-time-string format-string (apply #'encode-time time-vals)))))
|
||||
(insert (org-capture-fill-template (imalison:get-journal-template)))))))
|
||||
|
||||
(bind-key "C-c j" 'imalison:open-todays-org-journal)
|
||||
#+end_src
|
||||
|
||||
*** Templates
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
(use-package org-capture
|
||||
@@ -626,7 +698,15 @@ SCHEDULED: %^t
|
||||
:PROPERTIES:
|
||||
:CREATED: %U
|
||||
:STYLE: habit
|
||||
:END:")))
|
||||
:END:"))
|
||||
(add-to-list 'org-capture-templates
|
||||
'("w" "Weekly Planning and Self Assesment"
|
||||
plain
|
||||
(function (lambda ()
|
||||
(find-file (let ((date (format-time-string "%Y-%m-%d")))
|
||||
(expand-file-name (concat date ".org")
|
||||
"~/org/weekly")))))
|
||||
(file "~/org/capture-templates/weekly.org"))))
|
||||
#+end_src
|
||||
** Babel
|
||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||
|
||||
5
dotfiles/emacs.d/snippets/python-mode/ign
Normal file
5
dotfiles/emacs.d/snippets/python-mode/ign
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ign
|
||||
# key: ign
|
||||
# --
|
||||
# type: ignore
|
||||
5
dotfiles/emacs.d/snippets/python-mode/inp
Normal file
5
dotfiles/emacs.d/snippets/python-mode/inp
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: inp
|
||||
# key: inp
|
||||
# --
|
||||
import numpy as np
|
||||
5
dotfiles/emacs.d/snippets/python-mode/isa
Normal file
5
dotfiles/emacs.d/snippets/python-mode/isa
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: isa
|
||||
# key: isa
|
||||
# --
|
||||
import sqlalchemy as sa
|
||||
5
dotfiles/emacs.d/snippets/python-mode/logg
Normal file
5
dotfiles/emacs.d/snippets/python-mode/logg
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: logg
|
||||
# key: logg
|
||||
# --
|
||||
logger = logging.getLogger(__name__)
|
||||
5
dotfiles/emacs.d/snippets/python-mode/noqa
Normal file
5
dotfiles/emacs.d/snippets/python-mode/noqa
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: 401
|
||||
# key: 401
|
||||
# --
|
||||
# noqa: F401
|
||||
@@ -10,7 +10,7 @@
|
||||
cpr = cherry-pick-range
|
||||
cam = commit -am
|
||||
clean-branches = "!r() { git branch --merged ${1-origin/master} | grep -v '*' | xargs -n1 git branch -d; }; r"
|
||||
del-merged-branches = "!f() { git fetch $1 && git branch -r --merged $1/$2 | awk -F/ \"/$1/ && !/$2$/ {print \\$2}\" | xargs -I {} git push $1 --delete {}; }; f"
|
||||
del-merged-branches = "!f() { git fetch $1 && git branch -r --merged $1/$2 | grep -v \"$1/$2$\" | sed \"s:$1/::\" | xargs -I {} sh -c \"git push $1 :{}\" _; }; f"
|
||||
clone = clone --recursive
|
||||
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" # Credit an author on the latest commit
|
||||
co = checkout
|
||||
@@ -50,6 +50,7 @@
|
||||
tb = rev-parse --abbrev-ref --symbolic-full-name @{u}
|
||||
untracked = "!u() { git status -s | grep "??" | awk '{print $2}'; }; u"
|
||||
which-branch = "!wb() { b="$(git symbolic-ref HEAD)" && echo ${b#refs/heads/}; }; wb"
|
||||
find-merge = "!sh -c 'commit=$0 && branch=${1:-HEAD} && (git rev-list $commit..$branch --ancestry-path | cat -n; git rev-list $commit..$branch --first-parent | cat -n) | sort -k2 -s | uniq -f1 -d | sort -n | tail -1 | cut -f2'"
|
||||
|
||||
[core]
|
||||
# Use custom `.gitignore` and `.gitattributes`
|
||||
@@ -88,12 +89,6 @@
|
||||
[rerere]
|
||||
enabled = false
|
||||
|
||||
[url "ssh://git@github.com/uber/"]
|
||||
insteadOf = https://github.com/uber/
|
||||
|
||||
[url "ssh://gitolite@code.uber.internal:2222/"]
|
||||
insteadOf = https://code.uber.internal/
|
||||
|
||||
[branch]
|
||||
autosetuprebase = always
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ pom.xml
|
||||
TAGS
|
||||
|
||||
# Vim
|
||||
*.sw*
|
||||
*.tmp*
|
||||
|
||||
# JavaScript
|
||||
@@ -75,3 +74,7 @@ cabal.project.local
|
||||
#
|
||||
.direnv
|
||||
/dotfiles/config/gtk-3.0/settings.ini
|
||||
|
||||
/untracked
|
||||
|
||||
railbird-infra-*.json
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
binding "gtk-emacs-text-entry"
|
||||
{
|
||||
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) }
|
||||
}
|
||||
|
||||
gtk-theme-name="Paper"
|
||||
gtk-icon-theme-name="Paper"
|
||||
gtk-font-name="Roboto 11"
|
||||
gtk-cursor-theme-name="Paper"
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle="hintfull"
|
||||
|
||||
164
dotfiles/lib/bin/brightness.hs
Executable file
164
dotfiles/lib/bin/brightness.hs
Executable file
@@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env runhaskell
|
||||
|
||||
import System.Environment (getArgs)
|
||||
import System.Process
|
||||
import System.Exit
|
||||
import Data.List (isPrefixOf, isSuffixOf)
|
||||
import Data.Maybe (mapMaybe, fromMaybe)
|
||||
import Text.Read (readMaybe)
|
||||
import Control.Monad (forM, when)
|
||||
import Data.Time.Clock
|
||||
import Data.Time.Format
|
||||
import System.IO
|
||||
|
||||
-- Types
|
||||
data Device = Device { deviceName :: String, deviceBrightness :: Int }
|
||||
deriving (Show)
|
||||
|
||||
data BrightnessCommand = Absolute Int | Increase Int | Decrease Int | Query
|
||||
deriving (Show)
|
||||
|
||||
-- Logging
|
||||
logAction :: String -> IO ()
|
||||
logAction arg = do
|
||||
time <- getCurrentTime
|
||||
let timeStr = formatTime defaultTimeLocale "%Y-%m-%d %H:%M:%S" time
|
||||
ppid <- readProcess "sh" ["-c", "ps -p $PPID -o comm= 2>/dev/null || echo unknown"] ""
|
||||
pwd <- readProcess "pwd" [] ""
|
||||
let logEntry = "[" ++ timeStr ++ "] Called with: '" ++ arg ++ "' | Parent: " ++
|
||||
filter (/= '\n') ppid ++ " | PWD: " ++ filter (/= '\n') pwd ++ "\n"
|
||||
appendFile "/tmp/brightness.log" logEntry
|
||||
|
||||
-- Parse command line argument
|
||||
parseArg :: String -> BrightnessCommand
|
||||
parseArg "" = Query
|
||||
parseArg ('+':rest) = case readMaybe rest of
|
||||
Just n -> Increase n
|
||||
Nothing -> Query
|
||||
parseArg ('-':rest) = case readMaybe rest of
|
||||
Just n -> Decrease n
|
||||
Nothing -> Query
|
||||
parseArg s = case readMaybe s of
|
||||
Just n -> Absolute n
|
||||
Nothing -> Query
|
||||
|
||||
-- Get list of backlight devices
|
||||
getBacklightDevices :: IO [String]
|
||||
getBacklightDevices = do
|
||||
output <- readProcess "brightnessctl" ["--list"] ""
|
||||
return $ mapMaybe extractDevice (lines output)
|
||||
where
|
||||
extractDevice line
|
||||
| "Device '" `isInfixOf` line && "class 'backlight'" `isInfixOf` line =
|
||||
let afterDevice = drop (length "Device '") line
|
||||
deviceName = takeWhile (/= '\'') afterDevice
|
||||
in if null deviceName then Nothing else Just deviceName
|
||||
| otherwise = Nothing
|
||||
|
||||
-- Get brightness percentage for a device
|
||||
getDeviceBrightness :: String -> IO (Maybe Int)
|
||||
getDeviceBrightness device = do
|
||||
output <- readProcess "brightnessctl" ["-d", device] ""
|
||||
return $ extractPercentage output
|
||||
where
|
||||
extractPercentage s = case dropWhile (/= '(') s of
|
||||
('(':rest) -> readMaybe (takeWhile (/= '%') rest)
|
||||
_ -> Nothing
|
||||
|
||||
-- Set brightness for a device
|
||||
setDeviceBrightness :: String -> String -> IO ()
|
||||
setDeviceBrightness device cmd = do
|
||||
_ <- readProcess "brightnessctl" ["-d", device, "set", cmd] ""
|
||||
return ()
|
||||
|
||||
-- Build brightness command string
|
||||
buildCommand :: BrightnessCommand -> String
|
||||
buildCommand (Absolute n) = show n ++ "%"
|
||||
buildCommand (Increase n) = show n ++ "%+"
|
||||
buildCommand (Decrease n) = show n ++ "%-"
|
||||
buildCommand Query = ""
|
||||
|
||||
-- Apply brightness change to all devices
|
||||
applyBrightness :: BrightnessCommand -> IO ()
|
||||
applyBrightness Query = return ()
|
||||
applyBrightness cmd = do
|
||||
devices <- getBacklightDevices
|
||||
let cmdStr = buildCommand cmd
|
||||
|
||||
-- Log what we're about to do
|
||||
appendFile "/tmp/brightness.log" $
|
||||
" Applying: " ++ cmdStr ++ " to devices: " ++ show devices ++ "\n"
|
||||
|
||||
-- Apply to all devices
|
||||
mapM_ (\dev -> setDeviceBrightness dev cmdStr) devices
|
||||
|
||||
-- Sync devices if needed
|
||||
when (length devices > 1) $ do
|
||||
brightnesses <- forM devices $ \dev -> do
|
||||
mbBright <- getDeviceBrightness dev
|
||||
return (dev, mbBright)
|
||||
|
||||
let validBrightnesses = [(d, b) | (d, Just b) <- brightnesses]
|
||||
when (not $ null validBrightnesses) $ do
|
||||
let values = map snd validBrightnesses
|
||||
maxBright = maximum values
|
||||
minBright = minimum values
|
||||
|
||||
-- If devices are out of sync
|
||||
when (maxBright /= minBright) $ do
|
||||
-- Use minimum when brightness is low (15% or below)
|
||||
let syncValue = if maxBright <= 15 then minBright else maxBright
|
||||
-- Log sync decision for debugging
|
||||
appendFile "/tmp/brightness.log" $
|
||||
" Syncing: max=" ++ show maxBright ++ "%, min=" ++ show minBright ++
|
||||
"%, using=" ++ show syncValue ++ "%\n"
|
||||
mapM_ (\dev -> setDeviceBrightness dev (show syncValue ++ "%")) devices
|
||||
|
||||
-- Get average brightness across all devices
|
||||
getAverageBrightness :: IO Int
|
||||
getAverageBrightness = do
|
||||
devices <- getBacklightDevices
|
||||
if null devices
|
||||
then return 50 -- Default fallback
|
||||
else do
|
||||
brightnesses <- forM devices getDeviceBrightness
|
||||
let validValues = [b | Just b <- brightnesses]
|
||||
if null validValues
|
||||
then return 50
|
||||
else return $ sum validValues `div` length validValues
|
||||
|
||||
-- Send notification using rumno if available
|
||||
sendNotification :: Int -> IO ()
|
||||
sendNotification brightness = do
|
||||
rumnoExists <- (== ExitSuccess) <$>
|
||||
rawSystem "sh" ["-c", "command -v rumno >/dev/null 2>&1"]
|
||||
if rumnoExists
|
||||
then do
|
||||
_ <- readProcess "rumno" ["notify", "-b", show brightness] ""
|
||||
return ()
|
||||
else putStrLn (show brightness)
|
||||
|
||||
-- Check if a string contains another
|
||||
isInfixOf :: String -> String -> Bool
|
||||
isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
|
||||
where
|
||||
tails [] = [[]]
|
||||
tails xs@(_:xs') = xs : tails xs'
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
args <- getArgs
|
||||
let arg = case args of
|
||||
[] -> ""
|
||||
(x:_) -> x
|
||||
|
||||
-- Log the invocation
|
||||
logAction arg
|
||||
|
||||
-- Parse and apply command
|
||||
let cmd = parseArg arg
|
||||
applyBrightness cmd
|
||||
|
||||
-- Get current brightness and notify
|
||||
brightness <- getAverageBrightness
|
||||
sendNotification brightness
|
||||
@@ -1,3 +1,92 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
volnoti-show $(sudo brightness_manager.py -c "$@" -p)
|
||||
# Get the brightness argument (default to empty string to just show current)
|
||||
ARG="${1:-}"
|
||||
|
||||
# Log the incoming arguments for debugging
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] brightness.sh called with: '$ARG' (all args: $@)" >> /tmp/brightness_bash.log
|
||||
|
||||
# Function to get current brightness percentage
|
||||
get_brightness_percentage() {
|
||||
# Get list of display backlight devices only (filter by class 'backlight')
|
||||
local devices=$(brightnessctl --list 2>/dev/null | grep 'class.*backlight' | cut -d' ' -f2 | cut -d"'" -f2)
|
||||
local device_count=$(echo "$devices" | wc -w)
|
||||
|
||||
if [ "$device_count" -eq 0 ]; then
|
||||
echo "50" # Default fallback
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "$device_count" -eq 1 ]; then
|
||||
# Single device - just output its percentage
|
||||
local info=$(brightnessctl 2>/dev/null | grep -oP '\d+%' | head -1 | tr -d '%')
|
||||
if [ -n "$info" ]; then
|
||||
echo "$info"
|
||||
else
|
||||
echo "50"
|
||||
fi
|
||||
else
|
||||
# Multiple devices - calculate average brightness
|
||||
local total=0
|
||||
local count=0
|
||||
for device in $devices; do
|
||||
local info=$(brightnessctl -d "$device" 2>/dev/null | grep -oP '\d+%' | head -1 | tr -d '%')
|
||||
if [ -n "$info" ]; then
|
||||
total=$((total + info))
|
||||
count=$((count + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$count" -gt 0 ]; then
|
||||
echo $((total / count))
|
||||
else
|
||||
echo "50"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Apply brightness change if argument provided
|
||||
if [ -n "$ARG" ]; then
|
||||
# Determine if it's absolute or relative
|
||||
if [[ "$ARG" == "up" ]]; then
|
||||
# Increase by 5%
|
||||
BRIGHTNESS_CMD="5%+"
|
||||
elif [[ "$ARG" == "down" ]]; then
|
||||
# Decrease by 5%
|
||||
BRIGHTNESS_CMD="5%-"
|
||||
elif [[ "$ARG" == +* ]]; then
|
||||
# Relative increase (e.g., +5)
|
||||
BRIGHTNESS_CMD="${ARG:1}%+"
|
||||
elif [[ "$ARG" == -* ]]; then
|
||||
# Relative decrease (e.g., -5)
|
||||
BRIGHTNESS_CMD="${ARG:1}%-"
|
||||
else
|
||||
# Absolute value (e.g., 50)
|
||||
BRIGHTNESS_CMD="${ARG}%"
|
||||
fi
|
||||
|
||||
# Try to apply to all devices
|
||||
# Get list of display backlight devices only (filter by class 'backlight')
|
||||
DEVICES=$(brightnessctl --list 2>/dev/null | grep 'class.*backlight' | cut -d' ' -f2 | cut -d"'" -f2)
|
||||
|
||||
if [ -n "$DEVICES" ]; then
|
||||
# Apply to each device independently without syncing
|
||||
# This allows each device to maintain its own brightness range
|
||||
for device in $DEVICES; do
|
||||
brightnessctl -d "$device" set "$BRIGHTNESS_CMD" >/dev/null 2>&1
|
||||
done
|
||||
else
|
||||
# Fallback: just run brightnessctl without specifying device
|
||||
brightnessctl set "$BRIGHTNESS_CMD" >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get current brightness percentage for display
|
||||
BRIGHTNESS=$(get_brightness_percentage)
|
||||
|
||||
# Show notification if rumno is available
|
||||
if command -v rumno &> /dev/null; then
|
||||
rumno notify -b "$BRIGHTNESS"
|
||||
else
|
||||
echo "$BRIGHTNESS"
|
||||
fi
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class BrightnessManager(object):
|
||||
|
||||
@classmethod
|
||||
def from_path(cls, path):
|
||||
return cls(
|
||||
set_brightness_filepath=os.path.join(path, "brightness"),
|
||||
actual_brightness_filepath=os.path.join(path, "actual_brightness"),
|
||||
max_brightness_filepath=os.path.join(path, "max_brightness"),
|
||||
)
|
||||
|
||||
def __init__(
|
||||
self, set_brightness_filepath, max_brightness_filepath, actual_brightness_filepath
|
||||
):
|
||||
self.set_brightness_filepath = set_brightness_filepath
|
||||
self.max_brightness_filepath = max_brightness_filepath
|
||||
self.actual_brightness_filepath = actual_brightness_filepath
|
||||
|
||||
@property
|
||||
def current_brightness(self):
|
||||
with open(self.actual_brightness_filepath) as fd:
|
||||
return int(fd.read())
|
||||
|
||||
@property
|
||||
def max_brightness(self):
|
||||
with open(self.max_brightness_filepath) as fd:
|
||||
return int(fd.read())
|
||||
|
||||
@current_brightness.setter
|
||||
def current_brightness(self, brightness):
|
||||
with open(self.set_brightness_filepath, 'w') as fd:
|
||||
fd.write(str(brightness))
|
||||
|
||||
def increment_by_proportion(self, proportion):
|
||||
new_brightness = self.current_brightness + int(self.max_brightness * proportion)
|
||||
new_brightness = min(new_brightness, self.max_brightness)
|
||||
self.current_brightness = new_brightness
|
||||
|
||||
@property
|
||||
def current_proportion(self):
|
||||
return float(self.current_brightness) / self.max_brightness
|
||||
|
||||
|
||||
IntelBrightnessManager = BrightnessManager.from_path(
|
||||
"/sys/class/backlight/intel_backlight",
|
||||
)
|
||||
|
||||
|
||||
def build_parser():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Interact with macbook brightness',
|
||||
)
|
||||
parser.add_argument(
|
||||
"--change", "-c",
|
||||
help="Change volume by the given percentage",
|
||||
default=0
|
||||
)
|
||||
parser.add_argument(
|
||||
"--print", "-p", dest="do_print",
|
||||
action='store_true',
|
||||
default=False
|
||||
)
|
||||
return parser
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = build_parser().parse_args()
|
||||
IntelBrightnessManager.increment_by_proportion(float(args.change) / 100)
|
||||
if args.do_print:
|
||||
print(int(IntelBrightnessManager.current_proportion * 100))
|
||||
7
dotfiles/lib/functions/nr
Executable file
7
dotfiles/lib/functions/nr
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function nr {
|
||||
nix run nixpkgs#"$@"
|
||||
}
|
||||
|
||||
nr "$@"
|
||||
7
dotfiles/lib/functions/ns
Executable file
7
dotfiles/lib/functions/ns
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function ns {
|
||||
sk --ansi -i -c 'nix-search "{}"' | get_cols 1
|
||||
}
|
||||
|
||||
ns "$@"
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
function pashowvolume {
|
||||
if paismuted; then
|
||||
volnoti-show -m
|
||||
rumno notify -m
|
||||
else
|
||||
actual=$(pavolume)
|
||||
max=100
|
||||
show=$(( actual < max ? actual : max ))
|
||||
volnoti-show "$show"
|
||||
rumno notify -v "$show"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function pavolume {
|
||||
pacmd list-sinks |
|
||||
awk '/^\s+name: /{indefault = $2 == "<'"$(pasink)"'>"}
|
||||
/^\s+volume: / && indefault {print $5; exit}' | grep -Eo "[0-9]*"
|
||||
pactl get-sink-volume $(pactl get-default-sink) | FS="/" get_cols 2 | grep -oE '[0-9]*'
|
||||
}
|
||||
|
||||
pavolume
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function set_volume {
|
||||
current_default=$(pahelper list | grep '*' | all_after_char ":" | xargs)
|
||||
environment_variable_exists USE_ONLY_O_PASINK && pahelper "$current_default"
|
||||
|
||||
# XXX: this does not prevent volumes higher than 100
|
||||
pulsemixer "$@"
|
||||
pashowvolume
|
||||
}
|
||||
|
||||
@@ -10,5 +10,3 @@ function split_by_char {
|
||||
}
|
||||
|
||||
split_by_char "$@"
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ section: aliases
|
||||
tv:
|
||||
imalison-arch
|
||||
imalison-desktop
|
||||
imalison-home
|
||||
imalison-home justin-bieber-creek
|
||||
controlling:
|
||||
uber-loaner
|
||||
imalison-mpb-arch
|
||||
@@ -22,4 +22,5 @@ section: aliases
|
||||
kat-uber-loaner
|
||||
Dean-PC
|
||||
imalison-mbp
|
||||
strixi-minaj
|
||||
end
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Automatically rename new sessions to the basename of the current directory
|
||||
set-hook -g session-created 'run-shell "tmux rename-session -t #{session_name} $(basename #{pane_current_path})"'
|
||||
|
||||
# Also rename when attaching to a session (optional)
|
||||
set-hook -g client-session-changed 'run-shell "tmux rename-session -t #{session_name} $(basename #{pane_current_path})"'
|
||||
7
dotfiles/xkb/keymap/strixi-minaj
Normal file
7
dotfiles/xkb/keymap/strixi-minaj
Normal file
@@ -0,0 +1,7 @@
|
||||
xkb_keymap {
|
||||
xkb_keycodes { include "evdev+aliases(qwerty)" };
|
||||
xkb_types { include "complete" };
|
||||
xkb_compat { include "complete" };
|
||||
xkb_symbols { include "pc+us+inet(evdev)+altwin(swap_lalt_lwin)+imalison(ralt_as_hyper)+capslock(ctrl_modifier)" };
|
||||
xkb_geometry { include "pc(pc105)" };
|
||||
};
|
||||
293
nix-darwin/flake.lock
generated
Normal file
293
nix-darwin/flake.lock
generated
Normal file
@@ -0,0 +1,293 @@
|
||||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": [
|
||||
"railbird-secrets",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1707830867,
|
||||
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"brew-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1763638478,
|
||||
"narHash": "sha256-n/IMowE9S23ovmTkKX7KhxXC2Yq41EAVFR2FBIXPcT8=",
|
||||
"owner": "Homebrew",
|
||||
"repo": "brew",
|
||||
"rev": "fbfdbaba008189499958a7aeb1e2c36ab10c067d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Homebrew",
|
||||
"ref": "5.0.3",
|
||||
"repo": "brew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"railbird-secrets",
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700795494,
|
||||
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767930051,
|
||||
"narHash": "sha256-YXtqo8h5bAbqC64XAPMMsZdYk8XkwkyNj/7XOsIyVf8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "297a08510894822ddd93ee2cfc66d6ac65a3cebb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"railbird-secrets",
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703113217,
|
||||
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-cask": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767937441,
|
||||
"narHash": "sha256-hiGvxqI6npGOAnNwMXkF1628IkyKhhYsAqO5kmSAuqM=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"rev": "cc94d21fe7abb3cc93db50671bf5048176711be9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-cask",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"homebrew-core": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767948289,
|
||||
"narHash": "sha256-a6s+kRHOXRq4QoA4bDLZVKpC1woi6tTRqEt8Vk0ikGo=",
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"rev": "f268dcd932823c65f8feb2cfc533300ccbcc4541",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "homebrew",
|
||||
"repo": "homebrew-core",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767718503,
|
||||
"narHash": "sha256-V+VkFs0aSG0ca8p/N3gib7FAf4cq9jyr5Gm+ZBrHQpo=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "9f48ffaca1f44b3e590976b4da8666a9e86e6eb1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-homebrew": {
|
||||
"inputs": {
|
||||
"brew-src": "brew-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764473698,
|
||||
"narHash": "sha256-C91gPgv6udN5WuIZWNehp8qdLqlrzX6iF/YyboOj6XI=",
|
||||
"owner": "zhaofengli-wip",
|
||||
"repo": "nix-homebrew",
|
||||
"rev": "6a8ab60bfd66154feeaa1021fc3b32684814a62a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zhaofengli-wip",
|
||||
"repo": "nix-homebrew",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1767364772,
|
||||
"narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1709703039,
|
||||
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"railbird-secrets": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766173571,
|
||||
"narHash": "sha256-iYU5oTgXkZHqkb03IDPVMHA4Yte4AFhusTem0nf7pcc=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "5b42885b7c702fb30b4678e5cb51cc8501fd7830",
|
||||
"revCount": 139,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"homebrew-cask": "homebrew-cask",
|
||||
"homebrew-core": "homebrew-core",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-homebrew": "nix-homebrew",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"railbird-secrets": "railbird-secrets"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
211
nix-darwin/flake.nix
Normal file
211
nix-darwin/flake.nix
Normal file
@@ -0,0 +1,211 @@
|
||||
{
|
||||
description = "Example Darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
railbird-secrets = {
|
||||
url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
|
||||
};
|
||||
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
|
||||
|
||||
# Optional: Declarative tap management
|
||||
homebrew-core = {
|
||||
url = "github:homebrew/homebrew-core";
|
||||
flake = false;
|
||||
};
|
||||
homebrew-cask = {
|
||||
url = "github:homebrew/homebrew-cask";
|
||||
flake = false;
|
||||
};
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
libDir = ../dotfiles/lib;
|
||||
configuration = { pkgs, config, ... }: {
|
||||
networking.hostName = "mac-demarco-mini";
|
||||
imports = [ (import ./gitea-actions-runner.nix) ];
|
||||
services.gitea-actions-runner = {
|
||||
user = "gitea-runner";
|
||||
instances.nix = {
|
||||
enable = true;
|
||||
name = config.networking.hostName;
|
||||
url = "https://dev.railbird.ai";
|
||||
token = "H0A7YXAWsKSp9QzvMymfJI12hbxwR7UerEHpCJUe";
|
||||
labels = [
|
||||
"nix-darwin-${pkgs.system}:host"
|
||||
"macos-aarch64-darwin"
|
||||
"nix:host"
|
||||
];
|
||||
settings = {
|
||||
cache = {
|
||||
enabled = true;
|
||||
};
|
||||
host = {
|
||||
workdir_parent = "/var/lib/gitea-runner/action-cache-dir";
|
||||
};
|
||||
};
|
||||
hostPackages = with pkgs; [
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
direnv
|
||||
gawk
|
||||
just
|
||||
git-lfs
|
||||
isort
|
||||
gitFull
|
||||
gnused
|
||||
ncdu
|
||||
nixVersions.stable
|
||||
nodejs
|
||||
openssh
|
||||
wget
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
launchd.daemons.gitea-runner-nix.serviceConfig.EnvironmentVariables = {
|
||||
XDG_CONFIG_HOME = "/var/lib/gitea-runner";
|
||||
XDG_CACHE_HOME = "/var/lib/gitea-runner/.cache";
|
||||
XDG_RUNTIME_DIR = "/var/lib/gitea-runner/tmp";
|
||||
};
|
||||
|
||||
system.primaryUser = "kat";
|
||||
|
||||
# launchd.daemons.gitea-runner-restarter = {
|
||||
# serviceConfig = {
|
||||
# ProgramArguments = [
|
||||
# "/usr/bin/env"
|
||||
# "bash"
|
||||
# "-c"
|
||||
# ''
|
||||
# SERVICE_NAME="org.nixos.gitea-runner-nix"
|
||||
# while true; do
|
||||
# # Check the second column of launchctl list output for our service
|
||||
# EXIT_CODE=$(sudo launchctl list | grep "$SERVICE_NAME" | awk '{print $2}')
|
||||
# if [ -z "$EXIT_CODE" ]; then
|
||||
# echo "$(date): $SERVICE_NAME is running correctly. Terminating the restarter."
|
||||
# exit 0
|
||||
# else
|
||||
# echo "$(date): $SERVICE_NAME is not running or in error state. Attempting to restart..."
|
||||
# sudo launchctl bootout system/$SERVICE_NAME 2>/dev/null || true
|
||||
# sudo launchctl load /Library/LaunchDaemons/$SERVICE_NAME.plist
|
||||
# sleep 2 # Give the service some time to start
|
||||
# fi
|
||||
# done
|
||||
# ''
|
||||
# ];
|
||||
# RunAtLoad = true;
|
||||
# ThrottleInterval = 300;
|
||||
# };
|
||||
# };
|
||||
|
||||
launchd.daemons.does-anything-work = {
|
||||
serviceConfig = {
|
||||
ProgramArguments = ["/usr/bin/env" "bash" "-c" "date > /var/log/does-anything-work"];
|
||||
RunAtLoad = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [(import ../nixos/overlay.nix)];
|
||||
environment.systemPackages = with pkgs; [
|
||||
#python-with-my-packages
|
||||
emacs
|
||||
alejandra
|
||||
cocoapods
|
||||
gitFull
|
||||
just
|
||||
tmux
|
||||
htop
|
||||
nodePackages.prettier
|
||||
nodejs
|
||||
ripgrep
|
||||
slack
|
||||
claude-code
|
||||
typescript
|
||||
vim
|
||||
yarn
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
launchd.user.envVariables.PATH = config.environment.systemPath;
|
||||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
|
||||
# Set Git commit hash for darwin-version.
|
||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing
|
||||
system.stateVersion = 4;
|
||||
|
||||
# The platform the configuration will be used on.
|
||||
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
users.users.kat.openssh.authorizedKeys.keys = inputs.railbird-secrets.keys.kanivanKeys;
|
||||
users.users.gitea-runner = {
|
||||
name = "gitea-runner";
|
||||
isHidden = false;
|
||||
home = "/Users/gitea-runner";
|
||||
createHome = false;
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true;
|
||||
|
||||
users.users.kat = {
|
||||
name = "kat";
|
||||
home = "/Users/kat";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
fpath+="${libDir}/functions"
|
||||
for file in "${libDir}/functions/"*
|
||||
do
|
||||
autoload "''${file##*/}"
|
||||
done
|
||||
'';
|
||||
interactiveShellInit = ''
|
||||
# eval "$(register-python-argcomplete prb)"
|
||||
# eval "$(register-python-argcomplete prod-prb)"
|
||||
# eval "$(register-python-argcomplete railbird)"
|
||||
# [ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
|
||||
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.kat = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
darwinConfigurations."mac-demarco-mini" = nix-darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
home-manager.darwinModules.home-manager
|
||||
configuration
|
||||
];
|
||||
};
|
||||
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
darwinPackages = self.darwinConfigurations."mac-demarco-mini".pkgs;
|
||||
};
|
||||
}
|
||||
176
nix-darwin/gitea-actions-runner.nix
Normal file
176
nix-darwin/gitea-actions-runner.nix
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.gitea-actions-runner;
|
||||
|
||||
settingsFormat = pkgs.formats.yaml {};
|
||||
|
||||
hasDockerScheme = instance:
|
||||
instance.labels == [] || any (label: hasInfix ":docker:" label) instance.labels;
|
||||
wantsContainerRuntime = any hasDockerScheme (attrValues cfg.instances);
|
||||
|
||||
hasHostScheme = instance: any (label: hasSuffix ":host" label) instance.labels;
|
||||
|
||||
tokenXorTokenFile = instance:
|
||||
(instance.token == null && instance.tokenFile != null)
|
||||
|| (instance.token != null && instance.tokenFile == null);
|
||||
in {
|
||||
options.services.gitea-actions-runner = {
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gitea-actions-runner;
|
||||
defaultText = literalExpression "pkgs.gitea-actions-runner";
|
||||
description = "The gitea-actions-runner package to use.";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "gitea-runner";
|
||||
description = "The user account under which the Gitea Actions Runner should run.";
|
||||
};
|
||||
|
||||
instances = mkOption {
|
||||
default = {};
|
||||
description = "Gitea Actions Runner instances.";
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
enable = mkEnableOption "Gitea Actions Runner instance";
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
example = "my-runner";
|
||||
description = "The name identifying the runner instance towards the Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
url = mkOption {
|
||||
type = types.str;
|
||||
example = "https://forge.example.com";
|
||||
description = "Base URL of your Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
token = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Plain token to register at the configured Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
tokenFile = mkOption {
|
||||
type = types.nullOr (types.either types.str types.path);
|
||||
default = null;
|
||||
description = "Path to a file containing the token to register at the configured Gitea/Forgejo instance.";
|
||||
};
|
||||
|
||||
labels = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = ["macos:host" "x86_64:host"];
|
||||
description = "Labels used to map jobs to their runtime environment.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
description = "Configuration for `act_runner daemon`.";
|
||||
type = types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
};
|
||||
default = {};
|
||||
};
|
||||
|
||||
hostPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = with pkgs; [
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
gnused
|
||||
nodejs
|
||||
wget
|
||||
openssh
|
||||
];
|
||||
description = "List of packages available to actions when the runner is configured with a host execution label.";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.instances != {}) {
|
||||
assertions = [
|
||||
{
|
||||
assertion = all tokenXorTokenFile (attrValues cfg.instances);
|
||||
message = "Instances of gitea-actions-runner can have `token` or `tokenFile`, not both.";
|
||||
}
|
||||
];
|
||||
|
||||
users.users.${cfg.user} = {
|
||||
name = cfg.user;
|
||||
description = "Gitea Actions Runner user";
|
||||
};
|
||||
|
||||
launchd.daemons =
|
||||
(mapAttrs' (
|
||||
name: instance:
|
||||
nameValuePair "gitea-runner-${name}" {
|
||||
serviceConfig = {
|
||||
ProgramArguments = [
|
||||
"/usr/bin/env"
|
||||
"bash"
|
||||
"-c"
|
||||
''
|
||||
cd /var/lib/gitea-runner/${name}
|
||||
exec ${cfg.package}/bin/act_runner daemon --config ${settingsFormat.generate "config.yaml" instance.settings}
|
||||
''
|
||||
];
|
||||
KeepAlive = true;
|
||||
ThrottleInterval = 5;
|
||||
SessionCreate = true;
|
||||
UserName = cfg.user;
|
||||
GroupName = "staff";
|
||||
WorkingDirectory = "/var/lib/gitea-runner/${name}";
|
||||
EnvironmentVariables = {
|
||||
PATH = (lib.makeBinPath (instance.hostPackages ++ [cfg.package])) + ":/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
cfg.instances)
|
||||
// (mapAttrs' (
|
||||
name: instance:
|
||||
nameValuePair "gitea-runner-setup-${name}"
|
||||
{
|
||||
serviceConfig = {
|
||||
EnvironmentVariables =
|
||||
{}
|
||||
// optionalAttrs (instance.token != null) {
|
||||
TOKEN = instance.token;
|
||||
};
|
||||
RunAtLoad = true;
|
||||
ProgramArguments = [
|
||||
"${pkgs.writeShellScript "gitea-runner-setup-${name}" ''
|
||||
mkdir -p /var/lib/gitea-runner/${name}
|
||||
cd /var/lib/gitea-runner/${name}
|
||||
if [ ! -e "/var/lib/gitea-runner/${name}/.runner" ]; then
|
||||
${cfg.package}/bin/act_runner register --no-interactive \
|
||||
--instance ${escapeShellArg instance.url} \
|
||||
--token "$TOKEN" \
|
||||
--name ${escapeShellArg instance.name} \
|
||||
--labels ${escapeShellArg (concatStringsSep "," instance.labels)} \
|
||||
--config ${settingsFormat.generate "config.yaml" instance.settings}
|
||||
fi
|
||||
|
||||
# Start the runner
|
||||
chown -R ${cfg.user} /var/lib/gitea-runner
|
||||
chown -R ${cfg.user} /var/log/gitea-runner
|
||||
''}"
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
cfg.instances);
|
||||
};
|
||||
}
|
||||
2
nix-darwin/justfile
Normal file
2
nix-darwin/justfile
Normal file
@@ -0,0 +1,2 @@
|
||||
switch:
|
||||
nix run nix-darwin -- switch --flake .#
|
||||
@@ -3,9 +3,6 @@
|
||||
options = {
|
||||
};
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-udev-rules
|
||||
];
|
||||
nixpkgs.config.android_sdk.accept_license = true;
|
||||
programs.adb.enable = true;
|
||||
};
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{ config, pkgs, options, inputs, makeEnable, ... }:
|
||||
makeEnable config "modules.base" true {
|
||||
{ config, pkgs, forEachUser, makeEnable, realUsers, ... }:
|
||||
makeEnable config "myModules.base" true {
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"openssl-1.0.2u"
|
||||
"electron-12.2.3"
|
||||
"etcher"
|
||||
"electron-19.1.9"
|
||||
"electron-32.3.3"
|
||||
"etcher"
|
||||
"nix-2.16.2"
|
||||
"openssl-1.0.2u"
|
||||
"openssl-1.1.1w"
|
||||
];
|
||||
|
||||
# Disabling these waits disables the stuck on boot up issue
|
||||
@@ -18,7 +21,6 @@ makeEnable config "modules.base" true {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
package = pkgs.gnupg_2_4_0;
|
||||
};
|
||||
services.pcscd.enable = true;
|
||||
|
||||
@@ -28,19 +30,26 @@ makeEnable config "modules.base" true {
|
||||
'';
|
||||
|
||||
networking.firewall.enable = false;
|
||||
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
enableStrongSwan = true;
|
||||
plugins = [ pkgs.networkmanager-l2tp pkgs.networkmanager-openvpn ];
|
||||
extraConfig = ''
|
||||
[main]
|
||||
rc-manager=resolvconf
|
||||
'';
|
||||
};
|
||||
networking.resolvconf.enable = false;
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
||||
# Audio
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
services.pulseaudio.enable = true;
|
||||
services.pipewire = {
|
||||
enable = false;
|
||||
systemWide = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
@@ -56,20 +65,29 @@ makeEnable config "modules.base" true {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Update timezone automatically
|
||||
# # Update timezone automatically
|
||||
services.tzupdate.enable = true;
|
||||
|
||||
# TODO: Add a comment explaining what this does.
|
||||
services.locate.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
services.orca.enable = false;
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
|
||||
services.logind.extraConfig = "RuntimeDirectorySize=5G";
|
||||
|
||||
# For supporting gnome stuff
|
||||
services.dbus.packages = [ pkgs.gcr ];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
home-manager.users = forEachUser (import ./home-manager.nix);
|
||||
nix.settings.trusted-users = realUsers ++ ["gitea-runner"];
|
||||
}
|
||||
|
||||
18
nixos/ben.nix
Normal file
18
nixos/ben.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, inputs, config, makeEnable, ... }:
|
||||
makeEnable config "myModules.ben" true {
|
||||
home-manager.backupFileExtension = "backup"; # Add this line
|
||||
home-manager.users.ben = {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
l = "ls -CF";
|
||||
la = "ls -A";
|
||||
ll = "ls -lh";
|
||||
lla = "ls -alh";
|
||||
ls = "ls --color=auto";
|
||||
gts = "git status";
|
||||
gtl = "git log";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./essential.nix
|
||||
@@ -21,7 +21,7 @@
|
||||
enable = true;
|
||||
layout = "us";
|
||||
desktopManager = {
|
||||
plasma5.enable = true;
|
||||
plasma6.enable = true;
|
||||
};
|
||||
displayManager = {
|
||||
sddm = {
|
||||
@@ -36,7 +36,7 @@
|
||||
'';
|
||||
};
|
||||
};
|
||||
nix = rec {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
inherit inputs machineNames;
|
||||
makeEnable = (import ../make-enable.nix) nixpkgs.lib;
|
||||
mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys);
|
||||
realUsers = [ "root" "imalison" "kat" "dean" "alex" ];
|
||||
realUsers = [ "root" "imalison" "kat" "dean" "alex" "ben"];
|
||||
forEachUser = mapValueToKeys realUsers;
|
||||
} // specialArgs // (import ../keys.nix);
|
||||
});
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{ config, makeEnable, lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let cfg = config.modules.cache-server;
|
||||
let cfg = config.myModules.cache-server;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.cache-server = {
|
||||
myModules.cache-server = {
|
||||
enable = mkEnableOption "nix cache server";
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 8080;
|
||||
default = 5050;
|
||||
};
|
||||
host-string = mkOption {
|
||||
type = types.string;
|
||||
@@ -27,18 +27,7 @@ in
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = config.age.secrets."cache-priv-key.pem".path;
|
||||
port = 5050;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"${cfg.host-string}" = {
|
||||
locations."${cfg.path}".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||
listen = [ { addr = "0.0.0.0"; port = cfg.port; } ];
|
||||
};
|
||||
};
|
||||
port = cfg.port;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
{ pkgs, config, makeEnable, ... }:
|
||||
makeEnable config "modules.code" true {
|
||||
makeEnable config "myModules.code" true {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# LLM Tools
|
||||
antigravity
|
||||
claude-code
|
||||
codex
|
||||
gemini-cli
|
||||
|
||||
# MCP
|
||||
github-mcp-server
|
||||
gitea-mcp-server
|
||||
playwright-mcp
|
||||
|
||||
# C
|
||||
clang
|
||||
|
||||
@@ -24,6 +35,8 @@ makeEnable config "modules.code" true {
|
||||
# Node
|
||||
nodePackages.npm
|
||||
nodejs
|
||||
yarn
|
||||
prettier
|
||||
|
||||
# Typescript
|
||||
typescript
|
||||
@@ -34,6 +47,7 @@ makeEnable config "modules.code" true {
|
||||
|
||||
# Rust
|
||||
rustup
|
||||
cargo-sweep
|
||||
|
||||
# Clojure
|
||||
boot
|
||||
@@ -43,8 +57,13 @@ makeEnable config "modules.code" true {
|
||||
ruby
|
||||
|
||||
# python
|
||||
poetry
|
||||
black
|
||||
poetry
|
||||
uv
|
||||
|
||||
# kotlin
|
||||
kotlin
|
||||
kotlin-language-server
|
||||
|
||||
# dhall
|
||||
haskellPackages.dhall
|
||||
@@ -57,6 +76,7 @@ makeEnable config "modules.code" true {
|
||||
# nix
|
||||
nixd
|
||||
nil
|
||||
alejandra
|
||||
] ++ (if pkgs.system == "x86_64-linux" then with pkgs; [
|
||||
# purescript
|
||||
purescript
|
||||
|
||||
@@ -1,31 +1,46 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, forEachUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
./android.nix
|
||||
./base.nix
|
||||
./cache.nix
|
||||
./ben.nix
|
||||
./cache-server.nix
|
||||
./cache.nix
|
||||
./code.nix
|
||||
./desktop.nix
|
||||
./electron.nix
|
||||
./environment.nix
|
||||
./essential.nix
|
||||
./extra.nix
|
||||
./games.nix
|
||||
./git-sync.nix
|
||||
./gitea.nix
|
||||
./gitea-runner.nix
|
||||
./gitea.nix
|
||||
./gnome.nix
|
||||
./home-assistant.nix
|
||||
./imalison.nix
|
||||
./internet-computer.nix
|
||||
./k3s.nix
|
||||
./kat.nix
|
||||
./keybase.nix
|
||||
./kubelet.nix
|
||||
./laptop.nix
|
||||
./nix.nix
|
||||
./nixified.ai.nix
|
||||
./nvidia.nix
|
||||
./options.nix
|
||||
./plasma.nix
|
||||
./postgres.nix
|
||||
./rabbitmq.nix
|
||||
./secrets.nix
|
||||
./ssh.nix
|
||||
./syncthing.nix
|
||||
./tts.nix
|
||||
./user-specific.nix
|
||||
./users.nix
|
||||
./vscode.nix
|
||||
./wsl.nix
|
||||
./wyoming.nix
|
||||
./xmonad.nix
|
||||
];
|
||||
|
||||
@@ -34,14 +49,16 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf config.features.full.enable {
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = true;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = true;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = true;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.plasma.enable = true;
|
||||
myModules.gnome.enable = false;
|
||||
myModules.xmonad.enable = true;
|
||||
myModules.extra.enable = true;
|
||||
myModules.electron.enable = true;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ config, pkgs, options, inputs, makeEnable, forEachUser, ... }:
|
||||
makeEnable config "modules.desktop" true {
|
||||
{ inputs, config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "myModules.desktop" true {
|
||||
imports = [
|
||||
./fonts.nix
|
||||
];
|
||||
@@ -7,14 +7,10 @@ makeEnable config "modules.desktop" true {
|
||||
services.xserver = {
|
||||
exportConfiguration = true;
|
||||
enable = true;
|
||||
layout = "us";
|
||||
desktopManager = {
|
||||
plasma5.enable = true;
|
||||
xkb = {
|
||||
layout = "us";
|
||||
};
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
};
|
||||
sessionCommands = ''
|
||||
systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH
|
||||
'';
|
||||
@@ -25,6 +21,8 @@ makeEnable config "modules.desktop" true {
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
};
|
||||
@@ -36,12 +34,14 @@ makeEnable config "modules.desktop" true {
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Visual notification manager
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Appearance
|
||||
gnome.adwaita-icon-theme
|
||||
adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
libsForQt5.breeze-gtk
|
||||
materia-theme
|
||||
# libsForQt5.breeze-gtk
|
||||
# materia-theme
|
||||
numix-icon-theme-circle
|
||||
papirus-icon-theme
|
||||
|
||||
@@ -58,81 +58,59 @@ makeEnable config "modules.desktop" true {
|
||||
# Desktop
|
||||
alacritty
|
||||
blueman
|
||||
clipit
|
||||
dfeet
|
||||
dolphin
|
||||
element-desktop
|
||||
# clipit
|
||||
d-spy
|
||||
kdePackages.dolphin
|
||||
# inputs.ghostty.packages."${system}".default
|
||||
|
||||
feh
|
||||
firefox
|
||||
gnome.cheese
|
||||
gnome.gpaste
|
||||
|
||||
kleopatra
|
||||
cheese
|
||||
gpaste
|
||||
kdePackages.kleopatra
|
||||
libnotify
|
||||
# Seems to be broken
|
||||
libreoffice
|
||||
lxappearance
|
||||
lxqt.lxqt-powermanagement
|
||||
networkmanagerapplet
|
||||
notify-osd-customizable
|
||||
okular
|
||||
picom
|
||||
pinentry
|
||||
psensor
|
||||
kdePackages.okular
|
||||
pinentry-gnome3
|
||||
# mission-center
|
||||
quassel
|
||||
remmina
|
||||
rofi
|
||||
wofi
|
||||
rofi-pass
|
||||
rofi-systemd
|
||||
shutter
|
||||
simplescreenrecorder
|
||||
skippy-xd
|
||||
synergy
|
||||
transmission-gtk
|
||||
# TODO: reenable
|
||||
# transmission_3-gtk
|
||||
vlc
|
||||
volnoti
|
||||
xfce.thunar
|
||||
|
||||
# Audio
|
||||
picard
|
||||
pavucontrol
|
||||
playerctl
|
||||
pulsemixer
|
||||
espeak
|
||||
|
||||
#
|
||||
brightnessctl
|
||||
|
||||
# Visualization
|
||||
graphviz
|
||||
nodePackages.mermaid-cli
|
||||
] ++ (if pkgs.system == "x86_64-linux" then with pkgs; [
|
||||
bitwarden
|
||||
discord
|
||||
etcher
|
||||
google-chrome
|
||||
keybase-gui
|
||||
pommed_light
|
||||
slack
|
||||
spicetify-cli
|
||||
spotify
|
||||
tor-browser-bundle-bin
|
||||
tor-browser
|
||||
vscode
|
||||
zoom-us
|
||||
zulip
|
||||
] else []);
|
||||
|
||||
home-manager.users = forEachUser (if pkgs.system == "x86_64-linux" then {
|
||||
systemd.user.services.bitwarden = {
|
||||
Unit = {
|
||||
Description = "Bitwarden";
|
||||
After = [ "graphical-session-pre.target" "tray.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.bitwarden}/bin/bitwarden";
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
};
|
||||
};
|
||||
} else {});
|
||||
}
|
||||
|
||||
28
nixos/electron.nix
Normal file
28
nixos/electron.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ pkgs, config, makeEnable, forEachUser, ... }:
|
||||
makeEnable config "myModules.electron" false {
|
||||
environment.systemPackages = with pkgs; [
|
||||
element-desktop
|
||||
# bitwarden
|
||||
discord
|
||||
# etcher
|
||||
# keybase-gui
|
||||
zoom-us
|
||||
];
|
||||
home-manager.users = forEachUser (if pkgs.system == "x86_64-linux" then {
|
||||
# systemd.user.services.bitwarden = {
|
||||
# Unit = {
|
||||
# Description = "Bitwarden";
|
||||
# After = [ "graphical-session-pre.target" "tray.target" ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
|
||||
# Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.bitwarden}/bin/bitwarden";
|
||||
# Restart = "always";
|
||||
# RestartSec = 3;
|
||||
# };
|
||||
# };
|
||||
} else {});
|
||||
}
|
||||
@@ -27,6 +27,26 @@ with lib;
|
||||
do
|
||||
autoload "''${file##*/}"
|
||||
done
|
||||
fpath+="${pkgs.python-with-my-packages}/lib/python3.11/site-packages/argcomplete/bash_completion.d"
|
||||
'';
|
||||
interactiveShellInit = ''
|
||||
eval "$(register-python-argcomplete prb)"
|
||||
eval "$(register-python-argcomplete prod-prb)"
|
||||
eval "$(register-python-argcomplete railbird)"
|
||||
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/zsh"
|
||||
|
||||
# Enable bracketed paste
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
'';
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
interactiveShellInit = ''
|
||||
eval "$(register-python-argcomplete prb)"
|
||||
eval "$(register-python-argcomplete prod-prb)"
|
||||
eval "$(register-python-argcomplete railbird)"
|
||||
[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && source "$EAT_SHELL_INTEGRATION_DIR/bash"
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -47,6 +67,7 @@ with lib;
|
||||
localBinInPath = true;
|
||||
shellAliases = {
|
||||
df_ssh = "TERM='xterm-256color ssh -o StrictHostKeyChecking=no'";
|
||||
fix_nix = "LD_LIBRARY_PATH='' nix";
|
||||
};
|
||||
variables = {
|
||||
ROFI_SYSTEMD_TERM = "alacritty -e";
|
||||
|
||||
@@ -1,25 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
appdirs
|
||||
ipdb
|
||||
ipython
|
||||
numpy
|
||||
openpyxl
|
||||
pip
|
||||
requests
|
||||
tox
|
||||
virtualenv
|
||||
virtualenvwrapper
|
||||
];
|
||||
python-with-my-packages = pkgs.python311.withPackages my-python-packages;
|
||||
in
|
||||
{
|
||||
nixpkgs.config.allowBroken = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
automake
|
||||
bazel
|
||||
bento4
|
||||
bind
|
||||
binutils
|
||||
cachix
|
||||
@@ -30,14 +16,16 @@ in
|
||||
efibootmgr
|
||||
emacs
|
||||
fd
|
||||
ffmpeg
|
||||
file
|
||||
gawk
|
||||
gcc
|
||||
gdb
|
||||
gh
|
||||
git-fame
|
||||
git-lfs
|
||||
git-sync
|
||||
gitFull
|
||||
glxinfo
|
||||
gnumake
|
||||
gparted
|
||||
home-manager
|
||||
@@ -46,29 +34,37 @@ in
|
||||
iotop
|
||||
ispell
|
||||
jq
|
||||
just
|
||||
lshw
|
||||
lsof
|
||||
magic-wormhole-rs
|
||||
mesa-demos
|
||||
ncdu
|
||||
neofetch
|
||||
neovim
|
||||
nix-index
|
||||
nix-search-cli
|
||||
pass
|
||||
patchelf
|
||||
pciutils
|
||||
pstree
|
||||
pulseaudio
|
||||
python-with-my-packages
|
||||
rclone
|
||||
rcm
|
||||
ripgrep
|
||||
runc
|
||||
silver-searcher
|
||||
sysz
|
||||
skim
|
||||
sshfs
|
||||
sysz
|
||||
tmux
|
||||
tzupdate
|
||||
udiskie
|
||||
unzip
|
||||
usbutils
|
||||
wget
|
||||
xkcdpass
|
||||
yubikey-manager
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "modules.extra" false {
|
||||
services.expressvpn.enable = true;
|
||||
makeEnable config "myModules.extra" false {
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -10,7 +9,6 @@ makeEnable config "modules.extra" false {
|
||||
asciidoctor
|
||||
roomeqwizard
|
||||
razergenie
|
||||
expressvpn
|
||||
signal-desktop
|
||||
gource
|
||||
gimp
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
nix flake lock --update-input taffybar
|
||||
nix flake lock --update-input imalison-taffybar
|
||||
nix flake lock --update-input xmonad
|
||||
nix flake lock --update-input xmonad-contrib
|
||||
1408
nixos/flake.lock
generated
1408
nixos/flake.lock
generated
File diff suppressed because it is too large
Load Diff
300
nixos/flake.nix
300
nixos/flake.nix
@@ -1,16 +1,48 @@
|
||||
{
|
||||
inputs = {
|
||||
nixos-hardware = { url = "github:NixOS/nixos-hardware"; };
|
||||
|
||||
nixpkgs = {
|
||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
|
||||
systems = {url = "github:nix-systems/default";};
|
||||
|
||||
git-ignore-nix = {
|
||||
url = "github:hercules-ci/gitignore.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-hardware = {url = "github:colonelpanic8/nixos-hardware/my-master";};
|
||||
|
||||
nixos-wsl = {url = "github:nix-community/NixOS-WSL";};
|
||||
|
||||
agenix = {url = "github:ryantm/agenix";};
|
||||
|
||||
railbird-secrets = {
|
||||
url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
|
||||
};
|
||||
# railbird-secrets = {
|
||||
# url = "git+ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git";
|
||||
# };
|
||||
|
||||
xmonad = {
|
||||
url = "github:xmonad/xmonad";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
git-ignore-nix.follows = "git-ignore-nix";
|
||||
};
|
||||
};
|
||||
|
||||
xmonad-contrib = {
|
||||
url = "github:IvanMalison/xmonad-contrib/withMyChanges";
|
||||
inputs = {
|
||||
@@ -21,35 +53,21 @@
|
||||
};
|
||||
};
|
||||
|
||||
xmonad = {
|
||||
url = "path:../dotfiles/config/xmonad/xmonad";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
git-ignore-nix.follows = "git-ignore-nix";
|
||||
};
|
||||
};
|
||||
|
||||
taffybar = {
|
||||
url = "path:../dotfiles/config/taffybar/taffybar";
|
||||
url = "github:taffybar/taffybar/old-master";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
git-ignore-nix.follows = "git-ignore-nix";
|
||||
xmonad.follows = "xmonad";
|
||||
gtk-sni-tray.follows = "gtk-sni-tray";
|
||||
gtk-strut.follows = "gtk-strut";
|
||||
};
|
||||
};
|
||||
|
||||
imalison-taffybar = {
|
||||
url = "path:../dotfiles/config/taffybar";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
xmonad.follows = "xmonad";
|
||||
taffybar.follows = "taffybar";
|
||||
};
|
||||
# inputs = {
|
||||
# nixpkgs.follows = "nixpkgs";
|
||||
# flake-utils.follows = "flake-utils";
|
||||
# xmonad.follows = "xmonad";
|
||||
# taffybar.follows = "taffybar";
|
||||
# };
|
||||
};
|
||||
|
||||
notifications-tray-icon = {
|
||||
@@ -59,22 +77,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix = {
|
||||
url = "github:IvanMalison/nix/my2.15.1";
|
||||
};
|
||||
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
|
||||
systems = { url = "github:nix-systems/default"; };
|
||||
|
||||
git-ignore-nix = {
|
||||
url = "github:hercules-ci/gitignore.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
gtk-sni-tray = {
|
||||
url = "github:taffybar/gtk-sni-tray";
|
||||
inputs = {
|
||||
@@ -103,20 +105,88 @@
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs-regression = { url = "github:NixOS/nixpkgs"; };
|
||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||
|
||||
nixified-ai = { url = "github:nixified-ai/flake"; };
|
||||
nixified-ai = {url = "github:nixified-ai/flake";};
|
||||
|
||||
nixos-wsl = { url = "github:nix-community/NixOS-WSL"; };
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
nixtheplanet.url = "github:matthewcroughan/nixtheplanet";
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad,
|
||||
xmonad-contrib, notifications-tray-icon, nix, agenix, imalison-taffybar, ...
|
||||
}:
|
||||
let
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
home-manager,
|
||||
taffybar,
|
||||
xmonad,
|
||||
nixtheplanet,
|
||||
xmonad-contrib,
|
||||
notifications-tray-icon,
|
||||
nix,
|
||||
agenix,
|
||||
imalison-taffybar,
|
||||
...
|
||||
}: let
|
||||
# Nixpkgs PR patches - just specify PR number and hash
|
||||
nixpkgsPRPatches = [
|
||||
{
|
||||
pr = 434160; # git-sync-rs package
|
||||
hash = "sha256-zjzjmC1XJmwfHr/YXFyYsqUFR5MHSoxWWyxIR35YNbM=";
|
||||
}
|
||||
# claude-code
|
||||
# {
|
||||
# pr = 464698;
|
||||
# hash = "sha256-Pe9G6b/rI0874mM7FIOSEKiaubk95NcFhTQ7paAeLTU=";
|
||||
# }
|
||||
# {
|
||||
# pr = 464816;
|
||||
# hash = "sha256-bKEoRy4dzP5TyRBjYskwEzr7tj8/ez/Y1XHiQgu5q5I=";
|
||||
# }
|
||||
];
|
||||
|
||||
# Custom patches that don't fit the PR template
|
||||
nixpkgsCustomPatches = [
|
||||
];
|
||||
|
||||
# Home-manager PR patches - just specify PR number and hash
|
||||
homeManagerPRPatches = [
|
||||
# Example:
|
||||
# {
|
||||
# pr = 1234;
|
||||
# hash = "sha256-...";
|
||||
# }
|
||||
];
|
||||
|
||||
# Custom home-manager patches that don't fit the PR template
|
||||
homeManagerCustomPatches = [
|
||||
{
|
||||
url = "https://github.com/colonelpanic8/home-manager/commit/92f4b7aa5254f8bcddc9ef86e04ea5314410d10b.patch";
|
||||
hash = "sha256-RQl5daVpCqQi05l9QfTEz2PpQxmsv/HYnXrgXbqbwWk=";
|
||||
}
|
||||
];
|
||||
|
||||
# Convert PR patches to full patch format for nixpkgs
|
||||
nixpkgsPrPatchesToPatches = prPatches:
|
||||
map (p: {
|
||||
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/${toString p.pr}.patch";
|
||||
hash = p.hash;
|
||||
})
|
||||
prPatches;
|
||||
|
||||
# Convert PR patches to full patch format for home-manager
|
||||
homeManagerPrPatchesToPatches = prPatches:
|
||||
map (p: {
|
||||
url = "https://patch-diff.githubusercontent.com/raw/nix-community/home-manager/pull/${toString p.pr}.patch";
|
||||
hash = p.hash;
|
||||
})
|
||||
prPatches;
|
||||
|
||||
# Combine all nixpkgs patches
|
||||
allNixpkgsPatches = (nixpkgsPrPatchesToPatches nixpkgsPRPatches) ++ nixpkgsCustomPatches;
|
||||
|
||||
# Combine all home-manager patches
|
||||
allHomeManagerPatches = (homeManagerPrPatchesToPatches homeManagerPRPatches) ++ homeManagerCustomPatches;
|
||||
|
||||
machinesFilepath = ./machines;
|
||||
machineFilenames = builtins.attrNames (builtins.readDir machinesFilepath);
|
||||
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
||||
@@ -125,7 +195,9 @@
|
||||
name = machineNameFromFilename filename;
|
||||
value = {
|
||||
modules = [
|
||||
(machinesFilepath + ("/" + filename)) agenix.nixosModules.default
|
||||
(machinesFilepath + ("/" + filename))
|
||||
agenix.nixosModules.default
|
||||
nixtheplanet.nixosModules.macos-ventura
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -139,28 +211,87 @@
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
};
|
||||
mkConfig =
|
||||
args@
|
||||
{ system ? "x86_64-linux"
|
||||
, baseModules ? []
|
||||
, modules ? []
|
||||
, specialArgs ? {}
|
||||
, ...
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem (args // {
|
||||
inherit system;
|
||||
modules = baseModules ++ modules;
|
||||
specialArgs = rec {
|
||||
inherit inputs machineNames;
|
||||
makeEnable = (import ./make-enable.nix) nixpkgs.lib;
|
||||
mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys);
|
||||
realUsers = [ "root" "imalison" "kat" "dean" "alex", "will" ];
|
||||
forEachUser = mapValueToKeys realUsers;
|
||||
keys = (import ./keys.nix);
|
||||
} // specialArgs;
|
||||
});
|
||||
in
|
||||
{
|
||||
mkConfig = {
|
||||
system ? "x86_64-linux",
|
||||
baseModules ? [],
|
||||
modules ? [],
|
||||
specialArgs ? {},
|
||||
...
|
||||
}: let
|
||||
# Bootstrap nixpkgs for this specific system
|
||||
bootstrapPkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {};
|
||||
overlays = [];
|
||||
};
|
||||
# Apply patches to nixpkgs source
|
||||
patchedSource = bootstrapPkgs.applyPatches {
|
||||
name = "nixpkgs-patched";
|
||||
src = nixpkgs;
|
||||
patches = map bootstrapPkgs.fetchpatch allNixpkgsPatches;
|
||||
prePatch = ''
|
||||
mkdir -p pkgs/by-name/an/antigravity
|
||||
'';
|
||||
};
|
||||
# Get eval-config from patched source
|
||||
evalConfig = import "${patchedSource}/nixos/lib/eval-config.nix";
|
||||
# Apply patches to home-manager source (only if there are patches)
|
||||
patchedHomeManagerSource =
|
||||
if allHomeManagerPatches == []
|
||||
then home-manager
|
||||
else
|
||||
bootstrapPkgs.applyPatches {
|
||||
name = "home-manager-patched";
|
||||
src = home-manager;
|
||||
patches = map bootstrapPkgs.fetchpatch allHomeManagerPatches;
|
||||
};
|
||||
# Import the patched home-manager flake
|
||||
patchedHomeManager =
|
||||
if allHomeManagerPatches == []
|
||||
then home-manager
|
||||
else import "${patchedHomeManagerSource}/flake.nix";
|
||||
# Get the NixOS module from the patched source
|
||||
patchedHomeManagerModule =
|
||||
if allHomeManagerPatches == []
|
||||
then home-manager.nixosModules.home-manager
|
||||
else import "${patchedHomeManagerSource}/nixos";
|
||||
# Create a modified inputs with patched home-manager
|
||||
patchedInputs = inputs // {
|
||||
home-manager = inputs.home-manager // {
|
||||
nixosModules = inputs.home-manager.nixosModules // {
|
||||
home-manager = patchedHomeManagerModule;
|
||||
};
|
||||
# Also provide the patched source path for any direct imports
|
||||
outPath = patchedHomeManagerSource.outPath or "${patchedHomeManagerSource}";
|
||||
};
|
||||
};
|
||||
in
|
||||
evalConfig {
|
||||
inherit system;
|
||||
modules = baseModules ++ modules;
|
||||
specialArgs =
|
||||
rec {
|
||||
inputs = patchedInputs;
|
||||
inherit machineNames;
|
||||
makeEnable = (import ./make-enable.nix) nixpkgs.lib;
|
||||
keys = import ./keys.nix;
|
||||
usersInfo = (import ./users.nix) {
|
||||
pkgs = {zsh = "zsh";};
|
||||
inherit keys system;
|
||||
inputs = patchedInputs;
|
||||
};
|
||||
realUsers = (
|
||||
builtins.attrNames
|
||||
(nixpkgs.lib.filterAttrs
|
||||
(_: value: (builtins.elem "isNormalUser" (builtins.attrNames value)) && value.isNormalUser)
|
||||
usersInfo.users.users)
|
||||
);
|
||||
mapAllKeysToValue = keys: value: builtins.listToAttrs (map (name: {inherit name value;}) keys);
|
||||
forEachUser = mapAllKeysToValue realUsers;
|
||||
}
|
||||
// specialArgs;
|
||||
};
|
||||
in {
|
||||
nixConfig = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
@@ -169,19 +300,24 @@
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
extra-substituters = [
|
||||
"http://1896Folsom.duckdns.org"
|
||||
"http://192.168.1.26:5050"
|
||||
"https://cache.flox.dev"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"1896Folsom.duckdns.org:U2FTjvP95qwAJo0oGpvmUChJCgi5zQoG1YisoI08Qoo="
|
||||
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
|
||||
];
|
||||
};
|
||||
nixosConfigurations = builtins.mapAttrs (machineName: params:
|
||||
let machineParams =
|
||||
if builtins.hasAttr machineName customParams
|
||||
then (builtins.getAttr machineName customParams)
|
||||
else {};
|
||||
in mkConfig (params // machineParams)
|
||||
) defaultConfigurationParams;
|
||||
nixosConfigurations =
|
||||
builtins.mapAttrs (
|
||||
machineName: params: let
|
||||
machineParams =
|
||||
if builtins.hasAttr machineName customParams
|
||||
then (builtins.getAttr machineName customParams)
|
||||
else {};
|
||||
in
|
||||
mkConfig (params // machineParams)
|
||||
)
|
||||
defaultConfigurationParams;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ pkgs, makeEnable, config, ... }:
|
||||
makeEnable config "modules.fonts" true {
|
||||
makeEnable config "myModules.fonts" true {
|
||||
# Enable the gtk icon cache
|
||||
gtk.iconCache.enable = true;
|
||||
|
||||
@@ -15,19 +15,16 @@ makeEnable config "modules.fonts" true {
|
||||
fira-mono
|
||||
font-awesome
|
||||
|
||||
noto-fonts-emoji
|
||||
noto-fonts-color-emoji
|
||||
roboto
|
||||
source-code-pro
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
twemoji-color-font
|
||||
(nerdfonts.override { fonts = [
|
||||
"JetBrainsMono"
|
||||
"FantasqueSansMono"
|
||||
"Iosevka"
|
||||
"VictorMono"
|
||||
"SourceCodePro"
|
||||
]; })
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.fantasque-sans-mono
|
||||
nerd-fonts.iosevka
|
||||
nerd-fonts.victor-mono
|
||||
];
|
||||
fontconfig = {
|
||||
hinting.autohint = true;
|
||||
@@ -35,7 +32,7 @@ makeEnable config "modules.fonts" true {
|
||||
allowBitmaps = true;
|
||||
useEmbeddedBitmaps = true;
|
||||
defaultFonts = {
|
||||
monospace = [ "Source Code Pro" ];
|
||||
monospace = [ "JetBrains Mono" ];
|
||||
sansSerif = [ "Roboto" ];
|
||||
serif = [ "Source Serif Pro" ];
|
||||
};
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
{ config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "modules.games" false {
|
||||
makeEnable config "myModules.games" false {
|
||||
environment.systemPackages = with pkgs; [
|
||||
steam
|
||||
heroic
|
||||
];
|
||||
boot.extraModulePackages = with pkgs; [
|
||||
xboxdrv
|
||||
];
|
||||
hardware.xone.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ ... }: {
|
||||
{ pkgs, ... }: {
|
||||
home-manager.users.imalison = ({ config, ... }: {
|
||||
services.git-sync = {
|
||||
enable = true;
|
||||
package = pkgs.git-sync-rs;
|
||||
repositories = {
|
||||
config = {
|
||||
path = config.home.homeDirectory + "/config";
|
||||
@@ -18,7 +19,7 @@
|
||||
};
|
||||
katnivan = {
|
||||
path = config.home.homeDirectory + "/katnivan";
|
||||
uri = "ssh://gitea@1896Folsom.duckdns.org:1123/colonelpanic/katnivan.git";
|
||||
uri = "ssh://gitea@dev.railbird.ai:1123/colonelpanic/katnivan.git";
|
||||
interval = 30;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ pkgs, config, makeEnable, ... }:
|
||||
makeEnable config "modules.gitea-runner" false {
|
||||
makeEnable config "myModules.gitea-runner" false {
|
||||
age.secrets.gitea-runner-token = {
|
||||
file = ./secrets/gitea-runner-token.${config.networking.hostName}.age;
|
||||
file = ./secrets/gitea-runner-token.age;
|
||||
group = "docker";
|
||||
};
|
||||
|
||||
@@ -23,12 +23,16 @@ makeEnable config "modules.gitea-runner" false {
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
direnv
|
||||
docker
|
||||
gawk
|
||||
git-lfs
|
||||
nixFlakes
|
||||
gitFull
|
||||
gnused
|
||||
just
|
||||
nixVersions.stable
|
||||
nodejs
|
||||
openssh
|
||||
wget
|
||||
];
|
||||
enable = true;
|
||||
@@ -41,9 +45,18 @@ makeEnable config "modules.gitea-runner" false {
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.gitea-runner-nix.environment =
|
||||
let gitea-runner-directory = "/var/lib/gitea-runner"; in {
|
||||
systemd.services.gitea-runner-nix = {
|
||||
environment = let gitea-runner-directory = "/var/lib/gitea-runner"; in {
|
||||
XDG_CONFIG_HOME = gitea-runner-directory;
|
||||
XDG_CACHE_HOME = "${gitea-runner-directory}/.cache";
|
||||
};
|
||||
serviceConfig.PrivateTmp = false;
|
||||
};
|
||||
users.groups.gitea-runner = {};
|
||||
users.users.gitea-runner = {
|
||||
isSystemUser = true;
|
||||
group = "gitea-runner";
|
||||
extraGroups = ["docker"];
|
||||
home = "/var/lib/gitea-runner";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
{ config, makeEnable, ... }:
|
||||
makeEnable config "modules.gitea" false {
|
||||
makeEnable config "myModules.gitea" false {
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
dump = {
|
||||
enable = true;
|
||||
interval = "23:05";
|
||||
};
|
||||
settings.service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
settings.server = {
|
||||
DOMAIN = "dev.railbird.ai";
|
||||
SSH_PORT = 1123;
|
||||
HTTP_PORT = 3001;
|
||||
ROOT_URL = "https://dev.railbird.ai";
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
settings.actions = {
|
||||
ENABLED = true;
|
||||
|
||||
7
nixos/gnome.nix
Normal file
7
nixos/gnome.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, makeEnable, ... }:
|
||||
makeEnable config "myModules.gnome" false {
|
||||
services.xserver = {
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
};
|
||||
}
|
||||
119
nixos/home-assistant.nix
Normal file
119
nixos/home-assistant.nix
Normal file
@@ -0,0 +1,119 @@
|
||||
{ pkgs, config, lib, makeEnable, realUsers, ... }:
|
||||
makeEnable config "myModules.home-assistant" false {
|
||||
boot.kernel.sysctl = {
|
||||
# For all interfaces (e.g. if you want to accept RA on all):
|
||||
"net.ipv6.conf.all.accept_ra" = lib.mkForce "1";
|
||||
"net.ipv6.conf.all.accept_ra_rt_info_max_plen" = lib.mkForce "64";
|
||||
"net.ipv6.conf.default.accept_ra" = lib.mkForce "1";
|
||||
"net.ipv6.conf.default.accept_ra_rt_info_max_plen" = lib.mkForce "64";
|
||||
"net.ipv6.conf.wlo1.accept_ra" = lib.mkForce "1";
|
||||
"net.ipv6.conf.wlo1.accept_ra_rt_info_max_plen" = lib.mkForce "64";
|
||||
|
||||
# Ensure forwarding is off on all interfaces unless needed
|
||||
"net.ipv6.conf.all.forwarding" = lib.mkForce "0";
|
||||
};
|
||||
|
||||
# services.matter-server = {
|
||||
# enable = true;
|
||||
# logLevel = "debug";
|
||||
# extraArgs = let cert-dir = pkgs.fetchFromGitHub {
|
||||
# repo = "connectedhomeip";
|
||||
# owner = "project-chip";
|
||||
# rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1";
|
||||
# hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk=";
|
||||
# }; in
|
||||
# [
|
||||
# # "--bluetooth-adapter=0"
|
||||
# "--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs"
|
||||
# "--enable-test-net-dcl"
|
||||
# "--ota-provider-dir=/var/lib/matter-server/ota-provider"
|
||||
# ];
|
||||
# };
|
||||
|
||||
# age.secrets.google-service-account = {
|
||||
# file = ../secrets/google-assistant-integration-service-key.age;
|
||||
# owner = "hass";
|
||||
# };
|
||||
|
||||
age.secrets.zwave-js-config-filepath = {
|
||||
file = ./secrets/zwave-js.json.age;
|
||||
owner = "imalison";
|
||||
group = "users";
|
||||
mode = "777";
|
||||
};
|
||||
|
||||
services.zwave-js = {
|
||||
enable = true;
|
||||
serialPort = "/dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10_700_Z-Wave_Stick_fec41d5809caec11843b63a341be1031-if00-port0";
|
||||
secretsConfigFile = config.age.secrets.zwave-js-config-filepath.path;
|
||||
};
|
||||
|
||||
systemd.services.zwave-js = {
|
||||
serviceConfig = {
|
||||
# DynamicUser = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
|
||||
services.zwave-js-ui = {
|
||||
enable = true;
|
||||
serialPort = "/dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10_700_Z-Wave_Stick_fec41d5809caec11843b63a341be1031-if00-port0";
|
||||
settings = {
|
||||
HOST = "::";
|
||||
PORT = "8091";
|
||||
};
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
"anthropic"
|
||||
"cast"
|
||||
"dlna_dmr"
|
||||
"esphome"
|
||||
"google_assistant"
|
||||
"google_translate"
|
||||
"homeassistant_hardware"
|
||||
"homeassistant_sky_connect"
|
||||
"homekit_controller"
|
||||
"hue"
|
||||
"ibeacon"
|
||||
"isal"
|
||||
"kef"
|
||||
"kegtron"
|
||||
"matter"
|
||||
"met"
|
||||
"opensky"
|
||||
"otbr"
|
||||
"piper"
|
||||
"radio_browser"
|
||||
"roomba"
|
||||
"spotify"
|
||||
"samsungtv"
|
||||
"thread"
|
||||
"wake_word"
|
||||
"webostv"
|
||||
"whisper"
|
||||
"wyoming"
|
||||
"yale"
|
||||
"zwave_js"
|
||||
];
|
||||
extraPackages = python3Packages: with python3Packages; [
|
||||
numpy
|
||||
python-matter-server
|
||||
universal-silabs-flasher
|
||||
];
|
||||
config = {
|
||||
http = {
|
||||
use_x_forwarded_for = true;
|
||||
trusted_proxies = ["0.0.0.0" "127.0.0.1" "::1" "192.168.50.1"];
|
||||
};
|
||||
# google_assistant = {
|
||||
# project_id = "canyon-run-b104-home-assistant";
|
||||
# service_account = "!include ${config.age.secrets.google-service-account.path}";
|
||||
# report_state = true;
|
||||
# exposed_domains = ["switch" "light"];
|
||||
# };
|
||||
default_config = {};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, config, specialArgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xsession = {
|
||||
enable = true;
|
||||
@@ -11,17 +11,29 @@
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.ssh = {
|
||||
forwardAgent = true;
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
forwardAgent = true;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.gpg.package = pkgs.gnupg_2_4_0;
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 8 * 60 * 60;
|
||||
maxCacheTtl = 8 * 60 * 60;
|
||||
enableSshSupport = true;
|
||||
pinentryFlavor = "qt";
|
||||
extraConfig = ''
|
||||
allow-emacs-pinentry
|
||||
allow-loopback-pinentry
|
||||
@@ -52,7 +64,7 @@
|
||||
};
|
||||
|
||||
font = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Sans";
|
||||
size = 10;
|
||||
};
|
||||
|
||||
14
nixos/justfile
Normal file
14
nixos/justfile
Normal file
@@ -0,0 +1,14 @@
|
||||
switch *args:
|
||||
sudo nixos-rebuild switch --flake '.#' --impure {{args}}
|
||||
|
||||
fix-local-path-issue:
|
||||
nix flake update imalison-taffybar
|
||||
|
||||
|
||||
expire-home-manager-generations:
|
||||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
for user in $(awk -F':' '{ if ($3 >= 1000 && $7 !~ /nologin|false|sync|shutdown|halt/) print $1 }' /etc/passwd); do
|
||||
echo $user
|
||||
sudo su - $user -c 'home-manager expire-generations -1days'
|
||||
done
|
||||
165
nixos/k3s.nix
Normal file
165
nixos/k3s.nix
Normal file
@@ -0,0 +1,165 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.myModules.railbird-k3s;
|
||||
mount-path = "/var/lib/railbird/bucket";
|
||||
bucket-name = "railbird-dev-videos";
|
||||
plugins-path = pkgs.buildEnv {
|
||||
name = "combined-cni-plugins";
|
||||
paths = [
|
||||
pkgs.cni-plugins
|
||||
pkgs.calico-cni-plugin
|
||||
pkgs.calico-kube-controllers
|
||||
pkgs.cni-plugin-flannel
|
||||
];
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
myModules.railbird-k3s = {
|
||||
enable = mkEnableOption "railbird k3s";
|
||||
serverAddr = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
extraFlags = mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets."1896Folsom-k3s-token.age".file = ./secrets/1896Folsom-k3s-token.age;
|
||||
age.secrets."k3s-registry.yaml.age".file = ./secrets/k3s-registry.yaml.age;
|
||||
age.secrets.api-service-key = {
|
||||
file = ./secrets/api_service_account_key.json.age;
|
||||
owner = "railbird";
|
||||
group = "users";
|
||||
};
|
||||
environment.etc."rancher/k3s/registries.yaml".source = config.age.secrets."k3s-registry.yaml.age".path;
|
||||
services.dockerRegistry = {
|
||||
enable = true;
|
||||
listenAddress = "0.0.0.0";
|
||||
port = 5279;
|
||||
enableDelete = true;
|
||||
enableGarbageCollect = true;
|
||||
};
|
||||
|
||||
virtualisation.containerd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
plugins."io.containerd.cri.v1.runtime" = {
|
||||
enable_cdi = true;
|
||||
cdi_spec_dirs = [ "/var/run/cdi" ];
|
||||
};
|
||||
plugins."io.containerd.grpc.v1.cri" = {
|
||||
enable_cdi = true;
|
||||
cdi_spec_dirs = [ "/var/run/cdi" ];
|
||||
cni.bin_dir = "${plugins-path}/bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
virtualisation.containers = {
|
||||
containersConf.cniPlugins = [
|
||||
pkgs.cni-plugins
|
||||
pkgs.calico-cni-plugin
|
||||
pkgs.calico-kube-controllers
|
||||
pkgs.cni-plugin-flannel
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
nvidia-container-toolkit-cdi-generator = {
|
||||
# Even with `--library-search-path`, `nvidia-ctk` won't find the libs
|
||||
# unless I bodge their path into the environment.
|
||||
environment.LD_LIBRARY_PATH = "${config.hardware.nvidia.package}/lib";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.mount-railbird-bucket = {
|
||||
after = ["agenix.service"];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Mount railbird bucket";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
RemainAfterExit = true;
|
||||
Restart = "on-failure"; # Restart the service on failure
|
||||
RestartSec = 5; # Wait 5 seconds before restarti
|
||||
TimeoutStopSec = 2;
|
||||
ExecStartPre = [
|
||||
"-${pkgs.util-linux}/bin/umount -f ${mount-path}"
|
||||
"${pkgs.coreutils}/bin/mkdir -p ${mount-path}"
|
||||
"${pkgs.coreutils}/bin/chown railbird:users ${mount-path}"
|
||||
"${pkgs.coreutils}/bin/chmod 0775 ${mount-path}"
|
||||
];
|
||||
ExecStart = let
|
||||
key-file = config.age.secrets.api-service-key.path;
|
||||
in
|
||||
pkgs.writeShellScript "mount-railbird-bucket" ''
|
||||
while true; do
|
||||
if ${pkgs.util-linux}/bin/mount | grep -q "${mount-path}" && [ -d "${mount-path}/dev" ]; then
|
||||
echo "Mount path ${mount-path} is mounted and valid (contains directory 'dev')."
|
||||
else
|
||||
echo "Mount path is not valid or not mounted, attempting remount."
|
||||
${pkgs.util-linux}/bin/umount -f "${mount-path}" || true
|
||||
${pkgs.gcsfuse}/bin/gcsfuse --implicit-dirs --key-file "${key-file}" "${bucket-name}" "${mount-path}"
|
||||
fi
|
||||
echo "Sleeping"
|
||||
sleep 30
|
||||
done
|
||||
'';
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
|
||||
services.k3s = {
|
||||
enable = true;
|
||||
clusterInit = cfg.serverAddr == "";
|
||||
serverAddr = cfg.serverAddr;
|
||||
configPath = pkgs.writeTextFile {
|
||||
name = "k3s-config.yaml";
|
||||
text = ''
|
||||
kubelet-arg:
|
||||
- "eviction-hard=nodefs.available<2Gi"
|
||||
- "eviction-soft=nodefs.available<5Gi"
|
||||
- "eviction-soft-grace-period=nodefs.available=5m"
|
||||
'';
|
||||
};
|
||||
tokenFile = config.age.secrets."1896Folsom-k3s-token.age".path;
|
||||
extraFlags =
|
||||
[
|
||||
"--tls-san ryzen-shine.local"
|
||||
"--tls-san nixquick.local"
|
||||
"--tls-san biskcomp.local"
|
||||
"--tls-san jimi-hendnix.local"
|
||||
"--tls-san dev.railbird.ai"
|
||||
"--node-label nixos-nvidia-cdi=enabled"
|
||||
"--etcd-arg=quota-backend-bytes=8589934592"
|
||||
]
|
||||
++ cfg.extraFlags;
|
||||
containerdConfigTemplate = ''
|
||||
{{ template "base" . }}
|
||||
|
||||
plugins."io.containerd.grpc.v1.cri".cdi_spec_dirs = [ "/var/run/cdi" ]
|
||||
plugins."io.containerd.grpc.v1.cri".enable_cdi = true
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia]
|
||||
runtime_type = "io.containerd.runc.v2"
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options]
|
||||
BinaryName = "/run/current-system/sw/bin/nvidia-container-runtime.cdi"
|
||||
|
||||
[debug]
|
||||
level = "trace"
|
||||
'';
|
||||
gracefulNodeShutdown = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
{ pkgs, inputs, config, makeEnable, ... }:
|
||||
makeEnable config "modules.kat" false {
|
||||
{ pkgs, config, makeEnable, ... }:
|
||||
makeEnable config "myModules.kat" false {
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden
|
||||
obsidian
|
||||
obs-studio
|
||||
ffmpeg
|
||||
bitwarden
|
||||
code-cursor
|
||||
obsidian
|
||||
windsurf
|
||||
];
|
||||
|
||||
environment.extraInit = ''
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
rec {
|
||||
giteaSecret = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHRNHlKPGVnOATsbnkPccyK+C15TWGKbBwqNKt0UcQ81 imalison@adele";
|
||||
hostKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG3UqIYs/NY0okKuiIO+dU2OM7A8vv3b6//GedagvLoX ryzen-shine.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINFbM1sL/vlDhrqPV1OMIGi4dKG0tMKhWSXx95ccbfyM biskcomp.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIoHW29TmS5FgK12N+bCXhGWASDdmzqSEA0QxbyGaJ+j nixquick.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIaA0tRVTqwBDxY6X03wx+50pbB37y5e8gqFpFMDa/Bj adele.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID4j70BoksIEiX+OMBCsSG8wvMIEwoRQf5Gz5ppbm7Iy jimi-hendnix.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOYAoN3l15Avweu5fcfcnlRzmFPHtlYIpo02sxBHANZ+ strixy-minaj.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFTYwBuQ3CNbkj6gAQ0oqxhPlKZ+X6tUaZotccowzjCW justin-bieber-creek.local"
|
||||
];
|
||||
kanivanKeys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUSkj7587e+MAUNyU/KRpw9Vk++53Wv5nB+0V1QgiTO3rMQe6HJt0Tm2wi/o/T8GNjueT2D69YgkqOIF1FQwsj2EFLObcMzeBgs5gTSglqggA2I91BIc1vvgjCDpogOMAzAQGlTxRnqrEXhqG0jJtw8KIzLr9WrvWLdTT4rHtWS8RoOBgkQ8oxbggZ4vtbMBIwoIAYGRr70KBRNCsLTPLa8yEf+DDQxq1entzxSjHXHgyeBSVVpPCrBVmhjandk+lIFInjvAiAE1ZkJHSRccL73ORmgb1crwH7xlD9NwBPmypowMi8UIRMKfL2lNehT0AQIlEAikUBLMDzPIPhnwLZ imalison@ivanm-dfinity-razer.local"
|
||||
@@ -21,9 +24,13 @@ rec {
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMCJ08qswd3OoApAIHQwojEUJ4sre89vSngbM3x5pBP2 imalison@jay-lenovo.local" # Kat's Lenovo Legion
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVGIGnpkU7HNQ/zl/Ffi562M+laWY9/yIjB63BCMiTS kat@nixcomp.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3tlMePru6ZlSuf8yUii3N1dy3WwJnSQAt3EgETkctK kat@jay-lenovo.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFrOYD3ReFc2+xFUylBFHREcm1lO7BRJGW5JrOoY3I8s ivanm@strixi-minaj"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINYy93265G59aA1ksckjqlfeHq0vpEpzC8BwqCrpeXdh kat@Kats-Mac-mini.local"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG60q//rVd2JESQT59XLvLdsH9AdYfQXTkXMjx9pH3xp imalison@justin-bieber-creek"
|
||||
];
|
||||
deanKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICDvbEVL+y7eV4+mtxOuHwyomBBQ6uYMesctstua20+e deanwenstrand@deans-mbp-2.lan"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeXvPyHIYBPtn6QJtOrjlBUsZjDonVRfmWqTTM2ITWx nixos@nixos"
|
||||
];
|
||||
alexKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP2SQkJenAX67Ze99SKOVpKDD1XvAZnxQ8RLP0dL/Ej2 alexm@MALISONSERVER"
|
||||
@@ -35,6 +42,7 @@ rec {
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqBnDZXcZIMtOTPxg4pJWyMyNp84kpU2uH88aCkrhMBY2TI4dqAXGY4h1DOyOEyQo9nTgyvdlv4M1Hlp5tzfbuapdTWtt36gb+FKpsTUy8dz45fhKJerUszNbVQ+SpZu4ZFN4Nv9eP3AHO+Mzjcvbf666VMDEzZWu2totd7jxyI9PdK78TD5AOi+kGTtbEgqMpJCcZmJlzJ9NJJ2ejhPCRwcfDrShHcfMeEwWL5MmnzT+WstkRwJAM0f9/ks77jWDnB1Eu55rQykU8zVZ1nz1GiXZcxUpm6B0IRhwn8NGH6nVzSLITtO5eJ7LPQR9XNUODpbrsVGNK6jgGql9gZpYp andy@nixos"
|
||||
];
|
||||
willKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqBw9QBC0t1TGu7JdryJ6vX3hkBjNnDLe4GFptN2Y3k willgester@gmail.com"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILgLjW6R+dTEmlUoPfE4GA8gRn93UlcSJqlJP1xw0KWl willgester@gmail.com"
|
||||
];
|
||||
loewyKeys = [
|
||||
@@ -42,4 +50,16 @@ rec {
|
||||
];
|
||||
agenixKeys = hostKeys ++ kanivanKeys;
|
||||
allKeys = loewyKeys ++ mikeKeys ++ kanivanKeys ++ deanKeys ++ alexKeys ++ hostKeys;
|
||||
railbird-sf = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDozY/3Cd9npaYPCgIn/E7MjW9c7Zb5/wTO5Qi7yRU45 root@railbird-sf"
|
||||
];
|
||||
micahKeys = [
|
||||
"AAAAB3NzaC1yc2EAAAADAQABAAACAQC4ayU9sly58EHQ2YdrnoJ5o0mFD8I8UiDvN3kVh6oSMMQ9wkVzLUY6wUzlc0uq3P/OYco9mURMt83C+lY4UC+jvN09nIEHV7yVJWsKV3ntmnEqM63e9cOWnpC9XA1MSha7xrf9DaO/doxST4fY6ixZA+nbE0bFgNTqyjzdya7pCamAdnPqKqwUEha+0KfpA8TJlrfgrDLd65f2/+jLU8fhTkU6yhrJ9Piq7C+RwVTu/dlrp50PNirfQRSa7vUPNS8Y973XtK6jzB/xS2Qc6iGJ+4QcCy6lgu2xksO/MNIimZYGOCP2yx6/GDp/gnOlAktrJ3flMycJdEHkZVH61HfQV76O/mY3tck/SiCwhuNxXw0uh9wf4UO8JHlnJcsIsBkSBemJsxQul+G7kV4EV/gqW/iO5U2nKmDqbwNWigO9mN44LqBOwsnAnu78kiSE8sNCEdSy/qVWloBw4VyT/emvmTwP1okh/CKNnu0/HmfSNL6Vib1XuvKSPvrUIOLMrSeRdtu85LrWaS0CvKEoMrIgpvc+3jHtdbxwINE3JBGrbXvfe20CuHl6Fx0ONkhirRmrjG7iUjV/4c6nS2aguPVsGi7q3GYvtz7cNEe3XbfpZaHzrCncnoQPbnSDLjHdeZf4O5Aew6iOwwkpgBBDA3lJO55ujq2vNbgkpH3hmQjltQ=="
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEBce6E/XCdo8+dC4PPyyTsO/Z0BZxuz0IrTLaGehrT weitzman.micah@gmail.com"
|
||||
];
|
||||
benKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAJ6lD0c+frh2vzQjvsrsmJpwM1ovaY59m5NNPml5G+E benjamin.j.corner@gmail.com"
|
||||
];
|
||||
interviewKeys = [
|
||||
];
|
||||
}
|
||||
|
||||
23
nixos/kubelet-client.crt
Normal file
23
nixos/kubelet-client.crt
Normal file
@@ -0,0 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDyTCCAjGgAwIBAgIRAMQBZiVjA5BGSkDldScI9cMwDQYJKoZIhvcNAQELBQAw
|
||||
LzEtMCsGA1UEAxMkM2I2N2M2NzgtNzI5My00YTIzLTg3ZWItY2NiMTZjYWFkMzFm
|
||||
MB4XDTI0MDkyOTIwNTAzNloXDTI5MDkyODIwNTIzNlowOTEVMBMGA1UEChMMc3lz
|
||||
dGVtOm5vZGVzMSAwHgYDVQQDExdzeXN0ZW06bm9kZTpyeXplbi1zaGluZTCCASIw
|
||||
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANIOfbq05IIdgX2jXYLaEt66rkXp
|
||||
NlqPNfh6v9nL1Aw6PSM3DEIWXVko8AyduRF4kXNO6xc6l/Rzk03w3qSvJpWpALGD
|
||||
JjslgRL4VJWUC6/QydsCO9io7SoUEmXFtDcsW6DftFejosr+56ZnVFrz5MMzfUAL
|
||||
Ix6n83NJvXZ8f9oHSX8TFW34ZClLxDq2fprFIs+D2QlFRE50Jr/Q8gPI2OSQDUBW
|
||||
DFdQrjt81bLs6doQipUqvHb4/Ms49agHek1ceWIMf+KZWoao5KNQTBe6XL2BUgA/
|
||||
MS3ZvQppDDTygA0QkgdtOJyG2lsrAmd7LEXTr9ilsqLV3YQMMKhCifwINa0CAwEA
|
||||
AaNWMFQwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAwGA1Ud
|
||||
EwEB/wQCMAAwHwYDVR0jBBgwFoAUjvcbOeZ4QIk53EkATOaOFiAZUq0wDQYJKoZI
|
||||
hvcNAQELBQADggGBAELWgmdmg9TKjDDqmF6pYr1j43gZYclXW4sB509itSiIeltX
|
||||
Isrvn5R5ok0W5Jcl+7QMhpntqIKJi26OqbcdBhqlaVURkBkbrx8aegkWJfPO+Fzz
|
||||
NyyiIpk7KQzGy6N5//jfMPZtJfQEQZwMenW0cj7F0QHOdVZy90+JNr2P3uV3Ad7u
|
||||
WZuYpbOFjOeQg1hJsX8wEU4KJyptn/kXhM+CqAnQ4S+k2wpjECD8KpWKAmpJWZg0
|
||||
RaBPyHZSmWnbXqs4LU6ERaZJxZQG0ODuA18DmGfaAkUUUvE2J0ploc2Y8Xl4zUWW
|
||||
Ivwslyx30YO3J9qI30d9tTQw/A0vHCoDNDbCg7lorZqP3TiTG9ANLndPqqg6inYU
|
||||
yfj612//JrO8w/4qh7cxR03P35aK0paLC74FaKLtZ5CwPK3BAW/0Zhv5fH4io6hE
|
||||
rfJmcjhbKD0Cwr9Dn6wVFz/a33H+0vMohHrVlDk4bSDIymbuJcZpYgR8n5WNQbGu
|
||||
nwjiLXCnVxcVjkcj2w==
|
||||
-----END CERTIFICATE-----
|
||||
22
nixos/kubelet.nix
Normal file
22
nixos/kubelet.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, pkgs, makeEnable, ... }:
|
||||
makeEnable config "myModules.kubelet" false {
|
||||
age.secrets."api_service_account_key.json.age".file = ./secrets/api_service_account_key.json.age;
|
||||
services.kubernetes.kubelet = {
|
||||
enable = true;
|
||||
kubeconfig = {
|
||||
server = "https://34.31.205.230";
|
||||
caFile = ./railbird-kubernetes.crt;
|
||||
certFile = ./kubelet-client.crt;
|
||||
keyFile = config.age.secrets."api_service_account_key.json.age".path;
|
||||
};
|
||||
registerNode = true;
|
||||
cni = {
|
||||
packages = [ pkgs.cni-plugins pkgs.calico-cni-plugin ];
|
||||
};
|
||||
extraOpts = ''
|
||||
--fail-swap-on=false
|
||||
# --container-runtime=remote
|
||||
# --container-runtime-endpoint=unix:///run/containerd/containerd.sock
|
||||
'';
|
||||
};
|
||||
}
|
||||
4
nixos/laptop.nix
Normal file
4
nixos/laptop.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ makeEnable, config, ... }:
|
||||
makeEnable config "myModules.laptop" true {
|
||||
services.logind.settings.Login.HandleLidSwitchExternalPower = "ignore";
|
||||
}
|
||||
@@ -1,32 +1,47 @@
|
||||
{ config, lib, pkgs, inputs, forEachUser, ... }:
|
||||
{ lib, pkgs, inputs, forEachUser, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
imports = [
|
||||
../configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-intel
|
||||
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia
|
||||
];
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
modules.gitea-runner.enable = true;
|
||||
# services.tts.servers.coqui = {
|
||||
# enable = false;
|
||||
# useCuda = false;
|
||||
# port = 11400;
|
||||
# };
|
||||
|
||||
myModules.wyoming.enable = false;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.xmonad.enable = true;
|
||||
myModules.extra.enable = false;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
myModules.nixified-ai.enable = false;
|
||||
myModules.gitea-runner.enable = false;
|
||||
hardware.nvidia.open = true;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-studio
|
||||
];
|
||||
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.xserver.libinput = {
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
touchpad.tapping = true;
|
||||
};
|
||||
@@ -52,7 +67,7 @@
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.hostName = "adele";
|
||||
networking.hostName = "adell";
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
|
||||
39
nixos/machines/bencbox.nix
Normal file
39
nixos/machines/bencbox.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ lib, pkgs, config, inputs, forEachUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
services.xserver.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
sublime
|
||||
vlc
|
||||
];
|
||||
myModules.desktop.enable = false;
|
||||
myModules.plasma.enable = false;
|
||||
imalison.nixOverlay.enable = false;
|
||||
myModules.wsl.enable = true;
|
||||
|
||||
networking.hostName = "bencbox";
|
||||
|
||||
wsl.defaultUser = "ben";
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "22.05";
|
||||
};
|
||||
|
||||
users.users.ben = {
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"adbusers"
|
||||
"disk"
|
||||
"docker"
|
||||
"networkmanager"
|
||||
"openrazer"
|
||||
"plugdev"
|
||||
"syncthing"
|
||||
"systemd-journal"
|
||||
"video"
|
||||
] ++ ["wheel"];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ forEachUser, ... }:
|
||||
{ pkgs, lib, forEachUser, config, ... }:
|
||||
let biskcomp-nginx-hostnames = "192.168.1.44 railbird.ai 1896Folsom.duckdns.org biskcomp.local 0.0.0.0 67.162.131.71";
|
||||
in
|
||||
{
|
||||
@@ -7,28 +7,48 @@ in
|
||||
../raspberry-pi.nix
|
||||
];
|
||||
|
||||
modules.raspberry-pi.enable = true;
|
||||
users.users.nginx = {
|
||||
group = "nginx";
|
||||
isSystemUser = true;
|
||||
extraGroups = ["syncthing"];
|
||||
};
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = false;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
modules.cache-server = {
|
||||
myModules.home-assistant.enable = true;
|
||||
myModules.raspberry-pi.enable = true;
|
||||
myModules.plasma.enable = false;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = false;
|
||||
myModules.xmonad.enable = false;
|
||||
myModules.extra.enable = false;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
myModules.nixified-ai.enable = false;
|
||||
myModules.cache-server = {
|
||||
enable = false;
|
||||
host-string = biskcomp-nginx-hostnames;
|
||||
port = 80;
|
||||
path = "/nix-cache";
|
||||
};
|
||||
modules.gitea.enable = true;
|
||||
modules.gitea-runner.enable = false;
|
||||
myModules.gitea.enable = true;
|
||||
myModules.gitea-runner.enable = false;
|
||||
|
||||
myModules.railbird-k3s = {
|
||||
enable = false;
|
||||
serverAddr = "https://dev.railbird.ai:6443";
|
||||
};
|
||||
services.k3s.disableAgent = true;
|
||||
|
||||
age.secrets.vaultwarden-environment-file = {
|
||||
file = ../secrets/vaultwarden-environment-file.age;
|
||||
owner = "vaultwarden";
|
||||
};
|
||||
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
backupDir = "/var/backup/vaultwarden";
|
||||
environmentFile = config.age.secrets.vaultwarden-environment-file.path;
|
||||
config = {
|
||||
ROCKET_ADDRESS = "::1";
|
||||
ROCKET_PORT = 8222;
|
||||
@@ -40,12 +60,86 @@ in
|
||||
defaults.email = "IvanMalison@gmail.com";
|
||||
};
|
||||
|
||||
services.gitlab = {
|
||||
enable = true;
|
||||
databasePasswordFile = pkgs.writeText "dbPassword" "zgvcyfwsxzcwr85l";
|
||||
initialRootPasswordFile = pkgs.writeText "rootPassword" "dakqdvp4ovhksxer";
|
||||
host = "gitlab.railbird.ai";
|
||||
secrets = {
|
||||
secretFile = pkgs.writeText "secret" "Aig5zaic";
|
||||
otpFile = pkgs.writeText "otpsecret" "Riew9mue";
|
||||
dbFile = pkgs.writeText "dbsecret" "we2quaeZ";
|
||||
jwsFile = pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.discourse-admin-password = {
|
||||
file = ../secrets/discourse-admin-password.age;
|
||||
mode = "770";
|
||||
owner = "discourse";
|
||||
group = "users";
|
||||
};
|
||||
|
||||
age.secrets.discourse-secret-key-base = {
|
||||
file = ../secrets/discourse-secret-key-base.age;
|
||||
group = "users";
|
||||
owner = "discourse";
|
||||
};
|
||||
|
||||
services.discourse = {
|
||||
enable = false;
|
||||
enableACME = true;
|
||||
hostname = "discourse.railbird.ai";
|
||||
admin = {
|
||||
passwordFile = config.age.secrets.discourse-admin-password.path;
|
||||
email = "support@railbird.ai";
|
||||
fullName = "Admin";
|
||||
username = "admin";
|
||||
};
|
||||
secretKeyBaseFile = config.age.secrets.discourse-secret-key-base.path;
|
||||
database.ignorePostgresqlVersion = true;
|
||||
};
|
||||
|
||||
systemd.services.emacs-org-api = {
|
||||
description = "Emacs org api";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''${pkgs.runtimeShell} -l -c "${lib.getExe' pkgs.emacs "emacs"} --load /home/imalison/.emacs.d/org-api.el --daemon=org-api"'';
|
||||
RemainAfterExit = true;
|
||||
Restart = "on-failure";
|
||||
User = "imalison";
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.org-api-passwords = {
|
||||
file = ../secrets/org-api-passwords.age;
|
||||
owner = "nginx";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts = {
|
||||
"org-mode.1896Folsom.duckdns.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:2025";
|
||||
basicAuthFile = config.age.secrets.org-api-passwords.path;
|
||||
extraConfig = ''
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'POST, PUT, DELETE, GET, PATCH, OPTIONS' always;
|
||||
'';
|
||||
};
|
||||
};
|
||||
"gitlab.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
|
||||
};
|
||||
"vaultwarden.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
@@ -53,6 +147,26 @@ in
|
||||
proxyPass = "http://[::1]:8222";
|
||||
};
|
||||
};
|
||||
"syncthing.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/lib/syncthing/railbird";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
"docs.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/lib/syncthing/railbird/docs";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -65,20 +179,6 @@ in
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
# Components required to complete the onboarding
|
||||
"met"
|
||||
"radio_browser"
|
||||
];
|
||||
config = {
|
||||
# Includes dependencies for a basic setup
|
||||
# https://www.home-assistant.io/integrations/default_config/
|
||||
default_config = {};
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/swapfile"; size = 8192; } # size is in MiB
|
||||
];
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, forEachUser, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.xmonad.enable = false;
|
||||
myModules.extra.enable = false;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
myModules.nixified-ai.enable = false;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
@@ -34,29 +34,15 @@
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/58218a04-3ba1-4295-86bb-ada59f75e3b6";
|
||||
device = "/dev/disk/by-uuid/36864608-8e74-42b8-a075-27b59ef2701d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/8142784e-45c6-4a2b-91f1-09df741ac00f";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/36E1-BE93";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
systemd.services.resume-fix = {
|
||||
description = "Fixes acpi immediate resume after suspend";
|
||||
wantedBy = [ "multi-user.target" "post-resume.target" ];
|
||||
after = [ "multi-user.target" "post-resume.target" ];
|
||||
script = ''
|
||||
if ${pkgs.gnugrep}/bin/grep -q '\bXHC\b.*\benabled\b' /proc/acpi/wakeup; then
|
||||
echo XHC > /proc/acpi/wakeup
|
||||
fi
|
||||
'';
|
||||
serviceConfig.Type = "oneshot";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
@@ -65,10 +51,12 @@
|
||||
}
|
||||
];
|
||||
|
||||
networking.hostName = "ivanm-dfinity-razer";
|
||||
networking.hostName = "david-blade";
|
||||
|
||||
nix.settings.maxJobs = lib.mkDefault 12;
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
system.stateVersion = "18.03";
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
21
nixos/machines/dean-zephyrus.nix
Normal file
21
nixos/machines/dean-zephyrus.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ lib, pkgs, config, inputs, forEachUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
services.xserver.enable = true;
|
||||
environment.systemPackages = with pkgs; [sublime];
|
||||
myModules.desktop.enable = false;
|
||||
myModules.plasma.enable = false;
|
||||
imalison.nixOverlay.enable = false;
|
||||
myModules.wsl.enable = true;
|
||||
|
||||
networking.hostName = "dean-zephyrus";
|
||||
|
||||
wsl.defaultUser = "dean";
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
];
|
||||
|
||||
imalison.nixOverlay.enable = false;
|
||||
modules.wsl.enable = true;
|
||||
myModules.wsl.enable = true;
|
||||
|
||||
networking.hostName = "jay-lenovo-wsl";
|
||||
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
myModules.wyoming.enable = true;
|
||||
features.full.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-studio
|
||||
linuxPackages_latest.perf
|
||||
zenmonitor
|
||||
code-cursor
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
@@ -25,13 +28,13 @@
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
myModules.postgres.enable = true;
|
||||
myModules.kat.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
libinput.enable = true;
|
||||
displayManager.sddm.enable = true;
|
||||
desktopManager.plasma5.enable = true;
|
||||
videoDrivers = [ "amdgpu" ];
|
||||
};
|
||||
|
||||
|
||||
@@ -5,22 +5,80 @@
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
modules.gitea-runner.enable = true;
|
||||
myModules.railbird-k3s = {
|
||||
enable = true;
|
||||
serverAddr = "https://ryzen-shine.local:6443";
|
||||
};
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.xmonad.enable = true;
|
||||
myModules.extra.enable = false;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
myModules.gitea-runner.enable = true;
|
||||
myModules.postgres.enable = true;
|
||||
myModules.gitea.enable = true;
|
||||
|
||||
age.secrets.vaultwarden-environment-file = {
|
||||
file = ../secrets/vaultwarden-environment-file.age;
|
||||
owner = "vaultwarden";
|
||||
};
|
||||
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
backupDir = "/var/backup/vaultwarden";
|
||||
environmentFile = config.age.secrets.vaultwarden-environment-file.path;
|
||||
config = {
|
||||
ROCKET_ADDRESS = "::1";
|
||||
ROCKET_PORT = 8222;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts = {
|
||||
"vaultwarden.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://[::1]:8222";
|
||||
};
|
||||
};
|
||||
"syncthing.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/lib/syncthing/railbird";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
"docs.railbird.ai" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/lib/syncthing/railbird/docs";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "IvanMalison@gmail.com";
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# install nvidia drivers in addition to intel one
|
||||
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
||||
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
||||
myModules.nvidia.enable = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
@@ -44,6 +102,10 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/598e9aa1-4940-4410-a2fa-3dfd8b7d2c0d"; }
|
||||
];
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
|
||||
207
nixos/machines/justin-bieber-creek.nix
Normal file
207
nixos/machines/justin-bieber-creek.nix
Normal file
@@ -0,0 +1,207 @@
|
||||
{ config, lib, pkgs, forEachUser, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
services.synergy.server = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
myModules.fonts.enable = true;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.xmonad.enable = true;
|
||||
myModules.wyoming.enable = true;
|
||||
|
||||
networking.enableIPv6 = true;
|
||||
|
||||
services.synergy.client = {
|
||||
enable = true;
|
||||
serverAddress = "strixi-minaj.local:24800";
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
# For all interfaces (e.g. if you want to accept RA on all):
|
||||
"net.ipv6.conf.all.accept_ra" = lib.mkForce "1";
|
||||
"net.ipv6.conf.all.accept_ra_rt_info_max_plen" = lib.mkForce "64";
|
||||
"net.ipv6.conf.default.accept_ra" = lib.mkForce "1";
|
||||
"net.ipv6.conf.default.accept_ra_rt_info_max_plen" = lib.mkForce "64";
|
||||
"net.ipv6.conf.wlo1.accept_ra" = lib.mkForce "1";
|
||||
"net.ipv6.conf.wlo1.accept_ra_rt_info_max_plen" = lib.mkForce "64";
|
||||
|
||||
# Ensure forwarding is off on all interfaces unless needed
|
||||
"net.ipv6.conf.all.forwarding" = lib.mkForce "0";
|
||||
};
|
||||
|
||||
systemd.services.otbr-agent = {
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
};
|
||||
|
||||
services.openthread-border-router = {
|
||||
enable = true;
|
||||
backboneInterface = "wpan0";
|
||||
logLevel = "debug";
|
||||
radio = {
|
||||
device = "/dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_0cd053abfa38ef119c66e1d154516304-if00-port0";
|
||||
baudRate = 460800;
|
||||
flowControl = true;
|
||||
};
|
||||
web = {
|
||||
listenPort = 8087;
|
||||
};
|
||||
rest = {
|
||||
listenPort = 8089;
|
||||
};
|
||||
};
|
||||
|
||||
services.matter-server = {
|
||||
enable = true;
|
||||
logLevel = "debug";
|
||||
extraArgs = let cert-dir = pkgs.fetchFromGitHub {
|
||||
repo = "connectedhomeip";
|
||||
owner = "project-chip";
|
||||
rev = "6e8676be6142bb541fa68048c77f2fc56a21c7b1";
|
||||
hash = "sha256-QwPKn2R4mflTKMyr1k4xF04t0PJIlzNCOdXEiQwX5wk=";
|
||||
}; in
|
||||
[
|
||||
"--bluetooth-adapter=0"
|
||||
"--paa-root-cert-dir=${cert-dir}/credentials/production/paa-root-certs"
|
||||
"--enable-test-net-dcl"
|
||||
"--ota-provider-dir=/var/lib/matter-server/ota-provider"
|
||||
];
|
||||
};
|
||||
|
||||
age.secrets.google-service-account = {
|
||||
file = ../secrets/google-assistant-integration-service-key.age;
|
||||
owner = "hass";
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
"anthropic"
|
||||
"cast"
|
||||
"dlna_dmr"
|
||||
"esphome"
|
||||
"google_assistant"
|
||||
"homeassistant_hardware"
|
||||
"homeassistant_sky_connect"
|
||||
"homekit_controller"
|
||||
"ibeacon"
|
||||
"isal"
|
||||
"kef"
|
||||
"kegtron"
|
||||
"matter"
|
||||
"met"
|
||||
"opensky"
|
||||
"otbr"
|
||||
"piper"
|
||||
"radio_browser"
|
||||
"roomba"
|
||||
"samsungtv"
|
||||
"thread"
|
||||
"wake_word"
|
||||
"webostv"
|
||||
"whisper"
|
||||
"wyoming"
|
||||
"yale"
|
||||
];
|
||||
extraPackages = python3Packages: with python3Packages; [
|
||||
numpy
|
||||
python-matter-server
|
||||
universal-silabs-flasher
|
||||
];
|
||||
config = {
|
||||
http = {
|
||||
use_x_forwarded_for = true;
|
||||
trusted_proxies = ["0.0.0.0" "127.0.0.1" "::1" "192.168.50.1"];
|
||||
};
|
||||
google_assistant = {
|
||||
project_id = "canyon-run-b104-home-assistant";
|
||||
service_account = "!include ${config.age.secrets.google-service-account.path}";
|
||||
report_state = true;
|
||||
exposed_domains = ["switch" "light"];
|
||||
};
|
||||
default_config = {};
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "IvanMalison@gmail.com";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts = {
|
||||
"homeassistant.canyonrunb104.duckdns.org" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8123";
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
};
|
||||
};
|
||||
"ha.canyonrunb104.duckdns.org" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8123";
|
||||
extraConfig = ''
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 3;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# Add Intel Wi-Fi firmware
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/453d28a1-26f2-4b25-ac72-c6d301fd0bb8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/184E-E5E8";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.hostName = "justin-bieber-creek";
|
||||
|
||||
networking.useDHCP = false;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
}
|
||||
@@ -4,9 +4,25 @@
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
services.macos-ventura = {
|
||||
enable = false;
|
||||
openFirewall = true;
|
||||
vncListenAddr = "0.0.0.0";
|
||||
};
|
||||
|
||||
features.full.enable = true;
|
||||
modules.cache-server.enable = true;
|
||||
modules.gitea-runner.enable = true;
|
||||
myModules.cache-server = {
|
||||
enable = true;
|
||||
port = 3090;
|
||||
};
|
||||
myModules.gitea-runner.enable = true;
|
||||
myModules.vscode.enable = true;
|
||||
myModules.kat.enable = true;
|
||||
myModules.nvidia.enable = true;
|
||||
myModules.railbird-k3s = {
|
||||
enable = true;
|
||||
serverAddr = "https://dev.railbird.ai:6443";
|
||||
};
|
||||
|
||||
networking.hostName = "nixquick";
|
||||
|
||||
@@ -17,15 +33,6 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# install nvidia drivers in addition to intel one
|
||||
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
||||
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
# This also enables v4l2loopback
|
||||
|
||||
@@ -1,58 +1,9 @@
|
||||
{ config, lib, pkgs, inputs, forEachUser, ... }:
|
||||
{ config, lib, pkgs, forEachUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = false;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
services.xserver.desktopManager.gnome3.enable = true;
|
||||
services.displayManager.gddm.enable = true;
|
||||
|
||||
features.full.enable = false;
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.code.enable = true;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
|
||||
networking.hostName = "railbird-sf";
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
@@ -61,47 +12,61 @@
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
myModules.postgres.enable = true;
|
||||
features.full.enable = true;
|
||||
|
||||
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
||||
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
services.k3s.role = "agent";
|
||||
services.k3s.extraFlags = lib.mkForce ["--node-label nixos-nvidia-cdi=enabled"];
|
||||
|
||||
hardware.nvidia = {
|
||||
powerManagement.enable = false;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.code.enable = true;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
myModules.plasma.enable = true;
|
||||
myModules.nvidia.enable = true;
|
||||
myModules.gitea-runner.enable = true;
|
||||
myModules.railbird-k3s = {
|
||||
enable = false;
|
||||
serverAddr = "https://dev.railbird.ai:6443";
|
||||
};
|
||||
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
# This also enables v4l2loopback
|
||||
programs.droidcam.enable = true
|
||||
|
||||
fileSystems."/" =
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";
|
||||
fsType = "ext4";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B875-39D4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/129345f3-e1e1-4d45-9db9-643160c6d564"; }
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-studio
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
|
||||
services.xrdp.enable = true;
|
||||
services.xrdp.defaultWindowManager = "startplasma-x11";
|
||||
services.xrdp.openFirewall = true;
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "23.11";
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
101
nixos/machines/ryzen-shine-original.nix
Normal file
101
nixos/machines/ryzen-shine-original.nix
Normal file
@@ -0,0 +1,101 @@
|
||||
{ lib, pkgs, forEachUser, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
features.full.enable = true;
|
||||
myModules.kubelet.enable = false;
|
||||
myModules.nvidia.enable = true;
|
||||
# Needed for now because monitors have different refresh rates
|
||||
myModules.xmonad.picom.vSync.enable = false;
|
||||
myModules.cache-server = {
|
||||
enable = true;
|
||||
port = 3090;
|
||||
};
|
||||
myModules.gitea-runner.enable = true;
|
||||
myModules.postgres.enable = true;
|
||||
myModules.railbird-k3s = {
|
||||
enable = true;
|
||||
# extraFlags = ["--node-taint preferNoSchedule=true:NoSchedule"];
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
networking.hostName = "ryzen-shine";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
linuxPackages_latest.perf
|
||||
];
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.plymouth = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
networking.interfaces.enp5s0.useDHCP = true;
|
||||
networking.interfaces.wlp4s0.useDHCP = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5";
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
|
||||
# install nvidia drivers in addition to intel one
|
||||
hardware.graphics.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
||||
hardware.graphics.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
hardware.graphics.enable32Bit = true;
|
||||
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B270-C7E6";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/shared" = {
|
||||
device = "/dev/disk/by-uuid/D4009CE8009CD33A";
|
||||
fsType = "ntfs";
|
||||
options = [ "nofail" "uid=0" "gid=users" "umask=002" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77"; }
|
||||
];
|
||||
|
||||
# nix.settings.maxJobs = lib.mkDefault 16;
|
||||
# High-DPI console
|
||||
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
|
||||
|
||||
# services.xrdp.enable = true;
|
||||
# services.xrdp.defaultWindowManager = "startplasma-x11";
|
||||
# services.xrdp.openFirewall = true;
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "21.05";
|
||||
};
|
||||
|
||||
# users.extraUsers.dean.home = "/shared/dean";
|
||||
}
|
||||
24
nixos/machines/ryzen-shine-wsl.nix
Normal file
24
nixos/machines/ryzen-shine-wsl.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ lib, pkgs, config, inputs, forEachUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
services.xserver.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
sublime
|
||||
vlc
|
||||
];
|
||||
myModules.desktop.enable = false;
|
||||
myModules.plasma.enable = false;
|
||||
imalison.nixOverlay.enable = false;
|
||||
myModules.wsl.enable = true;
|
||||
|
||||
networking.hostName = "ryzen-shine-wsl";
|
||||
|
||||
wsl.defaultUser = "imalison";
|
||||
system.stateVersion = "22.05";
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, inputs, forEachUser, ... }:
|
||||
{ lib, pkgs, forEachUser, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -6,13 +6,23 @@
|
||||
];
|
||||
|
||||
features.full.enable = true;
|
||||
myModules.kubelet.enable = false;
|
||||
myModules.nvidia.enable = true;
|
||||
# Needed for now because monitors have different refresh rates
|
||||
modules.xmonad.picom.vSync.enable = false;
|
||||
modules.cache-server = {
|
||||
myModules.xmonad.picom.vSync.enable = false;
|
||||
myModules.cache-server = {
|
||||
enable = true;
|
||||
port = 3090;
|
||||
};
|
||||
modules.gitea-runner.enable = true;
|
||||
myModules.gitea-runner.enable = true;
|
||||
myModules.postgres.enable = true;
|
||||
myModules.railbird-k3s = {
|
||||
enable = true;
|
||||
serverAddr = "https://jimi-hendnix.local:6443";
|
||||
# extraFlags = ["--node-taint preferNoSchedule=true:NoSchedule"];
|
||||
};
|
||||
myModules.nixified-ai.enable = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
@@ -29,29 +39,6 @@
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
"1896Office" = {
|
||||
fingerprint = {
|
||||
DP-0 = "00ffffffffffff0010ace4a153364b300c200104b55123783bfce1b04d3bb8250e505421080001010101010101010101010101010101e77c70a0d0a029503020150829623100001a000000ff0023473749594d78677741413052000000fd0001afffff63010a202020202020000000fc0044656c6c20415733343233445702d8020320f12309070183010000654b04000101e305c000e2006ae6060501634b004ed470a0d0a046503020e50c29623100001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009970127903000f000aa4140e0e07012045000002010d310cdb4dbd13b85b620e01455403013c520101046f0d9f002f801f009f0554004c000400663801046f0d9f002f801f009f0566005e0004008b8101046f0d9f002f801f009f057e007600040000000000000000000000000000000000000000000000000000000000005f90";
|
||||
HDMI-0 = "00ffffffffffff0010ac67d0534d39312d1a0103803c2278ee4455a9554d9d260f5054a54b00b300d100714fa9408180778001010101565e00a0a0a029503020350055502100001a000000ff00483759434336423831394d530a000000fc0044454c4c205532373135480a20000000fd0038561e711e000a202020202020019e020322f14f1005040302071601141f1213202122230907078301000065030c001000023a801871382d40582c250055502100001e011d8018711c1620582c250055502100009e011d007251d01e206e28550055502100001e8c0ad08a20e02d10103e9600555021000018483f00ca808030401a50130055502100001e00000094";
|
||||
};
|
||||
config = {
|
||||
DP-0 = {
|
||||
enable = true;
|
||||
mode = "3440x1440";
|
||||
rate = "143.97";
|
||||
position = "0x1440";
|
||||
primary = true;
|
||||
};
|
||||
HDMI-0 = {
|
||||
enable = true;
|
||||
rate = "59.95";
|
||||
mode = "2560x1440";
|
||||
position = "440x0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
@@ -63,43 +50,30 @@
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/nvme0n1p5";
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
|
||||
# install nvidia drivers in addition to intel one
|
||||
hardware.opengl.extraPackages = [ pkgs.linuxPackages.nvidia_x11.out ];
|
||||
hardware.opengl.extraPackages32 = [ pkgs.linuxPackages.nvidia_x11.lib32 ];
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/356173ab-d076-43e0-aeb6-6a6829c4402b";
|
||||
device = "/dev/disk/by-uuid/9bd06145-8151-4f7b-bcfe-f1809e0db1ea";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B270-C7E6";
|
||||
device = "/dev/disk/by-uuid/E1E1-909E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/shared" = {
|
||||
device = "/dev/disk/by-uuid/D4009CE8009CD33A";
|
||||
fsType = "ntfs";
|
||||
options = [ "nofail" ];
|
||||
options = [ "nofail" "uid=0" "gid=users" "umask=002" ];
|
||||
};
|
||||
|
||||
swapDevices =[
|
||||
{ device = "/dev/disk/by-uuid/f719b44e-295a-4909-9a60-84f87acb7f77"; }
|
||||
];
|
||||
|
||||
# nix.settings.maxJobs = lib.mkDefault 16;
|
||||
# High-DPI console
|
||||
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
|
||||
@@ -113,5 +87,5 @@
|
||||
home.stateVersion = "21.05";
|
||||
};
|
||||
|
||||
users.extraUsers.dean.home = "/shared/dean";
|
||||
# users.extraUsers.dean.home = "/shared/dean";
|
||||
}
|
||||
|
||||
35
nixos/machines/strixi-minaj-wsl.nix
Normal file
35
nixos/machines/strixi-minaj-wsl.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ lib, pkgs, config, inputs, forEachUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
myModules.wsl.enable = true;
|
||||
|
||||
networking.hostName = "strixi-minaj-wsl";
|
||||
|
||||
wsl.defaultUser = "imalison";
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "23.11";
|
||||
};
|
||||
|
||||
programs.gnupg = {
|
||||
agent = {
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"openssl-1.0.2u"
|
||||
"electron-12.2.3"
|
||||
"etcher"
|
||||
"electron-19.1.9"
|
||||
"openssl-1.1.1w"
|
||||
"nix-2.16.2"
|
||||
"electron-32.3.3"
|
||||
];
|
||||
}
|
||||
87
nixos/machines/strixi-minaj.nix
Normal file
87
nixos/machines/strixi-minaj.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{ config, lib, pkgs, inputs, forEachUser, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
|
||||
];
|
||||
|
||||
myModules.base.enable = true;
|
||||
myModules.desktop.enable = true;
|
||||
myModules.xmonad.enable = true;
|
||||
myModules.extra.enable = false;
|
||||
myModules.code.enable = true;
|
||||
myModules.games.enable = false;
|
||||
myModules.syncthing.enable = true;
|
||||
myModules.fonts.enable = true;
|
||||
myModules.gitea-runner.enable = false;
|
||||
myModules.nvidia.enable = true;
|
||||
myModules.electron.enable = true;
|
||||
myModules.wyoming.enable = false;
|
||||
myModules.tts.enable = false;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# nixpkgs.config.cudaSupport = true;
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-studio
|
||||
];
|
||||
|
||||
services.synergy.server = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
configFile = ../../dotfiles/synergy.conf;
|
||||
};
|
||||
|
||||
services.matter-server = {
|
||||
enable = false;
|
||||
logLevel = "debug";
|
||||
extraArgs = ["--bluetooth-adapter=0" "--enable-test-net-dcl"];
|
||||
};
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
|
||||
services.xserver.dpi = 96;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# See https://github.com/NixOS/nixpkgs/issues/467814 for why this was needed
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
hardware.nvidia.powerManagement.enable = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.asusd.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/fc06a54c-cc45-423a-914b-8dfcb5939106";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B28A-829A";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/27f277a0-b552-43a0-904d-625e48922bb9"; }
|
||||
];
|
||||
|
||||
networking.hostName = "strixi-minaj";
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
|
||||
|
||||
home-manager.users = forEachUser {
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
{ inputs, specialArgs, config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModule
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
options = {
|
||||
imalison.nixOverlay.enable = lib.mkOption {
|
||||
default = true;
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
@@ -18,6 +18,7 @@
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
|
||||
nix = rec {
|
||||
extraOptions = ''
|
||||
@@ -27,15 +28,27 @@
|
||||
settings = {
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
"https://ai.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.railbird.ai:KhnvcouxtIU2zxUcjJsm4bUK3o1S3p8xMf9qfZGF7/A="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
"ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
||||
];
|
||||
nix-path = nixPath;
|
||||
};
|
||||
channel.enable = false;
|
||||
nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs.outPath}"
|
||||
];
|
||||
settings.nix-path = nixPath;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
# (import ./nvidia-container-toolkit-overlay.nix)
|
||||
(import ./runc-overlay.nix)
|
||||
(import ./overlay.nix)
|
||||
] ++ (if config.imalison.nixOverlay.enable then [ inputs.nix.overlays.default ] else []);
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
{ inputs, config, specialArgs, ... }:
|
||||
specialArgs.makeEnable config "modules.nixified-ai" false {
|
||||
imports = [
|
||||
inputs.nixified-ai.nixosModules.invokeai
|
||||
];
|
||||
specialArgs.makeEnable config "myModules.nixified-ai" false {
|
||||
imports = [
|
||||
inputs.nixified-ai.nixosModules.comfyui
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.nixified-ai.packages.${config.nixpkgs.system}.invokeai-nvidia
|
||||
];
|
||||
|
||||
services.invokeai = {
|
||||
enable = false;
|
||||
host = "0.0.0.0";
|
||||
nsfwChecker = false;
|
||||
package = inputs.nixified-ai.packages.${config.nixpkgs.system}.invokeai-nvidia;
|
||||
};
|
||||
services.comfyui = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
};
|
||||
}
|
||||
|
||||
BIN
nixos/notification-sound.wav
Normal file
BIN
nixos/notification-sound.wav
Normal file
Binary file not shown.
140
nixos/nvidia-container-toolkit-overlay.nix
Normal file
140
nixos/nvidia-container-toolkit-overlay.nix
Normal file
@@ -0,0 +1,140 @@
|
||||
final: prev: {
|
||||
nvidia-container-toolkit = final.stdenv.mkDerivation {
|
||||
pname = "nvidia-container-toolkit-debug";
|
||||
version = prev.nvidia-container-toolkit.version;
|
||||
|
||||
# This is key: multiple outputs, so you can reference them later as:
|
||||
# $out -> for main
|
||||
# $tools -> for the 'tools' output in your new derivation
|
||||
outputs = [ "out" "tools" ];
|
||||
|
||||
# No source required for a pure wrap
|
||||
src = null;
|
||||
dontUnpack = true;
|
||||
dontPatchShell = true;
|
||||
nativeBuildInputs = [ final.installShellFiles ] ++ final.lib.optionals final.stdenv.hostPlatform.isLinux [ final.makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
prev.nvidia-container-toolkit
|
||||
prev.nvidia-container-toolkit.tools
|
||||
final.glibc
|
||||
final.coreutils
|
||||
final.bash
|
||||
];
|
||||
|
||||
# Create wrapper scripts for each set of binaries
|
||||
buildPhase = ''
|
||||
# --- Wrap binaries from the main output of the original toolkit ---
|
||||
mkdir -p wrapper-out
|
||||
if [ -d "${prev.nvidia-container-toolkit}/bin" ]; then
|
||||
for exe in $(ls ${prev.nvidia-container-toolkit}/bin); do
|
||||
cat > wrapper-out/$exe <<EOF
|
||||
#!${final.bash}/bin/bash
|
||||
|
||||
if [ "\$(id -u)" -eq 0 ]; then
|
||||
mkdir -p /var/log/nvidia-container-toolkit
|
||||
chown root:users /var/log/nvidia-container-toolkit
|
||||
chmod 2777 /var/log/nvidia-container-toolkit
|
||||
fi
|
||||
|
||||
# --- STARTUP LOG ---
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - $exe started" \
|
||||
>> /var/log/nvidia-container-toolkit/$exe.startup.log 2>/dev/null || true
|
||||
|
||||
# --- COMMAND INVOCATION LOG ---
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - Executing $exe with args: \$@" \
|
||||
>> /var/log/nvidia-container-toolkit/$exe.log 2>/dev/null || true
|
||||
|
||||
# --- Run the real tool, piping stdout+stderr to tee ---
|
||||
${prev.nvidia-container-toolkit}/bin/$exe "\$@" > \
|
||||
>(tee -a /var/log/nvidia-container-toolkit/$exe.stdout.log) \
|
||||
2> >(tee -a /var/log/nvidia-container-toolkit/$exe.stderr.log >&2)
|
||||
|
||||
exit_code=\$?
|
||||
|
||||
# --- FINISHED LOG ---
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - Finished $exe with exit code: \$exit_code" >> \
|
||||
/var/log/nvidia-container-toolkit/$exe.log 2>/dev/null || true
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - $exe finished" \
|
||||
>> /var/log/nvidia-container-toolkit/$exe.startup.log 2>/dev/null || true
|
||||
EOF
|
||||
chmod +x wrapper-out/$exe
|
||||
done
|
||||
fi
|
||||
|
||||
# --- Wrap binaries from the 'tools' output of the original toolkit ---
|
||||
mkdir -p wrapper-tools
|
||||
if [ -d "${prev.nvidia-container-toolkit.tools}/bin" ]; then
|
||||
for exe in $(ls ${prev.nvidia-container-toolkit.tools}/bin); do
|
||||
cat > wrapper-tools/$exe <<EOF
|
||||
#!${final.bash}/bin/bash
|
||||
|
||||
echo "STARTING TOOL"
|
||||
|
||||
if [ "\$(id -u)" -eq 0 ]; then
|
||||
mkdir -p /var/log/nvidia-container-toolkit
|
||||
chown root:users /var/log/nvidia-container-toolkit
|
||||
chmod 2777 /var/log/nvidia-container-toolkit
|
||||
fi
|
||||
|
||||
# --- STARTUP LOG ---
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - $exe started" \
|
||||
>> /var/log/nvidia-container-toolkit/$exe.startup.log 2>/dev/null || true
|
||||
|
||||
# --- COMMAND INVOCATION LOG ---
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - Executing $exe with args: \$@" \
|
||||
>> /var/log/nvidia-container-toolkit/$exe.log 2>/dev/null || true
|
||||
|
||||
debug_flag="$([[ $exe = "nvidia-cdi-hook" ]] && echo "--debug")"
|
||||
|
||||
|
||||
ldd ${prev.nvidia-container-toolkit.tools}/bin/$exe
|
||||
|
||||
set +e
|
||||
# --- Run the real tool, piping stdout+stderr to tee ---
|
||||
${prev.nvidia-container-toolkit.tools}/bin/$exe $debug_flag "\$@" > \
|
||||
>(tee -a /var/log/nvidia-container-toolkit/$exe.stdout.log) \
|
||||
2> >(tee -a /var/log/nvidia-container-toolkit/$exe.stderr.log >&2) || true
|
||||
|
||||
exit_code=\$?
|
||||
|
||||
# --- FINISHED LOG ---
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - Finished $exe with exit code: \$exit_code" >> \
|
||||
/var/log/nvidia-container-toolkit/$exe.log 2>/dev/null || true
|
||||
echo "\$(date '+%Y-%m-%d %H:%M:%S') - $exe finished" \
|
||||
>> /var/log/nvidia-container-toolkit/$exe.startup.log 2>/dev/null || true
|
||||
EOF
|
||||
chmod +x wrapper-tools/$exe
|
||||
done
|
||||
fi
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# For the main output of our wrapper derivation
|
||||
mkdir -p $out/bin
|
||||
|
||||
if [ -d wrapper-out ]; then
|
||||
cp wrapper-out/* $out/bin/
|
||||
fi
|
||||
|
||||
# For the 'tools' output of our wrapper derivation
|
||||
mkdir -p $tools/bin
|
||||
|
||||
if [ -d wrapper-tools ]; then
|
||||
cp wrapper-tools/* $tools/bin/
|
||||
fi
|
||||
'';
|
||||
|
||||
# If you need runtime dependencies, inherit them from the original package
|
||||
propagatedBuildInputs = prev.nvidia-container-toolkit.propagatedBuildInputs or [];
|
||||
propagatedUserEnvPkgs = prev.nvidia-container-toolkit.propagatedUserEnvPkgs or [];
|
||||
|
||||
meta = {
|
||||
description = "Debug-wrapped NVIDIA Container Toolkit with separate tools output.";
|
||||
homepage = prev.nvidia-container-toolkit.meta.homepage;
|
||||
license = prev.nvidia-container-toolkit.meta.license;
|
||||
maintainers = prev.nvidia-container-toolkit.meta.maintainers;
|
||||
platforms = prev.nvidia-container-toolkit.meta.platforms;
|
||||
};
|
||||
};
|
||||
}
|
||||
25
nixos/nvidia.nix
Normal file
25
nixos/nvidia.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, makeEnable, lib, ... }:
|
||||
|
||||
makeEnable config "myModules.nvidia" false {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-container-toolkit
|
||||
nvidia-container-toolkit.tools
|
||||
];
|
||||
hardware.nvidia-container-toolkit = {
|
||||
enable = true;
|
||||
mount-nvidia-executables = true;
|
||||
# additionalEdit = ''
|
||||
# ${lib.getExe pkgs.jq} '
|
||||
# .devices |= map(
|
||||
# .containerEdits.hooks |= map(select(.args | index("nvidia-cdi-hook") < 0))
|
||||
# )' | ${lib.getExe pkgs.jq} '.containerEdits.hooks |= map(select(.args | index("nvidia-cdi-hook") < 0 ))' '';
|
||||
};
|
||||
hardware.nvidia.open = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
hardware.graphics.extraPackages = [ config.hardware.nvidia.package.out ];
|
||||
hardware.graphics.extraPackages32 = [ config.hardware.nvidia.package.lib32 ];
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
# nixpkgs.config.cudaSupport = true;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user