Compare commits
126 Commits
skycam
...
fd49cc75b1
Author | SHA1 | Date | |
---|---|---|---|
fd49cc75b1
|
|||
242d87fbf7
|
|||
87ec801acf
|
|||
84105829b1
|
|||
00d8cdf92b
|
|||
0473348ad2
|
|||
5a8b6bc354
|
|||
ccb57f954e
|
|||
c3283314b7
|
|||
328a50c365
|
|||
b00cd5c2b3
|
|||
404e747037
|
|||
ee346f40b3
|
|||
f237ba2c0b
|
|||
33ba1c7ebe
|
|||
ebb790a20d
|
|||
ec20e57c4c
|
|||
0e4ad54430
|
|||
0763facbc4
|
|||
03f14d2cba
|
|||
5eba7a839f
|
|||
b6f46aaa74
|
|||
8e291e7af5
|
|||
34a3d27cf9
|
|||
f268e51c91
|
|||
f6a49c3fef
|
|||
83b3b41ad1
|
|||
a7ddd3b7f2
|
|||
5145f91894
|
|||
91391935d4
|
|||
6634835230
|
|||
fe78f556bf
|
|||
5da17626d7
|
|||
a0ae046c21
|
|||
33cc89e3fe
|
|||
764096b425
|
|||
69c3e90826
|
|||
b55db2cbf9
|
|||
7e6649d242
|
|||
b9c9efd50c
|
|||
b8056c578c
|
|||
3c00b0ebd8
|
|||
2ddd86a8aa
|
|||
c4cf50c5ba
|
|||
0ce93a2d87
|
|||
4922eaf378
|
|||
139bcc8fe1
|
|||
74f91d2338
|
|||
8bb21d349b
|
|||
e316405016
|
|||
2ebf32ee13
|
|||
0316e1c845
|
|||
20e5602a47
|
|||
b3d9d580f4
|
|||
5cb5502ed1
|
|||
0d4edb3a21
|
|||
cf8b1fb1e2
|
|||
45253ee88e
|
|||
8768b4603b
|
|||
0af8802458
|
|||
0137c573ce
|
|||
973ec145c4
|
|||
6191a052f1
|
|||
d6fd7cf11c
|
|||
637c14b4ef
|
|||
02ceb375ff
|
|||
2f9a29d5ec
|
|||
48fb2b6ed7
|
|||
517cb6b040
|
|||
0f5d6947d2
|
|||
da501ec2ef
|
|||
9c961593a9
|
|||
117ed99bd2
|
|||
48c3d713f0
|
|||
697e1c8d43
|
|||
928e0c55e4
|
|||
94c58ca9dc
|
|||
4b44ba69d5
|
|||
1444cb7058
|
|||
ecf1bab2b0
|
|||
8ff1b4d05d
|
|||
6cecf2519e
|
|||
cd616653f3
|
|||
f91c0a33e2
|
|||
e5685cb361
|
|||
1f911b0bcb
|
|||
3338ebf695
|
|||
a685860680
|
|||
e35154a5ea
|
|||
367d5f08a1
|
|||
decc27afd7
|
|||
bdd73f1ef8
|
|||
a3d1b16bec
|
|||
b70b4cd14f
|
|||
36a6ccf65c
|
|||
2def8145b4
|
|||
413869266e
|
|||
0cb2740a86
|
|||
3a77365452
|
|||
8ca88da93a
|
|||
cf6898565b
|
|||
cc97ede099
|
|||
6ddb31c36f
|
|||
b74bfc9683
|
|||
19dbe4c226
|
|||
a0bb510d8d
|
|||
fdfacc0f97
|
|||
6eed6303f2
|
|||
1cb6482106
|
|||
3323f930d3
|
|||
37d56b613e
|
|||
6205824c0d
|
|||
b613c266ed
|
|||
c9fa49b24d
|
|||
064f180528
|
|||
3f36be6cb7
|
|||
ab23bb3b76
|
|||
533397fc21
|
|||
7943e063c2
|
|||
91d66003aa
|
|||
ecf34dbc89
|
|||
08c9a6ae19
|
|||
0c564903ab
|
|||
ad9f4e52ef
|
|||
a96d5a9aeb
|
|||
d57d70bbbf
|
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (C) 2023 by Jordan Holt <jordan@vimium.com>
|
||||
Copyright (C) 2025 by Jordan Holt <jordan@vimium.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
@ -6,8 +6,8 @@ System and user configuration for NixOS-based systems.
|
||||
|-|-|
|
||||
| **Shell:** | zsh |
|
||||
| **DE:** | GNOME |
|
||||
| **Theme:** | adwaita |
|
||||
| **Terminal:** | Console |
|
||||
| **Theme:** | Adwaita |
|
||||
| **Terminal:** | Ptyxis |
|
||||
|
||||
## Provisioning a new host
|
||||
> [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) is the module used
|
||||
@ -52,4 +52,3 @@ tailscale up --login-server https://headscale.vimium.net
|
||||
then visit the URL, SSH onto `vps1` and run `headscale --user mesh nodes register --key <key>`.
|
||||
|
||||
The new node can optionally be given a friendly name with `headscale node rename -i <index> <hostname>`.
|
||||
|
||||
|
454
flake.lock
generated
454
flake.lock
generated
@ -8,11 +8,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722339003,
|
||||
"narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=",
|
||||
"lastModified": 1736955230,
|
||||
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7",
|
||||
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -66,11 +66,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718194053,
|
||||
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
|
||||
"lastModified": 1727447169,
|
||||
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
|
||||
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -87,11 +87,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722113426,
|
||||
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||
"lastModified": 1735644329,
|
||||
"narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||
"rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -107,11 +107,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722821805,
|
||||
"narHash": "sha256-FGrUPUD+LMDwJsYyNSxNIzFMldtCm8wXiQuyL2PHSrM=",
|
||||
"lastModified": 1737038063,
|
||||
"narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "0257e44f4ad472b54f19a6dd1615aee7fa48ed49",
|
||||
"rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -123,11 +123,11 @@
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1721276923,
|
||||
"narHash": "sha256-HJKuwVvi+yGv+8n9Ez4EwaJA0B79JRss9J30vpgy/GI=",
|
||||
"lastModified": 1736899990,
|
||||
"narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "cc70ec20e2775df7cd2bccdd20dcdecc3e0a733b",
|
||||
"rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -206,11 +206,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"lastModified": 1736143030,
|
||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -219,25 +219,42 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721042469,
|
||||
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
|
||||
"lastModified": 1735882644,
|
||||
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
|
||||
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -285,6 +302,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -313,16 +351,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720042825,
|
||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||
"lastModified": 1736373539,
|
||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@ -335,20 +373,48 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720042825,
|
||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||
"lastModified": 1736373539,
|
||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729958008,
|
||||
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.0.6",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kvlibadwaita": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -365,40 +431,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"libcamera-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718617480,
|
||||
"narHash": "sha256-qqEMJzMotybf1nJp1dsz3zc910Qj0TmqCm1CwuSb1VY=",
|
||||
"owner": "raspberrypi",
|
||||
"repo": "libcamera",
|
||||
"rev": "6ddd79b5bdbedc1f61007aed35391f1559f9e29a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "raspberrypi",
|
||||
"repo": "libcamera",
|
||||
"rev": "6ddd79b5bdbedc1f61007aed35391f1559f9e29a",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"libpisp-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1718613892,
|
||||
"narHash": "sha256-V/d4RrXoq8HNc8r/Kr1gH3E7YTZzfIdgbaJtq/Xi7uQ=",
|
||||
"owner": "raspberrypi",
|
||||
"repo": "libpisp",
|
||||
"rev": "b567f04556801ca350331ed21a1ae3eef4675c23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "raspberrypi",
|
||||
"ref": "v1.0.6",
|
||||
"repo": "libpisp",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -407,11 +439,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722609272,
|
||||
"narHash": "sha256-Kkb+ULEHVmk07AX+OhwyofFxBDpw+2WvsXguUS2m6e4=",
|
||||
"lastModified": 1736370755,
|
||||
"narHash": "sha256-iWcjToBpx4PUd74uqvIGAfqqVfyrvRLRauC/SxEKIF0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "f7142b8024d6b70c66fd646e1d099d3aa5bfec49",
|
||||
"rev": "57733bd1dc81900e13438e5b4439239f1b29db0e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -422,11 +454,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1722332872,
|
||||
"narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=",
|
||||
"lastModified": 1736978406,
|
||||
"narHash": "sha256-oMr3PVIQ8XPDI8/x6BHxsWEPBRU98Pam6KGVwUh8MPk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "14c333162ba53c02853add87a0000cbd7aa230c2",
|
||||
"rev": "b678606690027913f3434dea3864e712b862dde5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -442,20 +474,18 @@
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-24_05": "nixpkgs-24_05",
|
||||
"utils": "utils_2"
|
||||
"nixpkgs-24_11": "nixpkgs-24_11"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718084203,
|
||||
"narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=",
|
||||
"lastModified": 1735230346,
|
||||
"narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"rev": "29916981e7b3b5782dc5085ad18490113f8ff63b",
|
||||
"rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixos-mailserver",
|
||||
"type": "gitlab"
|
||||
}
|
||||
@ -476,28 +506,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-24_05": {
|
||||
"nixpkgs-24_11": {
|
||||
"locked": {
|
||||
"lastModified": 1717144377,
|
||||
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
|
||||
"lastModified": 1734083684,
|
||||
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
|
||||
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-24.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1722630782,
|
||||
"narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=",
|
||||
"lastModified": 1737062831,
|
||||
"narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d04953086551086b44b6f3c6b7eeb26294f207da",
|
||||
"rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -524,35 +554,19 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1722791413,
|
||||
"narHash": "sha256-rCTrlCWvHzMCNcKxPE3Z/mMK2gDZ+BvvpEVyRM4tKmU=",
|
||||
"lastModified": 1736916166,
|
||||
"narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8b5b6723aca5a51edf075936439d9cd3947b7b2c",
|
||||
"rev": "e24b4c09e963677b1beea49d411cd315a024ad3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-24.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1722651103,
|
||||
"narHash": "sha256-IRiJA0NVAoyaZeKZluwfb2DoTpBAj+FLI0KfybBeDU0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a633d89c6dc9a2a8aae11813a62d7c58b2c0cc51",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
@ -564,23 +578,47 @@
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722688115,
|
||||
"narHash": "sha256-Ubk5KzAp2Z4Dzmi81aGgabvy41QXjZMwNikDYm7+jS0=",
|
||||
"lastModified": 1737141914,
|
||||
"narHash": "sha256-Lq7PWAD+edeIpZKM7aresrwON+Tdo3OMu1S2YX8AjjM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "4e6974c619bd280789ef3697a73fcf7c20f70819",
|
||||
"rev": "c2ee71c814c9427d4991b9d58d412add9c5a1c56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735854821,
|
||||
"narHash": "sha256-Iv59gMDZajNfezTO0Fw6LHE7uKAShxbvMidmZREit7c=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "836908e3bddd837ae0f13e215dd48767aee355f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
@ -591,11 +629,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722804745,
|
||||
"narHash": "sha256-l6N3QaiDqN2QmHDAxjczQPLPCTv+Kp7PsrtJBltmhTo=",
|
||||
"lastModified": 1736549395,
|
||||
"narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "61d9342fb471cd3c45a047406428fba7b6fb49ad",
|
||||
"rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -604,30 +642,25 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"raspberry-pi-nix": {
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"libcamera-src": "libcamera-src",
|
||||
"libpisp-src": "libpisp-src",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"rpi-bluez-firmware-src": "rpi-bluez-firmware-src",
|
||||
"rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src",
|
||||
"rpi-firmware-src": "rpi-firmware-src",
|
||||
"rpi-linux-6_10_0-rc5-src": "rpi-linux-6_10_0-rc5-src",
|
||||
"rpi-linux-6_6_31-src": "rpi-linux-6_6_31-src",
|
||||
"rpicam-apps-src": "rpicam-apps-src",
|
||||
"u-boot-src": "u-boot-src"
|
||||
"flake-compat": "flake-compat_4",
|
||||
"gitignore": "gitignore_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722525809,
|
||||
"narHash": "sha256-LTCbMSKbSHvKubfXolss39UeTKDIoP9wWTyXV/tDPHU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "raspberry-pi-nix",
|
||||
"rev": "35bb455fdeb495043a94433f67e05fa88980cdad",
|
||||
"lastModified": 1737043064,
|
||||
"narHash": "sha256-I/OuxGwXwRi5gnFPsyCvVR+IfFstA+QXEpHu1hvsgD8=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "94ee657f6032d913fe0ef49adaa743804635b0bb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "raspberry-pi-nix",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@ -646,121 +679,19 @@
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nixvim": "nixvim",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"raspberry-pi-nix": "raspberry-pi-nix",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"secrets": "secrets",
|
||||
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
|
||||
}
|
||||
},
|
||||
"rpi-bluez-firmware-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1708969706,
|
||||
"narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=",
|
||||
"owner": "RPi-Distro",
|
||||
"repo": "bluez-firmware",
|
||||
"rev": "78d6a07730e2d20c035899521ab67726dc028e1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "RPi-Distro",
|
||||
"ref": "bookworm",
|
||||
"repo": "bluez-firmware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rpi-firmware-nonfree-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1708967191,
|
||||
"narHash": "sha256-BGq0+cr+xBRwQM/LqiQuRWuZpQsKM5jfcrNCqWMuVzM=",
|
||||
"owner": "RPi-Distro",
|
||||
"repo": "firmware-nonfree",
|
||||
"rev": "223ccf3a3ddb11b3ea829749fbbba4d65b380897",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "RPi-Distro",
|
||||
"ref": "bookworm",
|
||||
"repo": "firmware-nonfree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rpi-firmware-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716978780,
|
||||
"narHash": "sha256-KsCo7ZG6vKstxRyFljZtbQvnDSqiAPdUza32xTY/tlA=",
|
||||
"owner": "raspberrypi",
|
||||
"repo": "firmware",
|
||||
"rev": "3590de0c181d433af368a95f15bc480bdaff8b47",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "raspberrypi",
|
||||
"ref": "1.20240529",
|
||||
"repo": "firmware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rpi-linux-6_10_0-rc5-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719265450,
|
||||
"narHash": "sha256-xd/Pz/uZFYW9hJIFKryWDE9Aks6f2EIvEDCmfk0C70c=",
|
||||
"owner": "raspberrypi",
|
||||
"repo": "linux",
|
||||
"rev": "f61d3aca8045e70d64b55f7b98f083738f639ad2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "raspberrypi",
|
||||
"ref": "rpi-6.10.y",
|
||||
"repo": "linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rpi-linux-6_6_31-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716545726,
|
||||
"narHash": "sha256-UWUTeCpEN7dlFSQjog6S3HyEWCCnaqiUqV5KxCjYink=",
|
||||
"owner": "raspberrypi",
|
||||
"repo": "linux",
|
||||
"rev": "c1432b4bae5b6582f4d32ba381459f33c34d1424",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "raspberrypi",
|
||||
"ref": "stable_20240529",
|
||||
"repo": "linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rpicam-apps-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1717081637,
|
||||
"narHash": "sha256-s4zJh6r3VhiquO54KWZ78dVCH1BmlphY9zEB9BidNyo=",
|
||||
"owner": "raspberrypi",
|
||||
"repo": "rpicam-apps",
|
||||
"rev": "49344f2a8d1817558d4e6463032fcf11be618b38",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "raspberrypi",
|
||||
"ref": "v1.5.0",
|
||||
"repo": "rpicam-apps",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1722712220,
|
||||
"narHash": "sha256-gEmbk/DROfVZ+v/BAZHDloHzS0KdqIzxtW7z9g2eH4Y=",
|
||||
"lastModified": 1730732927,
|
||||
"narHash": "sha256-t3MTEgi6O7DMxMjdi3xcTAztLDQmEtqQ+oU+ZbWz2AI=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "dfe0e95be5ef539bf28602ff47beeea26cc4d1b8",
|
||||
"revCount": 22,
|
||||
"rev": "4ae2ac777c38f60a29384b70c456f41847cdf1b5",
|
||||
"revCount": 28,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||
},
|
||||
@ -817,11 +748,11 @@
|
||||
"thunderbird-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1721874544,
|
||||
"narHash": "sha256-BHW9jlx92CsHY84FT0ce5Vxl0KFheLhNn2vndcIf7no=",
|
||||
"lastModified": 1732643121,
|
||||
"narHash": "sha256-i0Uo5EN45rlGuR85hvPet43zW/thOQTwHypVg9shTHU=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "thunderbird-gnome-theme",
|
||||
"rev": "628fcccb7788e3e0ad34f67114f563c87ac8c1dc",
|
||||
"rev": "1994e7ec0649053e2a0811973245758d41e33f5f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -838,11 +769,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722330636,
|
||||
"narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
|
||||
"lastModified": 1736154270,
|
||||
"narHash": "sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
|
||||
"rev": "13c913f5deb3a5c08bb810efd89dc8cb24dd968b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -851,19 +782,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"u-boot-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1712055538,
|
||||
"narHash": "sha256-IlaDdjKq/Pq2orzcU959h93WXRZfvKBGDO/MFw9mZMg=",
|
||||
"type": "tarball",
|
||||
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.04.tar.bz2"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.04.tar.bz2"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
@ -881,24 +799,6 @@
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
198
flake.nix
198
flake.nix
@ -2,7 +2,7 @@
|
||||
description = "NixOS system configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||
nixpkgs.url = "nixpkgs/nixos-24.11";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
# nixpkgs-master.url = "nixpkgs";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
@ -12,7 +12,7 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
url = "github:nix-community/home-manager/release-24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
firefox-gnome-theme = {
|
||||
@ -29,11 +29,11 @@
|
||||
};
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nixos-mailserver = {
|
||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-24.05";
|
||||
url = "github:nix-community/nixvim/nixos-24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
plasma-manager = {
|
||||
@ -41,8 +41,9 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
raspberry-pi-nix = {
|
||||
url = "github:nix-community/raspberry-pi-nix";
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
secrets = {
|
||||
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
||||
@ -54,126 +55,111 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, deploy-rs, disko, home-manager, nixos-hardware, nixos-mailserver, ... }:
|
||||
outputs =
|
||||
inputs@{ self, nixpkgs, ... }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
domain = "mesh.vimium.net";
|
||||
forEachSystem = lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
mkPkgsForSystem = system: inputs.nixpkgs;
|
||||
customPkgs = forEachSystem (system:
|
||||
mkDeployNode = hostName: {
|
||||
hostname = "${hostName}.${domain}";
|
||||
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path =
|
||||
inputs.deploy-rs.lib.${
|
||||
self.nixosConfigurations.${hostName}.config.system.build.toplevel.system
|
||||
}.activate.nixos
|
||||
self.nixosConfigurations.${hostName};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
overlays = lib.packagesFromDirectoryRecursive {
|
||||
callPackage = path: overrides: import path;
|
||||
directory = ./overlays;
|
||||
};
|
||||
|
||||
legacyPackages = forEachSystem (
|
||||
system:
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
callPackage = nixpkgs.legacyPackages.${system}.callPackage;
|
||||
directory = ./pkgs;
|
||||
});
|
||||
overlays = [
|
||||
agenix.overlays.default
|
||||
(import ./overlays/gnome.nix)
|
||||
(import ./overlays/libcamera.nix)
|
||||
(
|
||||
final: prev: {
|
||||
unstable = import inputs.nixpkgs-unstable { system = final.system; };
|
||||
}
|
||||
)
|
||||
];
|
||||
commonModules = [
|
||||
agenix.nixosModules.age
|
||||
disko.nixosModules.disko
|
||||
nixos-mailserver.nixosModule
|
||||
home-manager.nixosModule
|
||||
./modules
|
||||
];
|
||||
mkNixosSystem = { system, name, extraModules ? [] }:
|
||||
let
|
||||
nixpkgs = mkPkgsForSystem system;
|
||||
lib = (import nixpkgs { inherit overlays system; }).lib;
|
||||
in
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit lib system;
|
||||
specialArgs = { modulesPath = toString (nixpkgs + "/nixos/modules"); inherit inputs; };
|
||||
baseModules = import (nixpkgs + "/nixos/modules/module-list.nix");
|
||||
modules = commonModules ++ [
|
||||
({ config, ... }:
|
||||
);
|
||||
|
||||
nixosConfigurations = lib.pipe ./hosts [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (name: value: value == "directory"))
|
||||
(lib.mapAttrs (
|
||||
name: value:
|
||||
lib.nixosSystem {
|
||||
specialArgs = { inherit self; };
|
||||
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.pkgs = import nixpkgs {
|
||||
inherit overlays system;
|
||||
config.allowUnfree = true;
|
||||
config.nvidia.acceptLicense = true;
|
||||
networking = {
|
||||
inherit domain;
|
||||
hostName = name;
|
||||
};
|
||||
networking.hostName = name;
|
||||
})
|
||||
}
|
||||
./hosts/${name}
|
||||
] ++ extraModules;
|
||||
};
|
||||
in
|
||||
{
|
||||
legacyPackages = forEachSystem (system:
|
||||
lib.packagesFromDirectoryRecursive {
|
||||
callPackage = nixpkgs.legacyPackages.${system}.callPackage;
|
||||
directory = ./pkgs;
|
||||
});
|
||||
|
||||
nixosConfigurations = {
|
||||
atlas = mkNixosSystem { system = "x86_64-linux"; name = "atlas"; };
|
||||
eos = mkNixosSystem { system = "x86_64-linux"; name = "eos"; };
|
||||
helios = mkNixosSystem { system = "x86_64-linux"; name = "helios"; };
|
||||
hypnos = mkNixosSystem { system = "x86_64-linux"; name = "hypnos"; };
|
||||
library = mkNixosSystem { system = "x86_64-linux"; name = "library"; };
|
||||
mail = mkNixosSystem { system = "x86_64-linux"; name = "mail"; };
|
||||
odyssey = mkNixosSystem { system = "x86_64-linux"; name = "odyssey"; };
|
||||
pi = mkNixosSystem { system = "aarch64-linux"; name = "pi"; extraModules = [ nixos-hardware.nixosModules.raspberry-pi-4 ]; };
|
||||
skycam = mkNixosSystem { system = "aarch64-linux"; name = "skycam"; extraModules = [ inputs.raspberry-pi-nix.nixosModules.raspberry-pi ]; };
|
||||
vps1 = mkNixosSystem { system = "x86_64-linux"; name = "vps1"; };
|
||||
};
|
||||
|
||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||
buildInputs = [
|
||||
deploy-rs.packages.x86_64-linux.deploy-rs
|
||||
];
|
||||
}
|
||||
))
|
||||
];
|
||||
|
||||
checks =
|
||||
builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib
|
||||
// (forEachSystem (system: {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
check-case-conflicts.enable = true;
|
||||
check-executables-have-shebangs.enable = true;
|
||||
check-merge-conflicts.enable = true;
|
||||
deadnix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
noLambdaArg = true;
|
||||
};
|
||||
};
|
||||
detect-private-keys.enable = true;
|
||||
end-of-file-fixer.enable = true;
|
||||
fix-byte-order-marker.enable = true;
|
||||
mixed-line-endings.enable = true;
|
||||
nixfmt-rfc-style.enable = true;
|
||||
trim-trailing-whitespace.enable = true;
|
||||
};
|
||||
};
|
||||
}));
|
||||
|
||||
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
||||
|
||||
devShells = forEachSystem (system: {
|
||||
default = nixpkgs.legacyPackages.${system}.mkShell {
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
buildInputs = [
|
||||
inputs.agenix.packages.${system}.agenix
|
||||
inputs.deploy-rs.packages.${system}.deploy-rs
|
||||
] ++ self.checks.${system}.pre-commit-check.enabledPackages;
|
||||
};
|
||||
});
|
||||
|
||||
deploy = {
|
||||
magicRollback = true;
|
||||
autoRollback = true;
|
||||
sshUser = "root";
|
||||
nodes = {
|
||||
mail = {
|
||||
hostname = "mail.mesh.vimium.net";
|
||||
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mail;
|
||||
nodes = lib.genAttrs [
|
||||
"mail"
|
||||
# "pi"
|
||||
# "skycam"
|
||||
"vps1"
|
||||
] mkDeployNode;
|
||||
};
|
||||
};
|
||||
vps1 = {
|
||||
hostname = "vps1.mesh.vimium.net";
|
||||
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vps1;
|
||||
};
|
||||
};
|
||||
pi = {
|
||||
hostname = "10.0.1.191";
|
||||
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.pi;
|
||||
};
|
||||
};
|
||||
skycam = {
|
||||
hostname = "10.0.1.146";
|
||||
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.skycam;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,6 +6,8 @@
|
||||
../desktop.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
@ -20,29 +22,22 @@
|
||||
users.extraGroups.vboxusers.members = [ "jordan" ];
|
||||
|
||||
modules = {
|
||||
desktop = {
|
||||
apps = {
|
||||
qbittorrent.enable = true;
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
browsers = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
media.graphics = {
|
||||
raster.enable = true;
|
||||
vector.enable = true;
|
||||
};
|
||||
office.libreoffice.enable = true;
|
||||
};
|
||||
programs = {
|
||||
dev = {
|
||||
node.enable = true;
|
||||
};
|
||||
editors = {
|
||||
neovim.enable = true;
|
||||
};
|
||||
security = {
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
gpg.enable = true;
|
||||
graphics = {
|
||||
raster.enable = true;
|
||||
vector.enable = true;
|
||||
};
|
||||
libreoffice.enable = true;
|
||||
neovim.enable = true;
|
||||
pass.enable = true;
|
||||
qbittorrent.enable = true;
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
services = {
|
||||
borgmatic = {
|
||||
@ -54,7 +49,6 @@
|
||||
};
|
||||
};
|
||||
shell = {
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,7 +11,14 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
initrd.supportedFilesystems = [ "zfs" ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
|
@ -1,6 +1,25 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
self.inputs.agenix.nixosModules.age
|
||||
self.inputs.home-manager.nixosModule
|
||||
../modules/home-manager
|
||||
../modules/nixos
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
self.inputs.agenix.overlays.default
|
||||
(import ../overlays/default.nix)
|
||||
(final: prev: {
|
||||
unstable = import self.inputs.nixpkgs-unstable { system = final.system; };
|
||||
})
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
@ -38,17 +57,21 @@
|
||||
programs.zsh.enable = true;
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
package = pkgs.nixVersions.stable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "10.0.1.79";
|
||||
sshUser = "builder";
|
||||
sshUser = "root";
|
||||
system = "aarch64-linux";
|
||||
maxJobs = 6;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = [
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
];
|
||||
}
|
||||
];
|
||||
distributedBuilds = true;
|
||||
@ -62,12 +85,10 @@
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"http://odyssey.mesh.vimium.net"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"odyssey.mesh.vimium.net:ZhQhjscPWjoN4rlZwoMELznEiBnZ9O26iyGA27ibilQ="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
|
@ -1,14 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
];
|
||||
|
||||
services.printing.enable = true;
|
||||
nixpkgs.overlays = [
|
||||
(import ../overlays/gnome.nix)
|
||||
];
|
||||
|
||||
services.printing.enable = false;
|
||||
services.openssh.startWhenNeeded = true;
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@ -45,12 +48,19 @@
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
(nerdfonts.override { fonts = [ "BigBlueTerminal" "ComicShannsMono" "Terminus" "UbuntuMono" ]; })
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"BigBlueTerminal"
|
||||
"ComicShannsMono"
|
||||
"Terminus"
|
||||
"UbuntuMono"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
modules = {
|
||||
desktop.gnome.enable = true;
|
||||
networking.tailscale.enable = true;
|
||||
system.desktop.gnome.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,6 +6,8 @@
|
||||
../desktop.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
@ -23,24 +25,18 @@
|
||||
};
|
||||
|
||||
modules = {
|
||||
desktop = {
|
||||
apps.qbittorrent.enable = true;
|
||||
browsers = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
dev = {
|
||||
node.enable = true;
|
||||
};
|
||||
editors = {
|
||||
neovim.enable = true;
|
||||
};
|
||||
security = {
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
gpg.enable = true;
|
||||
neovim.enable = true;
|
||||
pass.enable = true;
|
||||
qbittorrent.enable = true;
|
||||
};
|
||||
shell = {
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,12 +11,19 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
initrd.kernelModules = [ ];
|
||||
initrd.availableKernelModules = [
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
initrd.supportedFilesystems = [ "zfs" ];
|
||||
kernelModules = [ ];
|
||||
kernel.sysctl = {
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"vm.laptop_mode" = 5;
|
||||
};
|
||||
kernelParams = [ "elevator=none" ];
|
||||
extraModulePackages = [ ];
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,6 +6,8 @@
|
||||
../desktop.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
boot = {
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
@ -20,21 +22,16 @@
|
||||
};
|
||||
|
||||
modules = {
|
||||
desktop = {
|
||||
apps.qbittorrent.enable = true;
|
||||
browsers = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
dev = {
|
||||
node.enable = true;
|
||||
};
|
||||
editors = {
|
||||
neovim.enable = true;
|
||||
};
|
||||
security = {
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
gpg.enable = true;
|
||||
neovim.enable = true;
|
||||
pass.enable = true;
|
||||
qbittorrent.enable = true;
|
||||
};
|
||||
services = {
|
||||
borgmatic = {
|
||||
@ -46,7 +43,6 @@
|
||||
};
|
||||
};
|
||||
shell = {
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,7 +11,15 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "zfs" ];
|
||||
initrd.availableKernelModules = [
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
"zfs"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
initrd.supportedFilesystems = [ "zfs" ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
|
@ -99,4 +99,3 @@ index d59b0947f..81158014f 100644
|
||||
#define EFI_LOAD_FILE_PROTOCOL_GUID EFI_GUID(0x56ec3091, 0x954c, 0x11d2, 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
@ -1,12 +1,26 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
self.inputs.disko.nixosModules.disko
|
||||
./hardware-configuration.nix
|
||||
./disko-config.nix
|
||||
../desktop.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
hostPlatform = "x86_64-linux";
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
nvidia.acceptLicense = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
@ -21,7 +35,7 @@
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
displayManager = {
|
||||
defaultSession = if config.modules.desktop.kde.enable then "plasmax11" else "gnome-xorg";
|
||||
defaultSession = if config.modules.system.desktop.kde.enable then "plasmax11" else "gnome-xorg";
|
||||
sddm.wayland.enable = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
@ -30,26 +44,20 @@
|
||||
environment.sessionVariables.GSK_RENDERER = "gl";
|
||||
|
||||
modules = {
|
||||
desktop = {
|
||||
browsers = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
media.recording = {
|
||||
audio.enable = true;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
dev = {
|
||||
node.enable = true;
|
||||
};
|
||||
editors = {
|
||||
neovim.enable = true;
|
||||
};
|
||||
security = {
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
gpg.enable = true;
|
||||
neovim.enable = true;
|
||||
pass.enable = true;
|
||||
recording = {
|
||||
audio.enable = true;
|
||||
};
|
||||
};
|
||||
shell = {
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
@ -123,4 +123,3 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,8 +12,22 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ "applesmc" "kvm-intel" "wl" ];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
kernel.sysctl = {
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"vm.laptop_mode" = 5;
|
||||
};
|
||||
kernelModules = [
|
||||
"applesmc"
|
||||
"kvm-intel"
|
||||
"wl"
|
||||
];
|
||||
extraModulePackages = [
|
||||
config.boot.kernelPackages.broadcom_sta
|
||||
config.boot.kernelPackages.nvidiaPackages.legacy_470
|
||||
@ -25,14 +45,12 @@
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
opengl = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
];
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -43,4 +43,3 @@ See [Graham Christensen's article](https://grahamc.com/blog/nixos-on-zfs/#datase
|
||||
### Networks
|
||||
- DHCP on `10.0.1.0/24` subnet.
|
||||
- Tailscale on `100.64.0.0/10` subnet. FQDN: `library.mesh.vimium.net`.
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
../server.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
@ -13,7 +15,6 @@
|
||||
};
|
||||
|
||||
networking = {
|
||||
domain = "mesh.vimium.net";
|
||||
hostId = "d24ae953";
|
||||
firewall = {
|
||||
enable = true;
|
||||
@ -70,12 +71,14 @@
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
static_configs = [{
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
||||
"127.0.0.1:${toString config.services.prometheus.exporters.zfs.port}"
|
||||
];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -106,7 +109,8 @@
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
services.nginx = let
|
||||
services.nginx =
|
||||
let
|
||||
proxyConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
@ -120,7 +124,8 @@
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.openresty;
|
||||
recommendedGzipSettings = true;
|
||||
@ -155,23 +160,26 @@
|
||||
};
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
];
|
||||
driSupport = true;
|
||||
};
|
||||
users.users.jellyfin.extraGroups = [ "video" "render" ];
|
||||
users.users.jellyfin.extraGroups = [
|
||||
"video"
|
||||
"render"
|
||||
];
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.jellyfin;
|
||||
cacheDir = "/var/cache/jellyfin";
|
||||
dataDir = "/var/lib/jellyfin";
|
||||
};
|
||||
|
||||
modules = {
|
||||
podman.enable = true;
|
||||
security = {
|
||||
programs = {
|
||||
gpg.enable = true;
|
||||
};
|
||||
shell = {
|
||||
@ -191,4 +199,3 @@
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,7 +11,13 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
extraModulePackages = [ ];
|
||||
@ -65,4 +76,3 @@
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
|
@ -15,4 +15,3 @@ NVMe | `/dev/sda1` (ext4, NixOS Root)
|
||||
### Networks
|
||||
- DHCP on `10.0.1.0/24` subnet.
|
||||
- Tailscale on `100.64.0.0/10` subnet. FQDN: `mail.mesh.vimium.net`.
|
||||
|
||||
|
@ -1,15 +1,21 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
self.inputs.disko.nixosModules.disko
|
||||
./hardware-configuration.nix
|
||||
./disko-config.nix
|
||||
../server.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
networking = {
|
||||
hostId = "08ac2f14";
|
||||
domain = "mesh.vimium.net";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
|
@ -1,4 +1,7 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -7,7 +10,12 @@
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"xen_blkfront"
|
||||
"vmw_pvscsi"
|
||||
];
|
||||
kernelModules = [ "nvme" ];
|
||||
};
|
||||
loader.grub = {
|
||||
@ -19,4 +27,3 @@
|
||||
|
||||
zramSwap.enable = true;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,6 +6,14 @@
|
||||
../desktop.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
hostPlatform = "x86_64-linux";
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
nvidia.acceptLicense = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
@ -18,7 +26,10 @@
|
||||
networking = {
|
||||
hostId = "c5e68d78";
|
||||
networkmanager.enable = true;
|
||||
firewall.trustedInterfaces = [ "lxdbr0" "virbr0" ]; # Work around https://github.com/NixOS/nixpkgs/issues/263359
|
||||
firewall.trustedInterfaces = [
|
||||
"lxdbr0"
|
||||
"virbr0"
|
||||
]; # Work around https://github.com/NixOS/nixpkgs/issues/263359
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
@ -36,18 +47,17 @@
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"odyssey.mesh.vimium.net" = {
|
||||
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||
locations."/".proxyPass =
|
||||
"http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules = {
|
||||
desktop = {
|
||||
apps.qbittorrent.enable = true;
|
||||
browsers = {
|
||||
firefox.enable = true;
|
||||
programs = {
|
||||
dev = {
|
||||
node.enable = true;
|
||||
};
|
||||
gaming = {
|
||||
emulators = {
|
||||
gamecube.enable = true;
|
||||
ps2.enable = true;
|
||||
@ -56,30 +66,25 @@
|
||||
wii.enable = true;
|
||||
xbox.enable = true;
|
||||
};
|
||||
lutris.enable = true;
|
||||
};
|
||||
media.graphics = {
|
||||
firefox.enable = true;
|
||||
git.enable = true;
|
||||
gpg.enable = true;
|
||||
graphics = {
|
||||
modeling.enable = true;
|
||||
raster.enable = true;
|
||||
vector.enable = true;
|
||||
};
|
||||
media.recording = {
|
||||
libreoffice.enable = true;
|
||||
lutris.enable = true;
|
||||
pass.enable = true;
|
||||
neovim.enable = true;
|
||||
qbittorrent.enable = true;
|
||||
recording = {
|
||||
audio.enable = true;
|
||||
video.enable = true;
|
||||
};
|
||||
office.libreoffice.enable = true;
|
||||
};
|
||||
dev = {
|
||||
node.enable = true;
|
||||
};
|
||||
editors = {
|
||||
neovim.enable = true;
|
||||
};
|
||||
hardware.presonus-studio.enable = true;
|
||||
security = {
|
||||
gpg.enable = true;
|
||||
pass.enable = true;
|
||||
};
|
||||
services = {
|
||||
borgmatic = {
|
||||
enable = true;
|
||||
@ -97,7 +102,6 @@
|
||||
gitea-runner.enable = true;
|
||||
};
|
||||
shell = {
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,7 +12,14 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
initrd.supportedFilesystems = [ "zfs" ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
@ -19,6 +32,7 @@
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
|
@ -1,12 +1,17 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||
./hardware-configuration.nix
|
||||
../server.nix
|
||||
];
|
||||
|
||||
networking.hostId = "731d1660";
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
|
||||
hardware = {
|
||||
raspberry-pi."4" = {
|
||||
@ -97,7 +102,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
networking.hostId = "731d1660";
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@ -107,113 +112,8 @@
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
age.secrets."files/services/home-assistant/secrets.yaml" = {
|
||||
file = "${inputs.secrets}/files/services/home-assistant/secrets.yaml.age";
|
||||
path = "${config.services.home-assistant.configDir}/secrets.yaml";
|
||||
owner = "hass";
|
||||
group = "hass";
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = [
|
||||
"api"
|
||||
"alert"
|
||||
"auth"
|
||||
"backup"
|
||||
"command_line"
|
||||
"default_config"
|
||||
"homekit_controller"
|
||||
"homekit"
|
||||
"http"
|
||||
"icloud"
|
||||
"jellyfin"
|
||||
"metoffice"
|
||||
"mqtt"
|
||||
"onkyo"
|
||||
"ping"
|
||||
"proximity"
|
||||
"radio_browser"
|
||||
"scrape"
|
||||
"sensor"
|
||||
"system_health"
|
||||
];
|
||||
config = {
|
||||
default_config = {};
|
||||
backup = {};
|
||||
homeassistant = {
|
||||
name = "Home";
|
||||
latitude = "!secret latitude";
|
||||
longitude = "!secret longitude";
|
||||
country = "GB";
|
||||
temperature_unit = "C";
|
||||
time_zone = config.time.timeZone;
|
||||
unit_system = "metric";
|
||||
};
|
||||
mqtt = { };
|
||||
scene = "!include scenes.yaml";
|
||||
automation = "!include automations.yaml";
|
||||
system_health = { };
|
||||
recorder = {
|
||||
purge_keep_days = 365;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.mosquitto = {
|
||||
enable = true;
|
||||
listeners = [{
|
||||
acl = [ "pattern readwrite #" ];
|
||||
omitPasswordAuth = true;
|
||||
port = 1883;
|
||||
settings = {
|
||||
allow_anonymous = true;
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
|
||||
file = "${inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age";
|
||||
path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml";
|
||||
owner = "zigbee2mqtt";
|
||||
group = "zigbee2mqtt";
|
||||
};
|
||||
|
||||
services.zigbee2mqtt = {
|
||||
package = pkgs.unstable.zigbee2mqtt;
|
||||
enable = true;
|
||||
dataDir = "/var/lib/zigbee2mqtt";
|
||||
settings = {
|
||||
homeassistant = lib.optionalAttrs config.services.home-assistant.enable {
|
||||
discovery_topic = "homeassistant";
|
||||
status_topic = "hass/status";
|
||||
legacy_entity_attributes = true;
|
||||
legacy_triggers = true;
|
||||
};
|
||||
availability = true;
|
||||
frontend = true;
|
||||
device_options = {
|
||||
retain = true;
|
||||
};
|
||||
serial = {
|
||||
port = "/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0";
|
||||
};
|
||||
advanced = {
|
||||
channel = 20;
|
||||
network_key = "!secret.yaml network_key";
|
||||
pan_id = 13001;
|
||||
ext_pan_id = [ 79 1 73 47 250 136 124 222 ];
|
||||
transmit_power = 20;
|
||||
};
|
||||
mqtt = {
|
||||
version = 5;
|
||||
server = "mqtt://localhost:1883";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules = {
|
||||
networking = {
|
||||
system = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = [ "wlan0" ];
|
||||
@ -222,21 +122,20 @@
|
||||
services = {
|
||||
borgmatic = {
|
||||
enable = true;
|
||||
directories = [
|
||||
"/var/lib/mosquitto"
|
||||
"/var/lib/zigbee2mqtt"
|
||||
];
|
||||
repoPath = "ssh://qcw86s11@qcw86s11.repo.borgbase.com/./repo";
|
||||
};
|
||||
home-assistant.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Connection to ONKYO HT-R990
|
||||
networking.interfaces.end0 = {
|
||||
ipv4.addresses = [{
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "172.16.0.1";
|
||||
prefixLength = 30;
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
@ -247,4 +146,3 @@
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -6,17 +11,80 @@
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages =
|
||||
let
|
||||
version = "6.1.73";
|
||||
tag = "stable_20240124";
|
||||
srcHash = "sha256-P4ExzxWqZj+9FZr9U2tmh7rfs/3+iHEv0m74PCoXVuM=";
|
||||
in
|
||||
pkgs.linuxPackagesFor (
|
||||
pkgs.linux_rpi4.override {
|
||||
argsOverride = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "linux";
|
||||
rev = tag;
|
||||
hash = srcHash;
|
||||
};
|
||||
version = version;
|
||||
modDirVersion = version;
|
||||
structuredExtraConfig = { };
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "drm-rp1-depends-on-instead-of-select-MFD_RP1.patch";
|
||||
patch = pkgs.fetchpatch {
|
||||
url = "https://github.com/peat-psuwit/rpi-linux/commit/6de0bb51929cd3ad4fa27b2a421a2af12e6468f5.patch";
|
||||
hash = "sha256-9pHcbgWTiztu48SBaLPVroUnxnXMKeCGt5vEo9V8WGw=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "iommu-bcm2712-don-t-allow-building-as-module.patch";
|
||||
patch = pkgs.fetchpatch {
|
||||
url = "https://github.com/peat-psuwit/rpi-linux/commit/693a5e69bddbcbe1d1b796ebc7581c3597685b1b.patch";
|
||||
hash = "sha256-8BYYQDM5By8cTk48ASYKJhGVQnZBIK4PXtV70UtfS+A=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
# Stop ZFS kernel being built
|
||||
supportedFilesystems = lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" ];
|
||||
supportedFilesystems = lib.mkForce [
|
||||
"btrfs"
|
||||
"cifs"
|
||||
"f2fs"
|
||||
"jfs"
|
||||
"ntfs"
|
||||
"reiserfs"
|
||||
"vfat"
|
||||
"xfs"
|
||||
];
|
||||
tmp.cleanOnBoot = true;
|
||||
};
|
||||
|
||||
# Fix missing modules
|
||||
# https://github.com/NixOS/nixpkgs/issues/154163
|
||||
nixpkgs.overlays = [
|
||||
(final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // { allowMissing = true; });
|
||||
(final: prev: {
|
||||
makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
|
||||
})
|
||||
(final: prev: {
|
||||
raspberrypifw =
|
||||
let
|
||||
version = "1.20240529";
|
||||
srcHash = "sha256-KsCo7ZG6vKstxRyFljZtbQvnDSqiAPdUza32xTY/tlA=";
|
||||
in
|
||||
pkgs.raspberrypifw.override {
|
||||
argsOverride = {
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "firmware";
|
||||
rev = "${version}";
|
||||
hash = srcHash;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
@ -28,4 +96,3 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -54,7 +56,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
modules.networking.tailscale = {
|
||||
modules.services.tailscale = {
|
||||
enable = true;
|
||||
restrictSSH = false;
|
||||
};
|
||||
|
@ -20,3 +20,9 @@ SD card | `/dev/mmcblk0` (ext4, NixOS Root)
|
||||
## Devices and connections
|
||||
- Camera Module 3 with wide-angle lens
|
||||
|
||||
## Building
|
||||
To generate a compressed SD card image for Skycam, run:
|
||||
`nix build '.#nixosConfigurations.skycam.config.system.build.sdImage'`
|
||||
|
||||
Once a card is imaged, the existing SSH host keys should be copied to
|
||||
`/etc/ssh` manually to enable secret decryption.
|
||||
|
@ -1,15 +1,77 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||
./hardware-configuration.nix
|
||||
../server.nix
|
||||
];
|
||||
|
||||
raspberry-pi-nix = {
|
||||
board = "bcm2711";
|
||||
libcamera-overlay.enable = false;
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
|
||||
hardware = {
|
||||
raspberry-pi."4" = {
|
||||
apply-overlays-dtmerge.enable = true;
|
||||
audio.enable = false;
|
||||
xhci.enable = false;
|
||||
};
|
||||
deviceTree = {
|
||||
enable = true;
|
||||
filter = "*rpi-4-*.dtb";
|
||||
# From https://github.com/Electrostasy/dots/blob/3b81723feece67610a252ce754912f6769f0cd34/hosts/phobos/klipper.nix#L43-L65
|
||||
overlays =
|
||||
let
|
||||
mkCompatibleDtsFile =
|
||||
dtbo:
|
||||
let
|
||||
drv =
|
||||
pkgs.runCommand "fix-dts"
|
||||
{
|
||||
nativeBuildInputs = with pkgs; [
|
||||
dtc
|
||||
gnused
|
||||
];
|
||||
}
|
||||
''
|
||||
mkdir "$out"
|
||||
dtc -I dtb -O dts ${dtbo} | sed -e 's/bcm2835/bcm2711/' > $out/overlay.dts
|
||||
'';
|
||||
in
|
||||
"${drv}/overlay.dts";
|
||||
|
||||
inherit (config.boot.kernelPackages) kernel;
|
||||
in
|
||||
[
|
||||
{
|
||||
name = "imx708.dtbo";
|
||||
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/imx708.dtbo";
|
||||
}
|
||||
{
|
||||
name = "vc4-kms-v3d-pi4.dtbo";
|
||||
dtsFile = mkCompatibleDtsFile "${kernel}/dtbs/overlays/vc4-kms-v3d-pi4.dtbo";
|
||||
}
|
||||
];
|
||||
};
|
||||
firmware = with pkgs; [
|
||||
firmwareLinuxNonfree
|
||||
];
|
||||
};
|
||||
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"
|
||||
KERNEL=="vcsm-cma", GROUP="video", MODE="0660"
|
||||
SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660"
|
||||
'';
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import ./../../overlays/libcamera.nix)
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostId = "731d1660";
|
||||
@ -36,12 +98,13 @@
|
||||
ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = ''${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
|
||||
ExecStart = ''
|
||||
${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
|
||||
--host=0.0.0.0 \
|
||||
--resolution=4608x2592
|
||||
'';
|
||||
DynamicUser = "yes";
|
||||
SupplementaryGroups = [ "video" "i2c" ];
|
||||
SupplementaryGroups = [ "video" ];
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
};
|
||||
@ -50,6 +113,7 @@
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
camera-streamer
|
||||
git
|
||||
neovim
|
||||
libcamera
|
||||
|
@ -1,6 +1,34 @@
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelModules = [ "bcm2835-v4l2" ];
|
||||
kernelParams = [
|
||||
"cma=512M"
|
||||
"panic=0"
|
||||
];
|
||||
supportedFilesystems = lib.mkForce [
|
||||
"f2fs"
|
||||
"vfat"
|
||||
"xfs"
|
||||
];
|
||||
tmp.cleanOnBoot = false;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: super: {
|
||||
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
|
||||
})
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
@ -9,4 +37,3 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -15,4 +15,3 @@ NVMe | `/dev/sda1` (ext4, NixOS Root)
|
||||
### Networks
|
||||
- DHCP on `10.0.1.0/24` subnet.
|
||||
- Tailscale on `100.64.0.0/10` subnet. FQDN: `vps1.mesh.vimium.net`.
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
@ -9,9 +11,10 @@
|
||||
../server.nix
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
networking = {
|
||||
hostId = "08bf6db3";
|
||||
domain = "mesh.vimium.net";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
@ -39,12 +42,53 @@
|
||||
groups = {
|
||||
jellyfin = { };
|
||||
};
|
||||
extraGroups.acme.members = [
|
||||
"kanidm"
|
||||
"nginx"
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||
|
||||
security.acme.certs."auth.vimium.com" = {
|
||||
postRun = "systemctl restart kanidm.service";
|
||||
group = "acme";
|
||||
};
|
||||
|
||||
services.kanidm =
|
||||
let
|
||||
baseDomain = "vimium.com";
|
||||
domain = "auth.${baseDomain}";
|
||||
uri = "https://${domain}";
|
||||
in
|
||||
{
|
||||
package = pkgs.unstable.kanidm;
|
||||
enableClient = true;
|
||||
enableServer = true;
|
||||
clientSettings = {
|
||||
inherit uri;
|
||||
};
|
||||
serverSettings = {
|
||||
bindaddress = "[::1]:3013";
|
||||
ldapbindaddress = "[::1]:636";
|
||||
domain = baseDomain;
|
||||
origin = uri;
|
||||
tls_chain = "${config.security.acme.certs.${domain}.directory}/full.pem";
|
||||
tls_key = "${config.security.acme.certs.${domain}.directory}/key.pem";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"auth.vimium.com" = {
|
||||
useACMEHost = "auth.vimium.com";
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "https://[::1]:3013";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules = rec {
|
||||
databases.postgresql.enable = true;
|
||||
services = {
|
||||
borgmatic = {
|
||||
enable = true;
|
||||
@ -68,10 +112,11 @@
|
||||
signal = true;
|
||||
whatsapp = true;
|
||||
};
|
||||
usePostgresql = databases.postgresql.enable;
|
||||
usePostgresql = services.postgresql.enable;
|
||||
};
|
||||
nginx.enable = true;
|
||||
photoprism.enable = true;
|
||||
postgresql.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,7 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -7,7 +10,12 @@
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"xen_blkfront"
|
||||
"vmw_pvscsi"
|
||||
];
|
||||
kernelModules = [ "nvme" ];
|
||||
};
|
||||
loader.grub.device = "/dev/sda";
|
||||
@ -23,4 +31,3 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./podman.nix
|
||||
./databases/postgresql.nix
|
||||
./desktop/gnome.nix
|
||||
./desktop/forensics.nix
|
||||
./desktop/hyprland.nix
|
||||
./desktop/kde.nix
|
||||
./desktop/mimeapps.nix
|
||||
./desktop/apps/qbittorrent.nix
|
||||
./desktop/apps/slack.nix
|
||||
./desktop/apps/thunderbird.nix
|
||||
./desktop/apps/zoom.nix
|
||||
./desktop/browsers/brave.nix
|
||||
./desktop/browsers/firefox.nix
|
||||
./desktop/gaming/emulators.nix
|
||||
./desktop/gaming/lutris.nix
|
||||
./desktop/gaming/steam.nix
|
||||
./desktop/media/graphics.nix
|
||||
./desktop/media/recording.nix
|
||||
./desktop/office/libreoffice.nix
|
||||
./dev/cc.nix
|
||||
./dev/java.nix
|
||||
./dev/lua.nix
|
||||
./dev/node.nix
|
||||
./dev/python.nix
|
||||
./dev/rust.nix
|
||||
./dev/scala.nix
|
||||
./dev/shell.nix
|
||||
./dev/zig.nix
|
||||
./editors/neovim
|
||||
./editors/vscode.nix
|
||||
./hardware/presonus-studio.nix
|
||||
./networking/tailscale.nix
|
||||
./networking/wireless.nix
|
||||
./security/gpg.nix
|
||||
./security/pass.nix
|
||||
./services/borgmatic
|
||||
./services/chrony
|
||||
./services/coturn
|
||||
./services/gitea
|
||||
./services/gitea-runner
|
||||
./services/headscale
|
||||
./services/mail
|
||||
./services/matrix
|
||||
./services/nginx
|
||||
./services/photoprism
|
||||
./shell/git
|
||||
./shell/zsh
|
||||
];
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop.media.recording;
|
||||
in {
|
||||
options.modules.desktop.media.recording = {
|
||||
audio.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
video.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
user.packages = with pkgs;
|
||||
(if cfg.audio.enable then [
|
||||
ardour
|
||||
audacity
|
||||
] else []) ++
|
||||
(if cfg.video.enable then [
|
||||
handbrake
|
||||
mkvtoolnix
|
||||
obs-studio
|
||||
] else []);
|
||||
};
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.desktop.office.libreoffice;
|
||||
# libreoffice-gtk4 = pkgs.libreoffice.override {
|
||||
# extraMakeWrapperArgs = [
|
||||
# "--set SAL_USE_VCLPLUGIN gtk4"
|
||||
# ];
|
||||
# unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
|
||||
# buildInputs = oldAttrs.buildInputs ++ [
|
||||
# pkgs.gtk4
|
||||
# ];
|
||||
# configureFlags = oldAttrs.configureFlags ++ [
|
||||
# "--disable-werror"
|
||||
# "--enable-gtk4"
|
||||
# ];
|
||||
# passthru = oldAttrs.passthru // {
|
||||
# inherit (pkgs) gtk4;
|
||||
# };
|
||||
# });
|
||||
# };
|
||||
in {
|
||||
options.modules.desktop.office.libreoffice = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
user.packages = with pkgs; [
|
||||
(if config.modules.desktop.kde.enable == true then libreoffice-qt else libreoffice)
|
||||
hunspell
|
||||
hunspellDicts.en-gb-large
|
||||
hunspellDicts.en-us-large
|
||||
];
|
||||
};
|
||||
}
|
33
modules/home-manager/default.nix
Normal file
33
modules/home-manager/default.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./programs/brave.nix
|
||||
./programs/dev/cc.nix
|
||||
./programs/dev/java.nix
|
||||
./programs/dev/lua.nix
|
||||
./programs/dev/node.nix
|
||||
./programs/dev/python.nix
|
||||
./programs/dev/rust.nix
|
||||
./programs/dev/scala.nix
|
||||
./programs/dev/shell.nix
|
||||
./programs/dev/zig.nix
|
||||
./programs/emulators.nix
|
||||
./programs/firefox.nix
|
||||
./programs/forensics.nix
|
||||
./programs/git
|
||||
./programs/gpg.nix
|
||||
./programs/graphics.nix
|
||||
./programs/libreoffice.nix
|
||||
./programs/lutris.nix
|
||||
./programs/neovim.nix
|
||||
./programs/pass.nix
|
||||
./programs/qbittorrent.nix
|
||||
./programs/recording.nix
|
||||
./programs/slack.nix
|
||||
./programs/steam.nix
|
||||
./programs/thunderbird.nix
|
||||
./programs/vscode.nix
|
||||
./programs/zoom.nix
|
||||
./shell/zsh
|
||||
];
|
||||
}
|
137
modules/home-manager/options.nix
Normal file
137
modules/home-manager/options.nix
Normal file
@ -0,0 +1,137 @@
|
||||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options = with types; {
|
||||
user = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
};
|
||||
|
||||
home = {
|
||||
configFile = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Files to place in $XDG_CONFIG_HOME";
|
||||
};
|
||||
dataFile = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Files to place in $XDG_DATA_HOME";
|
||||
};
|
||||
file = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Files to place directly in $HOME";
|
||||
};
|
||||
packages = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "User-level installed packages";
|
||||
};
|
||||
programs = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Programs managed directly from home-manager";
|
||||
};
|
||||
services = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "Services managed directly from home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings = mkOption {
|
||||
type = attrs;
|
||||
default = { };
|
||||
description = "dconf settings to enable";
|
||||
};
|
||||
|
||||
env = mkOption {
|
||||
type = attrsOf (oneOf [
|
||||
str
|
||||
path
|
||||
(listOf (either str path))
|
||||
]);
|
||||
apply = mapAttrs (
|
||||
n: v: if isList v then concatMapStringsSep ":" (x: toString x) v else (toString v)
|
||||
);
|
||||
default = { };
|
||||
description = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age";
|
||||
user =
|
||||
let
|
||||
user = builtins.getEnv "USER";
|
||||
name =
|
||||
if
|
||||
elem user [
|
||||
""
|
||||
"root"
|
||||
]
|
||||
then
|
||||
"jordan"
|
||||
else
|
||||
user;
|
||||
in
|
||||
{
|
||||
inherit name;
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"lxd"
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
description = "Jordan Holt";
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
|
||||
];
|
||||
hashedPasswordFile = config.age.secrets."passwords/users/jordan".path;
|
||||
home = "/home/${name}";
|
||||
group = "users";
|
||||
uid = 1000;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
users.${config.user.name} = {
|
||||
home = {
|
||||
file = mkAliasDefinitions options.home.file;
|
||||
stateVersion = config.system.stateVersion;
|
||||
};
|
||||
programs = mkAliasDefinitions options.home.programs;
|
||||
services = mkAliasDefinitions options.home.services;
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = mkAliasDefinitions options.home.configFile;
|
||||
dataFile = mkAliasDefinitions options.home.dataFile;
|
||||
};
|
||||
dconf.settings = mkAliasDefinitions options.dconf.settings;
|
||||
};
|
||||
|
||||
sharedModules = [
|
||||
self.inputs.nixvim.homeManagerModules.nixvim
|
||||
self.inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
};
|
||||
|
||||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
||||
|
||||
environment.extraInit = concatStringsSep "\n" (
|
||||
mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env
|
||||
);
|
||||
};
|
||||
}
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.browsers.brave;
|
||||
in {
|
||||
options.modules.desktop.browsers.brave = {
|
||||
let
|
||||
cfg = config.modules.programs.brave;
|
||||
in
|
||||
{
|
||||
options.modules.programs.brave = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.cc;
|
||||
in {
|
||||
options.modules.dev.cc = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.cc;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.cc = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.java;
|
||||
in {
|
||||
options.modules.dev.java = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.java;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.java = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.lua;
|
||||
in {
|
||||
options.modules.dev.lua = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.lua;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.lua = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.node;
|
||||
in {
|
||||
options.modules.dev.node = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.node;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.node = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -11,7 +18,7 @@ in {
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
user.packages = with pkgs; [
|
||||
nodejs_latest
|
||||
nodejs_22
|
||||
];
|
||||
};
|
||||
}
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.python;
|
||||
in {
|
||||
options.modules.dev.python = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.python;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.python = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.rust;
|
||||
in {
|
||||
options.modules.dev.rust = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.rust;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.rust = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.scala;
|
||||
in {
|
||||
options.modules.dev.scala = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.scala;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.scala = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.shell;
|
||||
in {
|
||||
options.modules.dev.shell = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.shell;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.shell = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.dev.zig;
|
||||
in {
|
||||
options.modules.dev.zig = {
|
||||
let
|
||||
cfg = config.modules.programs.dev.zig;
|
||||
in
|
||||
{
|
||||
options.modules.programs.dev.zig = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.gaming.emulators;
|
||||
in {
|
||||
options.modules.desktop.gaming.emulators = {
|
||||
let
|
||||
cfg = config.modules.programs.emulators;
|
||||
in
|
||||
{
|
||||
options.modules.programs.emulators = {
|
||||
ds.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -60,14 +67,9 @@ in {
|
||||
(lib.mkIf cfg.ps3.enable rpcs3)
|
||||
(lib.mkIf cfg.psp.enable unstable.ppsspp)
|
||||
(lib.mkIf cfg.ds.enable desmume)
|
||||
(lib.mkIf (cfg.gba.enable ||
|
||||
cfg.gb.enable ||
|
||||
cfg.snes.enable)
|
||||
higan)
|
||||
(lib.mkIf (cfg.gba.enable || cfg.gb.enable || cfg.snes.enable) higan)
|
||||
(lib.mkIf cfg.switch.enable yuzuPackages.mainline)
|
||||
(lib.mkIf (cfg.wii.enable ||
|
||||
cfg.gamecube.enable)
|
||||
dolphin-emu)
|
||||
(lib.mkIf (cfg.wii.enable || cfg.gamecube.enable) dolphin-emu)
|
||||
(lib.mkIf cfg.xbox.enable unstable.xemu)
|
||||
];
|
||||
};
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.browsers.firefox;
|
||||
in {
|
||||
options.modules.desktop.browsers.firefox = {
|
||||
let
|
||||
cfg = config.modules.programs.firefox;
|
||||
in
|
||||
{
|
||||
options.modules.programs.firefox = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -10,7 +17,8 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
|
||||
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source =
|
||||
self.inputs.firefox-gnome-theme;
|
||||
|
||||
home.programs.firefox = {
|
||||
enable = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.forensics;
|
||||
in {
|
||||
options.modules.desktop.forensics = {
|
||||
let
|
||||
cfg = config.modules.programs.forensics;
|
||||
in
|
||||
{
|
||||
options.modules.programs.forensics = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.shell.git;
|
||||
in {
|
||||
options.modules.shell.git = {
|
||||
let
|
||||
cfg = config.modules.programs.git;
|
||||
in
|
||||
{
|
||||
options.modules.programs.git = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.security.gpg;
|
||||
in {
|
||||
options.modules.security.gpg = {
|
||||
let
|
||||
cfg = config.modules.programs.gpg;
|
||||
in
|
||||
{
|
||||
options.modules.programs.gpg = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.media.graphics;
|
||||
in {
|
||||
options.modules.desktop.media.graphics = {
|
||||
let
|
||||
cfg = config.modules.programs.graphics;
|
||||
in
|
||||
{
|
||||
options.modules.programs.graphics = {
|
||||
modeling.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
44
modules/home-manager/programs/libreoffice.nix
Normal file
44
modules/home-manager/programs/libreoffice.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.programs.libreoffice;
|
||||
in
|
||||
# libreoffice-gtk4 = pkgs.libreoffice.override {
|
||||
# extraMakeWrapperArgs = [
|
||||
# "--set SAL_USE_VCLPLUGIN gtk4"
|
||||
# ];
|
||||
# unwrapped = pkgs.libreoffice-unwrapped.overrideAttrs (oldAttrs: {
|
||||
# buildInputs = oldAttrs.buildInputs ++ [
|
||||
# pkgs.gtk4
|
||||
# ];
|
||||
# configureFlags = oldAttrs.configureFlags ++ [
|
||||
# "--disable-werror"
|
||||
# "--enable-gtk4"
|
||||
# ];
|
||||
# passthru = oldAttrs.passthru // {
|
||||
# inherit (pkgs) gtk4;
|
||||
# };
|
||||
# });
|
||||
# };
|
||||
{
|
||||
options.modules.programs.libreoffice = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
user.packages = with pkgs; [
|
||||
(if config.modules.system.desktop.kde.enable == true then libreoffice-qt else libreoffice)
|
||||
hunspell
|
||||
hunspellDicts.en-gb-large
|
||||
hunspellDicts.en-us-large
|
||||
];
|
||||
};
|
||||
}
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.gaming.lutris;
|
||||
in {
|
||||
options.modules.desktop.gaming.lutris = {
|
||||
let
|
||||
cfg = config.modules.programs.lutris;
|
||||
in
|
||||
{
|
||||
options.modules.programs.lutris = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -21,10 +28,9 @@ in {
|
||||
vulkan-tools
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,9 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.editors.neovim;
|
||||
in {
|
||||
options.modules.editors.neovim = {
|
||||
cfg = config.modules.programs.neovim;
|
||||
in
|
||||
{
|
||||
options.modules.programs.neovim = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -11,7 +16,7 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.programs.nixvim = {
|
||||
home.programs.nixvim.config = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
@ -59,15 +64,15 @@ in {
|
||||
eslint.enable = true;
|
||||
gopls.enable = true;
|
||||
html.enable = true;
|
||||
lua-ls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
pylsp.enable = true;
|
||||
nixd.enable = true;
|
||||
rust-analyzer = {
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
tsserver.enable = true;
|
||||
ts_ls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
@ -108,7 +113,7 @@ in {
|
||||
nixvimInjections = true;
|
||||
|
||||
folding = true;
|
||||
indent = true;
|
||||
settings.indent.enable = true;
|
||||
};
|
||||
|
||||
plugins.treesitter-refactor = {
|
||||
@ -121,6 +126,8 @@ in {
|
||||
|
||||
plugins.undotree.enable = true;
|
||||
|
||||
plugins.web-devicons.enable = true;
|
||||
|
||||
# plugins.gitsigns.enable = true;
|
||||
# plugins.gitgutter.enable = true;
|
||||
# plugins.goyo.enable = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.security.pass;
|
||||
in {
|
||||
options.modules.security.pass = {
|
||||
let
|
||||
cfg = config.modules.programs.pass;
|
||||
in
|
||||
{
|
||||
options.modules.programs.pass = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.apps.qbittorrent;
|
||||
in {
|
||||
options.modules.desktop.apps.qbittorrent = {
|
||||
let
|
||||
cfg = config.modules.programs.qbittorrent;
|
||||
in
|
||||
{
|
||||
options.modules.programs.qbittorrent = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
46
modules/home-manager/programs/recording.nix
Normal file
46
modules/home-manager/programs/recording.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.programs.recording;
|
||||
in
|
||||
{
|
||||
options.modules.programs.recording = {
|
||||
audio.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
video.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
user.packages =
|
||||
with pkgs;
|
||||
(
|
||||
if cfg.audio.enable then
|
||||
[
|
||||
ardour
|
||||
audacity
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
++ (
|
||||
if cfg.video.enable then
|
||||
[
|
||||
handbrake
|
||||
mkvtoolnix
|
||||
obs-studio
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
);
|
||||
};
|
||||
}
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.apps.slack;
|
||||
in {
|
||||
options.modules.desktop.apps.slack = {
|
||||
let
|
||||
cfg = config.modules.programs.slack;
|
||||
in
|
||||
{
|
||||
options.modules.programs.slack = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.gaming.steam;
|
||||
in {
|
||||
options.modules.desktop.gaming.steam = {
|
||||
let
|
||||
cfg = config.modules.programs.steam;
|
||||
in
|
||||
{
|
||||
options.modules.programs.steam = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.apps.thunderbird;
|
||||
in {
|
||||
options.modules.desktop.apps.thunderbird = {
|
||||
let
|
||||
cfg = config.modules.programs.thunderbird;
|
||||
in
|
||||
{
|
||||
options.modules.programs.thunderbird = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -10,7 +17,8 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = inputs.thunderbird-gnome-theme;
|
||||
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source =
|
||||
self.inputs.thunderbird-gnome-theme;
|
||||
|
||||
home.programs.thunderbird = {
|
||||
enable = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.editors.vscode;
|
||||
in {
|
||||
options.modules.editors.vscode = {
|
||||
let
|
||||
cfg = config.modules.programs.vscode;
|
||||
in
|
||||
{
|
||||
options.modules.programs.vscode = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.apps.zoom;
|
||||
in {
|
||||
options.modules.desktop.apps.zoom = {
|
||||
let
|
||||
cfg = config.modules.programs.zoom;
|
||||
in
|
||||
{
|
||||
options.modules.programs.zoom = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,7 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.shell.zsh;
|
||||
in {
|
||||
let
|
||||
cfg = config.modules.shell.zsh;
|
||||
in
|
||||
{
|
||||
options.modules.shell.zsh = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
25
modules/nixos/default.nix
Normal file
25
modules/nixos/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
imports = [
|
||||
./hardware/presonus-studio
|
||||
./podman.nix
|
||||
./services/borgmatic.nix
|
||||
./services/chrony.nix
|
||||
./services/coturn.nix
|
||||
./services/gitea.nix
|
||||
./services/gitea-runner.nix
|
||||
./services/headscale.nix
|
||||
./services/home-assistant
|
||||
./services/mail.nix
|
||||
./services/matrix.nix
|
||||
./services/netbird.nix
|
||||
./services/nginx.nix
|
||||
./services/photoprism.nix
|
||||
./services/postgresql.nix
|
||||
./services/tailscale.nix
|
||||
./system/desktop/gnome.nix
|
||||
./system/desktop/hyprland.nix
|
||||
./system/desktop/kde.nix
|
||||
./system/desktop/mimeapps.nix
|
||||
./system/wireless.nix
|
||||
];
|
||||
}
|
@ -68,4 +68,3 @@ index ab2b938502eb..b86832edaaa0 100644
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.hardware.presonus-studio;
|
||||
snd-usb-audio-module = pkgs.callPackage ./snd-usb-audio.nix {
|
||||
@ -13,7 +18,8 @@ let
|
||||
"channelmix.upmix-method" = "psd";
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.hardware.presonus-studio = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
@ -67,11 +73,23 @@ in {
|
||||
"capture.props" = {
|
||||
"node.name" = "Genelec_Speakers";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = [ "FL" "FR" "SL" "SR" "LFE" ];
|
||||
"audio.position" = [
|
||||
"FL"
|
||||
"FR"
|
||||
"SL"
|
||||
"SR"
|
||||
"LFE"
|
||||
];
|
||||
};
|
||||
"playback.props" = {
|
||||
"node.name" = "playback.Genelec_Speakers";
|
||||
"audio.position" = [ "AUX0" "AUX1" "AUX3" "AUX4" "AUX5" ];
|
||||
"audio.position" = [
|
||||
"AUX0"
|
||||
"AUX1"
|
||||
"AUX3"
|
||||
"AUX4"
|
||||
"AUX5"
|
||||
];
|
||||
"target.object" = "alsa_output.usb-PreSonus_Studio_1824c_SC4E21110775-00.multichannel-output";
|
||||
"stream.dont-remix" = true;
|
||||
"node.passive" = true;
|
@ -1,8 +1,17 @@
|
||||
{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
kernel ? pkgs.linuxPackages_latest.kernel,
|
||||
}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "snd-usb-audio";
|
||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
||||
inherit (kernel)
|
||||
src
|
||||
version
|
||||
postPatch
|
||||
nativeBuildInputs
|
||||
;
|
||||
|
||||
kernel_dev = kernel.dev;
|
||||
kernelVersion = kernel.modDirVersion;
|
||||
@ -33,4 +42,3 @@ pkgs.stdenv.mkDerivation {
|
||||
license = lib.licenses.gpl2;
|
||||
};
|
||||
}
|
||||
|
@ -1,10 +1,16 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.modules.podman;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.podman = {
|
||||
enable = mkOption {
|
||||
default = false;
|
@ -1,9 +1,15 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.borgmatic;
|
||||
hostname = config.networking.hostName;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.borgmatic = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
@ -27,7 +33,7 @@ in {
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets."passwords/services/borg/${hostname}-passphrase" = {
|
||||
file = "${inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age";
|
||||
file = "${self.inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age";
|
||||
};
|
||||
|
||||
services.borgmatic = {
|
||||
@ -35,9 +41,14 @@ in {
|
||||
settings = {
|
||||
source_directories = cfg.directories;
|
||||
repositories = [
|
||||
{ label = "borgbase"; path = cfg.repoPath; }
|
||||
{
|
||||
label = "borgbase";
|
||||
path = cfg.repoPath;
|
||||
}
|
||||
];
|
||||
encryption_passcommand = "cat ${config.age.secrets."passwords/services/borg/${hostname}-passphrase".path}";
|
||||
encryption_passcommand = "cat ${
|
||||
config.age.secrets."passwords/services/borg/${hostname}-passphrase".path
|
||||
}";
|
||||
ssh_command = "ssh -i /etc/ssh/ssh_host_ed25519_key";
|
||||
keep_daily = 7;
|
||||
keep_weekly = 4;
|
@ -1,10 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.modules.services.chrony;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.chrony = {
|
||||
enable = mkOption {
|
||||
default = false;
|
@ -1,13 +1,14 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.coturn;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.coturn = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
@ -26,12 +27,16 @@ in {
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.firewall = let
|
||||
range = with config.services.coturn; lib.singleton {
|
||||
networking.firewall =
|
||||
let
|
||||
range =
|
||||
with config.services.coturn;
|
||||
lib.singleton {
|
||||
from = min-port;
|
||||
to = max-port;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
allowedTCPPorts = [
|
||||
3478 # TURN listener
|
||||
5349 # STUN TLS
|
||||
@ -52,19 +57,26 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
age.secrets =
|
||||
{
|
||||
"passwords/services/coturn/static-auth-secret" = {
|
||||
file = "${inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
|
||||
file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
|
||||
owner = "turnserver";
|
||||
group = "turnserver";
|
||||
};
|
||||
} // (if cfg.matrixIntegration then {
|
||||
}
|
||||
// (
|
||||
if cfg.matrixIntegration then
|
||||
{
|
||||
"passwords/services/coturn/matrix-turn-config.yml" = {
|
||||
file = "${inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
|
||||
file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
|
||||
owner = "matrix-synapse";
|
||||
group = "matrix-synapse";
|
||||
};
|
||||
} else {});
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
|
||||
services.coturn = rec {
|
||||
enable = true;
|
@ -1,4 +1,10 @@
|
||||
{ pkgs, config, lib, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
# Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
|
||||
|
||||
@ -52,7 +58,12 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "podman.service" ];
|
||||
requires = [ "podman.service" ];
|
||||
path = [ config.virtualisation.podman.package pkgs.gnutar pkgs.shadow pkgs.getent ];
|
||||
path = [
|
||||
config.virtualisation.podman.package
|
||||
pkgs.gnutar
|
||||
pkgs.shadow
|
||||
pkgs.getent
|
||||
];
|
||||
script = ''
|
||||
set -eux -o pipefail
|
||||
mkdir -p etc/nix
|
||||
@ -142,7 +153,12 @@ in
|
||||
"~setdomainname"
|
||||
"~sethostname"
|
||||
];
|
||||
RestrictAddressFamilies = [ "AF_INET" "AF_INET6" "AF_UNIX" "AF_NETLINK" ];
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
"AF_UNIX"
|
||||
"AF_NETLINK"
|
||||
];
|
||||
|
||||
# Needs network access
|
||||
PrivateNetwork = false;
|
||||
@ -176,7 +192,7 @@ in
|
||||
users.groups.nix-ci-user = { };
|
||||
|
||||
age.secrets."files/services/gitea-runner/${hostname}-token" = {
|
||||
file = "${inputs.secrets}/files/services/gitea-runner/${hostname}-token.age";
|
||||
file = "${self.inputs.secrets}/files/services/gitea-runner/${hostname}-token.age";
|
||||
group = "podman";
|
||||
};
|
||||
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.gitea;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.gitea = {
|
||||
enable = lib.mkEnableOption "gitea";
|
||||
domain = lib.mkOption {
|
||||
@ -40,9 +47,9 @@ in {
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${config.services.gitea.customDir}/public/assets/css' 0750 ${config.services.gitea.user} ${config.services.gitea.group} - -"
|
||||
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github.css' - - - - ${inputs.gitea-github-theme}/theme-github.css"
|
||||
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-auto.css' - - - - ${inputs.gitea-github-theme}/theme-github-auto.css"
|
||||
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${inputs.gitea-github-theme}/theme-github-dark.css"
|
||||
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github.css' - - - - ${self.inputs.gitea-github-theme}/theme-github.css"
|
||||
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-auto.css' - - - - ${self.inputs.gitea-github-theme}/theme-github-auto.css"
|
||||
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${self.inputs.gitea-github-theme}/theme-github-dark.css"
|
||||
];
|
||||
|
||||
services.gitea = rec {
|
@ -1,19 +1,23 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.headscale;
|
||||
fqdn = "headscale.vimium.net";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.headscale = {
|
||||
enable = mkOption {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.headscale ];
|
||||
|
||||
services.headscale = {
|
||||
@ -22,12 +26,17 @@ in {
|
||||
port = 8080;
|
||||
|
||||
settings = {
|
||||
policy.path = null;
|
||||
ip_prefixes = [
|
||||
"100.64.0.0/10"
|
||||
];
|
||||
server_url = "https://${fqdn}";
|
||||
dns_config = {
|
||||
base_domain = "vimium.net";
|
||||
derp = {
|
||||
auto_update_enable = false;
|
||||
update_frequency = "24h";
|
||||
};
|
||||
dns = {
|
||||
base_domain = "mesh.vimium.net";
|
||||
extra_records = [
|
||||
{
|
||||
name = "grafana.mesh.vimium.net";
|
||||
@ -40,6 +49,10 @@ in {
|
||||
value = "100.64.0.7";
|
||||
}
|
||||
];
|
||||
magic_dns = true;
|
||||
nameservers.global = [
|
||||
"9.9.9.9"
|
||||
];
|
||||
};
|
||||
logtail.enabled = false;
|
||||
};
|
306
modules/nixos/services/home-assistant/default.nix
Normal file
306
modules/nixos/services/home-assistant/default.nix
Normal file
@ -0,0 +1,306 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.home-assistant;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./floorplan/default.nix
|
||||
./mqtt.nix
|
||||
];
|
||||
|
||||
options.modules.services.home-assistant.enable = lib.mkEnableOption "home-assistant";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
age.secrets."files/services/home-assistant/secrets.yaml" = {
|
||||
file = "${self.inputs.secrets}/files/services/home-assistant/secrets.yaml.age";
|
||||
path = "${config.services.home-assistant.configDir}/secrets.yaml";
|
||||
owner = "hass";
|
||||
group = "hass";
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
|
||||
config = {
|
||||
automation = "!include automations.yaml";
|
||||
backup = { };
|
||||
binary_sensor = [ ];
|
||||
default_config = { };
|
||||
http = {
|
||||
server_host = "::1";
|
||||
trusted_proxies = [ "::1" ];
|
||||
use_x_forwarded_for = true;
|
||||
};
|
||||
ffmpeg = { };
|
||||
homeassistant = {
|
||||
name = "Home";
|
||||
latitude = "!secret latitude";
|
||||
longitude = "!secret longitude";
|
||||
country = "GB";
|
||||
temperature_unit = "C";
|
||||
time_zone = config.time.timeZone;
|
||||
unit_system = "metric";
|
||||
auth_providers = [
|
||||
{
|
||||
type = "trusted_networks";
|
||||
trusted_networks = [
|
||||
"100.64.0.0/10"
|
||||
"127.0.0.1"
|
||||
];
|
||||
allow_bypass_login = true;
|
||||
}
|
||||
{
|
||||
type = "homeassistant";
|
||||
}
|
||||
];
|
||||
};
|
||||
logger = {
|
||||
default = "info";
|
||||
logs = { };
|
||||
};
|
||||
lovelace = {
|
||||
resources = [
|
||||
{
|
||||
url = "/local/nixos-lovelace-modulels/mushroom.js";
|
||||
type = "module";
|
||||
}
|
||||
];
|
||||
};
|
||||
media_player = [ ];
|
||||
mobile_app = { };
|
||||
onkyo = { };
|
||||
open_meteo = { };
|
||||
recorder = {
|
||||
purge_keep_days = 365;
|
||||
};
|
||||
scene = "!include scenes.yaml";
|
||||
script = "!include scripts.yaml";
|
||||
sensor = [ ];
|
||||
system_health = { };
|
||||
zeroconf = { };
|
||||
};
|
||||
|
||||
configDir = "/etc/home-assistant";
|
||||
|
||||
extraComponents = [
|
||||
"air_quality"
|
||||
"airly"
|
||||
"alert"
|
||||
"api"
|
||||
"application_credentials"
|
||||
"asuswrt"
|
||||
"auth"
|
||||
"automation"
|
||||
"bayesian"
|
||||
"binary_sensor"
|
||||
# "blackbird"
|
||||
"blueprint"
|
||||
"bluetooth_adapters"
|
||||
"bluetooth_le_tracker"
|
||||
"button"
|
||||
"calendar"
|
||||
"camera"
|
||||
"cast"
|
||||
"cert_expiry"
|
||||
"climate"
|
||||
"co2signal"
|
||||
"color_extractor"
|
||||
"command_line"
|
||||
"compensation"
|
||||
"configurator"
|
||||
"counter"
|
||||
"cover"
|
||||
"cpuspeed"
|
||||
"default_config"
|
||||
"demo"
|
||||
"derivative"
|
||||
"device_automation"
|
||||
"device_sun_light_trigger"
|
||||
"device_tracker"
|
||||
"dlna_dmr"
|
||||
"dlna_dms"
|
||||
"dnsip"
|
||||
"esphome"
|
||||
"fail2ban"
|
||||
"fan"
|
||||
"feedreader"
|
||||
"ffmpeg"
|
||||
"file"
|
||||
"file_upload"
|
||||
"filesize"
|
||||
"folder"
|
||||
"folder_watcher"
|
||||
"forecast_solar"
|
||||
"frontend"
|
||||
"gdacs"
|
||||
"generic"
|
||||
"generic_hygrostat"
|
||||
"generic_thermostat"
|
||||
"geo_json_events"
|
||||
"geo_location"
|
||||
"geo_rss_events"
|
||||
"github"
|
||||
"group"
|
||||
"hardware"
|
||||
"hdmi_cec"
|
||||
"history_stats"
|
||||
"homeassistant"
|
||||
"homekit"
|
||||
"homekit_controller"
|
||||
"html5"
|
||||
"http"
|
||||
"humidifier"
|
||||
"icloud"
|
||||
"image_processing"
|
||||
"input_boolean"
|
||||
"input_button"
|
||||
"input_datetime"
|
||||
"input_number"
|
||||
"input_select"
|
||||
"input_text"
|
||||
"integration"
|
||||
"ios"
|
||||
"jellyfin"
|
||||
"light"
|
||||
"local_calendar"
|
||||
"local_file"
|
||||
"local_ip"
|
||||
"local_todo"
|
||||
"lock"
|
||||
"logentries"
|
||||
"logger"
|
||||
"lovelace"
|
||||
"manual"
|
||||
"manual_mqtt"
|
||||
"matter"
|
||||
"media_player"
|
||||
"min_max"
|
||||
"mjpeg"
|
||||
"modern_forms"
|
||||
"mold_indicator"
|
||||
"moon"
|
||||
"mysensors"
|
||||
"network"
|
||||
"nmap_tracker"
|
||||
"notify"
|
||||
"number"
|
||||
"onboarding"
|
||||
"onkyo"
|
||||
"panel_custom"
|
||||
"persistent_notification"
|
||||
"person"
|
||||
"ping"
|
||||
"plant"
|
||||
"prometheus"
|
||||
"proximity"
|
||||
"push"
|
||||
"proximity"
|
||||
"python_script"
|
||||
"radio_browser"
|
||||
"random"
|
||||
"recorder"
|
||||
"remote"
|
||||
"repairs"
|
||||
"rest"
|
||||
"rest_command"
|
||||
"rss_feed_template"
|
||||
"scene"
|
||||
"schedule"
|
||||
"scrape"
|
||||
"script"
|
||||
"search"
|
||||
"season"
|
||||
"select"
|
||||
"sense"
|
||||
"sensor"
|
||||
"sensorpush"
|
||||
"shell_command"
|
||||
"shopping_list"
|
||||
"siren"
|
||||
"smtp"
|
||||
"snmp"
|
||||
"sql"
|
||||
"statistics"
|
||||
"sun"
|
||||
"switch"
|
||||
"switch_as_x"
|
||||
"system_health"
|
||||
"system_log"
|
||||
"systemmonitor"
|
||||
"tag"
|
||||
"tailscale"
|
||||
"tcp"
|
||||
"template"
|
||||
"text"
|
||||
"thread"
|
||||
"threshold"
|
||||
"time_date"
|
||||
"timer"
|
||||
"tod"
|
||||
"todo"
|
||||
"tomorrowio"
|
||||
"trend"
|
||||
"universal"
|
||||
"upb"
|
||||
"update"
|
||||
"upnp"
|
||||
"uptime"
|
||||
"utility_meter"
|
||||
"vacuum"
|
||||
"vlc"
|
||||
"vlc_telnet"
|
||||
"wake_on_lan"
|
||||
"water_heater"
|
||||
"weather"
|
||||
"websocket_api"
|
||||
"wled"
|
||||
"workday"
|
||||
"worldclock"
|
||||
"zone"
|
||||
];
|
||||
|
||||
extraPackages =
|
||||
python3Packages: with python3Packages; [
|
||||
onkyo-eiscp
|
||||
zeroconf
|
||||
];
|
||||
|
||||
customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [
|
||||
bubble-card
|
||||
button-card
|
||||
mushroom
|
||||
sankey-chart
|
||||
universal-remote-card
|
||||
# zigbee2mqtt-networkmap
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.home-assistant.preStart = lib.mkForce "";
|
||||
|
||||
modules.services.borgmatic.directories = [
|
||||
config.services.home-assistant.configDir
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."home.mesh.vimium.net" = {
|
||||
forceSSL = false;
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
'';
|
||||
locations."/" = {
|
||||
proxyPass = "http://[::1]:8123";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
100
modules/nixos/services/home-assistant/floorplan/default.nix
Normal file
100
modules/nixos/services/home-assistant/floorplan/default.nix
Normal file
@ -0,0 +1,100 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.home-assistant;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.home-assistant = {
|
||||
config.lovelace.resources = [
|
||||
{
|
||||
url = "/local/nixos-lovelace-modules/floorplan.js";
|
||||
type = "module";
|
||||
}
|
||||
];
|
||||
customLovelaceModules = [
|
||||
pkgs.ha-floorplan
|
||||
];
|
||||
};
|
||||
|
||||
environment.etc."home-assistant/www/floorplan/style.css".source = ./style.css;
|
||||
environment.etc."home-assistant/www/floorplan/config.yaml".text = builtins.toJSON {
|
||||
image = {
|
||||
location = "/local/floorplan/beetham.svg";
|
||||
cache = false;
|
||||
};
|
||||
stylesheet = {
|
||||
location = "/local/floorplan/style.css";
|
||||
cache = false;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
hover_action = "hover-info";
|
||||
hold_action = "toggle";
|
||||
tap_action = "more-info";
|
||||
};
|
||||
|
||||
rules = [
|
||||
{
|
||||
name = "Rooms";
|
||||
entities = [
|
||||
{
|
||||
entity = "light.bedroom_lamps";
|
||||
element = "area.bedroom";
|
||||
}
|
||||
{
|
||||
entity = "light.hallway_spots";
|
||||
element = "area.hallway";
|
||||
}
|
||||
{
|
||||
entity = "light.living_room_lamps";
|
||||
element = "area.livingroom";
|
||||
}
|
||||
{
|
||||
entity = "light.office_lamps";
|
||||
element = "area.office";
|
||||
}
|
||||
];
|
||||
tap_action = "light.toggle";
|
||||
state_action = {
|
||||
service = "floorplan.class_set";
|
||||
service_data = ''
|
||||
if (entity.state === "on") {
|
||||
return "light-on";
|
||||
}
|
||||
return "light-off";
|
||||
'';
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "Temperature";
|
||||
entities = [
|
||||
"sensor.motion_sensor_temperature"
|
||||
];
|
||||
state_action = [
|
||||
{
|
||||
service = "floorplan.text_set";
|
||||
service_data = ''
|
||||
if (!isNaN(entity.state)) {
|
||||
return Math.round(entity.state * 10) / 10 + "°";
|
||||
}
|
||||
return "Unknown";
|
||||
'';
|
||||
}
|
||||
{
|
||||
service = "floorplan.class_set";
|
||||
service_data = {
|
||||
class = "static-temp";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
27
modules/nixos/services/home-assistant/floorplan/style.css
Normal file
27
modules/nixos/services/home-assistant/floorplan/style.css
Normal file
@ -0,0 +1,27 @@
|
||||
#floorplan {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
svg, svg * {
|
||||
vector-effect: non-scaling-stroke !important;
|
||||
pointer-events: all !important;
|
||||
}
|
||||
|
||||
path[id*="area."].light-on {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
path[id*="area."] {
|
||||
opacity: 0.5 !important;
|
||||
transition: opacity .25s;
|
||||
-moz-transition: opacity .25s;
|
||||
-webkit-transition: opacity .25s;
|
||||
}
|
||||
|
||||
svg tspan {
|
||||
fill: var(--primary-text-color);
|
||||
}
|
||||
|
||||
.static-temp, .static-temp tspan {
|
||||
fill: #ffffff;
|
||||
}
|
93
modules/nixos/services/home-assistant/mqtt.nix
Normal file
93
modules/nixos/services/home-assistant/mqtt.nix
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.home-assistant;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.mosquitto = {
|
||||
enable = true;
|
||||
listeners = [
|
||||
{
|
||||
acl = [ "pattern readwrite #" ];
|
||||
omitPasswordAuth = true;
|
||||
port = 1883;
|
||||
settings = {
|
||||
allow_anonymous = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
age.secrets."files/services/zigbee2mqtt/secret.yaml" = {
|
||||
file = "${self.inputs.secrets}/files/services/zigbee2mqtt/secret.yaml.age";
|
||||
path = "${config.services.zigbee2mqtt.dataDir}/secret.yaml";
|
||||
owner = "zigbee2mqtt";
|
||||
group = "zigbee2mqtt";
|
||||
};
|
||||
|
||||
services.zigbee2mqtt = {
|
||||
package = pkgs.unstable.zigbee2mqtt;
|
||||
enable = true;
|
||||
dataDir = "/var/lib/zigbee2mqtt";
|
||||
settings = {
|
||||
homeassistant = lib.optionalAttrs config.services.home-assistant.enable {
|
||||
discovery_topic = "homeassistant";
|
||||
status_topic = "hass/status";
|
||||
legacy_entity_attributes = true;
|
||||
legacy_triggers = true;
|
||||
};
|
||||
availability = true;
|
||||
frontend = true;
|
||||
device_options = {
|
||||
retain = true;
|
||||
};
|
||||
serial = {
|
||||
port = "/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0";
|
||||
};
|
||||
advanced = {
|
||||
channel = 20;
|
||||
network_key = "!secret.yaml network_key";
|
||||
pan_id = 13001;
|
||||
ext_pan_id = [
|
||||
79
|
||||
1
|
||||
73
|
||||
47
|
||||
250
|
||||
136
|
||||
124
|
||||
222
|
||||
];
|
||||
transmit_power = 20;
|
||||
};
|
||||
mqtt = {
|
||||
version = 5;
|
||||
server = "mqtt://localhost:1883";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
modules.services.borgmatic.directories = [
|
||||
config.services.mosquitto.dataDir
|
||||
config.services.zigbee2mqtt.dataDir
|
||||
];
|
||||
|
||||
services.home-assistant = {
|
||||
config.mqtt = { };
|
||||
extraComponents = [
|
||||
"mqtt"
|
||||
"mqtt_eventstream"
|
||||
"mqtt_json"
|
||||
"mqtt_room"
|
||||
"mqtt_statestream"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,4 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.mail;
|
||||
@ -14,7 +19,8 @@ let
|
||||
"vimium.org"
|
||||
"vimium.xyz"
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.services.mail = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
@ -22,6 +28,10 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
self.inputs.nixos-mailserver.nixosModule
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
@ -36,7 +46,10 @@ in {
|
||||
|
||||
services.nginx.enable = true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
|
||||
mailserver = {
|
||||
enable = true;
|
248
modules/nixos/services/matrix.nix
Normal file
248
modules/nixos/services/matrix.nix
Normal file
@ -0,0 +1,248 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.matrix;
|
||||
in
|
||||
{
|
||||
options.modules.services.matrix = {
|
||||
enable = lib.mkEnableOption "matrix";
|
||||
element = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
bridges = {
|
||||
signal = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Signal bridge.";
|
||||
};
|
||||
whatsapp = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable WhatsApp bridge.";
|
||||
};
|
||||
};
|
||||
serverName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "vimium.com";
|
||||
example = "vimium.com";
|
||||
};
|
||||
usePostgresql = lib.mkEnableOption "postgresql";
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
matrixSubdomain = "matrix.${cfg.serverName}";
|
||||
elementSubdomain = "chat.${cfg.serverName}";
|
||||
matrixClientConfig = {
|
||||
"m.homeserver" = {
|
||||
base_url = "https://${matrixSubdomain}";
|
||||
server_name = cfg.serverName;
|
||||
};
|
||||
"m.identity_server" = {
|
||||
"base_url" = "https://vector.im";
|
||||
};
|
||||
};
|
||||
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
|
||||
commonBridgeSettings = bridge: {
|
||||
appservice = {
|
||||
database = lib.mkIf cfg.usePostgresql {
|
||||
type = "postgres";
|
||||
uri = "postgresql:///${bridge}?host=/run/postgresql";
|
||||
};
|
||||
};
|
||||
bridge = {
|
||||
encryption = {
|
||||
allow = true;
|
||||
default = true;
|
||||
require = true;
|
||||
};
|
||||
permissions = {
|
||||
"${cfg.serverName}" = "user";
|
||||
"@jordan:${cfg.serverName}" = "admin";
|
||||
};
|
||||
provisioning = {
|
||||
shared_secret = "disable";
|
||||
};
|
||||
};
|
||||
homeserver = {
|
||||
address = "https://${matrixSubdomain}";
|
||||
domain = cfg.serverName;
|
||||
};
|
||||
};
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8448 # Matrix federation
|
||||
];
|
||||
|
||||
security.acme.certs = {
|
||||
"${matrixSubdomain}" = {
|
||||
reloadServices = [ "matrix-synapse" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts =
|
||||
{
|
||||
"${matrixSubdomain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 443;
|
||||
ssl = true;
|
||||
}
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
addr = "0.0.0.0";
|
||||
port = 8448;
|
||||
ssl = true;
|
||||
}
|
||||
{
|
||||
addr = "[::1]";
|
||||
port = 443;
|
||||
ssl = true;
|
||||
}
|
||||
{
|
||||
addr = "[::1]";
|
||||
port = 80;
|
||||
}
|
||||
{
|
||||
addr = "[::1]";
|
||||
port = 8448;
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://localhost:8008";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
'';
|
||||
};
|
||||
"/_matrix" = {
|
||||
proxyPass = "http://localhost:8008";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
client_max_body_size 50M;
|
||||
'';
|
||||
};
|
||||
"/_synapse/client".proxyPass = "http://localhost:8008";
|
||||
};
|
||||
};
|
||||
"${cfg.serverName}" =
|
||||
let
|
||||
mkWellKnown = data: ''
|
||||
more_set_headers 'Content-Type: application/json';
|
||||
return 200 '${builtins.toJSON data}';
|
||||
'';
|
||||
in
|
||||
{
|
||||
locations."= /.well-known/matrix/server".extraConfig = (mkWellKnown matrixServerConfig);
|
||||
locations."= /.well-known/matrix/client".extraConfig = (mkWellKnown matrixClientConfig);
|
||||
};
|
||||
}
|
||||
// (
|
||||
if cfg.element.enable then
|
||||
{
|
||||
"${elementSubdomain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
root = pkgs.unstable.element-web.override {
|
||||
conf = {
|
||||
default_server_config = matrixClientConfig;
|
||||
brand = "Vimium Chat";
|
||||
branding = {
|
||||
auth_header_logo_url = "https://vimium.com/images/logo.svg";
|
||||
auth_footer_links = [
|
||||
{
|
||||
"text" = "Vimium.com";
|
||||
"url" = "https://vimium.com";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{ }
|
||||
);
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"jitsi-meet-1.0.8043"
|
||||
"olm-3.2.16"
|
||||
];
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
enableRegistrationScript = true;
|
||||
settings = {
|
||||
database.name = (if cfg.usePostgresql then "psycopg2" else "sqlite3");
|
||||
enable_metrics = false;
|
||||
enable_registration = false;
|
||||
max_upload_size = "100M";
|
||||
report_stats = false;
|
||||
server_name = cfg.serverName;
|
||||
};
|
||||
};
|
||||
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups = (
|
||||
lib.optional cfg.bridges.whatsapp config.systemd.services.mautrix-whatsapp.serviceConfig.Group
|
||||
);
|
||||
|
||||
services.postgresql = lib.mkIf cfg.usePostgresql {
|
||||
ensureUsers =
|
||||
[
|
||||
{
|
||||
name = "matrix-synapse";
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
]
|
||||
++ (lib.optional cfg.bridges.signal {
|
||||
name = "mautrix-signal";
|
||||
ensureDBOwnership = true;
|
||||
})
|
||||
++ (lib.optional cfg.bridges.whatsapp {
|
||||
name = "mautrix-whatsapp";
|
||||
ensureDBOwnership = true;
|
||||
});
|
||||
ensureDatabases =
|
||||
[
|
||||
"matrix-synapse"
|
||||
]
|
||||
++ (lib.optional cfg.bridges.signal "mautrix-signal")
|
||||
++ (lib.optional cfg.bridges.whatsapp "mautrix-whatsapp");
|
||||
};
|
||||
|
||||
services.mautrix-signal = lib.mkIf cfg.bridges.signal {
|
||||
enable = true;
|
||||
settings = commonBridgeSettings "mautrix-signal";
|
||||
};
|
||||
|
||||
services.mautrix-whatsapp = lib.mkIf cfg.bridges.whatsapp {
|
||||
enable = true;
|
||||
settings = {
|
||||
bridge = {
|
||||
history_sync = {
|
||||
backfill = true;
|
||||
max_initial_conversations = -1;
|
||||
message_count = 50;
|
||||
request_full_sync = true;
|
||||
};
|
||||
mute_bridging = true;
|
||||
};
|
||||
} // commonBridgeSettings "mautrix-whatsapp";
|
||||
};
|
||||
};
|
||||
}
|
77
modules/nixos/services/netbird.nix
Normal file
77
modules/nixos/services/netbird.nix
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.services.netbird;
|
||||
in
|
||||
{
|
||||
options.modules.services.netbird = {
|
||||
enable = lib.mkEnableOption "netbird";
|
||||
coordinatorDomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "netbird.vimium.net";
|
||||
};
|
||||
meshDomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "mesh.vimium.net";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets."passwords/services/netbird/data-store-encryption-key" = {
|
||||
file = "${self.inputs.secrets}/passwords/services/netbird/data-store-encryption-key.age";
|
||||
};
|
||||
|
||||
services.netbird = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.netbird.server = {
|
||||
domain = cfg.coordinatorDomain;
|
||||
enable = true;
|
||||
enableNginx = true;
|
||||
dashboard.settings = {
|
||||
AUTH_AUTHORITY = "https://auth.vimium.com/oauth2/openid/netbird";
|
||||
};
|
||||
management = rec {
|
||||
disableAnonymousMetrics = true;
|
||||
dnsDomain = cfg.meshDomain;
|
||||
oidcConfigEndpoint = "https://auth.vimium.com/oauth2/openid/netbird/.well-known/openid-configuration";
|
||||
settings = {
|
||||
DataStoreEncryptionKey = {
|
||||
_secret = config.age.secrets."passwords/services/netbird/data-store-encryption-key".path;
|
||||
};
|
||||
HttpConfig = {
|
||||
AuthAudience = "netbird";
|
||||
};
|
||||
StoreConfig = {
|
||||
Engine = "sqlite";
|
||||
};
|
||||
TURNConfig = {
|
||||
Secret._secret = config.age.secrets."passwords/services/coturn/static-auth-secret".path;
|
||||
TimeBasedCredentials = true;
|
||||
};
|
||||
PKCEAuthorizationFlow.ProviderConfig = {
|
||||
AuthorizationEndpoint = "https://auth.vimium.com/ui/oauth2";
|
||||
TokenEndpoint = "https://auth.vimium.com/oauth2/token";
|
||||
};
|
||||
};
|
||||
singleAccountModeDomain = dnsDomain;
|
||||
turnDomain = config.services.coturn.realm;
|
||||
turnPort = config.services.coturn.listening-port;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.netbird-signal.serviceConfig.RestartSec = "60";
|
||||
systemd.services.netbird-management.serviceConfig.RestartSec = "60";
|
||||
|
||||
services.nginx.virtualHosts."netbird.vimium.net" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
};
|
||||
}
|
193
modules/nixos/services/nginx.nix
Normal file
193
modules/nixos/services/nginx.nix
Normal file
@ -0,0 +1,193 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.modules.services.nginx;
|
||||
nginxErrorPages = ''
|
||||
location @error_pages {
|
||||
rewrite ^.*$ /''${status}.html break;
|
||||
|
||||
root "/var/www/html/errors";
|
||||
}
|
||||
'';
|
||||
nginxEdgeHeaders = ''
|
||||
more_set_headers 'Server: Vimium';
|
||||
more_set_headers 'Access-Control-Allow-Origin: *';
|
||||
add_header Expect-CT max-age=30 always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
|
||||
add_header Vimium-Responding-Instance $hostname;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
'';
|
||||
nginxStrictHeaders = ''
|
||||
add_header X-Frame-Options SAMEORIGIN always;
|
||||
add_header Permissions-Policy "fullscreen=(self), sync-xhr=(self)" always;
|
||||
'';
|
||||
mkRedirect = from: to: {
|
||||
"${from}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
serverAliases = [ "www.${from}" ];
|
||||
locations."/".return = "301 https://${to}$request_uri";
|
||||
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.modules.services.nginx = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80 # HTTP
|
||||
443 # HTTPS
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
package = pkgs.openresty;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedTlsSettings = true;
|
||||
clientMaxBodySize = "2G";
|
||||
sslProtocols = "TLSv1.2 TLSv1.3";
|
||||
sslCiphers = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
|
||||
appendHttpConfig = ''
|
||||
error_page 400 @error_pages;
|
||||
error_page 401 @error_pages;
|
||||
error_page 403 @error_pages;
|
||||
error_page 404 @error_pages;
|
||||
error_page 405 @error_pages;
|
||||
error_page 429 @error_pages;
|
||||
error_page 500 @error_pages;
|
||||
error_page 501 @error_pages;
|
||||
error_page 502 @error_pages;
|
||||
error_page 503 @error_pages;
|
||||
error_page 504 @error_pages;
|
||||
|
||||
client_body_buffer_size 16k;
|
||||
client_header_buffer_size 8k;
|
||||
'';
|
||||
appendConfig = ''
|
||||
worker_processes auto;
|
||||
worker_cpu_affinity auto;
|
||||
worker_rlimit_nofile 50000;
|
||||
'';
|
||||
eventsConfig = ''
|
||||
worker_connections 20000;
|
||||
multi_accept off;
|
||||
'';
|
||||
proxyCachePath = {
|
||||
"skycam" = {
|
||||
enable = true;
|
||||
keysZoneName = "skycam_cache";
|
||||
maxSize = "100m";
|
||||
};
|
||||
};
|
||||
virtualHosts =
|
||||
{
|
||||
## Static sites
|
||||
"jellyfin.vimium.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = nginxErrorPages + nginxEdgeHeaders;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8000";
|
||||
extraConfig = ''
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_set_header Range $http_range;
|
||||
proxy_set_header If-Range $http_if_range;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
'';
|
||||
};
|
||||
};
|
||||
"jdholt.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
serverAliases = [ "www.jdholt.com" ];
|
||||
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
||||
locations."/skycam/snapshot.jpg" = {
|
||||
extraConfig = ''
|
||||
set $backend "skycam.mesh.vimium.net:8080";
|
||||
|
||||
resolver 100.100.100.100;
|
||||
|
||||
proxy_pass http://$backend/snapshot;
|
||||
proxy_cache skycam_cache;
|
||||
proxy_cache_valid any 10s;
|
||||
proxy_ignore_headers Cache-Control Expires Set-Cookie;
|
||||
'';
|
||||
};
|
||||
locations."/".return = "301 https://vimium.com$request_uri";
|
||||
};
|
||||
"pki.vimium.com" = {
|
||||
addSSL = true;
|
||||
forceSSL = false;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
${nginxErrorPages}
|
||||
more_set_headers 'Server: Vimium';
|
||||
'';
|
||||
locations."/" = {
|
||||
root = "/var/www/pki.vimium.com";
|
||||
};
|
||||
};
|
||||
"suhailhussain.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
serverAliases = [ "www.suhailhussain.com" ];
|
||||
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
||||
locations."/" = {
|
||||
root = "/var/www/suhailhussain.com";
|
||||
};
|
||||
};
|
||||
"vimium.com" = {
|
||||
default = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
serverAliases = [ "www.vimium.com" ];
|
||||
extraConfig =
|
||||
nginxErrorPages
|
||||
+ nginxEdgeHeaders
|
||||
+ nginxStrictHeaders
|
||||
+ ''
|
||||
add_header Content-Security-Policy "default-src 'self' https://vimium.com https://www.vimium.com; style-src 'unsafe-inline'; object-src 'none'; upgrade-insecure-requests" always;
|
||||
'';
|
||||
locations."/" = {
|
||||
root = "/var/www/vimium.com";
|
||||
};
|
||||
};
|
||||
}
|
||||
## Redirects
|
||||
// (mkRedirect "h0lt.com" "jdholt.com")
|
||||
// (mkRedirect "jordanholt.xyz" "jdholt.com")
|
||||
// (mkRedirect "omnimagic.com" "vimium.com")
|
||||
// (mkRedirect "omnimagic.net" "vimium.com")
|
||||
// (mkRedirect "thelostlegend.com" "suhailhussain.com")
|
||||
// (mkRedirect "vimium.co" "vimium.com")
|
||||
// (mkRedirect "vimium.co.uk" "vimium.com")
|
||||
// (mkRedirect "vimium.info" "vimium.com")
|
||||
// (mkRedirect "vimium.net" "vimium.com")
|
||||
// (mkRedirect "vimium.org" "vimium.com")
|
||||
// (mkRedirect "vimium.xyz" "vimium.com");
|
||||
};
|
||||
};
|
||||
}
|
@ -1,9 +1,16 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.modules.services.photoprism;
|
||||
in {
|
||||
let
|
||||
cfg = config.modules.services.photoprism;
|
||||
in
|
||||
{
|
||||
options.modules.services.photoprism = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
@ -36,7 +43,7 @@ in {
|
||||
};
|
||||
|
||||
age.secrets."passwords/services/photoprism/admin" = {
|
||||
file = "${inputs.secrets}/passwords/services/photoprism/admin.age";
|
||||
file = "${self.inputs.secrets}/passwords/services/photoprism/admin.age";
|
||||
};
|
||||
|
||||
services.photoprism = {
|
@ -5,9 +5,10 @@
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.databases.postgresql;
|
||||
in {
|
||||
options.modules.databases.postgresql = {
|
||||
cfg = config.modules.services.postgresql;
|
||||
in
|
||||
{
|
||||
options.modules.services.postgresql = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,11 +1,18 @@
|
||||
{ config, inputs, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.networking.tailscale;
|
||||
cfg = config.modules.services.tailscale;
|
||||
headscale = "https://headscale.vimium.net";
|
||||
hostname = config.networking.hostName;
|
||||
in {
|
||||
options.modules.networking.tailscale = {
|
||||
in
|
||||
{
|
||||
options.modules.services.tailscale = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -18,7 +25,7 @@ in {
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets."passwords/services/tailscale/${hostname}-authkey" = {
|
||||
file = "${inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age";
|
||||
file = "${self.inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age";
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.tailscale ];
|
@ -1,8 +1,16 @@
|
||||
{ config, inputs, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.gnome;
|
||||
in {
|
||||
options.modules.desktop.gnome = {
|
||||
let
|
||||
cfg = config.modules.system.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.modules.system.desktop.gnome = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -24,6 +32,11 @@ in {
|
||||
"io/github/celluloid-player/celluloid" = {
|
||||
draggable-video-area-enable = true;
|
||||
};
|
||||
"org/gnome/Console" = {
|
||||
font-scale = 1.4;
|
||||
use-system-font = false;
|
||||
custom-font = "ComicShannsMono Nerd Font 10";
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
cursor-theme = "Adwaita";
|
||||
@ -61,6 +74,11 @@ in {
|
||||
edge-tiling = true;
|
||||
experimental-features = [ "scale-monitor-framebuffer" ];
|
||||
};
|
||||
"org/gnome/Ptyxis" = {
|
||||
use-system-font = false;
|
||||
font-name = "ComicShannsMono Nerd Font 11";
|
||||
audible-bell = false;
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
volume-up = [
|
||||
"<Shift>F12"
|
||||
@ -77,7 +95,6 @@ in {
|
||||
"appindicatorsupport@rgcjonas.gmail.com"
|
||||
# "arcmenu@arcmenu.com"
|
||||
"blur-my-shell@aunetx"
|
||||
# "browser-tabs@com.github.harshadgavali"
|
||||
"burn-my-windows@schneegans.github.com"
|
||||
"clipboard-indicator@tudmotu.com"
|
||||
"CoverflowAltTab@palatis.blogspot.com"
|
||||
@ -89,14 +106,13 @@ in {
|
||||
# "forge@jmmaranan.com"
|
||||
"gsconnect@andyholmes.github.io"
|
||||
# "gSnap@micahosborne"
|
||||
# "hidetopbar@mathieu.bidon.ca"
|
||||
"hidetopbar@mathieu.bidon.ca"
|
||||
"just-perfection-desktop@just-perfection"
|
||||
# "mediacontrols@cliffniff.github.com"
|
||||
# "mousefollowsfocus@matthes.biz"
|
||||
# "pano@elhan.io"
|
||||
# "paperwm@hedning:matrix.org"
|
||||
"pip-on-top@rafostar.github.com"
|
||||
# "rounded-window-corners@yilozt"
|
||||
# "search-light@icedman.github.com"
|
||||
# "smart-auto-move@khimaros.com"
|
||||
"space-bar@luchrioh"
|
||||
@ -110,6 +126,7 @@ in {
|
||||
favorite-apps = [
|
||||
"firefox.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"org.gnome.Ptyxis.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/extensions/blur-my-shell/panel" = {
|
||||
@ -183,11 +200,6 @@ in {
|
||||
outer-gaps = 8;
|
||||
enable-blur-snap-assistant = true;
|
||||
};
|
||||
"org/gnome/Console" = {
|
||||
font-scale = 1.4;
|
||||
use-system-font = false;
|
||||
custom-font = "ComicShannsMono Nerd Font 10";
|
||||
};
|
||||
"org/gtk/settings/file-chooser" = {
|
||||
show-hidden = true;
|
||||
sort-directories-first = true;
|
||||
@ -207,10 +219,12 @@ in {
|
||||
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI { } {
|
||||
General.theme = "KvLibadwaitaDark";
|
||||
};
|
||||
"Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
|
||||
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita";
|
||||
};
|
||||
|
||||
user.packages = with pkgs; [
|
||||
user.packages =
|
||||
with pkgs;
|
||||
[
|
||||
authenticator
|
||||
# bottles
|
||||
# bustle
|
||||
@ -218,8 +232,8 @@ in {
|
||||
# d-spy
|
||||
# drawing
|
||||
# fragments
|
||||
gnome.dconf-editor
|
||||
gnome.ghex
|
||||
dconf-editor
|
||||
ghex
|
||||
# gnome-builder
|
||||
gnome-decoder
|
||||
gnome-firmware
|
||||
@ -227,15 +241,22 @@ in {
|
||||
# gnome-obfuscate
|
||||
gnome-podcasts
|
||||
identity
|
||||
mission-center
|
||||
# mission-center
|
||||
mousam
|
||||
newsflash
|
||||
ptyxis
|
||||
# schemes
|
||||
shortwave
|
||||
sysprof
|
||||
] ++ (if config.virtualisation.podman.enable then [
|
||||
]
|
||||
++ (
|
||||
if config.virtualisation.podman.enable then
|
||||
[
|
||||
pods
|
||||
] else []);
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
);
|
||||
|
||||
environment.systemPackages = with pkgs.unstable; [
|
||||
adw-gtk3
|
||||
@ -250,7 +271,6 @@ in {
|
||||
gnomeExtensions.appindicator
|
||||
gnomeExtensions.arcmenu
|
||||
gnomeExtensions.blur-my-shell
|
||||
gnomeExtensions.browser-tabs
|
||||
gnomeExtensions.burn-my-windows
|
||||
gnomeExtensions.clipboard-indicator
|
||||
gnomeExtensions.coverflow-alt-tab
|
||||
@ -266,10 +286,9 @@ in {
|
||||
gnomeExtensions.just-perfection
|
||||
gnomeExtensions.media-controls
|
||||
gnomeExtensions.mouse-follows-focus
|
||||
gnomeExtensions.pano
|
||||
# gnomeExtensions.pano (disabled due to: https://github.com/NixOS/nixpkgs/issues/369438)
|
||||
gnomeExtensions.paperwm
|
||||
gnomeExtensions.pip-on-top
|
||||
gnomeExtensions.rounded-window-corners
|
||||
gnomeExtensions.search-light
|
||||
gnomeExtensions.smart-auto-move
|
||||
gnomeExtensions.space-bar
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.hyprland;
|
||||
in {
|
||||
options.modules.desktop.hyprland = {
|
||||
let
|
||||
cfg = config.modules.system.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
options.modules.system.desktop.hyprland = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,8 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let cfg = config.modules.desktop.kde;
|
||||
in {
|
||||
options.modules.desktop.kde = {
|
||||
let
|
||||
cfg = config.modules.system.desktop.kde;
|
||||
in
|
||||
{
|
||||
options.modules.system.desktop.kde = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,11 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.modules.desktop.mimeapps;
|
||||
cfg = config.modules.system.desktop.mimeapps;
|
||||
avApp = "io.github.celluloid_player.Celluloid.desktop";
|
||||
imageApp = "org.gnome.eog.desktop";
|
||||
in {
|
||||
options.modules.desktop.mimeapps = {
|
||||
in
|
||||
{
|
||||
options.modules.system.desktop.mimeapps = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
@ -1,10 +1,17 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.modules.networking.wireless;
|
||||
in {
|
||||
options.modules.networking.wireless = {
|
||||
let
|
||||
cfg = config.modules.system.wireless;
|
||||
in
|
||||
{
|
||||
options.modules.system.wireless = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
@ -19,16 +26,16 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets."passwords/networks" = {
|
||||
file = "${inputs.secrets}/passwords/networks.age";
|
||||
file = "${self.inputs.secrets}/passwords/networks.age";
|
||||
};
|
||||
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = cfg.interfaces;
|
||||
environmentFile = config.age.secrets."passwords/networks".path;
|
||||
secretsFile = config.age.secrets."passwords/networks".path;
|
||||
networks = {
|
||||
"Apollo 600 Mbps".psk = "@PSK_APOLLO@";
|
||||
"Apollo 600 Mbps".pskRaw = "ext:PSK_APOLLO";
|
||||
};
|
||||
};
|
||||
networkmanager.ensureProfiles.profiles = {
|
@ -1,82 +0,0 @@
|
||||
{ config, options, lib, home-manager, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options = with types; {
|
||||
user = mkOption { type = attrs; default = { }; };
|
||||
|
||||
home = {
|
||||
configFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_CONFIG_HOME"; };
|
||||
dataFile = mkOption { type = attrs; default = { }; description = "Files to place in $XDG_DATA_HOME"; };
|
||||
file = mkOption { type = attrs; default = { }; description = "Files to place directly in $HOME"; };
|
||||
packages = mkOption { type = attrs; default = { }; description = "User-level installed packages"; };
|
||||
programs = mkOption { type = attrs; default = { }; description = "Programs managed directly from home-manager"; };
|
||||
services = mkOption { type = attrs; default = { }; description = "Services managed directly from home-manager"; };
|
||||
};
|
||||
|
||||
dconf.settings = mkOption { type = attrs; default = { }; description = "dconf settings to enable"; };
|
||||
|
||||
env = mkOption {
|
||||
type = attrsOf (oneOf [ str path (listOf (either str path)) ]);
|
||||
apply = mapAttrs (n: v:
|
||||
if isList v then
|
||||
concatMapStringsSep ":" (x: toString x) v
|
||||
else
|
||||
(toString v));
|
||||
default = { };
|
||||
description = "";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
age.secrets."passwords/users/jordan".file = "${inputs.secrets}/passwords/users/jordan.age";
|
||||
user =
|
||||
let user = builtins.getEnv "USER";
|
||||
name = if elem user [ "" "root" ] then "jordan" else user;
|
||||
in {
|
||||
inherit name;
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" "lxd" "video" ];
|
||||
description = "Jordan Holt";
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
|
||||
];
|
||||
hashedPasswordFile = config.age.secrets."passwords/users/jordan".path;
|
||||
home = "/home/${name}";
|
||||
group = "users";
|
||||
uid = 1000;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
users.${config.user.name} = {
|
||||
home = {
|
||||
file = mkAliasDefinitions options.home.file;
|
||||
stateVersion = config.system.stateVersion;
|
||||
};
|
||||
programs = mkAliasDefinitions options.home.programs;
|
||||
services = mkAliasDefinitions options.home.services;
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = mkAliasDefinitions options.home.configFile;
|
||||
dataFile = mkAliasDefinitions options.home.dataFile;
|
||||
};
|
||||
dconf.settings = mkAliasDefinitions options.dconf.settings;
|
||||
};
|
||||
|
||||
sharedModules = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
};
|
||||
|
||||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
||||
|
||||
environment.extraInit =
|
||||
concatStringsSep "\n"
|
||||
(mapAttrsToList (n: v: "export ${n}=\"${v}\"") config.env);
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user