Compare commits
486 Commits
fb680669fd
...
temp-small
Author | SHA1 | Date | |
---|---|---|---|
aad01c1271 | |||
35b37e743b
|
|||
313243768a
|
|||
4c36a45c9d
|
|||
618f476c03
|
|||
efb25e365e
|
|||
1b0b07b93b
|
|||
067237baa8
|
|||
e216938f0a
|
|||
9b66af5689
|
|||
20f369c8e0
|
|||
e47bd78c91
|
|||
d072c03d70
|
|||
9f7b74f6bc
|
|||
deb4370524
|
|||
b46052b8db
|
|||
773ed81ed3
|
|||
1bf8b26b52
|
|||
e4246ecbc8
|
|||
04808a27a3
|
|||
692b844a7b
|
|||
54525729ff
|
|||
954ca63b79
|
|||
f6b4bd9800
|
|||
ac4f790d0f
|
|||
6da7009de0
|
|||
ed29854bae
|
|||
4d51d5f054
|
|||
8c34a0fe54
|
|||
ad92e832ba
|
|||
a8bafb5697
|
|||
d4a1148120
|
|||
860377b06f
|
|||
7261a75366
|
|||
b7cc060453
|
|||
ca055cdb7d
|
|||
c1f3529e62
|
|||
fd67045917
|
|||
dfa3b12981
|
|||
da96878697
|
|||
f45f173bf5
|
|||
ad3e0980bc
|
|||
cc10d5e7ec
|
|||
0c4d735665
|
|||
110f59bbfd
|
|||
ef03ea7099
|
|||
18c17c5258
|
|||
68aa891d5a
|
|||
09b70672a2
|
|||
277816a279
|
|||
a401909496
|
|||
35a5a3c0cb
|
|||
d69ac1e939
|
|||
bf015be7c7
|
|||
95e62014ec
|
|||
c364c543f8
|
|||
ea386167b3
|
|||
825dc6ed0b
|
|||
9676504bd8
|
|||
620b9ae134
|
|||
e86e0e7322
|
|||
409c488ada
|
|||
47d17acd83
|
|||
04040e2c70
|
|||
8b863c711b
|
|||
06ddf61cbb
|
|||
b6389e849f
|
|||
d1d3519336
|
|||
310a7ac7df
|
|||
c39f253a48
|
|||
c7e0af586f
|
|||
9ca6e94eb9
|
|||
c94b579728
|
|||
80fd34381f
|
|||
40cc212f54
|
|||
2573f259dd
|
|||
fbc08eaa38
|
|||
afc0a02588
|
|||
05552596dc
|
|||
aab2fd60ae
|
|||
126aa284d7
|
|||
f3c2cb1d82
|
|||
057e81218c
|
|||
7922609990
|
|||
ea190268a2
|
|||
5c631e4715
|
|||
758abe5d2d
|
|||
9a69918af1
|
|||
e8571be7d8
|
|||
883d896dd1
|
|||
4ff6315ea6
|
|||
b50764dfde
|
|||
cb141b969f
|
|||
8505215a62
|
|||
d373b1dac4
|
|||
17c2921c05
|
|||
bd5ba8b971
|
|||
b833b5bb34
|
|||
82962ca127
|
|||
42052809d3
|
|||
0ac89f168f
|
|||
6aabe69ac8
|
|||
d20a4c30cc
|
|||
7ec05956e7
|
|||
f06dae4d57
|
|||
779fb447c1
|
|||
de7ce1b985
|
|||
0bc6869ae4
|
|||
4cbb83e2e7
|
|||
e410929403
|
|||
c4448c7f10
|
|||
aa9d4f41a3
|
|||
b32f56dbb2
|
|||
5625f9da2f
|
|||
1b9d134f9b
|
|||
35ca4d4924
|
|||
26f141ae9e
|
|||
2433846f88
|
|||
667dca09d7 | |||
18ecedca91 | |||
add05ebc4c | |||
7aef99d485
|
|||
9942a085c8
|
|||
e5d71b6715 | |||
87deff0d7e | |||
b3a30c804f | |||
796d77de53 | |||
1a18d89e7c | |||
be7e53fa89 | |||
7bf3625770 | |||
73ffdfb5fe | |||
e9595d1f62 | |||
545c56229c | |||
e185afafd2 | |||
22a15cf411 | |||
aa0050a1c4 | |||
f575803f71 | |||
add7bbc626 | |||
6b3b45f32a | |||
cee468a36a | |||
27b98a8b7a | |||
d7e40e0aef | |||
baae05cefe | |||
5509f5d272 | |||
7450cea426 | |||
842adea065 | |||
cebeb2be1c | |||
e8c10ec9e9 | |||
ec4197f428 | |||
0c9ff28dcc | |||
58d251cb69 | |||
00c684f767 | |||
09fa4932ee | |||
2a6740c86c | |||
d66a7d8c06 | |||
21ef485375 | |||
b56869b7a0 | |||
b40bef3a2b | |||
e467cd157b | |||
c524e569c1 | |||
c09f3df800 | |||
8a4fbe72ce | |||
a7018d8acb | |||
0821335f51 | |||
608c9f4ba0 | |||
b95801a563 | |||
8c794088eb | |||
83e91c7fd9 | |||
1ec09ff801 | |||
1171ce89af | |||
26a49133e3 | |||
27cb8551b6 | |||
f5fe230dfe | |||
d403ce5274 | |||
5039842006 | |||
99d0e6cf50 | |||
85c5aa239a | |||
f4e2ff36c6 | |||
f49d2dd7b4 | |||
8827aa9225 | |||
d75fdce8ba | |||
5dd4e662c8 | |||
8657433b7c | |||
0bb20832ab | |||
188b3ad91c | |||
1e4bbac925 | |||
8073d5db3d | |||
811483be83 | |||
9add853578 | |||
ce430e824b | |||
22bc48a7c2 | |||
995628652b | |||
78221df94d | |||
b383088147 | |||
5738346292 | |||
ebef767db7 | |||
031f57187f | |||
aee929e274 | |||
7e3780d981 | |||
b757a6fe5b | |||
879798dde3 | |||
0be64d3b78 | |||
2286267130 | |||
444fc29dbd | |||
cd97991b7b | |||
2e3fe19545 | |||
6d0f69a7ef | |||
c1f85d70eb | |||
a6464ec13c | |||
072fedac8f | |||
231b6eef28 | |||
5ac5e18285 | |||
f24a0f96d9 | |||
72d3f18b8c | |||
4c67fe6688 | |||
104b9f36ee | |||
f5068aee0b | |||
387a35c85d | |||
bd5dbb0303 | |||
5a66d508c4 | |||
b0d7153e6e | |||
e717dfc32b | |||
1cab9b2773 | |||
0f325244d2 | |||
6aae9a05af | |||
f556ff066f | |||
94683e2876 | |||
a886c52c39 | |||
b0d8884afe | |||
dead80b8fc | |||
0c1b65bb2a | |||
90ccaa07bd | |||
a85c6f2f4b | |||
f95018e7f6 | |||
4c2d93eae7 | |||
2bece06f10 | |||
499a6a8eb5 | |||
a81cb21190 | |||
d2085956c6 | |||
41a2a95c91 | |||
a0aa1849b5 | |||
58f37bf846 | |||
746501bb80 | |||
6a3806485f | |||
c7047b69b2 | |||
556d8aa823 | |||
a64f42befc | |||
a38c2e344f | |||
59b19cb712 | |||
87ee09343e | |||
07b170ea4c | |||
e990a82e78 | |||
8d089f0234 | |||
d331ae4e92 | |||
54c3e35c55 | |||
5e1932a2b3 | |||
a68be8ca90 | |||
f194426d2a | |||
46e88698f1 | |||
35b19eb311 | |||
d2c767dcea | |||
93afe2c440 | |||
a4c10a0849 | |||
f760b0f530 | |||
bbbb58b05b | |||
86efd3c0da | |||
eb886528ca | |||
f6f9aa2474 | |||
e103bd9387 | |||
8f4f3e2ef6 | |||
23fc75d099 | |||
406ae9c91f | |||
9ba62781bd | |||
fe24cbfb36 | |||
05cbc2f9ac | |||
28991b979d | |||
5d3cb76b55 | |||
95f6cb023a | |||
49a11a54e7 | |||
456f021528 | |||
581310f279 | |||
0208342f3a | |||
3640061d73 | |||
ffe91246bd | |||
9607c002a6 | |||
c4c5502f19 | |||
9656840792 | |||
eb0c53d8e2 | |||
d5855878d3 | |||
8ab6181448 | |||
f67b65245b | |||
d7a177bce5 | |||
e7f1b09db4 | |||
eb76cf10b1 | |||
d5c624d644 | |||
d71e586c8c | |||
996a25ef83 | |||
d7ee66ec7e | |||
39036609c5 | |||
303f719d9d | |||
88082aa0c1 | |||
12946ad4d0 | |||
60ce3ca2b3 | |||
565ac6ff9f | |||
446b560ad7 | |||
347884f9d5 | |||
d5cffc807c | |||
f5d672a0a2 | |||
314fba4726 | |||
ebb6970847 | |||
65c166c4af | |||
9704525fdf | |||
fcec0641aa | |||
854b5efeed | |||
38e2a9c067 | |||
ed491eb0a7 | |||
2fb5c3fa69 | |||
6bce966ded | |||
3dac70b9b8 | |||
a39d04b453 | |||
10657b3fd0 | |||
4ecff5e8eb | |||
25431075c0 | |||
a5c3c13c34 | |||
ad48cd7147 | |||
e54e88e1e9 | |||
2ce97c825a | |||
cf7bbd9557 | |||
1dbc476b8c | |||
d0fa636f97 | |||
4f50b24998 | |||
93ee02b933 | |||
8b5e27ad93 | |||
adf1a55724 | |||
9b6a11d8f7 | |||
2de2c7c28f | |||
f1b4bfe7a7 | |||
633f5c6c4a | |||
278aa8a0ed | |||
b94df9aeea | |||
24dde4bb55 | |||
ee662d342e | |||
1ee9a7e0eb | |||
fc09463735 | |||
8102c9ec47 | |||
a94fb2e345 | |||
8cdb19c60e | |||
1355d3b227 | |||
7017afd686 | |||
e2903036bc | |||
bae075b1fa | |||
43a14e8229 | |||
c309b67c88 | |||
ad012e58bc | |||
1f1e032a8d | |||
ad849bbaa0 | |||
30b5818fbf | |||
7eb675c567 | |||
770b4d0173 | |||
c833093839 | |||
72337e1b55 | |||
916909a87d | |||
50c06ed5bc | |||
be2e9a63db | |||
250e388f3d | |||
5223493d78 | |||
3030373877 | |||
7325ebb79a | |||
6fff4a2ffa | |||
3c0d817d35 | |||
9ae1824589 | |||
7281644439 | |||
a53925d99b | |||
5857dc461d | |||
4a38cbf686 | |||
0c97e9f3f6 | |||
960da0c59b | |||
cab42466e9 | |||
a36fbb43be | |||
944c829f3a | |||
75cf57ec9a | |||
0320768244 | |||
a07849d503 | |||
7dcb5f8d02 | |||
17fd93c88e | |||
07ab9c2c80 | |||
d0faa61427 | |||
40c90f7fee | |||
ffd89a2bbb | |||
d5e10b9fc1 | |||
ca690a113d | |||
e1049f0a16 | |||
8d151534b1 | |||
fca52c4b84 | |||
3999a552d4 | |||
8e3c2a79b9 | |||
f20e74c96b | |||
c922d35269 | |||
7f6429a8c4 | |||
569bb00160 | |||
38148b7ce1 | |||
5bac7e7078 | |||
5a6d11fc99 | |||
3cd2e54c74 | |||
7f94c0bb6a | |||
85faff133f | |||
96c5c04022 | |||
4b319432ff | |||
f7f743fa6c | |||
84aee8f8ee | |||
b6ba09f23b | |||
74039920ac | |||
83719ec59c | |||
d5d12e79d8 | |||
13aa781ebc | |||
bd3f12afd6 | |||
b8d47ee9dd | |||
5ed7492e59 | |||
921c6a174b | |||
3a1f6c24ba | |||
a4d83d6bb8 | |||
72a10c5ec0 | |||
3ac7f60459 | |||
810ec5b22a | |||
fbdda940f5 | |||
79111d65ba | |||
f08ff94e6f | |||
fb3413baff | |||
137fec122b | |||
229a6b13b5 | |||
0726d674cc | |||
79234d0f5b | |||
d14c058a4c | |||
b335e10809 | |||
e9fe2227f3 | |||
5f013e9a5e | |||
fb712795ea | |||
a7250e9581 | |||
fd6d93d0cf | |||
6a82a8638d | |||
993c40225e | |||
db4cdfa886 | |||
47e70d7386 | |||
8b88bc178a | |||
01a47497db | |||
d375bf295a | |||
0360a994c9 | |||
ad9656072c | |||
e0e927edb1 | |||
405080b22d | |||
89362838dc | |||
e2f45ccc42 | |||
f54d519ab1 | |||
ef1843801f | |||
ffc6e57b23 | |||
03cbf084e0 | |||
5f48a0ab51 | |||
fc677c6270 | |||
13d8a1b162 | |||
74311f01f8 | |||
3d533cd90f | |||
f07853ac05 | |||
8e46ecdb3a | |||
71dcf157a5 | |||
d32656069a | |||
eba67abc2a | |||
705c9ba011 | |||
c11bc57eb2 | |||
08ad72c933 | |||
bb9bb49940 | |||
70d37cc0e1 | |||
f0538e191d | |||
40332b46df | |||
9cc4631fa6 | |||
3c0f25d61f | |||
87ff39bb86 | |||
70cec6f3c6 | |||
1fbed0bf8a | |||
9b7ce0260c | |||
f79aec6f00 | |||
ce1ea8959f | |||
35ada16dcb | |||
9f5f770409 | |||
c0479068ed | |||
f0842bf343 | |||
b3423e8472 |
2
.git-blame-ignore-revs
Normal file
2
.git-blame-ignore-revs
Normal file
@@ -0,0 +1,2 @@
|
||||
# nixfmt all
|
||||
90ccaa07bd0dc2235af7fdd37909e17f637e9cab
|
33
.github/workflows/actions-check.yaml
vendored
Normal file
33
.github/workflows/actions-check.yaml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Check actions
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/*.yaml
|
||||
- .github/workflows/*.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/*.yaml
|
||||
- .github/workflows/*.yml
|
||||
|
||||
jobs:
|
||||
check-actions-actionlint:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
- run: |
|
||||
go install github.com/rhysd/actionlint/cmd/actionlint@latest
|
||||
actionlint .github/workflows/*.yaml
|
||||
check-actions-yamllint:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v5
|
||||
- run: |
|
||||
pipx run yamllint .github/workflows/*.yaml
|
14
.github/workflows/flake-check.yaml
vendored
Normal file
14
.github/workflows/flake-check.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Run nix flake check
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
flake-check:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- run: nix flake check
|
36
.github/workflows/flake-update.yaml
vendored
Normal file
36
.github/workflows/flake-update.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: Periodic flake update
|
||||
on: # yamllint disable-line rule:truthy
|
||||
schedule:
|
||||
- cron: "0 */2 * * *"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
flake-update:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: master
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- name: configure git
|
||||
env:
|
||||
SSH_PRIVKEY: ${{ secrets.BOT_SSH_PRIVKEY }}
|
||||
SSH_PUBKEY: ${{ secrets.BOT_SSH_PUBKEY }}
|
||||
run: |
|
||||
echo "$SSH_PRIVKEY" > "$RUNNER_TEMP/id_ed25519"
|
||||
echo "$SSH_PUBKEY" > "$RUNNER_TEMP/id_ed25519.pub"
|
||||
chmod -R 0600 "$RUNNER_TEMP/id_ed25519.pub" "$RUNNER_TEMP/id_ed25519"
|
||||
git config --global user.name 'torjus-bot'
|
||||
git config --global user.email 'torjus-bot@git.t-juice.club'
|
||||
git config --global user.signingKey "$RUNNER_TEMP/id_ed25519.pub"
|
||||
git config --global gpg.format ssh
|
||||
git config --global commit.gpgsign true
|
||||
- name: flake update
|
||||
run: nix flake update --commit-lock-file
|
||||
- name: push
|
||||
run: git push
|
13
.github/workflows/pre-commit.yml
vendored
13
.github/workflows/pre-commit.yml
vendored
@@ -1,13 +0,0 @@
|
||||
name: pre-commit
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pre-commit/action@v3.0.1
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
result
|
||||
.direnv/
|
@@ -1,12 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/nix-community/nixpkgs-fmt
|
||||
rev: v1.3.0
|
||||
hooks:
|
||||
- id: nixpkgs-fmt
|
29
.sops.yaml
Normal file
29
.sops.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
keys:
|
||||
- &admin_torjus age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u
|
||||
- &server_gunter age1whxf34vjdndqzwgm7yyaexdm46gdnv9sf3nal7qqyjr0nyhhndlsrmc0g3
|
||||
- &server_magicman age1stlqqspmt5fepyz35udrwr5avf9zuju79f787p26pu2d2j08yqps2q2t2c
|
||||
- &server_prismo age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u
|
||||
creation_rules:
|
||||
- path_regex: secrets/[^/]+\.(yaml|json|env|ini|toml)
|
||||
key_groups:
|
||||
- age:
|
||||
- *admin_torjus
|
||||
- path_regex: secrets/gunter/[^/]+\.(yaml|json|env|ini|toml)
|
||||
key_groups:
|
||||
- age:
|
||||
- *admin_torjus
|
||||
- *server_gunter
|
||||
- path_regex: secrets/magicman/[^/]+\.(yaml|json|env|ini|toml)
|
||||
key_groups:
|
||||
- age:
|
||||
- *admin_torjus
|
||||
- *server_magicman
|
||||
- path_regex: secrets/prismo/[^/]+\.(yaml|json|env|ini|toml)
|
||||
key_groups:
|
||||
- age:
|
||||
- *admin_torjus
|
||||
- *server_prismo
|
||||
- path_regex: secrets/torjus/[^/]+\.(yaml|json|env|ini|toml)
|
||||
key_groups:
|
||||
- age:
|
||||
- *admin_torjus
|
@@ -1 +1,8 @@
|
||||
# My NixOS config
|
||||
# My nixos configurations
|
||||
|
||||
Configurations for:
|
||||
|
||||
* gunter
|
||||
* magicman
|
||||
* prismo
|
||||
|
||||
|
459
flake.lock
generated
459
flake.lock
generated
@@ -1,5 +1,98 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ghettoptt": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728602333,
|
||||
"narHash": "sha256-sKbnng/g4ijuKcjShBi7oPxyUrCnMJDDy17U9W/TuMg=",
|
||||
"ref": "master",
|
||||
"rev": "84fcfdde62de9888d3af8bcb0d7134137b276b55",
|
||||
"revCount": 23,
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/ghettoptt"
|
||||
},
|
||||
"original": {
|
||||
"ref": "master",
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/ghettoptt"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -7,11 +100,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709204054,
|
||||
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
|
||||
"lastModified": 1732025103,
|
||||
"narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
|
||||
"rev": "a46e702093a5c46e192243edbd977d5749e7f294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,13 +113,101 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"huecli": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"poetry2nix": "poetry2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728336978,
|
||||
"narHash": "sha256-7FX4K8QBH/9jiYyCMs2JyCTzlx1/D5Cw6upaFThSVg4=",
|
||||
"ref": "master",
|
||||
"rev": "700ece0bada9833fcfd3b6ce698cd74bc00e4493",
|
||||
"revCount": 22,
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/huecli"
|
||||
},
|
||||
"original": {
|
||||
"ref": "master",
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/huecli"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"huecli",
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703863825,
|
||||
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixprstatus",
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720066371,
|
||||
"narHash": "sha256-uPlLYH2S0ACj0IcgaK9Lsf4spmJoGejR9DotXiXSBZQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "622f829f5fe69310a866c8a6cd07e747c44ef820",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-packages": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728153756,
|
||||
"narHash": "sha256-kNpO8yC2MioSRc2SNxNM5egVvFjA2Ox0b4SAs6GnM8w=",
|
||||
"ref": "master",
|
||||
"rev": "2fc840c15280d2dd3da1aba7272243b4aa11e611",
|
||||
"revCount": 21,
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/nix-packages"
|
||||
},
|
||||
"original": {
|
||||
"ref": "master",
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/nix-packages"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709150264,
|
||||
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
|
||||
"lastModified": 1731676054,
|
||||
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
|
||||
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -36,10 +217,274 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-small": {
|
||||
"locked": {
|
||||
"lastModified": 1732007104,
|
||||
"narHash": "sha256-qaWPxgLAvtIHTDcm0qJuc+WNYjcy4ZKigOyn2ag4ihM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0705964c881cea8896474610188905ba41b59b08",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1731755305,
|
||||
"narHash": "sha256-v5P3dk5JdiT+4x69ZaB18B8+Rcu3TIOrcdG4uEX7WZ8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "057f63b6dc1a2c67301286152eb5af20747a9cb4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixprstatus": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"poetry2nix": "poetry2nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729118937,
|
||||
"narHash": "sha256-7xYCJXTh92OpKwfshYYnxrWmfNjqaH9SzQ0stuBARVM=",
|
||||
"ref": "master",
|
||||
"rev": "58b113d934f5d62f27dc50439b89fece4eb621f5",
|
||||
"revCount": 37,
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/nixprstatus"
|
||||
},
|
||||
"original": {
|
||||
"ref": "master",
|
||||
"type": "git",
|
||||
"url": "https://git.t-juice.club/torjus/nixprstatus"
|
||||
}
|
||||
},
|
||||
"poetry2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"huecli",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724208502,
|
||||
"narHash": "sha256-TCRcEPSfgAw/t7kClmlr23s591N06mQCrhzlAO7cyFw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"rev": "884b66152b0c625b8220b570a31dc7acc36749a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"poetry2nix_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nix-github-actions": "nix-github-actions_2",
|
||||
"nixpkgs": [
|
||||
"nixprstatus",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_6",
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729073785,
|
||||
"narHash": "sha256-KaDC7emuamQblDdka+gkBUUdEjQf3YGYozMb+zomgSM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"rev": "795fddefc9f910671c1cf0752c29802ce27322d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"ghettoptt": "ghettoptt",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"huecli": "huecli",
|
||||
"nix-packages": "nix-packages",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-small": "nixpkgs-small",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixprstatus": "nixprstatus",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731954233,
|
||||
"narHash": "sha256-vvXx1m2Rsw7MkbKJdpcICzz4YPgZPApGKQGhNZfkhOI=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "e39947d0ee8e341fa7108bd02a33cdfa24a1360e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"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": {
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_6": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "systems",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"huecli",
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719749022,
|
||||
"narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixprstatus",
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727984844,
|
||||
"narHash": "sha256-xpRqITAoD8rHlXQafYZOLvUXCF6cnZkPfoq67ThN0Hc=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "4446c7a6fc0775df028c5a3f6727945ba8400e64",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
147
flake.nix
147
flake.nix
@@ -2,35 +2,162 @@
|
||||
description = "Torjus nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs?ref=nixos-24.11";
|
||||
#nixpkgs-master.url = "github:nixos/nixpkgs?ref=master";
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nixpkgs-small.url = "github:nixos/nixpkgs?ref=nixos-unstable-small";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
#inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
||||
};
|
||||
ghettoptt = {
|
||||
url = "git+https://git.t-juice.club/torjus/ghettoptt?ref=master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
huecli = {
|
||||
url = "git+https://git.t-juice.club/torjus/huecli?ref=master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-packages = {
|
||||
url = "git+https://git.t-juice.club/torjus/nix-packages?ref=master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixprstatus = {
|
||||
url = "git+https://git.t-juice.club/torjus/nixprstatus?ref=master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
# nixpkgs-master,
|
||||
nixpkgs-stable,
|
||||
nixpkgs-small,
|
||||
nixprstatus,
|
||||
sops-nix,
|
||||
ghettoptt,
|
||||
huecli,
|
||||
nix-packages,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
user = "torjus";
|
||||
overlay-stable = final: prev: {
|
||||
stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
overlay-pyside6 =
|
||||
final: prev:
|
||||
let
|
||||
small = import nixpkgs-small {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
python312Packages = small.lib.warn "Using python312Packages from nixos-unstable-small #" small.python312Packages;
|
||||
};
|
||||
# overlay-master = final: prev: {
|
||||
# master = import nixpkgs-master {
|
||||
# inherit system;
|
||||
# config.allowUnfree = true;
|
||||
# };
|
||||
# };
|
||||
allSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems =
|
||||
f: nixpkgs.lib.genAttrs allSystems (system: f { pkgs = import nixpkgs { inherit system; }; });
|
||||
commonOverlays = [
|
||||
overlay-stable
|
||||
# overlay-master
|
||||
overlay-pyside6
|
||||
ghettoptt.overlays.default
|
||||
huecli.overlays.default
|
||||
nix-packages.overlays.default
|
||||
nixprstatus.overlays.default
|
||||
];
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
prismo = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs self user; };
|
||||
modules = [ ./hosts/prismo ];
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs self user;
|
||||
};
|
||||
modules = [
|
||||
(
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = commonOverlays;
|
||||
}
|
||||
)
|
||||
./hosts/prismo
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
magicman = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs self user; };
|
||||
modules = [ ./hosts/magicman ];
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs self user;
|
||||
};
|
||||
modules = [
|
||||
(
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = commonOverlays;
|
||||
}
|
||||
)
|
||||
./hosts/magicman
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
gunter = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs self user; };
|
||||
modules = [ ./hosts/gunter ];
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
self
|
||||
user
|
||||
sops-nix
|
||||
;
|
||||
};
|
||||
modules = [
|
||||
(
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = commonOverlays;
|
||||
}
|
||||
)
|
||||
./hosts/gunter
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
};
|
||||
devShells = forAllSystems (
|
||||
{ pkgs }:
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
act
|
||||
actionlint
|
||||
yamllint
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@@ -1,27 +0,0 @@
|
||||
{ pkgs, inputs, self, user, ... }: {
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = { inherit pkgs inputs user; };
|
||||
users.${user} = { pkgs, ... }: {
|
||||
imports = [
|
||||
./editor/neovim
|
||||
./programs/firefox
|
||||
./programs/tmux
|
||||
./zsh
|
||||
./packages
|
||||
./hyprland
|
||||
];
|
||||
firefox.enable = true;
|
||||
tmux.enable = true;
|
||||
hyprland.enable = true;
|
||||
home = {
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
@@ -14,8 +15,14 @@
|
||||
lsp-zero-nvim
|
||||
vim-floaterm
|
||||
luasnip
|
||||
cmp_luasnip
|
||||
lualine-nvim
|
||||
vim-sleuth
|
||||
copilot-lua
|
||||
copilot-cmp
|
||||
cmp-cmdline
|
||||
cmp-buffer
|
||||
catppuccin-nvim
|
||||
(nvim-treesitter.withPlugins (p: [
|
||||
p.tree-sitter-yaml
|
||||
p.tree-sitter-nix
|
||||
@@ -25,6 +32,11 @@
|
||||
p.tree-sitter-bash
|
||||
p.tree-sitter-json
|
||||
p.tree-sitter-python
|
||||
p.tree-sitter-c
|
||||
p.tree-sitter-cmake
|
||||
p.tree-sitter-cpp
|
||||
p.tree-sitter-markdown
|
||||
p.tree-sitter-markdown-inline
|
||||
]))
|
||||
];
|
||||
extraLuaConfig = ''
|
||||
@@ -36,15 +48,20 @@
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
# nix stuff
|
||||
nixpkgs-fmt
|
||||
nixfmt-rfc-style
|
||||
statix
|
||||
|
||||
# LSPs
|
||||
gopls
|
||||
nodePackages.pyright
|
||||
pyright
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.typescript
|
||||
nil
|
||||
yaml-language-server
|
||||
lua-language-server
|
||||
clang-tools
|
||||
zls
|
||||
ruff
|
||||
];
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
}
|
||||
|
@@ -21,6 +21,11 @@ vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
|
||||
vim.keymap.set('n', '<leader>fg', require('telescope.builtin').live_grep,
|
||||
{ desc = '[F]ind by [G]rep' })
|
||||
|
||||
-- Tabs
|
||||
vim.keymap.set('n', '<leader>tt', ':tabnew<cr>')
|
||||
vim.keymap.set('n', '<leader>tn', ':tabnext<cr>')
|
||||
vim.keymap.set('n', '<leader>tp', ':tabprevious<cr>')
|
||||
|
||||
-- LSP
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition)
|
||||
|
@@ -3,11 +3,26 @@
|
||||
-- LSP stuff
|
||||
local lsp_zero = require('lsp-zero')
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
|
||||
lsp_zero.on_attach(function(_, bufnr)
|
||||
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||
end)
|
||||
|
||||
require('lspconfig').gopls.setup({
|
||||
lsp_zero.format_on_save({
|
||||
format_opts = {
|
||||
async = false,
|
||||
timeout_ms = 10000,
|
||||
},
|
||||
servers = {
|
||||
['gopls'] = { 'go' },
|
||||
['nil_ls'] = { 'nix' },
|
||||
['lua_ls'] = { 'lua' },
|
||||
['ts_ls'] = { 'typescript', 'javascript' },
|
||||
},
|
||||
})
|
||||
-- LSP: go
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.gopls.setup({
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
@@ -19,24 +34,150 @@ require('lspconfig').gopls.setup({
|
||||
}
|
||||
})
|
||||
|
||||
-- Cmp
|
||||
local cmp = require('cmp')
|
||||
local cmp_action = lsp_zero.cmp_action()
|
||||
-- GO: Automatically organize imports on save
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
params.context = { only = { "source.organizeImports" } }
|
||||
-- buf_request_sync defaults to a 1000ms timeout. Depending on your
|
||||
-- machine and codebase, you may want longer. Add an additional
|
||||
-- argument after params if you find that you have to write the file
|
||||
-- twice for changes to be saved.
|
||||
-- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000)
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params)
|
||||
for cid, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end
|
||||
})
|
||||
|
||||
cmp.setup({
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Enter to confirm completion
|
||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||
-- Ctrl+Space to open completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
-- Move between snippet placeholders
|
||||
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||
-- Scroll in completion docs
|
||||
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
||||
-- LSP: nix
|
||||
lspconfig.nil_ls.setup({
|
||||
autostart = true,
|
||||
settings = {
|
||||
['nil'] = {
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- LSP: lua
|
||||
lspconfig.lua_ls.setup({
|
||||
on_init = function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
}
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {
|
||||
format = {
|
||||
enable = true,
|
||||
defaultConfig = {
|
||||
indent_style = "space",
|
||||
indent_size = "2",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- LSP: ts/js
|
||||
lspconfig.ts_ls.setup({
|
||||
init_options = {
|
||||
plugins = {
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
"typescript",
|
||||
"javascript",
|
||||
},
|
||||
})
|
||||
|
||||
-- LSP: rust
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
}
|
||||
|
||||
-- LSP: python
|
||||
-- Ruff server
|
||||
lspconfig.ruff.setup({
|
||||
})
|
||||
|
||||
-- Ruff: automatically format on save
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.py",
|
||||
callback = function()
|
||||
vim.lsp.buf.format { async = false }
|
||||
end,
|
||||
})
|
||||
|
||||
-- Ruff: Disable hover capability
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup('lsp_attach_disable_ruff_hover', { clear = true }),
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client == nil then
|
||||
return
|
||||
end
|
||||
if client.name == 'ruff' then
|
||||
-- Disable hover in favor of Pyright
|
||||
client.server_capabilities.hoverProvider = false
|
||||
end
|
||||
end,
|
||||
desc = 'LSP: Disable hover capability from Ruff',
|
||||
})
|
||||
|
||||
-- Pyright
|
||||
lspconfig.pyright.setup {
|
||||
settings = {
|
||||
pyright = {
|
||||
-- Using Ruff's import organizer
|
||||
disableOrganizeImports = true,
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
-- Ignore all files for analysis to exclusively use Ruff for linting
|
||||
ignore = { '*' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- LSP: C/C++
|
||||
lspconfig.clangd.setup({})
|
||||
|
||||
-- LSP: zig
|
||||
lspconfig.zls.setup({})
|
||||
|
||||
-- Telescope
|
||||
require('telescope').setup({
|
||||
@@ -115,3 +256,47 @@ require('lualine').setup({
|
||||
lualine_z = { 'location' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Copilot
|
||||
require('copilot').setup({
|
||||
suggestions = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
require('copilot_cmp').setup()
|
||||
|
||||
-- Cmp
|
||||
local cmp = require('cmp')
|
||||
local cmp_action = lsp_zero.cmp_action()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- Enter to confirm completion
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||
-- Ctrl+Space to open completion menu
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
-- Move between snippet placeholders
|
||||
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||
-- Scroll in completion docs
|
||||
['<C-k>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-j>'] = cmp.mapping.scroll_docs(4),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
}, {
|
||||
{ name = "copilot", group_index = 2 },
|
||||
{ name = "nvim_lsp", group_index = 2 },
|
||||
-- { name = "luasnip" },
|
||||
-- { name = "buffer" },
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
-- Colorscheme
|
||||
require('catppuccin').setup({
|
||||
})
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
|
49
home/gunter.nix
Normal file
49
home/gunter.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs user;
|
||||
};
|
||||
users.${user} =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
./editor/neovim
|
||||
./hyprland/gunter.nix
|
||||
./packages
|
||||
./programs/dunst
|
||||
./programs/git
|
||||
./programs/firefox
|
||||
./programs/kitty
|
||||
./programs/obs-studio
|
||||
./programs/rofi
|
||||
./programs/tmux
|
||||
./programs/vscode
|
||||
./scripts
|
||||
./services/backup-home.nix
|
||||
./services/ghettoptt.nix
|
||||
./sops
|
||||
./ssh
|
||||
./zsh
|
||||
];
|
||||
firefox.enable = true;
|
||||
tmux.enable = true;
|
||||
hyprland.enable = true;
|
||||
home = {
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
13
home/hyprland/cursor.nix
Normal file
13
home/hyprland/cursor.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
# x11.enable = true;
|
||||
package = pkgs.catppuccin-cursors.macchiatoLavender;
|
||||
# name = "Catppuccin-Macchiato-Lavender-Cursors";
|
||||
name = "catppuccin-macchiato-lavender-cursors";
|
||||
size = 32;
|
||||
};
|
||||
|
||||
gtk.enable = true;
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{ imports = [ ./hyprland.nix ./waybar.nix ./xdg.nix ]; }
|
8
home/hyprland/gunter.nix
Normal file
8
home/hyprland/gunter.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./hyprland_gunter.nix
|
||||
./waybar
|
||||
./xdg.nix
|
||||
./cursor.nix
|
||||
];
|
||||
}
|
16
home/hyprland/hypridle.nix
Normal file
16
home/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [ hypridle ];
|
||||
xdg.configFile = {
|
||||
"hypr/hypridle.conf" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hypridle_${osConfig.system.name}.conf";
|
||||
target = "hypr/hypridle.conf";
|
||||
};
|
||||
};
|
||||
}
|
12
home/hyprland/hypridle_gunter.conf
Normal file
12
home/hyprland/hypridle_gunter.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
general {
|
||||
lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session)
|
||||
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
||||
before_sleep_cmd = lockhelper # command ran before sleep
|
||||
# after_sleep_cmd = # command ran after sleep
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 240 # in seconds
|
||||
on-timeout = lockhelper # command to run when timeout has passed
|
||||
}
|
19
home/hyprland/hypridle_magicman.conf
Normal file
19
home/hyprland/hypridle_magicman.conf
Normal file
@@ -0,0 +1,19 @@
|
||||
general {
|
||||
lock_cmd = lockhelper # dbus/sysd lock command (loginctl lock-session)
|
||||
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
||||
before_sleep_cmd = lockhelper # command ran before sleep
|
||||
# after_sleep_cmd = lockhelper # command ran after sleep
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 240 # in seconds
|
||||
on-timeout = lockhelper # command to run when timeout has passed
|
||||
# on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 900
|
||||
on-timeout = systemctl suspend # command to run when timeout has passed
|
||||
# on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
||||
}
|
@@ -1,96 +0,0 @@
|
||||
{ inputs, pkgs, lib, config, ... }: {
|
||||
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
||||
config = {
|
||||
home.packages = with pkgs; [ swww wl-clipboard cliphist hyprpaper hyprlock ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
"$term" = "alacritty";
|
||||
|
||||
monitor = [ "eDP-1,1920x1080@60,0x0,1" ];
|
||||
input = {
|
||||
kb_layout = "no";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
xray = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
master.new_is_master = true;
|
||||
misc.force_default_wallpaper = -1;
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.95 override 0.5 override,class:^(Alacritty)$"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# term
|
||||
"$mainMod,Return,exec,$term"
|
||||
# rofi
|
||||
"$mainMod,D,exec,rofi -show drun"
|
||||
# hyprland
|
||||
"$mainMod,Q,killactive,"
|
||||
"CTRLALT,Delete,exit,"
|
||||
"$mainMod,Space,togglefloating,"
|
||||
"$mainMod,F,fullscreen,"
|
||||
|
||||
# focus
|
||||
"$mainMod,l,movefocus,l"
|
||||
"$mainMod,h,movefocus,r"
|
||||
"$mainMod,k,movefocus,u"
|
||||
"$mainMod,j,movefocus,d"
|
||||
|
||||
# move
|
||||
"$mainMod,h,movewindow,l"
|
||||
"$mainMod,l,movewindow,r"
|
||||
"$mainMod,k,movewindow,u"
|
||||
"$mainMod,j,movewindow,d"
|
||||
] ++ (builtins.concatLists (builtins.genList
|
||||
(x:
|
||||
let
|
||||
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||
in
|
||||
[
|
||||
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"ALT, ${ws}, workspace, ${toString (x + 1)}"
|
||||
]) 10));
|
||||
exec-once = [ "waybar & hyprpaper" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
230
home/hyprland/hyprland_gunter.nix
Normal file
230
home/hyprland/hyprland_gunter.nix
Normal file
@@ -0,0 +1,230 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
];
|
||||
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
dunst
|
||||
# hyprlock
|
||||
hyprpaper
|
||||
rofi-wayland
|
||||
slurp
|
||||
swww
|
||||
waybar
|
||||
wl-clipboard
|
||||
catppuccin-cursors.macchiatoLavender
|
||||
bibata-cursors
|
||||
# For potentially fixing some issues
|
||||
libsForQt5.qt5.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
"$shiftMainMod" = "SUPER_SHIFT";
|
||||
"$term" = "kitty";
|
||||
|
||||
# monitors
|
||||
"$mon_top" = "desc:BNQ G2420HDBL T2B04424SL000";
|
||||
"$mon_left" = "desc:Samsung Electric Company LS27A600U HNMT502389";
|
||||
"$mon_center" = "desc:Acer Technologies XB271HU #ASPVEKfgZ8Dd";
|
||||
"$mon_right" = "desc:Samsung Electric Company LS27A600U HNMT502390";
|
||||
|
||||
monitor = [
|
||||
# "$mon_top,1920x1080@60,2560x0,1" # top T2B04424SL000
|
||||
"DP-6,1920x1080@60,2560x0,1" # top T2B04424SL000 60
|
||||
# "$mon_left,2560x1440@75,0x1080,1" # left
|
||||
"DP-8,2560x1440@75,0x1080,1" # left 75hz
|
||||
# "$mon_center,2560x1440@120,2560x1080,1" # main #ASPVEKfgZ8Dd
|
||||
"DP-5,2560x1440@144,2560x1080,1" # main #ASPVEKfgZ8Dd 120hz
|
||||
# "$mon_right,2560x1440@75,5120x1080,1" # right
|
||||
"DP-7,2560x1440@75,5120x1080,1" # right 75hz
|
||||
];
|
||||
input = {
|
||||
kb_layout = "no";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
};
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
# "__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
xray = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"myBezier, 0.05, 0.9, 0.1, 1.05"
|
||||
"easeInB, 0.6, -0.28, 0.735, 0.045"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, easeInB, slidefadevert"
|
||||
"specialWorkspace, 1, 4, default, fade"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
special_scale_factor = 0.85;
|
||||
};
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.95 override 0.7 override,class:^(Alacritty)$"
|
||||
"opacity 0.95 override 0.7 override,class:^(kitty)$"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"name:T1, monitor:$mon_top, persistent:true, default:true"
|
||||
"name:T2, monitor:$mon_top, persistent:true, default:false"
|
||||
"name:L1, monitor:$mon_left, persistent:true, default:true"
|
||||
"name:L2, monitor:$mon_left, persistent:true, default:false"
|
||||
"name:R1, monitor:$mon_right, persistent:true, default:true"
|
||||
"name:R2, monitor:$mon_right, persistent:true, default:false"
|
||||
"name:c1, monitor:$mon_center, persistent:true, default:true"
|
||||
"name:c2, monitor:$mon_center, persistent:true, default:false"
|
||||
"name:c3, monitor:$mon_center, persistent:true, default:false"
|
||||
"name:c4, monitor:$mon_center, persistent:true, default:false"
|
||||
"special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mainMod,mouse:272,movewindow"
|
||||
"$shiftMainMod,mouse:272,resizewindow"
|
||||
];
|
||||
|
||||
bindr = [
|
||||
# mumble ptt release
|
||||
# ",code:202,exec,mumble rpc stoptalking"
|
||||
# ",code:202,exec,pamixer --source 63 -m"
|
||||
# ",code:202,exec,sleep 0.5 && pamixer --default-source -m"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# term
|
||||
"$mainMod,Return,exec,$term"
|
||||
|
||||
# hyprlock
|
||||
"$shiftMainMod,l,exec,lockhelper"
|
||||
|
||||
# rofi
|
||||
"$mainMod,D,exec,rofi-launcher"
|
||||
"$mainMod,P,exec,rofi-rbw"
|
||||
|
||||
# hyprland
|
||||
"$mainMod,Q,killactive,"
|
||||
"CTRLALT,Delete,exit,"
|
||||
"$mainMod,Space,togglefloating,"
|
||||
"$mainMod,F,fullscreen,"
|
||||
|
||||
# focus
|
||||
"$mainMod,l,movefocus,l"
|
||||
"$mainMod,h,movefocus,r"
|
||||
"$mainMod,k,movefocus,u"
|
||||
"$mainMod,j,movefocus,d"
|
||||
|
||||
# move
|
||||
"$mainMod,h,movewindow,l"
|
||||
"$mainMod,l,movewindow,r"
|
||||
"$mainMod,k,movewindow,u"
|
||||
"$mainMod,j,movewindow,d"
|
||||
|
||||
# Force opacity
|
||||
"$shiftMainMod,o,exec, hl-no-opacity"
|
||||
|
||||
# grimblast
|
||||
"$mainMod,Print,exec,grimblast save active ~/tmp/$(date -Iseconds).png"
|
||||
"$shiftMainMod,Print,exec,grimblast copy area"
|
||||
",Print,exec,grimblast copy active"
|
||||
|
||||
# mumble ptt click
|
||||
# ",code:202,exec,mumble rpc starttalking"
|
||||
#",code:202,pass,^(info\.mumble\.Mumble)$"
|
||||
# ",code:202,exec,pamixer --default-source -u"
|
||||
",code:202,pass,^discord$"
|
||||
|
||||
# Paste to wtype
|
||||
"$mainMod,v,exec,sleep 0.5s && wl-paste | wtype -"
|
||||
|
||||
# worspace switching
|
||||
"$mainMod,1,workspace,name:c1"
|
||||
"$mainMod,2,workspace,name:c2"
|
||||
"$mainMod,3,workspace,name:c3"
|
||||
"$mainMod,4,workspace,name:c4"
|
||||
"$mainMod,5,workspace,5"
|
||||
"$mainMod,6,workspace,6"
|
||||
|
||||
# Move window to workspace
|
||||
"$shiftMainMod,1,movetoworkspace,name:c1"
|
||||
"$shiftMainMod,2,movetoworkspace,name:c2"
|
||||
"$shiftMainMod,3,movetoworkspace,name:c3"
|
||||
"$shiftMainMod,4,movetoworkspace,name:c4"
|
||||
"$shiftMainMod,5,movetoworkspace,5"
|
||||
"$shiftMainMod,6,movetoworkspace,6"
|
||||
|
||||
# Special workspace
|
||||
"$mainMod,c,togglespecialworkspace"
|
||||
"$shiftMainMod,c,movetoworkspace, special"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprpaper & sleep 10 && randomwp"
|
||||
"easyeffects --gapplication-service"
|
||||
"hypridle"
|
||||
"streamcontroller -b"
|
||||
# "dunst"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
171
home/hyprland/hyprland_magicman.nix
Normal file
171
home/hyprland/hyprland_magicman.nix
Normal file
@@ -0,0 +1,171 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
];
|
||||
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
dunst
|
||||
# hyprlock
|
||||
hyprpaper
|
||||
rofi-wayland
|
||||
slurp
|
||||
swww
|
||||
waybar
|
||||
wl-clipboard
|
||||
catppuccin-cursors.macchiatoLavender
|
||||
bibata-cursors
|
||||
# For potentially fixing some issues
|
||||
libsForQt5.qt5.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
"$shiftMainMod" = "SUPER_SHIFT";
|
||||
"$term" = "kitty";
|
||||
|
||||
monitor = [ "eDP-1,1920x1080@60,0x0,1" ];
|
||||
input = {
|
||||
kb_layout = "no";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
env = [ "XDG_SESSION_TYPE,wayland" ];
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
xray = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
"specialWorkspace, 1, 4, default, fade"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
special_scale_factor = 0.85;
|
||||
};
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.95 override 0.7 override,class:^(Alacritty)$"
|
||||
"opacity 0.95 override 0.7 override,class:^(kitty)$"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false"
|
||||
];
|
||||
|
||||
bindm = [ "ALT,mouse:272,movewindow" ];
|
||||
|
||||
bindr = [
|
||||
# mumble ptt release
|
||||
# ",code:202,exec,mumble rpc stoptalking"
|
||||
# ",code:202,exec,pamixer --source 63 -m"
|
||||
# ",code:202,exec,sleep 0.5 && pamixer --default-source -m"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# term
|
||||
"$mainMod,Return,exec,$term"
|
||||
|
||||
# rofi
|
||||
"$mainMod,D,exec,rofi-launcher"
|
||||
"$mainMod,P,exec,rofi-rbw"
|
||||
|
||||
# hyprlock
|
||||
"$shiftMainMod,l,exec,lockhelper"
|
||||
|
||||
# hyprland
|
||||
"$mainMod,Q,killactive,"
|
||||
"CTRLALT,Delete,exit,"
|
||||
"$mainMod,Space,togglefloating,"
|
||||
"$mainMod,F,fullscreen,"
|
||||
|
||||
# focus
|
||||
"$mainMod,l,movefocus,l"
|
||||
"$mainMod,h,movefocus,r"
|
||||
"$mainMod,k,movefocus,u"
|
||||
"$mainMod,j,movefocus,d"
|
||||
|
||||
# move
|
||||
"$mainMod,h,movewindow,l"
|
||||
"$mainMod,l,movewindow,r"
|
||||
"$mainMod,k,movewindow,u"
|
||||
"$mainMod,j,movewindow,d"
|
||||
|
||||
# Force opacity
|
||||
"$shiftMainMod,o,exec, hl-no-opacity"
|
||||
|
||||
# mumble ptt click
|
||||
# ",code:202,exec,mumble rpc starttalking"
|
||||
#",code:202,pass,^(info\.mumble\.Mumble)$"
|
||||
# ",code:202,exec,pamixer --default-source -u"
|
||||
# ",code:202,pass,^discord$"
|
||||
|
||||
# worspace switching
|
||||
"$mainMod,1,workspace,1"
|
||||
"$mainMod,2,workspace,2"
|
||||
"$mainMod,3,workspace,3"
|
||||
"$mainMod,4,workspace,4"
|
||||
"$mainMod,5,workspace,5"
|
||||
"$mainMod,6,workspace,6"
|
||||
|
||||
# Special workspace
|
||||
"$mainMod,c,togglespecialworkspace"
|
||||
"$shiftMainMod,c,movetoworkspace, special"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprpaper & sleep 2 && randomwp"
|
||||
"hypridle"
|
||||
# "dunst"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
159
home/hyprland/hyprland_prismo.nix
Normal file
159
home/hyprland/hyprland_prismo.nix
Normal file
@@ -0,0 +1,159 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.hyprland.enable = lib.mkEnableOption "Hyprland";
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
dunst
|
||||
# hyprlock
|
||||
hyprpaper
|
||||
rofi-wayland
|
||||
slurp
|
||||
swww
|
||||
waybar
|
||||
wl-clipboard
|
||||
catppuccin-cursors.macchiatoLavender
|
||||
bibata-cursors
|
||||
# For potentially fixing some issues
|
||||
libsForQt5.qt5.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
"$shiftMainMod" = "SUPER_SHIFT";
|
||||
"$term" = "kitty";
|
||||
|
||||
monitor = [ ];
|
||||
input = {
|
||||
kb_layout = "no";
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
env = [ "XDG_SESSION_TYPE,wayland" ];
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
xray = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
misc.force_default_wallpaper = -1;
|
||||
|
||||
windowrulev2 = [
|
||||
"opacity 0.95 override 0.7 override,class:^(Alacritty)$"
|
||||
"opacity 0.95 override 0.7 override,class:^(kitty)$"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"name:mumble, monitor:$mon_top, persistent:true, default:true"
|
||||
"name:left, monitor:$mon_left, persistent:true, default:true"
|
||||
"name:right, monitor:$mon_right, persistent:true, default:true"
|
||||
"name:main 1, monitor:$mon_center, persistent:true, default:true"
|
||||
"name:main 2, monitor:$mon_center, persistent:true, default:true"
|
||||
];
|
||||
|
||||
bindm = [ "ALT,mouse:272,movewindow" ];
|
||||
|
||||
bindr = [
|
||||
# mumble ptt release
|
||||
# ",code:202,exec,mumble rpc stoptalking"
|
||||
# ",code:202,exec,pamixer --source 63 -m"
|
||||
# ",code:202,exec,sleep 0.5 && pamixer --default-source -m"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# term
|
||||
"$mainMod,Return,exec,$term"
|
||||
|
||||
# rofi
|
||||
"$mainMod,D,exec,rofi-launcher"
|
||||
"$mainMod,P,exec,rofi-rbw"
|
||||
|
||||
# hyprland
|
||||
"$mainMod,Q,killactive,"
|
||||
"CTRLALT,Delete,exit,"
|
||||
"$mainMod,Space,togglefloating,"
|
||||
"$mainMod,F,fullscreen,"
|
||||
|
||||
# focus
|
||||
"$mainMod,l,movefocus,l"
|
||||
"$mainMod,h,movefocus,r"
|
||||
"$mainMod,k,movefocus,u"
|
||||
"$mainMod,j,movefocus,d"
|
||||
|
||||
# move
|
||||
"$mainMod,h,movewindow,l"
|
||||
"$mainMod,l,movewindow,r"
|
||||
"$mainMod,k,movewindow,u"
|
||||
"$mainMod,j,movewindow,d"
|
||||
|
||||
# Force opacity
|
||||
"$shiftMainMod,o,exec, hl-no-opacity"
|
||||
|
||||
# mumble ptt click
|
||||
# ",code:202,exec,mumble rpc starttalking"
|
||||
#",code:202,pass,^(info\.mumble\.Mumble)$"
|
||||
# ",code:202,exec,pamixer --default-source -u"
|
||||
",code:202,pass,^discord$"
|
||||
|
||||
# worspace switching
|
||||
"$mainMod,1,workspace,name:main 1"
|
||||
"$mainMod,2,workspace,name:main 2"
|
||||
"$mainMod,3,workspace,3"
|
||||
"$mainMod,4,workspace,4"
|
||||
"$mainMod,5,workspace,5"
|
||||
"$mainMod,6,workspace,6"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprpaper & sleep 2 && randomwp"
|
||||
"easyeffects --gapplication-service"
|
||||
# "dunst"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
16
home/hyprland/hyprlock.nix
Normal file
16
home/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [ hyprlock ];
|
||||
xdg.configFile = {
|
||||
"hypr/hyprlock.conf" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprlock_${osConfig.system.name}.conf";
|
||||
target = "hypr/hyprlock.conf";
|
||||
};
|
||||
};
|
||||
}
|
91
home/hyprland/hyprlock_gunter.conf
Normal file
91
home/hyprland/hyprlock_gunter.conf
Normal file
@@ -0,0 +1,91 @@
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor = DP-5
|
||||
path = /tmp/lockscreen/DP-5.png
|
||||
blur_passes = 3
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
background {
|
||||
monitor = DP-6
|
||||
path = /tmp/lockscreen/DP-6.png
|
||||
blur_passes = 3
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
background {
|
||||
monitor = DP-7
|
||||
path = /tmp/lockscreen/DP-7.png
|
||||
blur_passes = 3
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
background {
|
||||
monitor = DP-8
|
||||
path = /tmp/lockscreen/DP-8.png
|
||||
blur_passes = 3
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
# GENERAL
|
||||
general {
|
||||
no_fade_in = false
|
||||
grace = 0
|
||||
disable_loading_bar = true
|
||||
}
|
||||
|
||||
# INPUT FIELD
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 60
|
||||
outline_thickness = 2
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgba(0, 0, 0, 0)
|
||||
inner_color = rgba(0, 0, 0, 0.5)
|
||||
font_color = rgb(200, 200, 200)
|
||||
fade_on_empty = false
|
||||
font_family = JetBrains Mono Nerd Font Mono
|
||||
placeholder_text = <i><span foreground="##cdd6f4">Input Password...</span></i>
|
||||
hide_input = false
|
||||
position = 0, -120
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:2000] echo "$(date +"%b %d %H:%M")"
|
||||
#color = $foreground
|
||||
color = rgba(255, 255, 255, 0.6)
|
||||
font_size = 120
|
||||
font_family = JetBrains Mono Nerd Font Mono ExtraBold
|
||||
position = 0, -300
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
## USER
|
||||
#label {
|
||||
# monitor =
|
||||
# text = Hi there, $USER
|
||||
# color = $foreground
|
||||
# #color = rgba(255, 255, 255, 0.6)
|
||||
# font_size = 25
|
||||
# font_family = JetBrains Mono Nerd Font Mono
|
||||
# position = 0, -40
|
||||
# halign = center
|
||||
# valign = center
|
||||
#}
|
78
home/hyprland/hyprlock_magicman.conf
Normal file
78
home/hyprland/hyprlock_magicman.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
source = ~/.cache/wal/colors-hyprland.conf
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
path = /tmp/lockscreen/eDP-1.png
|
||||
blur_passes = 3
|
||||
contrast = 0.8916
|
||||
brightness = 0.8172
|
||||
vibrancy = 0.1696
|
||||
vibrancy_darkness = 0.0
|
||||
}
|
||||
|
||||
# GENERAL
|
||||
general {
|
||||
no_fade_in = false
|
||||
grace = 0
|
||||
disable_loading_bar = true
|
||||
}
|
||||
|
||||
# INPUT FIELD
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 60
|
||||
outline_thickness = 2
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgba(0, 0, 0, 0)
|
||||
inner_color = rgba(0, 0, 0, 0.5)
|
||||
font_color = rgb(200, 200, 200)
|
||||
fade_on_empty = false
|
||||
font_family = JetBrains Mono Nerd Font Mono
|
||||
placeholder_text = <i><span foreground="##cdd6f4">Input Password...</span></i>
|
||||
hide_input = false
|
||||
position = 0, -120
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%b %d %H:%M")"
|
||||
color = $foreground
|
||||
#color = rgba(255, 255, 255, 0.6)
|
||||
font_size = 120
|
||||
font_family = JetBrains Mono Nerd Font Mono ExtraBold
|
||||
position = 0, -300
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
## USER
|
||||
#label {
|
||||
# monitor =
|
||||
# text = Hi there, $USER
|
||||
# color = $foreground
|
||||
# #color = rgba(255, 255, 255, 0.6)
|
||||
# font_size = 25
|
||||
# font_family = JetBrains Mono Nerd Font Mono
|
||||
# position = 0, -40
|
||||
# halign = center
|
||||
# valign = center
|
||||
#}
|
||||
|
||||
# Battery level
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(batlvl)"
|
||||
color = $foreground
|
||||
#color = rgba(255, 255, 255, 0.6)
|
||||
font_size = 18
|
||||
# font_family = JetBrainsMono, Font Awesome 6 Free Solid
|
||||
font_family = JetBrains Mono Nerd Font Mono
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
@@ -1,3 +1 @@
|
||||
preload = ~/pics/wallpapers/1.jpg
|
||||
wallpaper = eDP-1,~/pics/wallpapers/1.jpg
|
||||
splash = false
|
||||
|
8
home/hyprland/magicman.nix
Normal file
8
home/hyprland/magicman.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./hyprland_magicman.nix
|
||||
./waybar
|
||||
./xdg.nix
|
||||
./cursor.nix
|
||||
];
|
||||
}
|
8
home/hyprland/prismo.nix
Normal file
8
home/hyprland/prismo.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./hyprland_prismo.nix
|
||||
./waybar
|
||||
./xdg.nix
|
||||
./cursor.nix
|
||||
];
|
||||
}
|
@@ -1,185 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = false; # disable it,autostart it in hyprland conf
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
font-family: "Fira Code", "Font Awesome 6 Free";
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border-radius: 0px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: rgb(242, 143, 173);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
}
|
||||
.warning,
|
||||
.critical,
|
||||
.urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
window > box {
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
margin-top: 0px;
|
||||
border-bottom: 2px solid @color1;
|
||||
background-color: @background;
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 0px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
color: @color1;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: @color1;
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: #b38dac;
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
tooltip {
|
||||
background: #3b4253;
|
||||
}
|
||||
tooltip label {
|
||||
color: #e4e8ef;
|
||||
}
|
||||
#custom-launcher {
|
||||
font-size: 20px;
|
||||
padding-left: 8px;
|
||||
padding-right: 6px;
|
||||
color: #7ebae4;
|
||||
}
|
||||
#mode,
|
||||
#clock,
|
||||
#memory,
|
||||
#temperature,
|
||||
#cpu,
|
||||
#mpd,
|
||||
#custom-wall,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu,
|
||||
#custom-cava-internal {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color: @color1;
|
||||
}
|
||||
#network.disconnected {
|
||||
color: #cccccc;
|
||||
}
|
||||
#battery.charging,
|
||||
#battery.full,
|
||||
#battery.discharging {
|
||||
color: #cf876f;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: #d6dce7;
|
||||
}
|
||||
#custom-powermenu {
|
||||
color: #bd6069;
|
||||
}
|
||||
#tray {
|
||||
padding-right: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#tray menu {
|
||||
background: #3b4252;
|
||||
color: #dee2ea;
|
||||
}
|
||||
#mpd.paused {
|
||||
color: rgb(192, 202, 245);
|
||||
font-style: italic;
|
||||
}
|
||||
#mpd.stopped {
|
||||
background: transparent;
|
||||
}
|
||||
#mpd {
|
||||
color: #e4e8ef;
|
||||
}
|
||||
#custom-cava-internal {
|
||||
font-family: "Hack Nerd Font";
|
||||
}
|
||||
'';
|
||||
settings = [{
|
||||
"layer" = "top";
|
||||
"position" = "top";
|
||||
modules-left = [ "custom/launcher" "hyprland/workspaces" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right =
|
||||
[ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" ];
|
||||
"custom/launcher" = {
|
||||
"format" = " ";
|
||||
"on-click" = "pkill rofi || ~/.config/rofi/launcher.sh";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
"format" = "{name}";
|
||||
"on-click" = "activate";
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
"scroll-step" = 5;
|
||||
"format" = "{icon} {volume}%";
|
||||
"format-muted" = "";
|
||||
"format-icons" = { "default" = [ "" "" "" ]; };
|
||||
"on-click" = "pamixer -t";
|
||||
};
|
||||
"pulseaudio#microphone" = {
|
||||
"format" = "{format_source}";
|
||||
"format-source" = " {volume}%";
|
||||
"format-source-muted" = "";
|
||||
"on-click" = "pamixer --default-source -t";
|
||||
"on-scroll-up" = "pamixer --default-source -i 5";
|
||||
"on-scroll-down" = "pamixer --default-source -d 5";
|
||||
"scroll-step" = 5;
|
||||
"on-click-right" = "pavucontrol";
|
||||
};
|
||||
"clock" = {
|
||||
"interval" = 1;
|
||||
"format" = "{:%I:%M %p %A %b %d}";
|
||||
"tooltip" = true;
|
||||
};
|
||||
"memory" = {
|
||||
"interval" = 3;
|
||||
"format" = " {percentage}%";
|
||||
"states" = { "warning" = 85; };
|
||||
};
|
||||
"cpu" = {
|
||||
"interval" = 3;
|
||||
"format" = " {usage}%";
|
||||
};
|
||||
"tray" = {
|
||||
"icon-size" = 15;
|
||||
"spacing" = 6;
|
||||
};
|
||||
}];
|
||||
};
|
||||
}
|
5
home/hyprland/waybar/arrhist.nix
Normal file
5
home/hyprland/waybar/arrhist.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs }:
|
||||
{
|
||||
sops.secrets."sonarr_api_key" = { };
|
||||
sops.secrets."radarr_api_key" = { };
|
||||
}
|
71
home/hyprland/waybar/arrhist.py
Normal file
71
home/hyprland/waybar/arrhist.py
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import os
|
||||
import requests
|
||||
from datetime import datetime, date, timedelta
|
||||
|
||||
SECRET_DIR = "/home/torjus/.config/sops-nix/secrets"
|
||||
|
||||
def sonarr_url():
|
||||
xdg_dir = os.environ["XDG_RUNTIME_DIR"]
|
||||
if not xdg_dir:
|
||||
raise Exception("XDG_RUNTIME_DIR not set")
|
||||
with open(f"{SECRET_DIR}/sonarr_base_url") as f:
|
||||
return f.read().strip()
|
||||
|
||||
def radarr_url():
|
||||
with open(f"{SECRET_DIR}/radarr_base_url") as f:
|
||||
return f.read().strip()
|
||||
|
||||
def make_header(api_key: str):
|
||||
return {"X-Api-Key": api_key, "Accept": "application/json"}
|
||||
|
||||
def get_sonarr_key():
|
||||
with open(f"{SECRET_DIR}/sonarr_api_key") as f:
|
||||
return f.read().strip()
|
||||
|
||||
def get_radarr_key():
|
||||
with open(f"{SECRET_DIR}/radarr_api_key") as f:
|
||||
return f.read().strip()
|
||||
|
||||
def get_sonarr_history(since: datetime|None=None):
|
||||
api_key = get_sonarr_key()
|
||||
if not since:
|
||||
since = datetime.combine(date.today()-timedelta(days=1),datetime.min.time())
|
||||
url = f"{sonarr_url()}/api/history/since"
|
||||
url += f"?date={since.isoformat()}"
|
||||
response = requests.get(url, headers=make_header(api_key))
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
|
||||
items = []
|
||||
for item in data:
|
||||
if item["eventType"] == "downloadFolderImported":
|
||||
items.append(item["sourceTitle"])
|
||||
return items
|
||||
|
||||
def get_radarr_history(since: datetime|None=None):
|
||||
api_key = get_radarr_key()
|
||||
if not since:
|
||||
since = datetime.combine(date.today()-timedelta(days=7),datetime.min.time())
|
||||
url = f"{radarr_url()}/api/v3/history/since"
|
||||
url += f"?date={since.isoformat()}"
|
||||
response = requests.get(url, headers=make_header(api_key))
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
|
||||
items = []
|
||||
for item in data:
|
||||
if item["eventType"] == "downloadFolderImported":
|
||||
items.append(item["sourceTitle"])
|
||||
return items
|
||||
|
||||
if __name__ == "__main__":
|
||||
sonarr_items = get_sonarr_history()
|
||||
radarr_items = get_radarr_history()
|
||||
|
||||
output = {
|
||||
"text": f"Son: {len(sonarr_items)}|Rad: {len(radarr_items)}",
|
||||
"tooltip": "Radarr: \n" + "\n".join(radarr_items) + "\n" + "Sonarr: \n" + "\n".join(sonarr_items)
|
||||
}
|
||||
print(json.dumps(output))
|
265
home/hyprland/waybar/default.nix
Normal file
265
home/hyprland/waybar/default.nix
Normal file
@@ -0,0 +1,265 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
flakestat = pkgs.writeShellApplication {
|
||||
name = "flakestat";
|
||||
runtimeInputs = with pkgs; [
|
||||
git
|
||||
jq
|
||||
];
|
||||
text = builtins.readFile ./flakestat.sh;
|
||||
};
|
||||
arrhist = pkgs.stdenv.mkDerivation {
|
||||
name = "arrhist";
|
||||
propagatedBuildInputs = [
|
||||
(pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ requests ]))
|
||||
];
|
||||
src = ./arrhist.py;
|
||||
dontUnpack = true;
|
||||
installPhase = "install -Dm755 ${./arrhist.py} $out/bin/arrhist";
|
||||
};
|
||||
withArrhist = if (osConfig.system.name == "gunter") then true else false;
|
||||
withBattery = if (osConfig.system.name == "magicman") then true else false;
|
||||
in
|
||||
{
|
||||
sops.secrets."sonarr_base_url" = { };
|
||||
sops.secrets."sonarr_api_key" = { };
|
||||
sops.secrets."radarr_base_url" = { };
|
||||
sops.secrets."radarr_api_key" = { };
|
||||
|
||||
xdg.configFile."waybar/macchiato.css" = {
|
||||
source =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "waybar";
|
||||
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
|
||||
sha256 = "WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
|
||||
}
|
||||
+ "/themes/macchiato.css";
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = false; # disable it,autostart it in hyprland conf
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
style = ''
|
||||
@import "macchiato.css";
|
||||
* {
|
||||
border: none;
|
||||
font-family: "JetbrainsMono Nerd Font";
|
||||
font-size: 15px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
color: @text;
|
||||
border-radius: 10px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: @surface2;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin-top: 6px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 0px;
|
||||
transition: none;
|
||||
color: transparent;
|
||||
background-color: @surface2;
|
||||
}
|
||||
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: @red;
|
||||
}
|
||||
}
|
||||
.warning,
|
||||
.critical,
|
||||
.urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
background-color: @base;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: @surface2;
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: alpha(@red, 0.4);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: @surface2;
|
||||
}
|
||||
tooltip {
|
||||
background-color: @base;
|
||||
}
|
||||
tooltip label {
|
||||
color: @text;
|
||||
}
|
||||
#custom-launcher {
|
||||
font-size: 15px;
|
||||
padding-left: 5px;
|
||||
padding-right: 12px;
|
||||
background-color: @base;
|
||||
}
|
||||
.modules-right {
|
||||
background-color: @base;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
}
|
||||
.modules-left {
|
||||
background-color: @base;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
}
|
||||
#mode,
|
||||
#clock,
|
||||
#memory,
|
||||
#temperature,
|
||||
#cpu,
|
||||
#mpd,
|
||||
#custom-wall,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu,
|
||||
#custom-flakestat,
|
||||
#custom-arrhist {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
#battery.charging,
|
||||
#battery.full,
|
||||
#battery.discharging {
|
||||
color: @maroon;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: @red;
|
||||
}
|
||||
'';
|
||||
settings = [
|
||||
(
|
||||
let
|
||||
volInterval = if (osConfig.system.name == "gunter") then "5" else "1";
|
||||
in
|
||||
{
|
||||
"layer" = "top";
|
||||
"position" = "top";
|
||||
modules-left = [ "custom/flakestat" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
(lib.mkIf (withArrhist) "custom/arrhist")
|
||||
"pulseaudio"
|
||||
"pulseaudio#microphone"
|
||||
"memory"
|
||||
"cpu"
|
||||
(lib.mkIf (withBattery) "battery")
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
"hyprland/workspaces" = {
|
||||
"format" = "{name}";
|
||||
"on-click" = "activate";
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"pulseaudio" = {
|
||||
"scroll-step" = 5;
|
||||
"format" = "{icon} {volume}%";
|
||||
"format-muted" = "";
|
||||
"format-icons" = {
|
||||
"default" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"on-scroll-up" = "pamixer -i ${volInterval}";
|
||||
"on-scroll-down" = "pamixer -d ${volInterval}";
|
||||
"on-click" = "pamixer -t";
|
||||
};
|
||||
"pulseaudio#microphone" = {
|
||||
"format" = "{format_source}";
|
||||
"format-source" = " {volume}%";
|
||||
"format-source-muted" = "";
|
||||
"on-click" = "pamixer --default-source -t";
|
||||
"on-scroll-up" = "pamixer --default-source -i ${volInterval}";
|
||||
"on-scroll-down" = "pamixer --default-source -d ${volInterval}";
|
||||
"scroll-step" = 5;
|
||||
"on-click-right" = "pavucontrol";
|
||||
};
|
||||
"clock" = {
|
||||
"interval" = 1;
|
||||
"format" = "{:%H:%M %A %b %d}";
|
||||
"tooltip" = true;
|
||||
};
|
||||
"memory" = {
|
||||
"interval" = 3;
|
||||
"format" = " {percentage}%";
|
||||
"states" = {
|
||||
"warning" = 85;
|
||||
};
|
||||
};
|
||||
"cpu" = {
|
||||
"interval" = 3;
|
||||
"format" = " {usage}%";
|
||||
};
|
||||
"tray" = {
|
||||
"icon-size" = 15;
|
||||
"spacing" = 6;
|
||||
};
|
||||
"battery" = {
|
||||
"interval" = 60;
|
||||
"states" = {
|
||||
"warning" = 20;
|
||||
"critical" = 5;
|
||||
};
|
||||
"format" = "{icon} {capacity}%";
|
||||
"format-icons" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"custom/flakestat" = {
|
||||
"exec" = "${flakestat}/bin/flakestat";
|
||||
"format" = " {}";
|
||||
"return-type" = "json";
|
||||
"interval" = 600;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (withArrhist) {
|
||||
"custom/arrhist" = {
|
||||
"exec" = "${arrhist}/bin/arrhist";
|
||||
"return-type" = "json";
|
||||
"interval" = 600;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
55
home/hyprland/waybar/flakestat.sh
Normal file
55
home/hyprland/waybar/flakestat.sh
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
# Args:
|
||||
# $1 text
|
||||
# $2 tooltip
|
||||
# $3 error-code
|
||||
print_output() {
|
||||
local text="$1"
|
||||
local tooltip="$2"
|
||||
local error_code="$3"
|
||||
|
||||
if [ -z "$error_code" ]; then
|
||||
output=$(jq -n \
|
||||
--arg text "$text" \
|
||||
--arg tooltip "$tooltip" \
|
||||
--unbuffered \
|
||||
--compact-output \
|
||||
'{text: $text, tooltip: $tooltip}')
|
||||
else
|
||||
output=$(jq -n \
|
||||
--arg text "$text" \
|
||||
--arg tooltip "$tooltip" \
|
||||
--unbuffered \
|
||||
--compact-output \
|
||||
'{text: $text, tooltip: $tooltip}')
|
||||
fi
|
||||
|
||||
echo "$output"
|
||||
}
|
||||
|
||||
FLAKE_DIR="/home/torjus/nixos"
|
||||
NIXPKGS_DIR="/home/torjus/git/nixpkgs"
|
||||
|
||||
flake_metadata=$(nix flake metadata --json "$FLAKE_DIR" 2>/dev/null)
|
||||
|
||||
unstable_input=$(echo "$flake_metadata" | jq '.locks.nodes.root.inputs.nixpkgs')
|
||||
unstable_rev=$(echo "$flake_metadata" | jq -r ".locks.nodes.$unstable_input.locked.rev")
|
||||
unstable_branch=$(echo "$flake_metadata" | jq -r ".locks.nodes.$unstable_input.original.ref")
|
||||
|
||||
cd "$NIXPKGS_DIR" || print_output "?" "Could not find git repo dir" 1
|
||||
if ! git fetch -q --all; then
|
||||
print_output "?" "Unable to fetch commits" 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! unstable_commit_count=$(git rev-list --count "$unstable_rev..origin/$unstable_branch"); then
|
||||
print_output "?" "Unable to list commits" 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
text="$unstable_commit_count"
|
||||
tooltip="${unstable_branch}: ${unstable_commit_count}"
|
||||
|
||||
print_output "$text" "$tooltip" 0
|
@@ -1,4 +1,5 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
xdg.configFile = {
|
||||
"hypr/hyprpaper.conf" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprpaper.conf";
|
||||
|
37
home/i3/default.nix
Normal file
37
home/i3/default.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mod = "Mod4";
|
||||
in
|
||||
{
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = mod;
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${mod}+Enter" = "exec kitty";
|
||||
|
||||
# Focus
|
||||
"${mod}+j" = "focus left";
|
||||
"${mod}+k" = "focus down";
|
||||
"${mod}+l" = "focus up";
|
||||
"${mod}+semicolon" = "focus right";
|
||||
|
||||
# Move
|
||||
"${mod}+Shift+j" = "move left";
|
||||
"${mod}+Shift+k" = "move down";
|
||||
"${mod}+Shift+l" = "move up";
|
||||
"${mod}+Shift+semicolon" = "move right";
|
||||
|
||||
# My multi monitor setup
|
||||
"${mod}+m" = "move workspace to output DP-2";
|
||||
"${mod}+Shift+m" = "move workspace to output DP-5";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
49
home/magicman.nix
Normal file
49
home/magicman.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs user;
|
||||
};
|
||||
users.${user} =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
./sops
|
||||
./editor/neovim
|
||||
./programs/firefox
|
||||
./programs/tmux
|
||||
./programs/dunst
|
||||
./programs/kitty
|
||||
./programs/rofi
|
||||
./programs/obs-studio
|
||||
./programs/vscode
|
||||
./programs/pywal
|
||||
./programs/zellij
|
||||
./scripts
|
||||
./scripts/batlvl.nix
|
||||
./zsh
|
||||
./packages
|
||||
./hyprland/magicman.nix
|
||||
./ssh
|
||||
];
|
||||
firefox.enable = true;
|
||||
tmux.enable = true;
|
||||
hyprland.enable = true;
|
||||
home = {
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,45 +1,118 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, osConfig, ... }:
|
||||
let
|
||||
withCuda = if (osConfig.system.name == "gunter") then true else false;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./zoom.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
# Generic tools
|
||||
# CLI utils
|
||||
act
|
||||
age
|
||||
alacritty
|
||||
btop
|
||||
bat
|
||||
bzip2
|
||||
croc
|
||||
devenv
|
||||
distrobox
|
||||
dust
|
||||
easyeffects
|
||||
eza
|
||||
fd
|
||||
ffmpeg
|
||||
file
|
||||
go-task
|
||||
fzf
|
||||
glib
|
||||
grimblast
|
||||
ijq
|
||||
incus
|
||||
jq
|
||||
kitty
|
||||
kubectl
|
||||
lazygit
|
||||
lf
|
||||
ncdu
|
||||
mumble
|
||||
pamixer
|
||||
nvd
|
||||
nurl
|
||||
nwg-look
|
||||
most
|
||||
pinentry
|
||||
pre-commit
|
||||
pulseaudio
|
||||
pulsemixer
|
||||
rbw
|
||||
restic
|
||||
ripgrep
|
||||
rofi-rbw-wayland
|
||||
sops
|
||||
sshfs
|
||||
tea
|
||||
tldr
|
||||
tokei
|
||||
unzip
|
||||
ventoy
|
||||
wtype
|
||||
|
||||
# Non-CLI stuff
|
||||
alacritty
|
||||
discord
|
||||
feh
|
||||
krita
|
||||
mpv
|
||||
mumble
|
||||
pamixer
|
||||
rofi-rbw-wayland
|
||||
spicetify-cli
|
||||
spotify
|
||||
virt-manager
|
||||
vmware-horizon-client
|
||||
yt-dlp
|
||||
|
||||
# Editors
|
||||
vscode
|
||||
# k8s tools
|
||||
cilium-cli
|
||||
cmctl
|
||||
k9s
|
||||
krew
|
||||
kubernetes-helm
|
||||
talosctl
|
||||
|
||||
# Go stuff
|
||||
go
|
||||
delve
|
||||
gopls
|
||||
|
||||
# js/ts
|
||||
nodejs
|
||||
nodePackages.pnpm
|
||||
typescript
|
||||
|
||||
# Py stuff
|
||||
python3
|
||||
(python312.withPackages (
|
||||
p: with p; [
|
||||
requests
|
||||
ipython
|
||||
]
|
||||
))
|
||||
poetry
|
||||
ruff
|
||||
|
||||
# Rust
|
||||
rustup
|
||||
# rust stuff
|
||||
rustc
|
||||
cargo
|
||||
rust-analyzer
|
||||
|
||||
# Homemade shit
|
||||
ghettoptt
|
||||
huecli
|
||||
nixprstatus
|
||||
|
||||
# Stuff with overrides
|
||||
# Btop
|
||||
(btop.override { cudaSupport = withCuda; })
|
||||
# PrismLauncher
|
||||
prismlauncher
|
||||
|
||||
# From nix-packages flake
|
||||
path-of-building-beta
|
||||
awakened-poe-trade
|
||||
];
|
||||
}
|
||||
|
16
home/packages/zoom.nix
Normal file
16
home/packages/zoom.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
version = "6.2.6.2503";
|
||||
zoom-override = pkgs.zoom-us.overrideAttrs (old: {
|
||||
inherit version;
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://zoom.us/client/${version}/zoom_x86_64.pkg.tar.xz";
|
||||
hash = "sha256-qhymegXkXSl9fK/5klSi5uRPwFVN88QH/5EVGaBUbfc=";
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
(lib.warn "Using overridden zoom version" zoom-override)
|
||||
];
|
||||
}
|
48
home/prismo.nix
Normal file
48
home/prismo.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs inputs user;
|
||||
};
|
||||
users.${user} =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
./sops
|
||||
./editor/neovim
|
||||
./programs/firefox
|
||||
./programs/tmux
|
||||
./programs/dunst
|
||||
./programs/kitty
|
||||
./programs/rofi
|
||||
./programs/obs-studio
|
||||
./programs/vscode
|
||||
./scripts
|
||||
./zsh
|
||||
./packages
|
||||
./hyprland/hyprland_prismo.nix
|
||||
./ssh
|
||||
./services/backup-home.nix
|
||||
./services/ghettoptt.nix
|
||||
];
|
||||
firefox.enable = true;
|
||||
tmux.enable = true;
|
||||
hyprland.enable = true;
|
||||
home = {
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
83
home/programs/dunst/default.nix
Normal file
83
home/programs/dunst/default.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
rounded = "yes";
|
||||
origin = "top-right";
|
||||
monitor = "4";
|
||||
alignment = "left";
|
||||
vertical_alignment = "center";
|
||||
width = "400";
|
||||
height = "400";
|
||||
scale = 0;
|
||||
gap_size = 0;
|
||||
progress_bar = true;
|
||||
transparency = 0;
|
||||
text_icon_padding = 0;
|
||||
separator_color = "frame";
|
||||
sort = "yes";
|
||||
idle_threshold = 120;
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
show_age_threshold = 60;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
always_run_script = true;
|
||||
corner_radius = 10;
|
||||
# follow = "mouse";
|
||||
font = "Source Sans Pro 10";
|
||||
format = "<b>%s</b>\\n%b"; # format = "<span foreground='#f3f4f5'><b>%s %p</b></span>\n%b"
|
||||
frame_color = "#232323";
|
||||
frame_width = 1;
|
||||
offset = "15x15";
|
||||
horizontal_padding = 10;
|
||||
icon_position = "left";
|
||||
indicate_hidden = "yes";
|
||||
min_icon_size = 0;
|
||||
max_icon_size = 64;
|
||||
mouse_left_click = "do_action, close_current";
|
||||
mouse_middle_click = "close_current";
|
||||
mouse_right_click = "close_all";
|
||||
padding = 10;
|
||||
plain_text = "no";
|
||||
separator_height = 2;
|
||||
show_indicators = "yes";
|
||||
shrink = "no";
|
||||
word_wrap = "yes";
|
||||
browser = "/usr/bin/env firefox -new-tab";
|
||||
};
|
||||
|
||||
fullscreen_delay_everything = {
|
||||
fullscreen = "delay";
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#d64e4e";
|
||||
foreground = "#f0e0e0";
|
||||
};
|
||||
urgency_low = {
|
||||
background = "#232323";
|
||||
foreground = "#2596be";
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#1e1e2a";
|
||||
foreground = "#2596be";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,6 +1,17 @@
|
||||
{ pkgs, config, lib, inputs, user, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.firefox.enable = lib.mkEnableOption "Firefox";
|
||||
|
||||
config =
|
||||
lib.mkIf config.firefox.enable { programs.firefox = { enable = true; }; };
|
||||
config = lib.mkIf config.firefox.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
23
home/programs/git/default.nix
Normal file
23
home/programs/git/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Torjus Håkestad";
|
||||
userEmail = "torjus@usit.uio.no";
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
signing = {
|
||||
key = "~/.ssh/id_ed25519.pub";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
includes = [
|
||||
{
|
||||
contents = {
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
27
home/programs/kitty/default.nix
Normal file
27
home/programs/kitty/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.configFile."kitty/kitty.conf" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./. + "/kitty.conf";
|
||||
target = "kitty/kitty.conf";
|
||||
};
|
||||
xdg.configFile."kitty/themes/macchiato.conf" = {
|
||||
source =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "kitty";
|
||||
rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
|
||||
sha256 = "mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=";
|
||||
}
|
||||
+ "/themes/macchiato.conf";
|
||||
};
|
||||
xdg.configFile."kitty/themes/latte.conf" = {
|
||||
source =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "kitty";
|
||||
rev = "d7d61716a83cd135344cbb353af9d197c5d7cec1";
|
||||
sha256 = "mRFa+40fuJCUrR1o4zMi7AlgjRtFmii4fNsQyD8hIjM=";
|
||||
}
|
||||
+ "/themes/latte.conf";
|
||||
};
|
||||
}
|
27
home/programs/kitty/kitty.conf
Normal file
27
home/programs/kitty/kitty.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
# shell
|
||||
shell .
|
||||
|
||||
# mute bell
|
||||
enable_audio_bell no
|
||||
|
||||
# Remove close window confirm
|
||||
confirm_os_window_close 0
|
||||
|
||||
# Font config
|
||||
font_family Fira Code
|
||||
bold_font Fira Code
|
||||
italic_font Fira Code
|
||||
bold_italic_font Fira Code
|
||||
|
||||
# Emoji font
|
||||
# Symbols Nerd Font Mono
|
||||
font_size 14.0
|
||||
|
||||
# Window padding
|
||||
window_padding_width 10
|
||||
|
||||
# Zoom mapping
|
||||
map ctrl+kp_add change_font_size all +2.0
|
||||
map ctrl+kp_minus change_font_size all -2.0
|
||||
|
||||
include themes/macchiato.conf
|
46
home/programs/obs-studio/default.nix
Normal file
46
home/programs/obs-studio/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
withCuda = osConfig.system.name == "gunter";
|
||||
|
||||
onnxruntime-gpu = (pkgs.onnxruntime.override { cudaSupport = withCuda; }).overrideAttrs (old: {
|
||||
# TODO: Remove when fixed in nixpkgs
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/onnxruntime/default.nix#L154
|
||||
buildInputs = old.buildInputs ++ [ pkgs.cudaPackages.nccl ];
|
||||
});
|
||||
|
||||
obs-backgrounremoval-gpu = (
|
||||
(pkgs.obs-studio-plugins.obs-backgroundremoval.override { onnxruntime = onnxruntime-gpu; })
|
||||
.overrideAttrs
|
||||
(old: {
|
||||
version = "1.1.14-beta";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "occ-ai";
|
||||
repo = "obs-backgroundremoval";
|
||||
rev = "012a7f45fe4cb5363abee654d05c5cba4235feb5";
|
||||
hash = "sha256-ud9RfnbMXfOaIhkUYG7zyR4SxZhj3rZd9b4+8P4jBYs=";
|
||||
};
|
||||
cmakeFlags =
|
||||
if withCuda then
|
||||
(lib.lists.remove "-DDISABLE_ONNXRUNTIME_GPU=ON" old.cmakeFlags)
|
||||
else
|
||||
old.cmakeFlags;
|
||||
})
|
||||
);
|
||||
in
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins =
|
||||
with pkgs.obs-studio-plugins;
|
||||
[
|
||||
obs-pipewire-audio-capture
|
||||
obs-shaderfilter
|
||||
]
|
||||
++ lib.optionals withCuda [ obs-backgrounremoval-gpu ];
|
||||
};
|
||||
}
|
29
home/programs/pywal/default.nix
Normal file
29
home/programs/pywal/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.pywal.enable = true;
|
||||
|
||||
xdg.configFile = {
|
||||
"wal/templates/colors-hyprland.conf" = {
|
||||
text = ''
|
||||
$foreground = 0xff{foreground.strip}
|
||||
$background = 0xff{background.strip}
|
||||
$color0 = 0xff{color0.strip}
|
||||
$color1 = 0xff{color1.strip}
|
||||
$color2 = 0xff{color2.strip}
|
||||
$color3 = 0xff{color3.strip}
|
||||
$color4 = 0xff{color4.strip}
|
||||
$color5 = 0xff{color5.strip}
|
||||
$color6 = 0xff{color6.strip}
|
||||
$color7 = 0xff{color7.strip}
|
||||
$color8 = 0xff{color8.strip}
|
||||
$color9 = 0xff{color9.strip}
|
||||
$color10 = 0xff{color10.strip}
|
||||
$color11 = 0xff{color11.strip}
|
||||
$color12 = 0xff{color12.strip}
|
||||
$color13 = 0xff{color13.strip}
|
||||
$color14 = 0xff{color14.strip}
|
||||
$color15 = 0xff{color15.strip}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
17
home/programs/rofi/config.rasi
Normal file
17
home/programs/rofi/config.rasi
Normal file
@@ -0,0 +1,17 @@
|
||||
configuration{
|
||||
modi: "run,drun,window";
|
||||
icon-theme: "Oranchelo";
|
||||
show-icons: true;
|
||||
terminal: "alacritty";
|
||||
drun-display-format: "{icon} {name}";
|
||||
location: 0;
|
||||
disable-history: false;
|
||||
hide-scrollbar: true;
|
||||
display-drun: " Apps ";
|
||||
display-run: " Run ";
|
||||
display-window: " Window";
|
||||
display-Network: " Network";
|
||||
sidebar-mode: true;
|
||||
}
|
||||
|
||||
@theme "latte"
|
27
home/programs/rofi/default.nix
Normal file
27
home/programs/rofi/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.configFile."rofi/config.rasi" = {
|
||||
source = ./config.rasi;
|
||||
};
|
||||
|
||||
xdg.configFile."rofi/macchiato.rasi" = {
|
||||
source =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "rofi";
|
||||
rev = "5350da41a11814f950c3354f090b90d4674a95ce";
|
||||
sha256 = "DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
|
||||
}
|
||||
+ "/basic/.local/share/rofi/themes/catppuccin-macchiato.rasi";
|
||||
};
|
||||
xdg.configFile."rofi/latte.rasi" = {
|
||||
source =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "rofi";
|
||||
rev = "5350da41a11814f950c3354f090b90d4674a95ce";
|
||||
sha256 = "DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
|
||||
}
|
||||
+ "/basic/.local/share/rofi/themes/catppuccin-latte.rasi";
|
||||
};
|
||||
}
|
@@ -1,7 +1,14 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.tmux.enable;
|
||||
in {
|
||||
let
|
||||
cfg = config.tmux.enable;
|
||||
in
|
||||
{
|
||||
options.tmux.enable = mkEnableOption "tmux";
|
||||
config = mkIf cfg {
|
||||
programs.tmux = {
|
||||
|
20
home/programs/vscode/default.nix
Normal file
20
home/programs/vscode/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
enableUpdateCheck = true;
|
||||
enableExtensionUpdateCheck = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
catppuccin.catppuccin-vsc
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
golang.go
|
||||
vscodevim.vim
|
||||
ms-python.python
|
||||
ms-vscode-remote.remote-ssh
|
||||
bbenoist.nix
|
||||
];
|
||||
userSettings = {
|
||||
"window.titleBarStyle" = "custom";
|
||||
};
|
||||
};
|
||||
}
|
8
home/programs/zellij/default.nix
Normal file
8
home/programs/zellij/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
# enableZshIntegration = true;
|
||||
settings = { };
|
||||
};
|
||||
}
|
11
home/scripts/batlvl.nix
Normal file
11
home/scripts/batlvl.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
batlvl = pkgs.writeShellApplication {
|
||||
name = "batlvl";
|
||||
runtimeInputs = [ ];
|
||||
text = builtins.readFile ./batlvl.sh;
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ batlvl ];
|
||||
}
|
12
home/scripts/batlvl.sh
Normal file
12
home/scripts/batlvl.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ac_status=$(cat /sys/class/power_supply/AC/online)
|
||||
bat_status=$(cat /sys/class/power_supply/BAT0/status)
|
||||
bat_lvl=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
if (("$ac_status" == 0)); then
|
||||
echo "$bat_status - $bat_lvl%"
|
||||
else
|
||||
if [ "$bat_lvl" -lt "90" ]; then
|
||||
echo "$bat_status - $bat_lvl%"
|
||||
fi
|
||||
fi
|
16
home/scripts/default.nix
Normal file
16
home/scripts/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
imports = [ ./lockhelper.nix ];
|
||||
home.file.".local/bin/hl-no-opacity" = {
|
||||
source = ./hl-no-opacity.sh;
|
||||
executable = true;
|
||||
};
|
||||
home.file.".local/bin/rofi-launcher" = {
|
||||
source = ./rofi-launcher.sh;
|
||||
executable = true;
|
||||
};
|
||||
home.file.".local/bin/randomwp" = {
|
||||
source = ./randomwp.sh;
|
||||
executable = true;
|
||||
};
|
||||
}
|
5
home/scripts/hl-no-opacity.sh
Normal file
5
home/scripts/hl-no-opacity.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
addr=$(hyprctl activewindow -j|jq -r .address)
|
||||
hyprctl setprop "address:$addr" alpha 1 lock
|
||||
hyprctl setprop "address:$addr" alphainactive 1 lock
|
14
home/scripts/lockhelper.nix
Normal file
14
home/scripts/lockhelper.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
lockhelper = pkgs.writeShellApplication {
|
||||
name = "lockhelper";
|
||||
runtimeInputs = with pkgs; [
|
||||
grim
|
||||
jq
|
||||
];
|
||||
text = (builtins.readFile ./lockhelper.sh);
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ lockhelper ];
|
||||
}
|
18
home/scripts/lockhelper.sh
Normal file
18
home/scripts/lockhelper.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
mkdir -p /tmp/lockscreen || true
|
||||
|
||||
monitors=$(hyprctl monitors -j | jq -r '.[] | select( .name | contains ("DP")) | .name')
|
||||
|
||||
while IFS= read -r m; do
|
||||
grim -o "$m" "/tmp/lockscreen/$m.png" || true
|
||||
done <<< "$monitors"
|
||||
|
||||
# Only lock if not already running
|
||||
if [ -z "$(pgrep hyprlock)" ]
|
||||
then
|
||||
exec hyprlock
|
||||
else
|
||||
echo "Already locked"
|
||||
fi
|
47
home/scripts/randomwp.sh
Normal file
47
home/scripts/randomwp.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ -z "${WALLPAPER_DIR}" ]; then
|
||||
WALLPAPER_DIR="${HOME}/wallpapers"
|
||||
fi
|
||||
|
||||
if ! [ -d "$WALLPAPER_DIR" ]; then
|
||||
echo "Wallpaper dir is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -eq 1 ]; then
|
||||
wallpaper_path="$1"
|
||||
ext=$(file --extension "$wallpaper_path" | cut -d" " -f2)
|
||||
if ! [ "$ext" == "png" ]; then
|
||||
echo "$wallpaper_path is an invalid wallpaper"
|
||||
fi
|
||||
else
|
||||
wallpaper_path=$(find "$WALLPAPER_DIR" -mindepth 1 | grep png| grep -v current| sort -R | tail -n 1)
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$wallpaper_path" ]; then
|
||||
echo "Unable to find wallpaper"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v hyprpaper &> /dev/null; then
|
||||
echo "Could not find hyprpaper command"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "setting $wallpaper_path as wallpaper"
|
||||
hyprctl hyprpaper unload all
|
||||
hyprctl hyprpaper preload "$wallpaper_path"
|
||||
|
||||
if command -v wal &> /dev/null; then
|
||||
wal -i "$wallpaper_path"
|
||||
fi
|
||||
|
||||
unlink "$WALLPAPER_DIR/current.png" || true
|
||||
ln -s "$wallpaper_path" "$WALLPAPER_DIR/current.png"
|
||||
|
||||
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
|
||||
hyprctl hyprpaper wallpaper "$monitor,$wallpaper_path"
|
||||
done
|
8
home/scripts/rofi-launcher.sh
Normal file
8
home/scripts/rofi-launcher.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
rofi \
|
||||
-show drun \
|
||||
-modi run,drun,ssh \
|
||||
-scroll-method 0 \
|
||||
-drun-match-fields all \
|
||||
-drun-display-format "{name}" \
|
||||
-terminal kitty
|
124
home/services/backup-home.nix
Normal file
124
home/services/backup-home.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
# Backup home script
|
||||
backup-home = pkgs.writeShellApplication {
|
||||
name = "backup-home";
|
||||
runtimeInputs = with pkgs; [
|
||||
coreutils
|
||||
curl
|
||||
jq
|
||||
libnotify
|
||||
restic
|
||||
];
|
||||
text = ''
|
||||
echo "========== BACKUP HOME STARTING =========="
|
||||
export RESTIC_PASSWORD="gunter.home.2rjus.net"
|
||||
export RESTIC_REPOSITORY="rest:http://10.69.12.52:8000/gunter.home.2rjus.net"
|
||||
SECRET_PATH="$XDG_CONFIG_HOME/sops-nix/secrets/gotify_backup_home"
|
||||
|
||||
if ! [ -f "$SECRET_PATH" ]; then
|
||||
notify-send -u critical "Backup issue" "Secret file for gotify token does not exist"
|
||||
else
|
||||
GOTIFY_TOKEN=$(<"$SECRET_PATH")
|
||||
if [ -z "$GOTIFY_TOKEN" ]; then
|
||||
notify-send -u critical "Backup issue" "No Gotify token found"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Send start notification
|
||||
notify-send -e -t 3000 "Backup started" "Backup of /home/torjus started"
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Failed to send notification"
|
||||
fi
|
||||
|
||||
# Do the backup
|
||||
echo "========== BACKUP TASK STARTING =========="
|
||||
SECONDS=0
|
||||
restic backup /home/torjus \
|
||||
--exclude '/home/torjus/.cache' \
|
||||
--exclude '/home/torjus/.local/share/Steam' \
|
||||
--exclude '/home/torjus/.local/share/containers' \
|
||||
--exclude '/home/torjus/.var' \
|
||||
--exclude '/home/torjus/.local/share/lutris' \
|
||||
--exclude '/home/torjus/.npm' \
|
||||
--exclude '/home/torjus/.factorio/mods' \
|
||||
--exclude '/home/torjus/.zoom' \
|
||||
--exclude '/home/torjus/git/nixpkgs'
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
notify-send -u critical "Backup failed" "Backup of /home/torjus failed"
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
curl "https://gotify.t-juice.club/message?token=$GOTIFY_TOKEN" \
|
||||
-F "title=Backup of home@gunter failed!" \
|
||||
-F "message=Please check status of backup-home service"
|
||||
fi
|
||||
fi
|
||||
BACKUP_DURATION="$SECONDS"
|
||||
echo "========== BACKUP TASK COMPLETE =========="
|
||||
|
||||
# Remove old snapshots and prune
|
||||
echo "========== PRUNE TASK STARTING =========="
|
||||
restic forget -d 7 -w 4 -m 6 --keep-within 1d --prune
|
||||
echo "========== PRUNE TASK COMPLETE =========="
|
||||
# Gather statistics
|
||||
echo "========== STATS TASK STARTING =========="
|
||||
stats=$(restic stats --json)
|
||||
stats_raw=$(restic stats --mode=raw-data --json)
|
||||
|
||||
raw_size=$(jq -r '.total_size' <<< "$stats_raw" \
|
||||
| numfmt --to=iec --suffix=B --format="%.2f")
|
||||
total_size=$(jq -r '.total_size' <<< "$stats" \
|
||||
| numfmt --to=iec --suffix=B --format="%.2f")
|
||||
total_files=$(jq -r '.total_file_count' <<< "$stats" \
|
||||
| numfmt --to=iec)
|
||||
total_snapshots=$(jq -r '.snapshots_count' <<< "$stats")
|
||||
message="$total_files files\n$total_snapshots snapshots\n$raw_size ($total_size)"
|
||||
echo "========== STATS TASK COMPLETE =========="
|
||||
|
||||
# Send completion notification
|
||||
notify-send -i checkmark -e -t 10000 \
|
||||
"Backup of /home/torjus completed in ''${BACKUP_DURATION}s (''${SECONDS}s total)" "$message"
|
||||
retval=$?
|
||||
if [ $retval -ne 0 ]; then
|
||||
echo "Failed to send notification"
|
||||
exit $retval
|
||||
fi
|
||||
echo "========== BACKUP HOME COMPLETE =========="
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
sops.secrets."gotify_backup_home" = { };
|
||||
|
||||
systemd.user.services.backup-home = {
|
||||
Unit = {
|
||||
Description = "Backup home directory";
|
||||
After = [
|
||||
"network.target"
|
||||
"sops-nix.service"
|
||||
];
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${backup-home}/bin/backup-home";
|
||||
};
|
||||
};
|
||||
systemd.user.timers.backup-home = {
|
||||
Unit = {
|
||||
Description = "Backup home directory";
|
||||
After = [ "network.target" ];
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* *:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [
|
||||
"timers.target"
|
||||
"graphical-session.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
15
home/services/ghettoptt.nix
Normal file
15
home/services/ghettoptt.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
systemd.user.services.ghettoptt = {
|
||||
Unit = {
|
||||
Description = "Run ghettoptt";
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.ghettoptt}/bin/ghettoptt";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
7
home/sops/default.nix
Normal file
7
home/sops/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ user, ... }:
|
||||
{
|
||||
sops = {
|
||||
age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ../../secrets/torjus/secret.yaml;
|
||||
};
|
||||
}
|
44
home/ssh/config.nix
Normal file
44
home/ssh/config.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
eduroam-active = pkgs.writeShellApplication {
|
||||
name = "eduroam-active";
|
||||
runtimeInputs = with pkgs; [
|
||||
networkmanager
|
||||
];
|
||||
text = ''
|
||||
nmcli -g GENERAL.STATE c s interface|grep -q -E '\bactiv'
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
controlMaster = "auto";
|
||||
|
||||
matchBlocks = {
|
||||
"bmo.uio.no-on-eduroam" = (
|
||||
lib.mkIf (osConfig.system.name == "magicman") (
|
||||
lib.hm.dag.entryBefore [ "bmo.uio.no" ] {
|
||||
match = "host bmo.uio.no exec \"nmcli -g GENERAL.STATE c s eduroam|grep -q -E '\\bactiv'\"";
|
||||
hostname = "bmo.uio.no";
|
||||
forwardAgent = false;
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
"bmo.uio.no" = {
|
||||
setEnv = {
|
||||
# TERM = "xterm-256color";
|
||||
};
|
||||
hostname = "bmo.uio.no";
|
||||
forwardAgent = false;
|
||||
proxyJump = "torjus@rlogin.uio.no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
1
home/ssh/default.nix
Normal file
1
home/ssh/default.nix
Normal file
@@ -0,0 +1 @@
|
||||
{ imports = [ ./config.nix ]; }
|
@@ -1,17 +1,54 @@
|
||||
{ user, pkgs, ... }: {
|
||||
{ user, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ fd ];
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
package = pkgs.direnv;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
package = pkgs.nix-direnv;
|
||||
};
|
||||
};
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = false;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
shellAliases = {
|
||||
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos#prismo";
|
||||
nrebuild = "sudo nixos-rebuild switch --flake /home/${user}/nixos";
|
||||
ndiffbuild = "sudo nixos-rebuild build --flake /home/${user}/nixos && nvd diff /run/current-system /home/${user}/nixos/result";
|
||||
};
|
||||
initExtra = ''
|
||||
bindkey -v
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
|
||||
# Prompt stuff
|
||||
autoload -Uz promptinit
|
||||
promptinit
|
||||
prompt pure
|
||||
export PATH="''${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
|
||||
# Aliases
|
||||
alias ls=eza
|
||||
'';
|
||||
zplug = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
({
|
||||
name = "plugins/git";
|
||||
tags = [ "from:oh-my-zsh" ];
|
||||
})
|
||||
({
|
||||
name = "modules/prompt";
|
||||
tags = [ "from:prezto" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,33 +1,106 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../system/monitoring.nix
|
||||
];
|
||||
|
||||
# Sops stuff
|
||||
sops.defaultSopsFile = ../../secrets/gunter/secrets.yaml;
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.age.generateKey = true;
|
||||
sops.secrets."gotify_tokens/backup-home" = { };
|
||||
|
||||
# Enable microcode updates
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Bootloader stuff
|
||||
boot.kernelParams = [
|
||||
boot = {
|
||||
# Kernel stuff
|
||||
# kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
# kernelPackages = lib.warn "Pinned to kernel 6.10 due to nvidia fbdev trouble!" pkgs.linuxPackages_6_10;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"rd.systemd.show_status=false"
|
||||
];
|
||||
boot.loader.systemd-boot = { enable = true; };
|
||||
boot.loader.efi = { canTouchEfiVariables = true; };
|
||||
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||
'';
|
||||
|
||||
# Bootloader stuff
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
loader.efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
supportedFilesystems = [ "nfs" ];
|
||||
};
|
||||
|
||||
# Networking stuff
|
||||
networking.hostName = "gunter"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
networking.nftables.enable = true;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Set time stuff
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
# Enable opengl
|
||||
# hardware.opengl = {
|
||||
# enable = true;
|
||||
# extraPackages = with pkgs; [
|
||||
# ];
|
||||
# Enable graphics
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
};
|
||||
|
||||
# Nvidia stuff
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = true;
|
||||
nvidiaSettings = false;
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||
# version = "560.28.03";
|
||||
# sha256_64bit = "sha256-martv18vngYBJw1IFUCAaYr+uc65KtlHAMdLMdtQJ+Y=";
|
||||
# sha256_aarch64 = lib.fakeHash;
|
||||
# openSha256 = "sha256-asGpqOpU0tIO9QqceA8XRn5L27OiBFuI9RZ1NjSVwaM=";
|
||||
# settingsSha256 = lib.fakeHash;
|
||||
# persistencedSha256 = lib.fakeSha256;
|
||||
# };
|
||||
};
|
||||
|
||||
# Setup hyprland
|
||||
# nixpkgs.overlays = [
|
||||
# (self: super: {
|
||||
# hyprland = super.hyprland.override {
|
||||
# debug = true;
|
||||
# };
|
||||
# })
|
||||
# ];
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
services.xserver.displayManager.gdm.wayland = true;
|
||||
services.xserver.displayManager.lightdm.enable = false;
|
||||
services.xserver.displayManager.startx.enable = true;
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
@@ -48,22 +121,50 @@
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = (with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
extraPortals = (
|
||||
with pkgs;
|
||||
[
|
||||
# unstable.xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
]);
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"torjus"
|
||||
];
|
||||
substituters = [ "https://cuda-maintainers.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# Install system-wide packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
git
|
||||
libnotify
|
||||
usbutils
|
||||
vim
|
||||
wget
|
||||
v4l-utils
|
||||
nmap
|
||||
(lib.mkIf (config.system.name == "gunter") pciutils)
|
||||
|
||||
# X shit
|
||||
# xorg.xorgserver
|
||||
# xorg.xinit
|
||||
# xorg.xf86inputevdev
|
||||
# xorg.xf86inputlibinput
|
||||
# xorg.xinit
|
||||
];
|
||||
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
|
@@ -1,8 +1,18 @@
|
||||
{ inputs, self, pks, ... }: {
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
pks,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
./steamuser.nix
|
||||
./nfs.nix
|
||||
./ollama.nix
|
||||
./streamdeck.nix
|
||||
../../system
|
||||
../../home
|
||||
../../home/gunter.nix
|
||||
];
|
||||
}
|
||||
|
54
hosts/gunter/hardware-configuration.nix
Normal file
54
hosts/gunter/hardware-configuration.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [
|
||||
"kvm-amd"
|
||||
"v4l2loopback"
|
||||
];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/a7d4b697-fffa-4bcb-9dd7-cbbd6121a50c";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/be82b184-3cc7-483b-9069-f7797f51c853";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/DC0C-AAB3";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/2284e9c6-c168-4d4f-ba6a-d270f1ae245d"; } ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp12s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp13s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
25
hosts/gunter/nfs.nix
Normal file
25
hosts/gunter/nfs.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ nfs-utils ];
|
||||
services.rpcbind.enable = true;
|
||||
systemd.mounts = [
|
||||
{
|
||||
type = "nfs";
|
||||
mountConfig = {
|
||||
Options = "rw,soft,noatime";
|
||||
};
|
||||
what = "nas.home.2rjus.net:/mnt/hdd-pool/media";
|
||||
where = "/mnt/nas/media";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.automounts = [
|
||||
{
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
automountConfig = {
|
||||
TimeoutIdleSec = "5min";
|
||||
};
|
||||
where = "/mnt/nas/media";
|
||||
}
|
||||
];
|
||||
}
|
17
hosts/gunter/ollama.nix
Normal file
17
hosts/gunter/ollama.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
};
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
environment = {
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434";
|
||||
WEBUI_AUTH = "False";
|
||||
};
|
||||
port = 11444;
|
||||
};
|
||||
}
|
23
hosts/gunter/steamuser.nix
Normal file
23
hosts/gunter/steamuser.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
services.xserver.desktopManager.xfce.enable = true;
|
||||
programs.steam.enable = true;
|
||||
programs.gamemode.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
|
||||
users.users.steam = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "steam";
|
||||
home = "/home/steam";
|
||||
description = "Steam user";
|
||||
shell = pkgs.zsh;
|
||||
# Install some user packages
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
mumble
|
||||
easyeffects
|
||||
];
|
||||
};
|
||||
}
|
4
hosts/gunter/streamdeck.nix
Normal file
4
hosts/gunter/streamdeck.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.streamcontroller.enable = true;
|
||||
}
|
@@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
@@ -8,19 +13,44 @@
|
||||
"quiet"
|
||||
"splash"
|
||||
"rd.systemd.show_status=false"
|
||||
"acpi_backlight=native"
|
||||
"video=efifb:nobgrt"
|
||||
"loglevel=3"
|
||||
"rd.udev.log_level=3"
|
||||
];
|
||||
boot.loader.systemd-boot = { enable = true; };
|
||||
boot.loader.efi = { canTouchEfiVariables = true; };
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 3;
|
||||
};
|
||||
boot.loader.efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
themePackages = with pkgs; [ catppuccin-plymouth ];
|
||||
theme = "catppuccin-macchiato";
|
||||
extraConfig = ''
|
||||
UseFirmwareBackground=false
|
||||
'';
|
||||
};
|
||||
|
||||
# Networking stuff
|
||||
networking.hostName = "magicman"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
networking.nftables.enable = true;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Set time stuff
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
# Enable opengl
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
@@ -29,14 +59,44 @@
|
||||
];
|
||||
};
|
||||
|
||||
# Bluetooth stuff
|
||||
services.blueman.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
services.pipewire.wireplumber.extraConfig = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Setup hyprland
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager = {
|
||||
gdm.wayland = true;
|
||||
lightdm.enable = false;
|
||||
};
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
# TRIM
|
||||
services.fstrim.enable = true;
|
||||
|
||||
# TLP
|
||||
services.tlp.enable = true;
|
||||
|
||||
# Brillo
|
||||
hardware.brillo.enable = true;
|
||||
|
||||
# Setup common XDG env vars
|
||||
environment.sessionVariables = rec {
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
@@ -51,14 +111,26 @@
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = (with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
extraPortals = (
|
||||
with pkgs;
|
||||
[
|
||||
# xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
]);
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"torjus"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# Install system-wide packages
|
||||
|
@@ -1,8 +1,14 @@
|
||||
{ inputs, self, pks, ... }: {
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
pks,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
../../system
|
||||
../../home
|
||||
../../home/magicman.nix
|
||||
];
|
||||
}
|
||||
|
51
hosts/magicman/hardware-configuration.nix
Normal file
51
hosts/magicman/hardware-configuration.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/31b20f4c-24bb-4fd1-9a3e-8ccc19fe3d64";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/4bbadd2c-94dd-4d80-94bf-9332d24b57bd";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/7FF3-B061";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/6f2c4906-ad88-4d7e-88ec-61cdda41ce28"; } ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
@@ -1,8 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
# Sops stuff
|
||||
sops.defaultSopsFile = ../../secrets/prismo/secrets.yaml;
|
||||
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
sops.age.generateKey = true;
|
||||
sops.secrets."gotify_tokens/backup-home" = { };
|
||||
|
||||
# Bootloader stuff
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
@@ -13,17 +24,23 @@
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
boot.loader.efi = { canTouchEfiVariables = true; };
|
||||
boot.loader.efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
# Networking stuff
|
||||
networking.hostName = "prismo"; # Define your hostname.
|
||||
networking.networkmanager.enable = true;
|
||||
networking.nftables.enable = true;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Set time stuff
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
# Enable opengl
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
@@ -54,14 +71,20 @@
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = (with pkgs; [
|
||||
extraPortals = (
|
||||
with pkgs;
|
||||
[
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
]);
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# Install system-wide packages
|
||||
|
@@ -1,8 +1,14 @@
|
||||
{ inputs, self, pks, ... }: {
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
pks,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
../../system
|
||||
../../home
|
||||
../../home/prismo.nix
|
||||
];
|
||||
}
|
||||
|
@@ -1,19 +1,29 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
|
||||
luks.devices."cryptroot".device =
|
||||
"/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919";
|
||||
luks.devices."cryptroot".device = "/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919";
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
@@ -29,8 +39,7 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; }];
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; } ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
@@ -41,6 +50,5 @@
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
48
packages/open-pomodoro.nix
Normal file
48
packages/open-pomodoro.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "openpomodoro-cli";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "open-pomodoro";
|
||||
repo = "openpomodoro-cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-h/o4yxrZ8ViHhN2JS0ZJMfvcJBPCsyZ9ZQw9OmKnOfY=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-BR9d/PMQ1ZUYWSDO5ID2bkTN+A+VbaLTlz5t0vbkO60=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
GOWORK = "off";
|
||||
|
||||
subPackages = [ "cmd/pomodoro" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# postInstall = ''
|
||||
# installShellCompletion --cmd talosctl \
|
||||
# --bash <($out/bin/talosctl completion bash) \
|
||||
# --fish <($out/bin/talosctl completion fish) \
|
||||
# --zsh <($out/bin/talosctl completion zsh)
|
||||
# '';
|
||||
|
||||
doCheck = false; # no tests
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command-line Pomodoro tracker which uses the Open Pomodoro Format";
|
||||
mainProgram = "pomodoro";
|
||||
homepage = "https://github.com/open-pomodoro/openpomodoro-cli";
|
||||
license = licenses.mit;
|
||||
# maintainers = with maintainers; [ flokli ];
|
||||
};
|
||||
}
|
26
scripts/update-pob.sh
Executable file
26
scripts/update-pob.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
# set -x
|
||||
|
||||
# TODO: Update pobfrontend as well?
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
nurl_output=$(nurl -j https://github.com/PathOfBuildingCommunity/PathOfBuilding 2>/dev/null)
|
||||
rev=$(jq '.args.rev' <<< "$nurl_output")
|
||||
else
|
||||
nurl_output=$(nurl -j https://github.com/PathOfBuildingCommunity/PathOfBuilding "$1" 2>/dev/null)
|
||||
fi
|
||||
|
||||
hash=$(jq '.args.hash' <<< "$nurl_output" | sed 's/\//\\\//g')
|
||||
echo "Updating pob to $rev"
|
||||
|
||||
# Find lines to replace
|
||||
rev_line_numbers=$(grep -Fn "rev =" packages/pob.nix| cut -d":" -f1)
|
||||
rev_line_data=$(head -n1 <<< "$rev_line_numbers")
|
||||
sed -i "${rev_line_data}s/.*/ rev = $rev;/" packages/pob.nix
|
||||
|
||||
hash_line_numbers=$(grep -Fn "hash =" packages/pob.nix| cut -d":" -f1)
|
||||
hash_line_data=$(head -n1 <<< "$hash_line_numbers")
|
||||
sed -i "${hash_line_data}s/.*/ hash = $hash;/" packages/pob.nix
|
||||
|
||||
nixfmt packages/pob.nix
|
31
secrets/gunter/secrets.yaml
Normal file
31
secrets/gunter/secrets.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
gotify_tokens:
|
||||
backup-home: ENC[AES256_GCM,data:sq5ijJ0/jms=,iv:r+hobBUbO3wOp+Xx22yff2sXc44XrCXVDhbD/IS3Rtg=,tag:ypOiz21arspX3TGYeGtgxg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwNm9vK1k0ODFwVTVDUEIw
|
||||
VXVIdllUZnJEUUVHdGY1VzV4d2grekFRNTJVCjR3MkJwQ1p2TDdDUzJEV3psQ0VR
|
||||
S3ZwNXhPK01MREJaOTJPKzcvYXh5NXMKLS0tIEU2b05pUXlKNHdqVHYzWFJrL0NO
|
||||
eUNJUHNxR1JQVUozc3ZBVVN2TVM2bjAK7BZLtjEEefxf53xPRbw2xeXNke/JK99u
|
||||
xj1FtTTnQhNAQ0jgR2N4jtwJ1L2+1usjSF1Lq16Y5TqZ/wO6368XOw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1whxf34vjdndqzwgm7yyaexdm46gdnv9sf3nal7qqyjr0nyhhndlsrmc0g3
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnTmdSdWZESDI2WE9CU0Uy
|
||||
SzhWNXlpV2QyK3JGQ0FHWVh3TEZqM3Fzbm44CnRNbGlmaVBiZURJSFUvdDVZWnIw
|
||||
RU53Uk9KRGZKeE9mRHQxRTFjdVM2WWMKLS0tIEZjWkxKYnBFb0pYTitvdVZBckht
|
||||
NElxU2dyQ3l2RmpERXZPcHJZVEJuTDAKEDpzlk5kOQ8ZYduWVy+2g8f/r4XEtcL5
|
||||
32tNuXEaM+qS49Ef6g84uuwKyQ2ju1UJUtC4XcoRn6nQ9yUkMVWtMQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-03-06T19:27:51Z"
|
||||
mac: ENC[AES256_GCM,data:IrgIp2evBmZYQGvo29kkIFfNsECVlqU3ZyksxKapK/yY45DWLlxtz5TBn6wpDZ8grygCz8SCJR8Ug4Yik7TTJRCgdSGtNjp3gvt3aUF+K9aJQgSQCsh/Uk0S+ZYK2YxZDmrgRo2I5unSdEtFV3X0Rp/aGmzCptLa2ZMnxrbgsis=,iv:nRXCllfgJ8QkBFC7FC9QLaKFLLFyUQe8NKmgGG+waGI=,tag:vXOw1nNMoJa7PSPvoNsYRQ==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
30
secrets/magicman/secrets.yaml
Normal file
30
secrets/magicman/secrets.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
test: ENC[AES256_GCM,data:hEW/,iv:23IEALBiMHgXZedT7tHFsxF8UenCLqESJ3DkbUCWMxI=,tag:p7haTXzRt/eCa9ueNrbQcw==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2dHNNR0pyZ1hDcmxwdFRV
|
||||
UzlSSm5nN0xkdk41dE1zbmZTa1FYVUl6d1RVCmpueUptV1NFVC9FR3g1djl6M1Za
|
||||
K0ZYd3dhWHRBSkdONmlDaFl2RHk1TUEKLS0tIFFqRFd5K0YxaFRKdFVCOFpvODBu
|
||||
L1V4MDV6WVFzVXhPcHNnNXJLVGx5WlkKBTUY5W4+h3VaKidz+a++hs5J0J3GhfXP
|
||||
0NWAVIjiQQsEhfEyZcCsrdnOL038HCANaS1EWOCfyY+D7GPCzj6DUQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1stlqqspmt5fepyz35udrwr5avf9zuju79f787p26pu2d2j08yqps2q2t2c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBNNDY4cnBIb2h3aUNuNkdk
|
||||
aWdjV3hFK3A5T05vQWtYc0VyY3BTSm12VzFNCkpIekF4Y3pKbEtaY3ZRNUI4eUlM
|
||||
azhvelZjOWM0ZkFrRzlEenNJSG1KS2MKLS0tIE1Oek1oSUVZdm5maE9uSlJqN0lR
|
||||
SGkzUkFuSUpzcWNsWVJRYW1RbTI5TGMKCirJOv9CxOjwiuORC0XTH3SwaMz37jC/
|
||||
wITW1GrMnbt1QM0cF08ybu7IKpMo8CzH1iyPduaVLG7AyniaNTlDFQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-10-07T20:32:06Z"
|
||||
mac: ENC[AES256_GCM,data:RGLh077dYLkltn82+iTzKe00gwlodeL40OHm/66ZHemE8tYqFJ+A971R37sEJA3QLAm8MtN9glaNz9PZvBwwimIW4ZrkZhSREYaM83WQyDoceqbiv5J79elq35OsMwJPelmW5kKdW1d6r+aPTP6QyR1qq8L3x7ncoK690tnbtA8=,iv:mbXVZQ5FasPuN6I8VN26KPcews7fYUxL5VB+q+WI/NI=,tag:pFku2TL4CPfpetG2ebgbxA==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.0
|
21
secrets/prismo/secrets.yaml
Normal file
21
secrets/prismo/secrets.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
test: ENC[AES256_GCM,data:MtSN,iv:ag/LDkk0DgE6QPjB/08RhEw3LzQHDOkRH0/4OBn8KUU=,tag:FeiJfjtbd4MCwNmCezH44A==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhaGtaL0tkVFFuTk9ka0Rz
|
||||
bHRpN0UyZFQxTG1ZSTRxSmI4eHJhbVM1ZWs0Cmx5UkdrSFNsRGU1eWRyU0hEcElH
|
||||
WWJLWHdNTVR4RVpGYlcwMlJ4b2J5eHcKLS0tIGkrTWpNdVdERHpvaHZRdGxHN1Mr
|
||||
WDJGWFA1M2kxQ1hHKzRwRTY4WUZwN2MKQIT//FEdXYWfEkI1knDD3uN+KMaIDtmR
|
||||
H64031YMvAh67fVGekRv72S5DWzrft/Zr2libKpsN7T4G9fxGihhEw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-10-02T20:56:45Z"
|
||||
mac: ENC[AES256_GCM,data:WQKHFMPmEvDTHS4eYYVcpsX7j8Xef9SV0VKNAbQh0hnZPMJEll4jtzR8sub2tUEt9/I1PvngXMWz6pPmINwOKRI+L3+gTSdg9QgPiikjE6wDA2qbpv9pd14uH22ABmCjkTeEZ9R+b9KbBl0GtMQof1sdTL9nUDrr9Fyfrr/UXs4=,iv:4DgDhwb2ksh2THtR/H5PiO57vF4yKSZ6FyCjWBqCQQI=,tag:dczk4ZAI8k6dareobGmt/w==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.0
|
25
secrets/torjus/secret.yaml
Normal file
25
secrets/torjus/secret.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
gotify_backup_home: ENC[AES256_GCM,data:DV22pltF1db7mP8dK4fb,iv:487nKwVToOX2KSBmz3pp1T0wwi2JTMZzwH2arp8DatA=,tag:uVmONZ1fznTXDxySh+xXvA==,type:str]
|
||||
sonarr_api_key: ENC[AES256_GCM,data:mg19hxs+DY6wsLjt4FupjavwmnmMJAP2Us5i1Rt/yyk=,iv:6thnP4JSsi51IdEdKXX60OeT2Xr5qMplwsKlk8XTOg8=,tag:cAkhxe2Fjdudzy/WZ6bNqg==,type:str]
|
||||
sonarr_base_url: ENC[AES256_GCM,data:0HiHIX4KcPEE62Ti1fLH230rC1A7xYg=,iv:mkAnl6t2H5xP9RPjTsbSZkfbrgli/7XKnPE5aGuZpTo=,tag:P2osFM60Jk8qkXJgLaGpjg==,type:str]
|
||||
radarr_api_key: ENC[AES256_GCM,data:Db1ISKTF+m2H1on55/4vdGticfqBdxfIzKHBxC9LAx4=,iv:NhiG4SmsRYIunW1ljFbxeHvRoi9fOVE+9DJn6kmZ6oI=,tag:DoJzo56CW3kJlySYmB8NYQ==,type:str]
|
||||
radarr_base_url: ENC[AES256_GCM,data:3UgOPQMblYhm0ysRB6VVosvZToIM5IA=,iv:o/s0bVBrjrma2Df2LlCCFL5Ks80063/4mABc6vzDrYg=,tag:eHKntLPM9yRRkMfIWSpIdg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1lznyk4ee7e7x8n92cq2n87kz9920473ks5u9jlhd3dczfzq4wamqept56u
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBDdDRDc0UvaWY4U0loZzQ0
|
||||
bDZCMitGbGVYaGJyUXNrZGpnZHJlWHRkK3drCnJ2TlovSUI0OEVrV2FBbVdlSm1z
|
||||
OE9lYXNMSXpCS0NMSkZDcjhtWENOUTAKLS0tIEZFMnVqcktwWkR5VHBGQXdobXlp
|
||||
Q3gxalhGVjNlS3B3YlFsK0VQMUFITEUKE87+RpOG6ucXHHQ0DMQ9F3yo0n1aXbv7
|
||||
OX5ibHU7RroUQwFmDj87u59VUTvpWRQjsBW4c4WrZRk9KcjwinZZZQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-04-25T19:19:54Z"
|
||||
mac: ENC[AES256_GCM,data:VGBiDi71DHAXLhi7XC0XSTqnSwcJXv1Lj53qriFER7BXXZNPUdbeknlYR+KMdL3hgKGiK+ElWK5foDAy6jpl1H3U7Y9B4d40pVZSzEoN+fCwUgfP+yym1HwKZZoJok2ksXZIL4MZyZSNS+ONjDeFEcyHobIx8pRThxic3CcvptI=,iv:QwnFcYeIWibx5q8C/ur1eE8F9vbyGHg5raInDHBoyVs=,tag:JJWEYAyVhfny4hWrKBAKig==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
@@ -1 +1,14 @@
|
||||
{ imports = [ ./podman.nix ./fonts.nix ./users.nix ./services.nix ./security.nix ]; }
|
||||
{
|
||||
imports = [
|
||||
./fonts.nix
|
||||
./fwupd.nix
|
||||
./git.nix
|
||||
./greetd.nix
|
||||
./libvirt.nix
|
||||
./podman.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./users.nix
|
||||
./label.nix
|
||||
];
|
||||
}
|
||||
|
@@ -1,13 +1,23 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ twemoji-color-font ];
|
||||
fonts.packages = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
font-awesome
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"JetBrainsMono"
|
||||
"FiraCode"
|
||||
"DroidSansMono"
|
||||
"DejaVuSansMono"
|
||||
];
|
||||
})
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
noto-fonts-monochrome-emoji
|
||||
source-sans-pro
|
||||
twemoji-color-font
|
||||
font-awesome
|
||||
];
|
||||
}
|
||||
|
6
system/fwupd.nix
Normal file
6
system/fwupd.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.fwupd = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
7
system/git.nix
Normal file
7
system/git.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
};
|
||||
}
|
12
system/greetd.nix
Normal file
12
system/greetd.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd \"dbus-run-session Hyprland\"";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
system/label.nix
Normal file
19
system/label.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
flakeRev = if (self ? shortRev) then self.shortRev else "dirty";
|
||||
flakeMod = if (self ? lastModifiedDate) then self.lastModifiedDate else "";
|
||||
flakeRevCount = if (self ? revCount) then builtins.toString self.revCount else "";
|
||||
tagGit = "rev:" + flakeRev + ":" + flakeRevCount;
|
||||
tagMod = "mod:" + flakeMod;
|
||||
label = flakeRevCount + "-" + flakeRev;
|
||||
in
|
||||
{
|
||||
system.nixos.tags = [
|
||||
tagGit
|
||||
tagMod
|
||||
];
|
||||
system.nixos.label = label;
|
||||
}
|
14
system/libvirt.nix
Normal file
14
system/libvirt.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
37
system/monitoring.nix
Normal file
37
system/monitoring.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
prometheus-node-exporter
|
||||
prometheus-systemd-exporter
|
||||
];
|
||||
|
||||
systemd.services."node-exporter" = {
|
||||
enable = true;
|
||||
unitConfig = {
|
||||
Description = "Prometheus Node Exporter";
|
||||
After = [ "network.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.prometheus-node-exporter}/bin/node_exporter";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
systemd.services."systemd-exporter" = {
|
||||
enable = true;
|
||||
unitConfig = {
|
||||
Description = "Prometheus Systemd Exporter";
|
||||
After = [ "network.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.prometheus-systemd-exporter}/bin/systemd_exporter";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
9100
|
||||
9558
|
||||
8989
|
||||
];
|
||||
}
|
@@ -2,9 +2,11 @@
|
||||
|
||||
{
|
||||
virtualisation = {
|
||||
containers.enable = true;
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,7 +1,14 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable sudo
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = false;
|
||||
};
|
||||
|
||||
# Enable polkit
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Enable rtkit
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
pipewire = {
|
||||
@@ -7,5 +8,11 @@
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
locate = {
|
||||
enable = true;
|
||||
package = pkgs.plocate;
|
||||
localuser = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user