Certbot+DNS+flake upadte
This commit is contained in:
1 parent
b23ab9be23
commit
acafdbbdd2
20 files changed
+393
-180
No files matched your search
@@ -1 +1 @@
|
|||||||
/nix/store/4ki9v1ykmxgfin53pjgav9wlcfkf7cj5-pre-commit-config.json
|
/nix/store/w0az8z0nd9vkl5pzbaqp83b88394y4pr-pre-commit-config.json
|
||||||
@@ -35,6 +35,10 @@ export def "skyg test" [] {
|
|||||||
nh os test | print
|
nh os test | print
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export def "skyg check" [] {
|
||||||
|
nix flake check --no-build
|
||||||
|
}
|
||||||
|
|
||||||
# rollback configuration
|
# rollback configuration
|
||||||
export def "skyg rollback" [] {
|
export def "skyg rollback" [] {
|
||||||
sudo nixos-rebuild switch --rollback
|
sudo nixos-rebuild switch --rollback
|
||||||
|
|||||||
Generated
+88
-72
@@ -153,12 +153,12 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776975946,
|
"lastModified": 1779475417,
|
||||||
"narHash": "sha256-h/+pqz7PQ4X8zffxM68fwmyTlalWrlM49W2fT2G/cAs=",
|
"narHash": "sha256-7/U/+X66C7XmLnt5JVJVtpx8wVDRU//Awaeqkq9+NNc=",
|
||||||
"rev": "26f072a4dddb0433e27aee6516e9e3287db4b8d2",
|
"rev": "8a9c57ea6b458a40589df60f26200b7d305354d1",
|
||||||
"revCount": 413,
|
"revCount": 417,
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.18.1/019dbc08-210a-7941-b195-710393c6fd8c/source.tar.gz"
|
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.21.0/019e5103-0940-7a50-bac6-f1c621bf31ff/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
@@ -168,37 +168,37 @@
|
|||||||
"determinate-nixd-aarch64-darwin": {
|
"determinate-nixd-aarch64-darwin": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-OmmajnGiM5Pvm/yWk6omjOMcmsLgfNvZ5+Dn/UZdH00=",
|
"narHash": "sha256-LNvx0qZsH8tbdgNfaig/x5Cf4r4UrXfU1m+0bO3D0E4=",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.18.1/macOS"
|
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/macOS"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.18.1/macOS"
|
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/macOS"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"determinate-nixd-aarch64-linux": {
|
"determinate-nixd-aarch64-linux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-RriiWEs0lLjofbqGVBkUSHuht7rOJaWM98GDOVg4pCM=",
|
"narHash": "sha256-rKg7uVAEK8X3TTFGaWp8CVZuCAr3wHkMnuJOndhXJF0=",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.18.1/aarch64-linux"
|
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/aarch64-linux"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.18.1/aarch64-linux"
|
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/aarch64-linux"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"determinate-nixd-x86_64-linux": {
|
"determinate-nixd-x86_64-linux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-8hemqyT1ruFwxVHvMQ8CWUQyQJSHIcMOY+zoRC37klg=",
|
"narHash": "sha256-vBCUEVPfY4+nxGDM62evpxJYEVqLTqdBGbCkmZ2sQhk=",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.18.1/x86_64-linux"
|
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/x86_64-linux"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.18.1/x86_64-linux"
|
"url": "https://install.determinate.systems/determinate-nixd/tag/v3.21.0/x86_64-linux"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dms": {
|
"dms": {
|
||||||
@@ -209,11 +209,11 @@
|
|||||||
"quickshell": "quickshell"
|
"quickshell": "quickshell"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777145534,
|
"lastModified": 1777431599,
|
||||||
"narHash": "sha256-K/DtFratLxaZ4+YS9G+HZA37banWacXYznmul3XPKKM=",
|
"narHash": "sha256-g6r/Gx8PTDzO3jCNzzySA+Ff1lmLF9nDlMCNyyoQjoE=",
|
||||||
"owner": "AvengeMedia",
|
"owner": "AvengeMedia",
|
||||||
"repo": "DankMaterialShell",
|
"repo": "DankMaterialShell",
|
||||||
"rev": "bcf41ed5caff19e5750f3ef0594088492ecbadbe",
|
"rev": "eb5afcdc40ea5446c27e18552ff4a19f9daf9484",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -338,11 +338,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776796298,
|
"lastModified": 1778507602,
|
||||||
"narHash": "sha256-PcRvlWayisPSjd0UcRQbhG8Oqw78AcPE6x872cPRHN8=",
|
"narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "3cfd774b0a530725a077e17354fbdb87ea1c4aad",
|
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -445,16 +445,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775425411,
|
"lastModified": 1779726825,
|
||||||
"narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
|
"narHash": "sha256-RUkMrREjKDQrA+dA9+xZviGAxM5W1aVdyOr/bSYpHrE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
|
"rev": "b179bde238977f7d4454fc770b1a727eaf55111c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-25.11",
|
"ref": "release-26.05",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -705,12 +705,12 @@
|
|||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776973637,
|
"lastModified": 1779472733,
|
||||||
"narHash": "sha256-6dtDAH38Jn658Vty5tULesSWvYj79cK+rtJtJgCUbW0=",
|
"narHash": "sha256-nV5OHwivEf392cB5MDwoVdDHSvy6Q+rRYZBHd9sePj4=",
|
||||||
"rev": "4dccfb86b6bc6ae733709c6770cd116ad62d910b",
|
"rev": "11f3aff904f84ae612e36e8bc578ac421fca74fa",
|
||||||
"revCount": 24973,
|
"revCount": 25967,
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.18.1/019dbc00-786e-7020-8304-a33065736bab/source.tar.gz"
|
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.21.0/019e50fb-8633-73d0-b673-b2e265950490/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
@@ -724,11 +724,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1775037210,
|
"lastModified": 1779036909,
|
||||||
"narHash": "sha256-KM2WYj6EA7M/FVZVCl3rqWY+TFV5QzSyyGE2gQxeODU=",
|
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
|
||||||
"owner": "LnL7",
|
"owner": "LnL7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "06648f4902343228ce2de79f291dd5a58ee12146",
|
"rev": "56c666e108467d87d13508936aade6d567f2a501",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -739,11 +739,11 @@
|
|||||||
},
|
},
|
||||||
"nix-flatpak": {
|
"nix-flatpak": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777229239,
|
"lastModified": 1779998907,
|
||||||
"narHash": "sha256-OwSaWqlBdKn8QIa7BrPtJmlrr46U7AuwMc/toDKuMZw=",
|
"narHash": "sha256-8CSkdFNkAF49pmhFneEFNAO4UX9/0FnoMwXMY3yyvi0=",
|
||||||
"owner": "gmodena",
|
"owner": "gmodena",
|
||||||
"repo": "nix-flatpak",
|
"repo": "nix-flatpak",
|
||||||
"rev": "3f1d78b63b6af353c0685b8a7411c04d980426e4",
|
"rev": "744221c2aef17f1f2a13278abfeabd9bd5e40180",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -760,11 +760,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777181277,
|
"lastModified": 1780210899,
|
||||||
"narHash": "sha256-yVJbd07ortDRAttDFmDV5p220aOLTHgVAx//0nW/xW8=",
|
"narHash": "sha256-4axz3OBPTKa6LIkXV8n0lc63MQU+et2CB5DGobEAi6k=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "b8eb7acee0f7604fe1bf6a5b3dcf5254369180fa",
|
"rev": "97df9dc0b7c924344b793a15c1e8e4522ebb854e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -774,12 +774,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_5"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776983936,
|
"lastModified": 1780310866,
|
||||||
"narHash": "sha256-ZOQyNqSvJ8UdrrqU1p7vaFcdL53idK+LOM8oRWEWh6o=",
|
"narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "2096f3f411ce46e88a79ae4eafcfc9df8ed41c61",
|
"rev": "4ed851c979641e28597a05086332d75cdc9e395f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -839,12 +842,12 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776877367,
|
"lastModified": 1779560665,
|
||||||
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
|
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||||
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
|
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||||
"revCount": 985613,
|
"revCount": 1004030,
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.985613%2Brev-0726a0ecb6d4e08f6adced58726b95db924cef57/019dc33e-a3ef-7cf1-936a-cf64d10f6c63/source.tar.gz"
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.1004030%2Brev-64c08a7ca051951c8eae34e3e3cb1e202fe36786/019e5fd8-b716-7e01-9710-e44ec43dc50b/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
@@ -853,26 +856,26 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761597516,
|
"lastModified": 1773222311,
|
||||||
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
|
"narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=",
|
||||||
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
|
"rev": "0590cd39f728e129122770c029970378a79d076a",
|
||||||
"revCount": 811874,
|
"revCount": 909248,
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.811874%2Brev-daf6dc47aa4b44791372d6139ab7b25269184d55/019a3494-3498-707e-9086-1fb81badc7fe/source.tar.gz"
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2511.909248%2Brev-0590cd39f728e129122770c029970378a79d076a/019ce32b-8ace-7339-b129-cceaa8dd10c6/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505"
|
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.2511"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776329215,
|
"lastModified": 1778869304,
|
||||||
"narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=",
|
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
|
||||||
"rev": "b86751bc4085f48661017fa226dee99fab6c651b",
|
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
|
||||||
"revCount": 981196,
|
"revCount": 998534,
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.981196%2Brev-b86751bc4085f48661017fa226dee99fab6c651b/019daeab-1563-75e1-9919-fee0062268db/source.tar.gz"
|
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nixpkgs-weekly/0.1.998534%2Brev-d233902339c02a9c334e7e593de68855ad26c4cb/019e3efc-e09a-7ff1-b05f-0c8f85ba7441/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
@@ -897,12 +900,25 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777077449,
|
"lastModified": 1767892417,
|
||||||
"narHash": "sha256-AIiMJiqvGrN4HyLEbKAoCSRRYn0rnlW5VbKNIMIYqm4=",
|
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
|
||||||
"rev": "a4bf06618f0b5ee50f14ed8f0da77d34ecc19160",
|
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
||||||
"revCount": 911667,
|
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2511.911667%2Brev-a4bf06618f0b5ee50f14ed8f0da77d34ecc19160/019dcae8-75b0-71d1-abd5-feab9658f0fa/source.tar.gz"
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1780203844,
|
||||||
|
"narHash": "sha256-K5sT4jTpGs15ADhviMKNBH38REpPf5Q6mM1+N6cArVE=",
|
||||||
|
"rev": "b51242d7d43689db2f3be91bd05d5b24fbb469c4",
|
||||||
|
"revCount": 1005180,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2605.1005180%2Brev-b51242d7d43689db2f3be91bd05d5b24fbb469c4/019e820b-3e9f-7ad0-acdd-dab08fdf665f/source.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
@@ -917,11 +933,11 @@
|
|||||||
"noctalia-qs": "noctalia-qs"
|
"noctalia-qs": "noctalia-qs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778075743,
|
"lastModified": 1780322768,
|
||||||
"narHash": "sha256-WB5zYuFT69KUGa1ou+aMGNGxV/9e5EaqxF3IltN6BxY=",
|
"narHash": "sha256-WnjyKaA+kywlyaPZs3dxD+XWVCMixsfDht8Sn7fshgs=",
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"repo": "noctalia-shell",
|
"repo": "noctalia-shell",
|
||||||
"rev": "3bbf31945de508409e3a3ded08cc154f185c42fb",
|
"rev": "fe6fa125f5ee7881c4ee0cf9c0a4329a8238d3c2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -940,11 +956,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777773024,
|
"lastModified": 1780194487,
|
||||||
"narHash": "sha256-pLU+KB84A0Jei/vTD6pOS4Ovkmq3QDfPQHg1MlKsRqM=",
|
"narHash": "sha256-M+YtjKCTkHrkplNaKVyaxfa8hAWjRF6wFOUBAZvxQ4U=",
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"repo": "noctalia-qs",
|
"repo": "noctalia-qs",
|
||||||
"rev": "d3e26ccd9eecde9139be00caf5dc2d4260fb31ee",
|
"rev": "07398e12b54f194e3a2d47c87e3fd10b8eeaa27d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1012,7 +1028,7 @@
|
|||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_6",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"noctalia": "noctalia",
|
"noctalia": "noctalia",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
@@ -1040,11 +1056,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776894428,
|
"lastModified": 1778680496,
|
||||||
"narHash": "sha256-wuT915MyCtMTfLj+uo9y8wtCwkEgJXiXvcbSleFrlN0=",
|
"narHash": "sha256-tUq1WASV0dHLv3j18log8V6Esq0NYkXuzNH2EHsstcg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "f34be27ce83efaa1c85ad1e5b1f8b6dea65b147d",
|
"rev": "fc5bec2e44678eeaa221d566d447a0257a884737",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=main";
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=main";
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-26.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# Themes
|
# Themes
|
||||||
|
|||||||
+4
-2
@@ -230,8 +230,10 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
port = 11434;
|
port = 11434;
|
||||||
acceleration = "rocm";
|
package = pkgs.ollama-rocm;
|
||||||
rocmOverrideGfx = "11.0.2";
|
environmentVariables = {
|
||||||
|
HSA_OVERRIDE_GFX_VERSION = "11.0.2";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# # Display Managers
|
# # Display Managers
|
||||||
services.xserver.videoDrivers = [
|
services.xserver.videoDrivers = [
|
||||||
|
|||||||
+3
-5
@@ -78,7 +78,7 @@ in
|
|||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
# Desktop Env
|
# Desktop Env
|
||||||
services.displayManager.gdm.enable = true;
|
services.displayManager.gdm.enable = true;
|
||||||
services.displayManager.gdm.wayland = true;
|
|
||||||
services.displayManager.defaultSession = "niri";
|
services.displayManager.defaultSession = "niri";
|
||||||
# Firmware updater
|
# Firmware updater
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
@@ -139,11 +139,10 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
port = ports.ollama;
|
port = ports.ollama;
|
||||||
acceleration = "vulkan";
|
package = pkgs.ollama-vulkan;
|
||||||
user = "ollama";
|
user = "ollama";
|
||||||
home = "/var/lib/ollama";
|
home = "/var/lib/ollama";
|
||||||
rocmOverrideGfx = "gfx1151";
|
|
||||||
# rocmOverrideGfx = "11.5.1";
|
|
||||||
|
|
||||||
environmentVariables = {
|
environmentVariables = {
|
||||||
# Stability fix — SDMA is buggy on Strix Halo unified memory
|
# Stability fix — SDMA is buggy on Strix Halo unified memory
|
||||||
@@ -176,7 +175,6 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
uri = "tcp://0.0.0.0:${toString ports.piper}";
|
uri = "tcp://0.0.0.0:${toString ports.piper}";
|
||||||
voice = "en_US-danny-low";
|
voice = "en_US-danny-low";
|
||||||
streaming = true;
|
|
||||||
};
|
};
|
||||||
faster-whisper.servers.todd = {
|
faster-whisper.servers.todd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.server.dns = {
|
skyg.server.dns.routing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
addressesSecretName = "dns-addresses.conf";
|
addressesSecretName = "dns-addresses.conf";
|
||||||
|
|||||||
+12
-1
@@ -24,7 +24,7 @@ in
|
|||||||
{
|
{
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.server.dns = {
|
skyg.server.dns.routing = {
|
||||||
enable = false;
|
enable = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
addressesSecretName = "dns-addresses.conf";
|
addressesSecretName = "dns-addresses.conf";
|
||||||
@@ -87,6 +87,17 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Certbot TLS service
|
||||||
|
skyg.server.dns.certbot = {
|
||||||
|
enable = false;
|
||||||
|
email = "admin@skyg.ca";
|
||||||
|
publicDomains = [
|
||||||
|
".*skyg.ca"
|
||||||
|
".*home.sosnovsky.ca"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Firewall
|
# Firewall
|
||||||
networking.firewall.allowedUDPPorts = openPorts;
|
networking.firewall.allowedUDPPorts = openPorts;
|
||||||
networking.firewall.allowedTCPPorts = openPorts;
|
networking.firewall.allowedTCPPorts = openPorts;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.server.dns = {
|
skyg.server.dns.routing = {
|
||||||
enable = false;
|
enable = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
addressesSecretName = "dns-addresses.conf";
|
addressesSecretName = "dns-addresses.conf";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.server.dns = {
|
skyg.server.dns.routing = {
|
||||||
enable = false;
|
enable = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
addressesSecretName = "dns-addresses.conf";
|
addressesSecretName = "dns-addresses.conf";
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ in
|
|||||||
{
|
{
|
||||||
skyg.user.enable = true;
|
skyg.user.enable = true;
|
||||||
skyg.nixos.common.ssh-server.enable = true;
|
skyg.nixos.common.ssh-server.enable = true;
|
||||||
skyg.server.dns = {
|
skyg.server.dns.routing = {
|
||||||
enable = false;
|
enable = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
addressesSecretName = "dns-addresses.conf";
|
addressesSecretName = "dns-addresses.conf";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
skyg.home-manager.version = mkOption {
|
skyg.home-manager.version = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "24.11";
|
default = "26.05";
|
||||||
description = "The home-manager state version";
|
description = "The home-manager state version";
|
||||||
};
|
};
|
||||||
skyg.home-manager.extraImports = mkOption {
|
skyg.home-manager.extraImports = mkOption {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ stateVersion ? "24.11" }:
|
{ stateVersion ? "26.05" }:
|
||||||
let
|
let
|
||||||
makeCommonGitConfigs = (import ./git.nix).makeCommonGitConfigs;
|
makeCommonGitConfigs = (import ./git.nix).makeCommonGitConfigs;
|
||||||
programsModule = (import ./programs.nix);
|
programsModule = (import ./programs.nix);
|
||||||
|
|||||||
+5
-5
@@ -72,7 +72,7 @@ in
|
|||||||
makeNixOs =
|
makeNixOs =
|
||||||
{ system ? "x86_64-linux"
|
{ system ? "x86_64-linux"
|
||||||
, hostName
|
, hostName
|
||||||
, systemStateVersion ? "24.05"
|
, systemStateVersion ? "26.05"
|
||||||
, configuration ? [ ]
|
, configuration ? [ ]
|
||||||
}: nixpkgs.lib.nixosSystem {
|
}: nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = specialArgs // {
|
specialArgs = specialArgs // {
|
||||||
@@ -93,8 +93,8 @@ in
|
|||||||
makeIso =
|
makeIso =
|
||||||
{ system ? "x86_64-linux"
|
{ system ? "x86_64-linux"
|
||||||
, hostName
|
, hostName
|
||||||
, systemStateVersion ? "25.11"
|
, systemStateVersion ? "26.05"
|
||||||
, homeManagerVersion ? "25.11"
|
, homeManagerVersion ? "26.05"
|
||||||
, configuration ? [ ]
|
, configuration ? [ ]
|
||||||
}: nixpkgs.lib.nixosSystem {
|
}: nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = specialArgs // {
|
specialArgs = specialArgs // {
|
||||||
@@ -118,8 +118,8 @@ in
|
|||||||
makeDarwinModule =
|
makeDarwinModule =
|
||||||
{ system ? "x86_64-darwin"
|
{ system ? "x86_64-darwin"
|
||||||
, user
|
, user
|
||||||
, homeManagerVersion ? "25.11"
|
, homeManagerVersion ? "26.05"
|
||||||
, systemStateVersion ? "25.11"
|
, systemStateVersion ? "26.05"
|
||||||
, hostName
|
, hostName
|
||||||
, configuration ? [ ]
|
, configuration ? [ ]
|
||||||
}:
|
}:
|
||||||
|
|||||||
+1
-1
@@ -16,6 +16,6 @@
|
|||||||
email = lib.mkDefault user.email;
|
email = lib.mkDefault user.email;
|
||||||
};
|
};
|
||||||
skyg.core.hostName = hostName;
|
skyg.core.hostName = hostName;
|
||||||
skyg.home-manager.version = lib.mkDefault "24.11";
|
skyg.home-manager.version = lib.mkDefault "26.05";
|
||||||
system.stateVersion = systemStateVersion;
|
system.stateVersion = systemStateVersion;
|
||||||
}
|
}
|
||||||
@@ -9,5 +9,6 @@
|
|||||||
./services
|
./services
|
||||||
./timers.nix
|
./timers.nix
|
||||||
./dns
|
./dns
|
||||||
|
./certbot.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.skyg.server.dns.certbot;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
skyg.server.dns.certbot = {
|
||||||
|
enable = mkEnableOption "Let's Encrypt certificate management with certbot for DNS domains";
|
||||||
|
|
||||||
|
publicDomains = mkOption {
|
||||||
|
description = "List of public domains for which to obtain Let's Encrypt certificates";
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
email = mkOption {
|
||||||
|
description = "Email address for Let's Encrypt account registration";
|
||||||
|
type = types.str;
|
||||||
|
example = "admin@example.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
testMode = mkOption {
|
||||||
|
description = "Use certbot in test mode (dry-run) for development/testing";
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.certbot pkgs.certbot-nginx ];
|
||||||
|
|
||||||
|
# Set up systemd service for certificate renewal
|
||||||
|
systemd.services.certbot-renew = {
|
||||||
|
description = "Renew Let's Encrypt certificates";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
ExecStart =
|
||||||
|
if cfg.testMode then
|
||||||
|
"${pkgs.certbot}/bin/certbot renew --dry-run --nginx"
|
||||||
|
else
|
||||||
|
"${pkgs.certbot}/bin/certbot renew --nginx";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set up systemd timer for certificate renewal
|
||||||
|
systemd.timers.certbot-renew = {
|
||||||
|
description = "Daily renewal of Let's Encrypt certificates";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "daily";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the renewal timer
|
||||||
|
systemd.timers.certbot-renew.enable = true;
|
||||||
|
|
||||||
|
# Configure nginx with virtual hosts for public domains
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create a simple certbot command that can be run manually
|
||||||
|
environment.shellAliases = {
|
||||||
|
"certbot-get-certs" =
|
||||||
|
"${pkgs.certbot}/bin/certbot certonly --nginx --non-interactive --agree-tos --email ${cfg.email} --expand ${concatMapStrings (domain: " --domains ${domain}") cfg.publicDomains}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,88 +1,8 @@
|
|||||||
{ config, lib, ... }:
|
{ ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.skyg.server.dns;
|
|
||||||
|
|
||||||
# Each { domain, ip } generates both exact and wildcard dnsmasq address entries
|
|
||||||
addressEntries = concatMap
|
|
||||||
({ domain, ip }: [
|
|
||||||
"/${domain}/${ip}"
|
|
||||||
"/.${domain}/${ip}"
|
|
||||||
])
|
|
||||||
cfg.addresses;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options = {
|
imports = [
|
||||||
skyg.server.dns = {
|
./certbot
|
||||||
enable = mkEnableOption "local DNS resolver via dnsmasq";
|
./routing
|
||||||
|
./local-ca
|
||||||
addresses = mkOption {
|
];
|
||||||
description = "Static domain-to-IP mappings. Each entry generates both exact and wildcard dnsmasq address= entries.";
|
|
||||||
type = types.listOf (types.submodule {
|
|
||||||
options = {
|
|
||||||
domain = mkOption { type = types.str; };
|
|
||||||
ip = mkOption { type = types.str; };
|
|
||||||
};
|
|
||||||
});
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
addressesSecretName = mkOption {
|
|
||||||
description = ''
|
|
||||||
Name of an agenix secret whose decrypted content is a dnsmasq config
|
|
||||||
fragment (address= lines). Included via dnsmasq conf-file. Set null to skip.
|
|
||||||
'';
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
example = "dns-addresses.conf";
|
|
||||||
};
|
|
||||||
|
|
||||||
upstreamServers = mkOption {
|
|
||||||
description = "Upstream DNS servers to forward unresolved queries to.";
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ "1.1.1.1" "1.0.0.1" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
listenAddresses = mkOption {
|
|
||||||
description = "IPs to bind. Empty list means listen on all interfaces (dnsmasq default).";
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
openFirewall = mkOption {
|
|
||||||
description = "Open port 53 UDP/TCP in the firewall.";
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
age.secrets = mkIf (cfg.addressesSecretName != null) {
|
|
||||||
${cfg.addressesSecretName} = {
|
|
||||||
file = ../../../../secrets + "/${cfg.addressesSecretName}.age";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.dnsmasq = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
address = addressEntries;
|
|
||||||
server = cfg.upstreamServers;
|
|
||||||
}
|
|
||||||
// optionalAttrs (cfg.listenAddresses != [ ]) {
|
|
||||||
listen-address = cfg.listenAddresses;
|
|
||||||
}
|
|
||||||
// optionalAttrs (cfg.addressesSecretName != null) {
|
|
||||||
conf-file = config.age.secrets.${cfg.addressesSecretName}.path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall = mkIf cfg.openFirewall {
|
|
||||||
allowedUDPPorts = [ 53 ];
|
|
||||||
allowedTCPPorts = [ 53 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.skyg.server.dns.local-ca;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
skyg.server.dns.local-ca = {
|
||||||
|
enable = mkEnableOption "Local Certificate Authority for DNS domains";
|
||||||
|
|
||||||
|
caCert = mkOption {
|
||||||
|
description = "Path to the local CA certificate";
|
||||||
|
type = types.str;
|
||||||
|
default = "/etc/ssl/local-ca/cert.pem";
|
||||||
|
};
|
||||||
|
|
||||||
|
caKey = mkOption {
|
||||||
|
description = "Path to the local CA private key";
|
||||||
|
type = types.str;
|
||||||
|
default = "/etc/ssl/local-ca/key.pem";
|
||||||
|
};
|
||||||
|
|
||||||
|
domain = mkOption {
|
||||||
|
description = "Domain name for the local CA";
|
||||||
|
type = types.str;
|
||||||
|
default = "local-ca.skyg.internal";
|
||||||
|
};
|
||||||
|
|
||||||
|
organizationalUnit = mkOption {
|
||||||
|
description = "Organizational unit for the local CA certificate";
|
||||||
|
type = types.str;
|
||||||
|
default = "Skyg Internal CA";
|
||||||
|
};
|
||||||
|
|
||||||
|
organization = mkOption {
|
||||||
|
description = "Organization for the local CA certificate";
|
||||||
|
type = types.str;
|
||||||
|
default = "Skyg";
|
||||||
|
};
|
||||||
|
|
||||||
|
country = mkOption {
|
||||||
|
description = "Country code for the local CA certificate";
|
||||||
|
type = types.str;
|
||||||
|
default = "CA";
|
||||||
|
};
|
||||||
|
|
||||||
|
email = mkOption {
|
||||||
|
description = "Email address for the local CA";
|
||||||
|
type = types.str;
|
||||||
|
default = "admin@skyg.ca";
|
||||||
|
};
|
||||||
|
|
||||||
|
certificateLifetime = mkOption {
|
||||||
|
description = "Certificate lifetime in days";
|
||||||
|
type = types.int;
|
||||||
|
default = 365;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.openssl ];
|
||||||
|
|
||||||
|
# Create directory for local CA
|
||||||
|
environment.etc."ssl/local-ca" = {
|
||||||
|
recursive = true;
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Create local CA certificate (this would typically be generated by a script)
|
||||||
|
# For now, we'll just set up the structure and configuration
|
||||||
|
systemd.services.local-ca-setup = {
|
||||||
|
description = "Setup local Certificate Authority";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = ''
|
||||||
|
mkdir -p /etc/ssl/local-ca
|
||||||
|
# In a real implementation, you would generate the CA certificate here
|
||||||
|
# openssl req -new -x509 -nodes -days ${toString cfg.certificateLifetime} \
|
||||||
|
# -subj "/C=${cfg.country}/O=${cfg.organization}/OU=${cfg.organizationalUnit}/CN=${cfg.domain}/emailAddress=${cfg.email}" \
|
||||||
|
# -keyout ${cfg.caKey} -out ${cfg.caCert}
|
||||||
|
'';
|
||||||
|
User = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configuration for services to trust local CA
|
||||||
|
environment.etc."ssl/certs/ca-certificates.crt".text = ''
|
||||||
|
# Local CA certificates would be added here
|
||||||
|
# This is a placeholder for where local CA certs would be included
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.skyg.server.dns.routing;
|
||||||
|
|
||||||
|
# Each { domain, ip } generates both exact and wildcard dnsmasq address entries
|
||||||
|
addressEntries = concatMap
|
||||||
|
({ domain, ip }: [
|
||||||
|
"/${domain}/${ip}"
|
||||||
|
"/.${domain}/${ip}"
|
||||||
|
])
|
||||||
|
cfg.addresses;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
skyg.server.dns.routing = {
|
||||||
|
enable = mkEnableOption "local DNS resolver via dnsmasq";
|
||||||
|
|
||||||
|
addresses = mkOption {
|
||||||
|
description = "Static domain-to-IP mappings. Each entry generates both exact and wildcard dnsmasq address= entries.";
|
||||||
|
type = types.listOf (types.submodule {
|
||||||
|
options = {
|
||||||
|
domain = mkOption { type = types.str; };
|
||||||
|
ip = mkOption { type = types.str; };
|
||||||
|
};
|
||||||
|
});
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
addressesSecretName = mkOption {
|
||||||
|
description = ''
|
||||||
|
Name of an agenix secret whose decrypted content is a dnsmasq config
|
||||||
|
fragment (address= lines). Included via dnsmasq conf-file. Set null to skip.
|
||||||
|
'';
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
example = "dns-addresses.conf";
|
||||||
|
};
|
||||||
|
|
||||||
|
upstreamServers = mkOption {
|
||||||
|
description = "Upstream DNS servers to forward unresolved queries to.";
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
listenAddresses = mkOption {
|
||||||
|
description = "IPs to bind. Empty list means listen on all interfaces (dnsmasq default).";
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
openFirewall = mkOption {
|
||||||
|
description = "Open port 53 UDP/TCP in the firewall.";
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
age.secrets = mkIf (cfg.addressesSecretName != null) {
|
||||||
|
${cfg.addressesSecretName} = {
|
||||||
|
file = ../../../../secrets + "/${cfg.addressesSecretName}.age";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.dnsmasq = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
address = addressEntries;
|
||||||
|
server = cfg.upstreamServers;
|
||||||
|
}
|
||||||
|
// optionalAttrs (cfg.listenAddresses != [ ]) {
|
||||||
|
listen-address = cfg.listenAddresses;
|
||||||
|
}
|
||||||
|
// optionalAttrs (cfg.addressesSecretName != null) {
|
||||||
|
conf-file = config.age.secrets.${cfg.addressesSecretName}.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
|
allowedUDPPorts = [ 53 ];
|
||||||
|
allowedTCPPorts = [ 53 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user