Compare commits
1 Commits
hass
...
4082863b9b
Author | SHA1 | Date | |
---|---|---|---|
4082863b9b
|
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright (C) 2025 by Jordan Holt <jordan@vimium.com>
|
Copyright (C) 2023 by Jordan Holt <jordan@vimium.com>
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
purpose with or without fee is hereby granted.
|
purpose with or without fee is hereby granted.
|
||||||
|
@@ -6,8 +6,8 @@ System and user configuration for NixOS-based systems.
|
|||||||
|-|-|
|
|-|-|
|
||||||
| **Shell:** | zsh |
|
| **Shell:** | zsh |
|
||||||
| **DE:** | GNOME |
|
| **DE:** | GNOME |
|
||||||
| **Theme:** | Adwaita |
|
| **Theme:** | adwaita |
|
||||||
| **Terminal:** | Ptyxis |
|
| **Terminal:** | Console |
|
||||||
|
|
||||||
## Provisioning a new host
|
## Provisioning a new host
|
||||||
> [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) is the module used
|
> [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) is the module used
|
||||||
|
253
flake.lock
generated
253
flake.lock
generated
@@ -8,11 +8,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723293904,
|
"lastModified": 1720546205,
|
||||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
"narHash": "sha256-boCXsjYVxDviyzoEyAk624600f3ZBo/DKtUdvMTpbGY=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
"rev": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -66,11 +66,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727447169,
|
"lastModified": 1718194053,
|
||||||
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
|
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
|
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -81,17 +81,18 @@
|
|||||||
},
|
},
|
||||||
"devshell": {
|
"devshell": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728330715,
|
"lastModified": 1717408969,
|
||||||
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
|
"narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "devshell",
|
"repo": "devshell",
|
||||||
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
|
"rev": "1ebbe68d57457c8cae98145410b164b5477761f4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -107,11 +108,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735468753,
|
"lastModified": 1721417620,
|
||||||
"narHash": "sha256-2dt1nOe9zf9pDkf5Kn7FUFyPRo581s0n90jxYXJ94l0=",
|
"narHash": "sha256-6q9b1h8fI3hXg2DG6/vrKWCeG8c5Wj2Kvv22RCgedzg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "84a5b93637cc16cbfcc61b6e1684d626df61eb21",
|
"rev": "bec6e3cde912b8acb915fecdc509eda7c973fb42",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -123,11 +124,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735511798,
|
"lastModified": 1721276923,
|
||||||
"narHash": "sha256-U9WjPisByrvw8Kt6Ufg9kLrvg7uHPsFSyG93GR3I1iE=",
|
"narHash": "sha256-HJKuwVvi+yGv+8n9Ez4EwaJA0B79JRss9J30vpgy/GI=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "097c98cb4a7568f6f83a43e37950c08b575dd126",
|
"rev": "cc70ec20e2775df7cd2bccdd20dcdecc3e0a733b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -182,6 +183,22 @@
|
|||||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat_4": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
@@ -190,11 +207,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733312601,
|
"lastModified": 1719994518,
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -205,14 +222,14 @@
|
|||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1701680307,
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -223,10 +240,7 @@
|
|||||||
},
|
},
|
||||||
"git-hooks": {
|
"git-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": [
|
"flake-compat": "flake-compat_4",
|
||||||
"nixvim",
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
@@ -238,11 +252,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734797603,
|
"lastModified": 1721038330,
|
||||||
"narHash": "sha256-ulZN7ps8nBV31SE+dwkDvKIzvN6hroRY8sYOT0w+E28=",
|
"narHash": "sha256-DyIGJ+DEnKeGd346YJCwjmp9hXwiYq8wqGtikgbDqSc=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "f0f0dc4920a903c3e08f5bdb9246bb572fcae498",
|
"rev": "622291c026190caf13cb26f5136616b1ff0a07aa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -318,16 +332,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735344290,
|
"lastModified": 1720042825,
|
||||||
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=",
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "613691f285dad87694c2ba1c9e6298d04736292d",
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.11",
|
"ref": "release-24.05",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -340,48 +354,20 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735344290,
|
"lastModified": 1720042825,
|
||||||
"narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=",
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "613691f285dad87694c2ba1c9e6298d04736292d",
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.11",
|
"ref": "release-24.05",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"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": {
|
"kvlibadwaita": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -406,11 +392,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735218083,
|
"lastModified": 1720845312,
|
||||||
"narHash": "sha256-MoUAbmXz9TEr7zlKDRO56DBJHe30+7B5X7nhXm+Vpc8=",
|
"narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "bc03f7818771a75716966ce8c23110b715eff2aa",
|
"rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -421,11 +407,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735388221,
|
"lastModified": 1721413321,
|
||||||
"narHash": "sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg=",
|
"narHash": "sha256-0GdiQScDceUrVGbxYpV819LHesK3szHOhJ09e6sgES4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "7c674c6734f61157e321db595dbfcd8523e04e19",
|
"rev": "ab165a8a6cd12781d76fe9cbccb9e975d0fb634f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -441,18 +427,20 @@
|
|||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nixpkgs-24_11": "nixpkgs-24_11"
|
"nixpkgs-24_05": "nixpkgs-24_05",
|
||||||
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735230346,
|
"lastModified": 1718084203,
|
||||||
"narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=",
|
"narHash": "sha256-Cx1xoVfSMv1XDLgKg08CUd1EoTYWB45VmB9XIQzhmzI=",
|
||||||
"owner": "simple-nixos-mailserver",
|
"owner": "simple-nixos-mailserver",
|
||||||
"repo": "nixos-mailserver",
|
"repo": "nixos-mailserver",
|
||||||
"rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b",
|
"rev": "29916981e7b3b5782dc5085ad18490113f8ff63b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "simple-nixos-mailserver",
|
"owner": "simple-nixos-mailserver",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixos-mailserver",
|
"repo": "nixos-mailserver",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
@@ -473,28 +461,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-24_11": {
|
"nixpkgs-24_05": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734083684,
|
"lastModified": 1717144377,
|
||||||
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
|
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
|
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-24.05",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735471104,
|
"lastModified": 1721379653,
|
||||||
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
|
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
|
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -521,16 +509,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735669367,
|
"lastModified": 1721409541,
|
||||||
"narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=",
|
"narHash": "sha256-b6PLr0Ty7JPDBtJtjnYzlBf02bbH9alWMAgispMkTwk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9",
|
"rev": "0c53b6b8c2a3e46c68e04417e247bba660689c9d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-24.05",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -545,47 +533,23 @@
|
|||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nuschtosSearch": "nuschtosSearch",
|
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735389157,
|
"lastModified": 1721045803,
|
||||||
"narHash": "sha256-3co5A7PUEN+Bm7b3/6BxFsmvplg3XYUNR2MzWnheZoE=",
|
"narHash": "sha256-dQGvOK+t45unF7DTp5bfO37hY0NkDUw6X3MH5CCTEAs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "c8fa65c6ac35dba157de0873d645ab398c370123",
|
"rev": "eef2f4c6b190d92e296e47e5fe10e7ced65fd959",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nuschtosSearch": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"ixx": "ixx",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixvim",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733773348,
|
|
||||||
"narHash": "sha256-Y47y+LesOCkJaLvj+dI/Oa6FAKj/T9sKVKDXLNsViPw=",
|
|
||||||
"owner": "NuschtOS",
|
|
||||||
"repo": "search",
|
|
||||||
"rev": "3051be7f403bff1d1d380e4612f0c70675b44fc9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NuschtOS",
|
|
||||||
"repo": "search",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"plasma-manager": {
|
"plasma-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": [
|
"home-manager": [
|
||||||
@@ -596,11 +560,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735049224,
|
"lastModified": 1720992717,
|
||||||
"narHash": "sha256-fWUd9kyXdepphJ7cCzOsuSo7l0kbFCkUqfgKqZyFZzE=",
|
"narHash": "sha256-8j1bZVfKT1vJ0e+U7NYRNBG+DdBj5C/tpwe5krxT4/4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "plasma-manager",
|
"repo": "plasma-manager",
|
||||||
"rev": "d16bbded0ae452bc088489e7dca3ef58d8d1830b",
|
"rev": "460b48dc3dcd05df568e27cbb90581d23baec8dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -631,11 +595,11 @@
|
|||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730732927,
|
"lastModified": 1720459643,
|
||||||
"narHash": "sha256-t3MTEgi6O7DMxMjdi3xcTAztLDQmEtqQ+oU+ZbWz2AI=",
|
"narHash": "sha256-X71/NplPXPe9pCvrd9ELpnYBEYtju4+x3LA7S5I1GXM=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "4ae2ac777c38f60a29384b70c456f41847cdf1b5",
|
"rev": "f8d68b934f4380ecbc6365b4ef7f7c632833d1aa",
|
||||||
"revCount": 28,
|
"revCount": 21,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||||
},
|
},
|
||||||
@@ -689,14 +653,29 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"thunderbird-gnome-theme": {
|
"thunderbird-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732643121,
|
"lastModified": 1721309490,
|
||||||
"narHash": "sha256-i0Uo5EN45rlGuR85hvPet43zW/thOQTwHypVg9shTHU=",
|
"narHash": "sha256-Xheela/OazoNH9YjP9IgC3hzxQdnPHRQMeH9yW7xl2c=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "thunderbird-gnome-theme",
|
"repo": "thunderbird-gnome-theme",
|
||||||
"rev": "1994e7ec0649053e2a0811973245758d41e33f5f",
|
"rev": "1c89a500dd35b7746ef1fde104a1baf809c2b59a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -713,11 +692,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735135567,
|
"lastModified": 1720930114,
|
||||||
"narHash": "sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q+T0BVeZE=",
|
"narHash": "sha256-VZK73b5hG5bSeAn97TTcnPjXUXtV7j/AtS4KN8ggCS0=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "9e09d30a644c57257715902efbb3adc56c79cf28",
|
"rev": "b92afa1501ac73f1d745526adc4f89b527595f14",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -743,6 +722,24 @@
|
|||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"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",
|
"root": "root",
|
||||||
|
135
flake.nix
135
flake.nix
@@ -2,7 +2,7 @@
|
|||||||
description = "NixOS system configuration";
|
description = "NixOS system configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-24.11";
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||||
# nixpkgs-master.url = "nixpkgs";
|
# nixpkgs-master.url = "nixpkgs";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.11";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
firefox-gnome-theme = {
|
firefox-gnome-theme = {
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
};
|
};
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
nixos-mailserver = {
|
nixos-mailserver = {
|
||||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim/nixos-24.11";
|
url = "github:nix-community/nixvim/nixos-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
plasma-manager = {
|
plasma-manager = {
|
||||||
@@ -51,60 +51,65 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, ... }:
|
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, deploy-rs, disko, home-manager, nixos-hardware, nixos-mailserver, ... }:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
mkPkgsForSystem = system: inputs.nixpkgs;
|
||||||
|
overlays = [
|
||||||
domain = "mesh.vimium.net";
|
agenix.overlays.default
|
||||||
forEverySystem = lib.getAttrs lib.systems.flakeExposed;
|
(import ./overlays/gnome.nix)
|
||||||
forEachSystem = lib.genAttrs [
|
(
|
||||||
"x86_64-linux"
|
final: prev: {
|
||||||
"aarch64-linux"
|
unstable = import inputs.nixpkgs-unstable { system = final.system; };
|
||||||
|
custom = self.packages { system = final.system; };
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
mkDeployNode = hostName: {
|
commonModules = [
|
||||||
hostname = "${hostName}.${domain}";
|
agenix.nixosModules.age
|
||||||
|
disko.nixosModules.disko
|
||||||
profiles.system = {
|
nixos-mailserver.nixosModule
|
||||||
user = "root";
|
home-manager.nixosModule
|
||||||
path = inputs.deploy-rs.lib.${self.nixosConfigurations.${hostName}.config.system.build.toplevel.system}.activate.nixos self.nixosConfigurations.${hostName};
|
./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, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.pkgs = import nixpkgs {
|
||||||
|
inherit overlays system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
config.nvidia.acceptLicense = true;
|
||||||
};
|
};
|
||||||
|
networking.hostName = name;
|
||||||
|
})
|
||||||
|
./hosts/${name}
|
||||||
|
] ++ extraModules;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
overlays = lib.packagesFromDirectoryRecursive {
|
nixosConfigurations = {
|
||||||
callPackage = path: overrides: import path;
|
atlas = mkNixosSystem { system = "x86_64-linux"; name = "atlas"; };
|
||||||
directory = ./overlays;
|
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 ]; };
|
||||||
|
vps1 = mkNixosSystem { system = "x86_64-linux"; name = "vps1"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
legacyPackages = forEachSystem (system:
|
|
||||||
lib.packagesFromDirectoryRecursive {
|
|
||||||
callPackage = nixpkgs.legacyPackages.${system}.callPackage;
|
|
||||||
directory = ./pkgs;
|
|
||||||
});
|
|
||||||
|
|
||||||
nixosConfigurations = lib.pipe ./hosts [
|
|
||||||
builtins.readDir
|
|
||||||
(lib.filterAttrs (name: value: value == "directory"))
|
|
||||||
(lib.mapAttrs (name: value:
|
|
||||||
lib.nixosSystem {
|
|
||||||
specialArgs = { inherit self; };
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
networking = {
|
|
||||||
inherit domain;
|
|
||||||
hostName = name;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./hosts/${name}
|
|
||||||
];
|
|
||||||
}))
|
|
||||||
];
|
|
||||||
|
|
||||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
inputs.agenix.packages.x86_64-linux.agenix
|
deploy-rs.packages.x86_64-linux.deploy-rs
|
||||||
inputs.deploy-rs.packages.x86_64-linux.deploy-rs
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -112,15 +117,35 @@
|
|||||||
magicRollback = true;
|
magicRollback = true;
|
||||||
autoRollback = true;
|
autoRollback = true;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
nodes = lib.genAttrs [
|
nodes = {
|
||||||
"mail"
|
mail = {
|
||||||
# "pi"
|
hostname = "mail.mesh.vimium.net";
|
||||||
# "skycam"
|
|
||||||
"vps1"
|
profiles.system = {
|
||||||
] mkDeployNode;
|
user = "root";
|
||||||
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mail;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,8 +6,6 @@
|
|||||||
../desktop.nix
|
../desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
@@ -1,22 +1,6 @@
|
|||||||
{ config, pkgs, self, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
self.inputs.agenix.nixosModules.age
|
|
||||||
self.inputs.home-manager.nixosModule
|
|
||||||
../modules
|
|
||||||
];
|
|
||||||
|
|
||||||
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";
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
@@ -54,21 +38,10 @@
|
|||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixVersions.stable;
|
package = pkgs.nixFlakes;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
buildMachines = [
|
|
||||||
{
|
|
||||||
hostName = "10.0.1.79";
|
|
||||||
sshUser = "root";
|
|
||||||
system = "aarch64-linux";
|
|
||||||
maxJobs = 6;
|
|
||||||
speedFactor = 1;
|
|
||||||
supportedFeatures = [ "big-parallel" "benchmark" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
distributedBuilds = true;
|
|
||||||
settings = {
|
settings = {
|
||||||
connect-timeout = 5;
|
connect-timeout = 5;
|
||||||
log-lines = 25;
|
log-lines = 25;
|
||||||
|
@@ -1,17 +1,14 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
services.printing.enable = true;
|
||||||
(import ../overlays/gnome.nix)
|
|
||||||
];
|
|
||||||
|
|
||||||
services.printing.enable = false;
|
|
||||||
services.openssh.startWhenNeeded = true;
|
services.openssh.startWhenNeeded = true;
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
@@ -62,7 +59,7 @@
|
|||||||
fd
|
fd
|
||||||
ffmpeg
|
ffmpeg
|
||||||
iotop
|
iotop
|
||||||
# unstable.nix-du
|
unstable.nix-du
|
||||||
# unstable.nix-melt
|
# unstable.nix-melt
|
||||||
unstable.nix-tree
|
unstable.nix-tree
|
||||||
unstable.nix-visualize
|
unstable.nix-visualize
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,8 +6,6 @@
|
|||||||
../desktop.nix
|
../desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
@@ -7,12 +7,11 @@
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
|
initrd.kernelModules = [ ];
|
||||||
initrd.supportedFilesystems = [ "zfs" ];
|
initrd.supportedFilesystems = [ "zfs" ];
|
||||||
kernel.sysctl = {
|
kernelModules = [ ];
|
||||||
"kernel.nmi_watchdog" = 0;
|
|
||||||
"vm.laptop_mode" = 5;
|
|
||||||
};
|
|
||||||
kernelParams = [ "elevator=none" ];
|
kernelParams = [ "elevator=none" ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
supportedFilesystems = [ "zfs" ];
|
supportedFilesystems = [ "zfs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,8 +6,6 @@
|
|||||||
../desktop.nix
|
../desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.grub = {
|
loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@@ -1,21 +1,12 @@
|
|||||||
{ config, lib, self, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
self.inputs.disko.nixosModules.disko
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disko-config.nix
|
./disko-config.nix
|
||||||
../desktop.nix
|
../desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
hostPlatform = "x86_64-linux";
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
nvidia.acceptLicense = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
@@ -7,10 +7,6 @@
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
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" ];
|
kernelModules = [ "applesmc" "kvm-intel" "wl" ];
|
||||||
extraModulePackages = [
|
extraModulePackages = [
|
||||||
config.boot.kernelPackages.broadcom_sta
|
config.boot.kernelPackages.broadcom_sta
|
||||||
@@ -29,12 +25,13 @@
|
|||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
};
|
};
|
||||||
graphics = {
|
opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
];
|
];
|
||||||
enable32Bit = true;
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -6,8 +6,6 @@
|
|||||||
../server.nix
|
../server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
@@ -15,6 +13,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
domain = "mesh.vimium.net";
|
||||||
hostId = "d24ae953";
|
hostId = "d24ae953";
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -156,16 +155,16 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
vaapiVdpau
|
vaapiVdpau
|
||||||
];
|
];
|
||||||
|
driSupport = true;
|
||||||
};
|
};
|
||||||
users.users.jellyfin.extraGroups = [ "video" "render" ];
|
users.users.jellyfin.extraGroups = [ "video" "render" ];
|
||||||
services.jellyfin = {
|
services.jellyfin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.unstable.jellyfin;
|
|
||||||
cacheDir = "/var/cache/jellyfin";
|
cacheDir = "/var/cache/jellyfin";
|
||||||
dataDir = "/var/lib/jellyfin";
|
dataDir = "/var/lib/jellyfin";
|
||||||
};
|
};
|
||||||
|
@@ -1,17 +1,15 @@
|
|||||||
{ config, lib, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
self.inputs.disko.nixosModules.disko
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disko-config.nix
|
./disko-config.nix
|
||||||
../server.nix
|
../server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostId = "08ac2f14";
|
hostId = "08ac2f14";
|
||||||
|
domain = "mesh.vimium.net";
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,14 +6,6 @@
|
|||||||
../desktop.nix
|
../desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
|
||||||
hostPlatform = "x86_64-linux";
|
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
nvidia.acceptLicense = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
nvidia = {
|
nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
open = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
};
|
};
|
||||||
|
@@ -1,13 +1,12 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../server.nix
|
../server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "aarch64-linux";
|
networking.hostId = "731d1660";
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
raspberry-pi."4" = {
|
raspberry-pi."4" = {
|
||||||
@@ -98,7 +97,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostId = "731d1660";
|
sound.enable = true;
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
@@ -108,6 +107,111 @@
|
|||||||
pulse.enable = true;
|
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 = {
|
modules = {
|
||||||
networking = {
|
networking = {
|
||||||
wireless = {
|
wireless = {
|
||||||
@@ -118,9 +222,12 @@
|
|||||||
services = {
|
services = {
|
||||||
borgmatic = {
|
borgmatic = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
directories = [
|
||||||
|
"/var/lib/mosquitto"
|
||||||
|
"/var/lib/zigbee2mqtt"
|
||||||
|
];
|
||||||
repoPath = "ssh://qcw86s11@qcw86s11.repo.borgbase.com/./repo";
|
repoPath = "ssh://qcw86s11@qcw86s11.repo.borgbase.com/./repo";
|
||||||
};
|
};
|
||||||
home-assistant.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,40 +6,6 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
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
|
# 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;
|
tmp.cleanOnBoot = true;
|
||||||
@@ -48,24 +14,9 @@
|
|||||||
# Fix missing modules
|
# Fix missing modules
|
||||||
# https://github.com/NixOS/nixpkgs/issues/154163
|
# https://github.com/NixOS/nixpkgs/issues/154163
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: super: {
|
||||||
makeModulesClosure = x:
|
makeModulesClosure = x:
|
||||||
prev.makeModulesClosure (x // { allowMissing = true; });
|
super.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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -1,29 +0,0 @@
|
|||||||
# Skycam
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
Raspberry Pi 4-based webcam
|
|
||||||
|
|
||||||
## Specs
|
|
||||||
* SoC - Broadcom BCM2711
|
|
||||||
* CPU - ARM Cortex-A72 @ 1.8 GHz
|
|
||||||
* Memory - 8 GB LPDDR4
|
|
||||||
|
|
||||||
### Disks
|
|
||||||
Device | Partitions _(filesystem, usage)_
|
|
||||||
--- | ---
|
|
||||||
SD card | `/dev/mmcblk0` (ext4, NixOS Root)
|
|
||||||
|
|
||||||
### Networks
|
|
||||||
- DHCP on `10.0.1.0/24` subnet.
|
|
||||||
- Tailscale on `100.64.0.0/10` subnet. FQDN: `skycam.mesh.vimium.net`.
|
|
||||||
|
|
||||||
## 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,111 +0,0 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
self.inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../server.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
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";
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [ 8080 ];
|
|
||||||
allowedUDPPorts = [ 8080 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.root = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
|
||||||
|
|
||||||
systemd.services.ustreamer = {
|
|
||||||
enable = true;
|
|
||||||
description = "uStreamer service";
|
|
||||||
unitConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
ConditionPathExists = "/sys/bus/i2c/drivers/imx708/10-001a/video4linux";
|
|
||||||
};
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = ''${pkgs.libcamera}/bin/libcamerify ${pkgs.unstable.ustreamer}/bin/ustreamer \
|
|
||||||
--host=0.0.0.0 \
|
|
||||||
--resolution=4608x2592
|
|
||||||
'';
|
|
||||||
DynamicUser = "yes";
|
|
||||||
SupplementaryGroups = [ "video" ];
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 10;
|
|
||||||
};
|
|
||||||
wantedBy = [ "network-online.target" ];
|
|
||||||
confinement.mode = "chroot-only";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
camera-streamer
|
|
||||||
git
|
|
||||||
neovim
|
|
||||||
libcamera
|
|
||||||
libraspberrypi
|
|
||||||
raspberrypi-eeprom
|
|
||||||
v4l-utils
|
|
||||||
unstable.ustreamer
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
{ config, 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";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "noatime" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -6,10 +9,9 @@
|
|||||||
../server.nix
|
../server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostId = "08bf6db3";
|
hostId = "08bf6db3";
|
||||||
|
domain = "mesh.vimium.net";
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
@@ -37,47 +39,10 @@
|
|||||||
groups = {
|
groups = {
|
||||||
jellyfin = { };
|
jellyfin = { };
|
||||||
};
|
};
|
||||||
extraGroups.acme.members = [ "kanidm" "nginx" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
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 {
|
modules = rec {
|
||||||
databases.postgresql.enable = true;
|
databases.postgresql.enable = true;
|
||||||
services = {
|
services = {
|
||||||
|
@@ -32,7 +32,6 @@
|
|||||||
./editors/neovim
|
./editors/neovim
|
||||||
./editors/vscode.nix
|
./editors/vscode.nix
|
||||||
./hardware/presonus-studio.nix
|
./hardware/presonus-studio.nix
|
||||||
./networking/netbird.nix
|
|
||||||
./networking/tailscale.nix
|
./networking/tailscale.nix
|
||||||
./networking/wireless.nix
|
./networking/wireless.nix
|
||||||
./security/gpg.nix
|
./security/gpg.nix
|
||||||
@@ -43,7 +42,6 @@
|
|||||||
./services/gitea
|
./services/gitea
|
||||||
./services/gitea-runner
|
./services/gitea-runner
|
||||||
./services/headscale
|
./services/headscale
|
||||||
./services/home-assistant
|
|
||||||
./services/mail
|
./services/mail
|
||||||
./services/matrix
|
./services/matrix
|
||||||
./services/nginx
|
./services/nginx
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.apps.thunderbird;
|
let cfg = config.modules.desktop.apps.thunderbird;
|
||||||
in {
|
in {
|
||||||
@@ -10,7 +10,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = self.inputs.thunderbird-gnome-theme;
|
home.file.".thunderbird/Default/chrome/thunderbird-gnome-theme".source = inputs.thunderbird-gnome-theme;
|
||||||
|
|
||||||
home.programs.thunderbird = {
|
home.programs.thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.browsers.brave;
|
let cfg = config.modules.desktop.browsers.brave;
|
||||||
in {
|
in {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, self, ... }:
|
{ config, lib, inputs, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.browsers.firefox;
|
let cfg = config.modules.desktop.browsers.firefox;
|
||||||
in {
|
in {
|
||||||
@@ -10,7 +10,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = self.inputs.firefox-gnome-theme;
|
home.file.".mozilla/firefox/Default/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
|
||||||
|
|
||||||
home.programs.firefox = {
|
home.programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@@ -21,9 +21,10 @@ in {
|
|||||||
vulkan-tools
|
vulkan-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{ config, inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.desktop.gnome;
|
let cfg = config.modules.desktop.gnome;
|
||||||
in {
|
in {
|
||||||
@@ -24,11 +24,6 @@ in {
|
|||||||
"io/github/celluloid-player/celluloid" = {
|
"io/github/celluloid-player/celluloid" = {
|
||||||
draggable-video-area-enable = true;
|
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" = {
|
"org/gnome/desktop/interface" = {
|
||||||
color-scheme = "prefer-dark";
|
color-scheme = "prefer-dark";
|
||||||
cursor-theme = "Adwaita";
|
cursor-theme = "Adwaita";
|
||||||
@@ -66,11 +61,6 @@ in {
|
|||||||
edge-tiling = true;
|
edge-tiling = true;
|
||||||
experimental-features = [ "scale-monitor-framebuffer" ];
|
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" = {
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||||
volume-up = [
|
volume-up = [
|
||||||
"<Shift>F12"
|
"<Shift>F12"
|
||||||
@@ -87,6 +77,7 @@ in {
|
|||||||
"appindicatorsupport@rgcjonas.gmail.com"
|
"appindicatorsupport@rgcjonas.gmail.com"
|
||||||
# "arcmenu@arcmenu.com"
|
# "arcmenu@arcmenu.com"
|
||||||
"blur-my-shell@aunetx"
|
"blur-my-shell@aunetx"
|
||||||
|
# "browser-tabs@com.github.harshadgavali"
|
||||||
"burn-my-windows@schneegans.github.com"
|
"burn-my-windows@schneegans.github.com"
|
||||||
"clipboard-indicator@tudmotu.com"
|
"clipboard-indicator@tudmotu.com"
|
||||||
"CoverflowAltTab@palatis.blogspot.com"
|
"CoverflowAltTab@palatis.blogspot.com"
|
||||||
@@ -98,18 +89,18 @@ in {
|
|||||||
# "forge@jmmaranan.com"
|
# "forge@jmmaranan.com"
|
||||||
"gsconnect@andyholmes.github.io"
|
"gsconnect@andyholmes.github.io"
|
||||||
# "gSnap@micahosborne"
|
# "gSnap@micahosborne"
|
||||||
"hidetopbar@mathieu.bidon.ca"
|
# "hidetopbar@mathieu.bidon.ca"
|
||||||
"just-perfection-desktop@just-perfection"
|
"just-perfection-desktop@just-perfection"
|
||||||
# "mediacontrols@cliffniff.github.com"
|
# "mediacontrols@cliffniff.github.com"
|
||||||
# "mousefollowsfocus@matthes.biz"
|
# "mousefollowsfocus@matthes.biz"
|
||||||
# "pano@elhan.io"
|
# "pano@elhan.io"
|
||||||
# "paperwm@hedning:matrix.org"
|
# "paperwm@hedning:matrix.org"
|
||||||
"pip-on-top@rafostar.github.com"
|
"pip-on-top@rafostar.github.com"
|
||||||
|
# "rounded-window-corners@yilozt"
|
||||||
# "search-light@icedman.github.com"
|
# "search-light@icedman.github.com"
|
||||||
# "smart-auto-move@khimaros.com"
|
# "smart-auto-move@khimaros.com"
|
||||||
"space-bar@luchrioh"
|
"space-bar@luchrioh"
|
||||||
# "tiling-assistant@leleat-on-github"
|
# "tiling-assistant@leleat-on-github"
|
||||||
"tilingshell@ferrarodomenico.com"
|
|
||||||
"Vitals@CoreCoding.com"
|
"Vitals@CoreCoding.com"
|
||||||
"windowIsReady_Remover@nunofarruca@gmail.com"
|
"windowIsReady_Remover@nunofarruca@gmail.com"
|
||||||
# "worksets@blipk.xyz"
|
# "worksets@blipk.xyz"
|
||||||
@@ -118,7 +109,6 @@ in {
|
|||||||
favorite-apps = [
|
favorite-apps = [
|
||||||
"firefox.desktop"
|
"firefox.desktop"
|
||||||
"org.gnome.Nautilus.desktop"
|
"org.gnome.Nautilus.desktop"
|
||||||
"org.gnome.Ptyxis.desktop"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"org/gnome/shell/extensions/blur-my-shell/panel" = {
|
"org/gnome/shell/extensions/blur-my-shell/panel" = {
|
||||||
@@ -187,10 +177,10 @@ in {
|
|||||||
screen-left-gap = 8;
|
screen-left-gap = 8;
|
||||||
window-gap = 8;
|
window-gap = 8;
|
||||||
};
|
};
|
||||||
"org/gnome/shell/extensions/tilingshell" = {
|
"org/gnome/Console" = {
|
||||||
inner-gaps = 16;
|
font-scale = 1.4;
|
||||||
outer-gaps = 8;
|
use-system-font = false;
|
||||||
enable-blur-snap-assistant = true;
|
custom-font = "ComicShannsMono Nerd Font 10";
|
||||||
};
|
};
|
||||||
"org/gtk/settings/file-chooser" = {
|
"org/gtk/settings/file-chooser" = {
|
||||||
show-hidden = true;
|
show-hidden = true;
|
||||||
@@ -211,7 +201,7 @@ in {
|
|||||||
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
|
"Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
|
||||||
General.theme = "KvLibadwaitaDark";
|
General.theme = "KvLibadwaitaDark";
|
||||||
};
|
};
|
||||||
"Kvantum/KvLibadwaita".source = "${self.inputs.kvlibadwaita}/src/KvLibadwaita";
|
"Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
|
||||||
};
|
};
|
||||||
|
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
@@ -222,8 +212,8 @@ in {
|
|||||||
# d-spy
|
# d-spy
|
||||||
# drawing
|
# drawing
|
||||||
# fragments
|
# fragments
|
||||||
dconf-editor
|
gnome.dconf-editor
|
||||||
ghex
|
gnome.ghex
|
||||||
# gnome-builder
|
# gnome-builder
|
||||||
gnome-decoder
|
gnome-decoder
|
||||||
gnome-firmware
|
gnome-firmware
|
||||||
@@ -231,10 +221,9 @@ in {
|
|||||||
# gnome-obfuscate
|
# gnome-obfuscate
|
||||||
gnome-podcasts
|
gnome-podcasts
|
||||||
identity
|
identity
|
||||||
# mission-center
|
mission-center
|
||||||
mousam
|
mousam
|
||||||
newsflash
|
newsflash
|
||||||
ptyxis
|
|
||||||
# schemes
|
# schemes
|
||||||
shortwave
|
shortwave
|
||||||
sysprof
|
sysprof
|
||||||
@@ -255,6 +244,7 @@ in {
|
|||||||
gnomeExtensions.appindicator
|
gnomeExtensions.appindicator
|
||||||
gnomeExtensions.arcmenu
|
gnomeExtensions.arcmenu
|
||||||
gnomeExtensions.blur-my-shell
|
gnomeExtensions.blur-my-shell
|
||||||
|
gnomeExtensions.browser-tabs
|
||||||
gnomeExtensions.burn-my-windows
|
gnomeExtensions.burn-my-windows
|
||||||
gnomeExtensions.clipboard-indicator
|
gnomeExtensions.clipboard-indicator
|
||||||
gnomeExtensions.coverflow-alt-tab
|
gnomeExtensions.coverflow-alt-tab
|
||||||
@@ -270,14 +260,15 @@ in {
|
|||||||
gnomeExtensions.just-perfection
|
gnomeExtensions.just-perfection
|
||||||
gnomeExtensions.media-controls
|
gnomeExtensions.media-controls
|
||||||
gnomeExtensions.mouse-follows-focus
|
gnomeExtensions.mouse-follows-focus
|
||||||
# gnomeExtensions.pano (disabled due to: https://github.com/NixOS/nixpkgs/issues/369438)
|
gnomeExtensions.pano
|
||||||
gnomeExtensions.paperwm
|
gnomeExtensions.paperwm
|
||||||
gnomeExtensions.pip-on-top
|
gnomeExtensions.pip-on-top
|
||||||
|
gnomeExtensions.rounded-window-corners
|
||||||
gnomeExtensions.search-light
|
gnomeExtensions.search-light
|
||||||
gnomeExtensions.smart-auto-move
|
gnomeExtensions.smart-auto-move
|
||||||
gnomeExtensions.space-bar
|
gnomeExtensions.space-bar
|
||||||
gnomeExtensions.tiling-assistant
|
gnomeExtensions.tiling-assistant
|
||||||
gnomeExtensions.tiling-shell
|
# gnomeExtensions.tiling-shell
|
||||||
gnomeExtensions.todotxt
|
gnomeExtensions.todotxt
|
||||||
gnomeExtensions.vitals
|
gnomeExtensions.vitals
|
||||||
gnomeExtensions.window-is-ready-remover
|
gnomeExtensions.window-is-ready-remover
|
||||||
|
@@ -11,7 +11,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.programs.nixvim.config = {
|
home.programs.nixvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
|
||||||
@@ -59,15 +59,15 @@ in {
|
|||||||
eslint.enable = true;
|
eslint.enable = true;
|
||||||
gopls.enable = true;
|
gopls.enable = true;
|
||||||
html.enable = true;
|
html.enable = true;
|
||||||
lua_ls.enable = true;
|
lua-ls.enable = true;
|
||||||
pylsp.enable = true;
|
pylsp.enable = true;
|
||||||
nixd.enable = true;
|
nixd.enable = true;
|
||||||
rust_analyzer = {
|
rust-analyzer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
installCargo = true;
|
installCargo = true;
|
||||||
installRustc = true;
|
installRustc = true;
|
||||||
};
|
};
|
||||||
ts_ls.enable = true;
|
tsserver.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ in {
|
|||||||
nixvimInjections = true;
|
nixvimInjections = true;
|
||||||
|
|
||||||
folding = true;
|
folding = true;
|
||||||
settings.indent.enable = true;
|
indent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins.treesitter-refactor = {
|
plugins.treesitter-refactor = {
|
||||||
@@ -121,8 +121,6 @@ in {
|
|||||||
|
|
||||||
plugins.undotree.enable = true;
|
plugins.undotree.enable = true;
|
||||||
|
|
||||||
plugins.web-devicons.enable = true;
|
|
||||||
|
|
||||||
# plugins.gitsigns.enable = true;
|
# plugins.gitsigns.enable = true;
|
||||||
# plugins.gitgutter.enable = true;
|
# plugins.gitgutter.enable = true;
|
||||||
# plugins.goyo.enable = true;
|
# plugins.goyo.enable = true;
|
||||||
|
@@ -1,70 +0,0 @@
|
|||||||
{ config, lib, self, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.modules.networking.netbird;
|
|
||||||
hostname = config.networking.hostName;
|
|
||||||
in {
|
|
||||||
options.modules.networking.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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{ config, inputs, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.networking.tailscale;
|
cfg = config.modules.networking.tailscale;
|
||||||
@@ -18,7 +18,7 @@ in {
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
age.secrets."passwords/services/tailscale/${hostname}-authkey" = {
|
age.secrets."passwords/services/tailscale/${hostname}-authkey" = {
|
||||||
file = "${self.inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age";
|
file = "${inputs.secrets}/passwords/services/tailscale/${hostname}-authkey.age";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.tailscale ];
|
environment.systemPackages = [ pkgs.tailscale ];
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@@ -19,16 +19,16 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
age.secrets."passwords/networks" = {
|
age.secrets."passwords/networks" = {
|
||||||
file = "${self.inputs.secrets}/passwords/networks.age";
|
file = "${inputs.secrets}/passwords/networks.age";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
wireless = {
|
wireless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interfaces = cfg.interfaces;
|
interfaces = cfg.interfaces;
|
||||||
secretsFile = config.age.secrets."passwords/networks".path;
|
environmentFile = config.age.secrets."passwords/networks".path;
|
||||||
networks = {
|
networks = {
|
||||||
"Apollo 600 Mbps".pskRaw = "ext:PSK_APOLLO";
|
"Apollo 600 Mbps".psk = "@PSK_APOLLO@";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
networkmanager.ensureProfiles.profiles = {
|
networkmanager.ensureProfiles.profiles = {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, options, lib, self, ... }:
|
{ config, options, lib, home-manager, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
@@ -29,14 +29,14 @@ with lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
age.secrets."passwords/users/jordan".file = "${self.inputs.secrets}/passwords/users/jordan.age";
|
age.secrets."passwords/users/jordan".file = "${inputs.secrets}/passwords/users/jordan.age";
|
||||||
user =
|
user =
|
||||||
let user = builtins.getEnv "USER";
|
let user = builtins.getEnv "USER";
|
||||||
name = if elem user [ "" "root" ] then "jordan" else user;
|
name = if elem user [ "" "root" ] then "jordan" else user;
|
||||||
in {
|
in {
|
||||||
inherit name;
|
inherit name;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "audio" "networkmanager" "wheel" "lxd" ];
|
extraGroups = [ "networkmanager" "wheel" "lxd" ];
|
||||||
description = "Jordan Holt";
|
description = "Jordan Holt";
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
@@ -68,8 +68,8 @@ with lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
self.inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
self.inputs.plasma-manager.homeManagerModules.plasma-manager
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.borgmatic;
|
cfg = config.modules.services.borgmatic;
|
||||||
@@ -27,7 +27,7 @@ in {
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
age.secrets."passwords/services/borg/${hostname}-passphrase" = {
|
age.secrets."passwords/services/borg/${hostname}-passphrase" = {
|
||||||
file = "${self.inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age";
|
file = "${inputs.secrets}/passwords/services/borg/${hostname}-passphrase.age";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.borgmatic = {
|
services.borgmatic = {
|
||||||
|
@@ -1,4 +1,9 @@
|
|||||||
{ config, lib, self, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.coturn;
|
cfg = config.modules.services.coturn;
|
||||||
@@ -49,13 +54,13 @@ in {
|
|||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
"passwords/services/coturn/static-auth-secret" = {
|
"passwords/services/coturn/static-auth-secret" = {
|
||||||
file = "${self.inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
|
file = "${inputs.secrets}/passwords/services/coturn/static-auth-secret.age";
|
||||||
owner = "turnserver";
|
owner = "turnserver";
|
||||||
group = "turnserver";
|
group = "turnserver";
|
||||||
};
|
};
|
||||||
} // (if cfg.matrixIntegration then {
|
} // (if cfg.matrixIntegration then {
|
||||||
"passwords/services/coturn/matrix-turn-config.yml" = {
|
"passwords/services/coturn/matrix-turn-config.yml" = {
|
||||||
file = "${self.inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
|
file = "${inputs.secrets}/passwords/services/coturn/matrix-turn-config.yml.age";
|
||||||
owner = "matrix-synapse";
|
owner = "matrix-synapse";
|
||||||
group = "matrix-synapse";
|
group = "matrix-synapse";
|
||||||
};
|
};
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, config, lib, self, ... }:
|
{ pkgs, config, lib, inputs, ... }:
|
||||||
|
|
||||||
# Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
|
# Based on: https://git.clan.lol/clan/clan-infra/src/branch/main/modules/web01/gitea/actions-runner.nix
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ in
|
|||||||
users.groups.nix-ci-user = { };
|
users.groups.nix-ci-user = { };
|
||||||
|
|
||||||
age.secrets."files/services/gitea-runner/${hostname}-token" = {
|
age.secrets."files/services/gitea-runner/${hostname}-token" = {
|
||||||
file = "${self.inputs.secrets}/files/services/gitea-runner/${hostname}-token.age";
|
file = "${inputs.secrets}/files/services/gitea-runner/${hostname}-token.age";
|
||||||
group = "podman";
|
group = "podman";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.gitea;
|
cfg = config.modules.services.gitea;
|
||||||
@@ -40,9 +40,9 @@ in {
|
|||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d '${config.services.gitea.customDir}/public/assets/css' 0750 ${config.services.gitea.user} ${config.services.gitea.group} - -"
|
"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' - - - - ${self.inputs.gitea-github-theme}/theme-github.css"
|
"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' - - - - ${self.inputs.gitea-github-theme}/theme-github-auto.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' - - - - ${self.inputs.gitea-github-theme}/theme-github-dark.css"
|
"L+ '${config.services.gitea.customDir}/public/assets/css/theme-github-dark.css' - - - - ${inputs.gitea-github-theme}/theme-github-dark.css"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.gitea = rec {
|
services.gitea = rec {
|
||||||
@@ -76,7 +76,7 @@ in {
|
|||||||
session.COOKIE_SECURE = true;
|
session.COOKIE_SECURE = true;
|
||||||
log = {
|
log = {
|
||||||
ROOT_PATH = "${stateDir}/log";
|
ROOT_PATH = "${stateDir}/log";
|
||||||
"logger.router.MODE" = "";
|
logger.router.MODE = "";
|
||||||
};
|
};
|
||||||
ui = {
|
ui = {
|
||||||
THEMES = "gitea,arc-green,github,github-auto,github-dark";
|
THEMES = "gitea,arc-green,github,github-auto,github-dark";
|
||||||
|
@@ -1,17 +1,19 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.headscale;
|
cfg = config.modules.services.headscale;
|
||||||
fqdn = "headscale.vimium.net";
|
fqdn = "headscale.vimium.net";
|
||||||
in {
|
in {
|
||||||
options.modules.services.headscale = {
|
options.modules.services.headscale = {
|
||||||
enable = lib.mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
example = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.headscale ];
|
environment.systemPackages = [ pkgs.headscale ];
|
||||||
|
|
||||||
services.headscale = {
|
services.headscale = {
|
||||||
@@ -20,17 +22,12 @@ in {
|
|||||||
port = 8080;
|
port = 8080;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
policy.path = null;
|
|
||||||
ip_prefixes = [
|
ip_prefixes = [
|
||||||
"100.64.0.0/10"
|
"100.64.0.0/10"
|
||||||
];
|
];
|
||||||
server_url = "https://${fqdn}";
|
server_url = "https://${fqdn}";
|
||||||
derp = {
|
dns_config = {
|
||||||
auto_update_enable = false;
|
base_domain = "vimium.net";
|
||||||
update_frequency = "24h";
|
|
||||||
};
|
|
||||||
dns = {
|
|
||||||
base_domain = "mesh.vimium.net";
|
|
||||||
extra_records = [
|
extra_records = [
|
||||||
{
|
{
|
||||||
name = "grafana.mesh.vimium.net";
|
name = "grafana.mesh.vimium.net";
|
||||||
@@ -43,10 +40,6 @@ in {
|
|||||||
value = "100.64.0.7";
|
value = "100.64.0.7";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
magic_dns = true;
|
|
||||||
nameservers.global = [
|
|
||||||
"9.9.9.9"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
logtail.enabled = false;
|
logtail.enabled = false;
|
||||||
};
|
};
|
||||||
|
@@ -1,298 +0,0 @@
|
|||||||
{ 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,92 +0,0 @@
|
|||||||
{ 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";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,27 +0,0 @@
|
|||||||
#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;
|
|
||||||
}
|
|
@@ -1,75 +0,0 @@
|
|||||||
{ 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,4 @@
|
|||||||
{ config, lib, self, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.mail;
|
cfg = config.modules.services.mail;
|
||||||
@@ -22,10 +22,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
|
||||||
self.inputs.nixos-mailserver.nixosModule
|
|
||||||
];
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.roundcube = {
|
services.roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@@ -1,4 +1,10 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.matrix;
|
cfg = config.modules.services.matrix;
|
||||||
@@ -28,6 +34,9 @@ in {
|
|||||||
default = "vimium.com";
|
default = "vimium.com";
|
||||||
example = "vimium.com";
|
example = "vimium.com";
|
||||||
};
|
};
|
||||||
|
slidingSync = {
|
||||||
|
enable = lib.mkEnableOption "sliding-sync";
|
||||||
|
};
|
||||||
usePostgresql = lib.mkEnableOption "postgresql";
|
usePostgresql = lib.mkEnableOption "postgresql";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -39,9 +48,10 @@ in {
|
|||||||
base_url = "https://${matrixSubdomain}";
|
base_url = "https://${matrixSubdomain}";
|
||||||
server_name = cfg.serverName;
|
server_name = cfg.serverName;
|
||||||
};
|
};
|
||||||
"m.identity_server" = {
|
"m.identity_server" = {};
|
||||||
"base_url" = "https://vector.im";
|
"org.matrix.msc3575.proxy" = if cfg.slidingSync.enable then {
|
||||||
};
|
"url" = "https://${matrixSubdomain}";
|
||||||
|
} else { };
|
||||||
};
|
};
|
||||||
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
|
matrixServerConfig."m.server" = "${matrixSubdomain}:443";
|
||||||
commonBridgeSettings = bridge: {
|
commonBridgeSettings = bridge: {
|
||||||
@@ -130,6 +140,13 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"/_synapse/client".proxyPass = "http://localhost:8008";
|
"/_synapse/client".proxyPass = "http://localhost:8008";
|
||||||
|
"~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)" = lib.mkIf cfg.slidingSync.enable {
|
||||||
|
priority = 100;
|
||||||
|
proxyPass = "http://localhost:8009";
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"${cfg.serverName}" = let
|
"${cfg.serverName}" = let
|
||||||
@@ -160,11 +177,6 @@ in {
|
|||||||
};
|
};
|
||||||
} else {});
|
} else {});
|
||||||
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"jitsi-meet-1.0.8043"
|
|
||||||
"olm-3.2.16"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableRegistrationScript = true;
|
enableRegistrationScript = true;
|
||||||
@@ -175,12 +187,26 @@ in {
|
|||||||
max_upload_size = "100M";
|
max_upload_size = "100M";
|
||||||
report_stats = false;
|
report_stats = false;
|
||||||
server_name = cfg.serverName;
|
server_name = cfg.serverName;
|
||||||
|
app_service_config_files = (lib.optional cfg.bridges.whatsapp
|
||||||
|
"/var/lib/mautrix-whatsapp/whatsapp-registration.yaml");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups =
|
systemd.services.matrix-synapse.serviceConfig.SupplementaryGroups =
|
||||||
(lib.optional cfg.bridges.whatsapp
|
(lib.optional cfg.bridges.whatsapp
|
||||||
config.systemd.services.mautrix-whatsapp.serviceConfig.Group);
|
config.systemd.services.mautrix-whatsapp.serviceConfig.Group);
|
||||||
|
|
||||||
|
age.secrets = if cfg.slidingSync.enable then {
|
||||||
|
"files/services/matrix/sliding-sync" = {
|
||||||
|
file = "${inputs.secrets}/files/services/matrix/sliding-sync.age";
|
||||||
|
};
|
||||||
|
} else {};
|
||||||
|
|
||||||
|
services.matrix-sliding-sync = lib.mkIf cfg.slidingSync.enable {
|
||||||
|
enable = true;
|
||||||
|
environmentFile = config.age.secrets."files/services/matrix/sliding-sync".path;
|
||||||
|
settings = { SYNCV3_SERVER = "https://${matrixSubdomain}"; };
|
||||||
|
};
|
||||||
|
|
||||||
services.postgresql = lib.mkIf cfg.usePostgresql {
|
services.postgresql = lib.mkIf cfg.usePostgresql {
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@@ -82,13 +82,6 @@ in {
|
|||||||
worker_connections 20000;
|
worker_connections 20000;
|
||||||
multi_accept off;
|
multi_accept off;
|
||||||
'';
|
'';
|
||||||
proxyCachePath = {
|
|
||||||
"skycam" = {
|
|
||||||
enable = true;
|
|
||||||
keysZoneName = "skycam_cache";
|
|
||||||
maxSize = "100m";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
## Static sites
|
## Static sites
|
||||||
"jellyfin.vimium.com" = {
|
"jellyfin.vimium.com" = {
|
||||||
@@ -112,25 +105,6 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"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" = {
|
"pki.vimium.com" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
forceSSL = false;
|
forceSSL = false;
|
||||||
@@ -168,6 +142,7 @@ in {
|
|||||||
## Redirects
|
## Redirects
|
||||||
// (mkRedirect "h0lt.com" "jdholt.com")
|
// (mkRedirect "h0lt.com" "jdholt.com")
|
||||||
// (mkRedirect "jordanholt.xyz" "jdholt.com")
|
// (mkRedirect "jordanholt.xyz" "jdholt.com")
|
||||||
|
// (mkRedirect "jdholt.com" "vimium.com")
|
||||||
// (mkRedirect "omnimagic.com" "vimium.com")
|
// (mkRedirect "omnimagic.com" "vimium.com")
|
||||||
// (mkRedirect "omnimagic.net" "vimium.com")
|
// (mkRedirect "omnimagic.net" "vimium.com")
|
||||||
// (mkRedirect "thelostlegend.com" "suhailhussain.com")
|
// (mkRedirect "thelostlegend.com" "suhailhussain.com")
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, self, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
age.secrets."passwords/services/photoprism/admin" = {
|
age.secrets."passwords/services/photoprism/admin" = {
|
||||||
file = "${self.inputs.secrets}/passwords/services/photoprism/admin.age";
|
file = "${inputs.secrets}/passwords/services/photoprism/admin.age";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.photoprism = {
|
services.photoprism = {
|
||||||
|
@@ -21,7 +21,7 @@ in {
|
|||||||
|
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
fd
|
fd
|
||||||
unstable.fzf
|
fzf
|
||||||
jq
|
jq
|
||||||
nix-zsh-completions
|
nix-zsh-completions
|
||||||
nnn
|
nnn
|
||||||
|
@@ -1,25 +0,0 @@
|
|||||||
From 625939e594ce255afa3fab3a40c3e524460e1f8b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Holt <jordan@vimium.com>
|
|
||||||
Date: Sat, 10 Aug 2024 18:28:08 +0100
|
|
||||||
Subject: [PATCH] Ignore IPA signing
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libcamera/ipa_manager.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
|
|
||||||
index 6d5bbd05..43004175 100644
|
|
||||||
--- a/src/libcamera/ipa_manager.cpp
|
|
||||||
+++ b/src/libcamera/ipa_manager.cpp
|
|
||||||
@@ -295,7 +295,7 @@ bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const
|
|
||||||
if (data.empty())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
- bool valid = pubKey_.verify(data, ipa->signature());
|
|
||||||
+ bool valid = true;
|
|
||||||
|
|
||||||
LOG(IPAManager, Debug)
|
|
||||||
<< "IPA module " << ipa->path() << " signature is "
|
|
||||||
--
|
|
||||||
2.44.1
|
|
||||||
|
|
@@ -1,142 +0,0 @@
|
|||||||
From 57128bb78f56cadf9e2dcca5ba4d710c3bd478a7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Holt <jordan@vimium.com>
|
|
||||||
Date: Mon, 5 Aug 2024 21:53:09 +0100
|
|
||||||
Subject: [PATCH] Remove relative config lookups
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libcamera/ipa_manager.cpp | 16 ----------
|
|
||||||
src/libcamera/ipa_proxy.cpp | 48 ++----------------------------
|
|
||||||
src/libcamera/pipeline_handler.cpp | 21 ++-----------
|
|
||||||
3 files changed, 4 insertions(+), 81 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
|
|
||||||
index f4e0b633..6d5bbd05 100644
|
|
||||||
--- a/src/libcamera/ipa_manager.cpp
|
|
||||||
+++ b/src/libcamera/ipa_manager.cpp
|
|
||||||
@@ -131,22 +131,6 @@ IPAManager::IPAManager()
|
|
||||||
<< "No IPA found in '" << modulePaths << "'";
|
|
||||||
}
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load IPAs from the
|
|
||||||
- * same build directory as the libcamera library itself.
|
|
||||||
- */
|
|
||||||
- std::string root = utils::libcameraBuildPath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- std::string ipaBuildPath = root + "src/ipa";
|
|
||||||
- constexpr int maxDepth = 2;
|
|
||||||
-
|
|
||||||
- LOG(IPAManager, Info)
|
|
||||||
- << "libcamera is not installed. Adding '"
|
|
||||||
- << ipaBuildPath << "' to the IPA search path";
|
|
||||||
-
|
|
||||||
- ipaCount += addDir(ipaBuildPath.c_str(), maxDepth);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/* Finally try to load IPAs from the installed system path. */
|
|
||||||
ipaCount += addDir(IPA_MODULE_DIR);
|
|
||||||
|
|
||||||
diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
|
|
||||||
index 69975d8f..cd9284a3 100644
|
|
||||||
--- a/src/libcamera/ipa_proxy.cpp
|
|
||||||
+++ b/src/libcamera/ipa_proxy.cpp
|
|
||||||
@@ -122,33 +122,11 @@ std::string IPAProxy::configurationFile(const std::string &name,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- std::string root = utils::libcameraSourcePath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load
|
|
||||||
- * configuration files from the source directory. The
|
|
||||||
- * configuration files are then located in the 'data'
|
|
||||||
- * subdirectory of the corresponding IPA module.
|
|
||||||
- */
|
|
||||||
- std::string ipaConfDir = root + "src/ipa/" + ipaName + "/data";
|
|
||||||
-
|
|
||||||
- LOG(IPAProxy, Info)
|
|
||||||
- << "libcamera is not installed. Loading IPA configuration from '"
|
|
||||||
- << ipaConfDir << "'";
|
|
||||||
-
|
|
||||||
- std::string confPath = ipaConfDir + "/" + name;
|
|
||||||
+ for (const auto &dir : utils::split(IPA_CONFIG_DIR, ":")) {
|
|
||||||
+ std::string confPath = dir + "/" + ipaName + "/" + name;
|
|
||||||
ret = stat(confPath.c_str(), &statbuf);
|
|
||||||
if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)
|
|
||||||
return confPath;
|
|
||||||
-
|
|
||||||
- } else {
|
|
||||||
- /* Else look in the system locations. */
|
|
||||||
- for (const auto &dir : utils::split(IPA_CONFIG_DIR, ":")) {
|
|
||||||
- std::string confPath = dir + "/" + ipaName + "/" + name;
|
|
||||||
- ret = stat(confPath.c_str(), &statbuf);
|
|
||||||
- if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)
|
|
||||||
- return confPath;
|
|
||||||
- }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fallbackName.empty()) {
|
|
||||||
@@ -197,28 +175,6 @@ std::string IPAProxy::resolvePath(const std::string &file) const
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load proxy workers
|
|
||||||
- * from the same build directory as the libcamera directory itself.
|
|
||||||
- * This requires identifying the path of the libcamera.so, and
|
|
||||||
- * referencing a relative path for the proxy workers from that point.
|
|
||||||
- */
|
|
||||||
- std::string root = utils::libcameraBuildPath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- std::string ipaProxyDir = root + "src/libcamera/proxy/worker";
|
|
||||||
-
|
|
||||||
- LOG(IPAProxy, Info)
|
|
||||||
- << "libcamera is not installed. Loading proxy workers from '"
|
|
||||||
- << ipaProxyDir << "'";
|
|
||||||
-
|
|
||||||
- std::string proxyPath = ipaProxyDir + proxyFile;
|
|
||||||
- if (!access(proxyPath.c_str(), X_OK))
|
|
||||||
- return proxyPath;
|
|
||||||
-
|
|
||||||
- return std::string();
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- /* Else try finding the exec target from the install directory. */
|
|
||||||
std::string proxyPath = std::string(IPA_PROXY_DIR) + proxyFile;
|
|
||||||
if (!access(proxyPath.c_str(), X_OK))
|
|
||||||
return proxyPath;
|
|
||||||
diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
|
|
||||||
index 5ea2ca78..fd8555ca 100644
|
|
||||||
--- a/src/libcamera/pipeline_handler.cpp
|
|
||||||
+++ b/src/libcamera/pipeline_handler.cpp
|
|
||||||
@@ -561,25 +561,8 @@ std::string PipelineHandler::configurationFile(const std::string &subdir,
|
|
||||||
struct stat statbuf;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
- std::string root = utils::libcameraSourcePath();
|
|
||||||
- if (!root.empty()) {
|
|
||||||
- /*
|
|
||||||
- * When libcamera is used before it is installed, load
|
|
||||||
- * configuration files from the source directory. The
|
|
||||||
- * configuration files are then located in the 'data'
|
|
||||||
- * subdirectory of the corresponding pipeline handler.
|
|
||||||
- */
|
|
||||||
- std::string confDir = root + "src/libcamera/pipeline/";
|
|
||||||
- confPath = confDir + subdir + "/data/" + name;
|
|
||||||
-
|
|
||||||
- LOG(Pipeline, Info)
|
|
||||||
- << "libcamera is not installed. Loading platform configuration file from '"
|
|
||||||
- << confPath << "'";
|
|
||||||
- } else {
|
|
||||||
- /* Else look in the system locations. */
|
|
||||||
- confPath = std::string(LIBCAMERA_DATA_DIR)
|
|
||||||
- + "/pipeline/" + subdir + '/' + name;
|
|
||||||
- }
|
|
||||||
+ confPath = std::string(LIBCAMERA_DATA_DIR)
|
|
||||||
+ + "/pipeline/" + subdir + '/' + name;
|
|
||||||
|
|
||||||
ret = stat(confPath.c_str(), &statbuf);
|
|
||||||
if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)
|
|
||||||
--
|
|
||||||
2.44.1
|
|
||||||
|
|
@@ -1,35 +0,0 @@
|
|||||||
final: prev:
|
|
||||||
|
|
||||||
/*
|
|
||||||
Generate an overlay from `pkgs` by handling the `callPackage` behaviour
|
|
||||||
ourselves, making exceptions for namespaced package sets. We cannot reuse
|
|
||||||
the definitions from `self.legacyPackages.${prev.system}`, as that would
|
|
||||||
evaluate nixpkgs twice here (prev.system does not exist then).
|
|
||||||
*/
|
|
||||||
|
|
||||||
let
|
|
||||||
lib = prev.lib;
|
|
||||||
|
|
||||||
pkgs = lib.packagesFromDirectoryRecursive {
|
|
||||||
callPackage = path: overrides: path;
|
|
||||||
directory = ../pkgs;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
lib.mapAttrs
|
|
||||||
(name: value:
|
|
||||||
if lib.isAttrs value then
|
|
||||||
if lib.hasAttrByPath [ name "overrideScope" ] prev then
|
|
||||||
# Namespaced package sets created with `lib.makeScope pkgs.newScope`.
|
|
||||||
prev.${name}.overrideScope (final': prev':
|
|
||||||
lib.mapAttrs (name': value': final'.callPackage value' { }) value)
|
|
||||||
else if lib.hasAttrByPath [ name "extend" ] prev then
|
|
||||||
# Namespaced package sets created with `lib.makeExtensible`.
|
|
||||||
prev.${name}.extend (final': prev':
|
|
||||||
lib.mapAttrs (name': value': final.callPackage value' { }) value)
|
|
||||||
else
|
|
||||||
# Namespaced package sets in regular attrsets.
|
|
||||||
prev.${name} // value
|
|
||||||
else
|
|
||||||
final.callPackage value { })
|
|
||||||
pkgs
|
|
||||||
|
|
@@ -1,22 +1,11 @@
|
|||||||
final: prev:
|
self: super:
|
||||||
{
|
{
|
||||||
gvdb = prev.fetchgit {
|
gnome = super.gnome.overrideScope' (gself: gsuper: {
|
||||||
url = "https://gitlab.gnome.org/GNOME/gvdb.git";
|
mutter = gsuper.mutter.overrideAttrs (oldAttrs: {
|
||||||
rev = "b54bc5da25127ef416858a3ad92e57159ff565b3"; # From gvdb_wrap
|
src = super.fetchurl {
|
||||||
sha256 = "c56yOepnKPEYFcU1B1TrDl8ydU0JU+z6R8siAQP4d2A=";
|
url = "https://gitlab.gnome.org/Community/Ubuntu/mutter/-/archive/triple-buffering-v4-46/mutter-triple-buffering-v4-46.tar.gz";
|
||||||
|
sha256 = "mmFABDsRMzYnLO3+Cf3CJ60XyUBl3y9NAUj+vs7nLqE=";
|
||||||
};
|
};
|
||||||
|
});
|
||||||
mutter = prev.mutter.overrideAttrs (attrs: {
|
|
||||||
src = prev.fetchurl {
|
|
||||||
url = "https://gitlab.gnome.org/Community/Ubuntu/mutter/-/archive/triple-buffering-v4-47/mutter-triple-buffering-v4-47.tar.gz";
|
|
||||||
sha256 = "oeykTJRcG/SY83U8RYnyFFZ8zKqoyXvtbaS2f/s503U=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
mkdir -p subprojects/gvdb
|
|
||||||
cp -r ${final.gvdb}/* subprojects/gvdb/
|
|
||||||
|
|
||||||
${attrs.postPatch or ""}
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -1,64 +0,0 @@
|
|||||||
final: prev:
|
|
||||||
{
|
|
||||||
libpisp = final.stdenv.mkDerivation {
|
|
||||||
name = "libpisp";
|
|
||||||
version = "1.0.5";
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "libpisp";
|
|
||||||
rev = "v1.0.5";
|
|
||||||
hash = "sha256-CHd44CH5dBcZuK+5fZtONZ8HE/lwGKwK5U0BYUK8gG4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = with final; [
|
|
||||||
pkg-config
|
|
||||||
meson
|
|
||||||
ninja
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with final; [
|
|
||||||
nlohmann_json
|
|
||||||
boost
|
|
||||||
];
|
|
||||||
|
|
||||||
BOOST_INCLUDEDIR = "${prev.lib.getDev final.boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${prev.lib.getLib final.boost}/lib";
|
|
||||||
};
|
|
||||||
|
|
||||||
libcamera = prev.libcamera.overrideAttrs (old: {
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "libcamera";
|
|
||||||
rev = "eb00c13d7c9f937732305d47af5b8ccf895e700f";
|
|
||||||
hash = "sha256-p0/inkHPRUkxSIsTmj7VI7sIaX7OXdqjMGZ31W7cnt4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
patchShebangs utils/ src/py/
|
|
||||||
'';
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./0001-Remove-relative-config-lookups.patch
|
|
||||||
./0001-Ignore-IPA-signing.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = old.buildInputs ++ (with final; [
|
|
||||||
libpisp
|
|
||||||
libglibutil
|
|
||||||
]);
|
|
||||||
|
|
||||||
mesonFlags = old.mesonFlags ++ [
|
|
||||||
"--buildtype=release"
|
|
||||||
"-Dpipelines=rpi/vc4,rpi/pisp"
|
|
||||||
"-Dipas=rpi/vc4,rpi/pisp"
|
|
||||||
"-Dgstreamer=enabled"
|
|
||||||
"-Dtest=false"
|
|
||||||
"-Dcam=enabled"
|
|
||||||
"-Dpycamera=disabled"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
camera-streamer = prev.callPackage ../pkgs/camera-streamer/package.nix {
|
|
||||||
libcamera = final.libcamera;
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,25 +0,0 @@
|
|||||||
From 0f17bb86772afe9495891e420a809a0b3c071caf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jordan Holt <jordan@vimium.com>
|
|
||||||
Date: Sat, 10 Aug 2024 15:37:15 +0100
|
|
||||||
Subject: [PATCH] Disable libdatachannel
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index d5029bd..e50ba1a 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -23,7 +23,7 @@ USE_HW_H264 ?= 1
|
|
||||||
USE_FFMPEG ?= $(shell pkg-config libavutil libavformat libavcodec && echo 1)
|
|
||||||
USE_LIBCAMERA ?= $(shell pkg-config libcamera && echo 1)
|
|
||||||
USE_RTSP ?= $(shell pkg-config live555 && echo 1)
|
|
||||||
-USE_LIBDATACHANNEL ?= $(shell [ -e $(LIBDATACHANNEL_PATH)/CMakeLists.txt ] && echo 1)
|
|
||||||
+USE_LIBDATACHANNEL ?= 0
|
|
||||||
|
|
||||||
ifeq (1,$(DEBUG))
|
|
||||||
CFLAGS += -g
|
|
||||||
--
|
|
||||||
2.44.1
|
|
||||||
|
|
@@ -1,78 +0,0 @@
|
|||||||
{ stdenv
|
|
||||||
, fetchFromGitHub
|
|
||||||
|
|
||||||
, cmake
|
|
||||||
, gnumake
|
|
||||||
, pkg-config
|
|
||||||
, xxd
|
|
||||||
|
|
||||||
, v4l-utils
|
|
||||||
, nlohmann_json
|
|
||||||
, ffmpegSupport ? true
|
|
||||||
, ffmpeg
|
|
||||||
, libcameraSupport ? true
|
|
||||||
, libcamera
|
|
||||||
, rtspSupport ? false
|
|
||||||
, live555
|
|
||||||
, webrtcSupport ? false
|
|
||||||
, openssl
|
|
||||||
|
|
||||||
, lib
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "camera-streamer";
|
|
||||||
version = "0.2.8";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ayufan";
|
|
||||||
repo = "camera-streamer";
|
|
||||||
rev = "refs/tags/v${finalAttrs.version}";
|
|
||||||
hash = "sha256-8vV8BMFoDeh22I1/qxk6zttJROaD/lrThBxXHZSPpT4=";
|
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./0001-Disable-libdatachannel.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
# Second replacement fixes literal newline in generated version.h.
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace Makefile \
|
|
||||||
--replace '/usr/local/bin' '/bin' \
|
|
||||||
--replace 'echo "#define' 'echo -e "#define'
|
|
||||||
'';
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = builtins.toString [
|
|
||||||
"-Wno-error=stringop-overflow"
|
|
||||||
"-Wno-error=format"
|
|
||||||
"-Wno-format"
|
|
||||||
"-Wno-format-security"
|
|
||||||
"-Wno-error=unused-result"
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
gnumake
|
|
||||||
pkg-config
|
|
||||||
xxd
|
|
||||||
];
|
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
|
||||||
|
|
||||||
buildInputs = [ nlohmann_json v4l-utils ]
|
|
||||||
++ (lib.optional ffmpegSupport ffmpeg)
|
|
||||||
++ (lib.optional libcameraSupport libcamera)
|
|
||||||
++ (lib.optional rtspSupport live555)
|
|
||||||
++ (lib.optional webrtcSupport openssl);
|
|
||||||
|
|
||||||
installFlags = [ "DESTDIR=${builtins.placeholder "out"}" ];
|
|
||||||
preInstall = "mkdir -p $out/bin";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "High-performance low-latency camera streamer for Raspberry Pi's";
|
|
||||||
website = "https://github.com/ayufan/camera-streamer";
|
|
||||||
license = licenses.gpl3Only;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
@@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
buildNpmPackage,
|
|
||||||
fetchFromGitHub
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildNpmPackage rec {
|
|
||||||
pname = "floorplan";
|
|
||||||
version = "1.0.44";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ExperienceLovelace";
|
|
||||||
repo = "ha-floorplan";
|
|
||||||
rev = "refs/tags/${version}";
|
|
||||||
hash = "sha256-ajEA47H9nFXVcuvhwkDsxc5YYQWMsUXqHQ3t6tuAaxc=";
|
|
||||||
};
|
|
||||||
|
|
||||||
npmDepsHash = "sha256-/6H3XMraD7/usZBwmQaCDpV2n1Eed+U+G0f2YnjyWgk=";
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir $out
|
|
||||||
cp -R dist/* $out/
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Floorplan for Home Assistant";
|
|
||||||
longDescription = ''
|
|
||||||
Bring new life to Home Assistant. By mapping entities to a SVG-object,
|
|
||||||
you're able to control devices, show states, calling services - and much
|
|
||||||
more. Add custom styling on top, to visualize whatever you can think of.
|
|
||||||
Your imagination just became the new limit.
|
|
||||||
'';
|
|
||||||
homepage = "https://github.com/ExperienceLovelace/ha-floorplan";
|
|
||||||
license = lib.licenses.asl20;
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,58 +0,0 @@
|
|||||||
{ stdenv
|
|
||||||
, fetchFromGitHub
|
|
||||||
, meson
|
|
||||||
, ninja
|
|
||||||
, pkg-config
|
|
||||||
, boost
|
|
||||||
, ffmpeg
|
|
||||||
, libcamera
|
|
||||||
, libdrm
|
|
||||||
, libexif
|
|
||||||
, libjpeg
|
|
||||||
, libpng
|
|
||||||
, libtiff
|
|
||||||
, lib
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "rpicam-apps";
|
|
||||||
version = "1.4.1";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "raspberrypi";
|
|
||||||
repo = "rpicam-apps";
|
|
||||||
rev = "v" + finalAttrs.version;
|
|
||||||
hash = "sha256-3NG2ZE/Ub3lTbfne0LCXuDgLGTPaAAADRdElEbZwvls=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
meson
|
|
||||||
ninja
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
boost
|
|
||||||
ffmpeg
|
|
||||||
libcamera
|
|
||||||
libdrm
|
|
||||||
libexif
|
|
||||||
libjpeg
|
|
||||||
libpng
|
|
||||||
libtiff
|
|
||||||
];
|
|
||||||
|
|
||||||
# Meson is no longer able to pick up Boost automatically:
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/86131
|
|
||||||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = ''
|
|
||||||
libcamera-based applications to drive the cameras on a Raspberry Pi platform
|
|
||||||
'';
|
|
||||||
homepage = "https://github.com/raspberrypi/rpicam-apps";
|
|
||||||
license = licenses.bsd2;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
Reference in New Issue
Block a user