Compare commits
5 Commits
d3faf45c6a
...
9f62ba4d4d
| Author | SHA1 | Date | |
|---|---|---|---|
|
9f62ba4d4d
|
|||
|
54668635e9
|
|||
|
b2665758ee
|
|||
|
b5e6fc022b
|
|||
|
a9002155bd
|
@@ -34,6 +34,9 @@
|
|||||||
./services/ups.nix
|
./services/ups.nix
|
||||||
|
|
||||||
./services/bitwarden.nix
|
./services/bitwarden.nix
|
||||||
|
|
||||||
|
# KEEP UNTIL 2028
|
||||||
|
./services/caddy_senior_project.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.targets = {
|
systemd.targets = {
|
||||||
|
|||||||
53
flake.lock
generated
53
flake.lock
generated
@@ -24,11 +24,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749105467,
|
"lastModified": 1756719547,
|
||||||
"narHash": "sha256-hXh76y/wDl15almBcqvjryB50B0BaiXJKk20f314RoE=",
|
"narHash": "sha256-N9gBKUmjwRKPxAafXEk1EGadfk2qDZPBQp4vXWPHINQ=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "6bc76b872374845ba9d645a2f012b764fecd765f",
|
"rev": "125ae9e3ecf62fb2c0fd4f2d894eb971f1ecaed2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -44,11 +44,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756115622,
|
"lastModified": 1756733629,
|
||||||
"narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=",
|
"narHash": "sha256-dwWGlDhcO5SMIvMSTB4mjQ5Pvo2vtxvpIknhVnSz2I8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "bafad29f89e83b2d861b493aa23034ea16595560",
|
"rev": "a5c4f2ab72e3d1ab43e3e65aa421c6f2bd2e12a1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -217,11 +217,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754297745,
|
"lastModified": 1756744479,
|
||||||
"narHash": "sha256-aD6/scLN3L4ZszmNbhhd3JQ9Pzv1ScYFphz14wHinfs=",
|
"narHash": "sha256-EyZXusK/wRD3V9vDh00W2Re3Eg8UQ+LjVBQrrH9dq1U=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "lanzaboote",
|
"repo": "lanzaboote",
|
||||||
"rev": "892cbdca865d6b42f9c0d222fe309f7720259855",
|
"rev": "747b7912f49e2885090c83364d88cf853a020ac1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -238,11 +238,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756689906,
|
"lastModified": 1756841250,
|
||||||
"narHash": "sha256-mJTaaHI3MINqVUiBQqCGHcp2DFSrClw5syh6MOSW9y4=",
|
"narHash": "sha256-VBFOuaNQZiRux2zNv2DThl10EOpEs8e4lz8xN/gnY2w=",
|
||||||
"owner": "ggml-org",
|
"owner": "ggml-org",
|
||||||
"repo": "llama.cpp",
|
"repo": "llama.cpp",
|
||||||
"rev": "b66df9d9c942254d03209186ef24ed7c994a576e",
|
"rev": "3de008208b9b8a33f49f979097a99b4d59e6e521",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -275,11 +275,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756245047,
|
"lastModified": 1756750488,
|
||||||
"narHash": "sha256-9bHzrVbjAudbO8q4vYFBWlEkDam31fsz0J7GB8k4AsI=",
|
"narHash": "sha256-e4ZAu2sjOtGpvbdS5zo+Va5FUUkAnizl4wb0/JlIL2I=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "a65b650d6981e23edd1afa1f01eb942f19cdcbb7",
|
"rev": "47eb4856cfd01eaeaa7bb5944a0f27db8fb9b94a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -291,11 +291,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756617294,
|
"lastModified": 1756754095,
|
||||||
"narHash": "sha256-aGnd4AHIYCWQKChAkHPpX+YYCt7pA6y2LFFA/s8q0wQ=",
|
"narHash": "sha256-9Rsn9XEWINExosFkKEqdp8EI6Mujr1gmQiyrEcts2ls=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b4c2c57c31e68544982226d07e4719a2d86302a8",
|
"rev": "7c815e513adbf03c9098b2bd230c1e0525c8a7f9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -353,6 +353,7 @@
|
|||||||
"nix-minecraft": "nix-minecraft",
|
"nix-minecraft": "nix-minecraft",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"senior_project-website": "senior_project-website",
|
||||||
"srvos": "srvos",
|
"srvos": "srvos",
|
||||||
"vpn-confinement": "vpn-confinement"
|
"vpn-confinement": "vpn-confinement"
|
||||||
}
|
}
|
||||||
@@ -378,6 +379,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"senior_project-website": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756856881,
|
||||||
|
"narHash": "sha256-RMjHSgGJ6h5kRG5OC8k9LStSLTQJNQRT2HOxCz+F0u4=",
|
||||||
|
"owner": "Titaniumtown",
|
||||||
|
"repo": "senior-project-website",
|
||||||
|
"rev": "107e7f82142fd10ccc04eb05f3925a77c55c7bb8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Titaniumtown",
|
||||||
|
"repo": "senior-project-website",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"srvos": {
|
"srvos": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|||||||
11
flake.nix
11
flake.nix
@@ -42,6 +42,11 @@
|
|||||||
url = "github:serokell/deploy-rs";
|
url = "github:serokell/deploy-rs";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
senior_project-website = {
|
||||||
|
url = "github:Titaniumtown/senior-project-website";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@@ -89,7 +94,11 @@
|
|||||||
https = {
|
https = {
|
||||||
certs = services_dir + "/http_certs";
|
certs = services_dir + "/http_certs";
|
||||||
# TODO! generate website from repo directly using hugo
|
# TODO! generate website from repo directly using hugo
|
||||||
data_dir = services_dir + "/http";
|
data_dir = services_dir + "/http/www";
|
||||||
|
|
||||||
|
# KEEP UNTIL 2028
|
||||||
|
senior_project_dir = services_dir + "/http/senior_project";
|
||||||
|
|
||||||
domain = "gardling.com";
|
domain = "gardling.com";
|
||||||
wg_ip = "192.168.15.1";
|
wg_ip = "192.168.15.1";
|
||||||
matrix_hostname = "matrix.${service_configs.https.domain}";
|
matrix_hostname = "matrix.${service_configs.https.domain}";
|
||||||
|
|||||||
52
services/caddy_senior_project.nix
Normal file
52
services/caddy_senior_project.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
service_configs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
theme = pkgs.fetchFromGitHub {
|
||||||
|
owner = "kaiiiz";
|
||||||
|
repo = "hugo-theme-monochrome";
|
||||||
|
rev = "d17e05715e91f41a842f2656e6bdd70cba73de91";
|
||||||
|
sha256 = "h9I2ukugVrldIC3SXefS0L3R245oa+TuRChOCJJgF24=";
|
||||||
|
};
|
||||||
|
|
||||||
|
hugoWebsite = pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "hugo-site";
|
||||||
|
version = "0.1";
|
||||||
|
|
||||||
|
src = inputs.senior_project-website;
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
hugo
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
rm -fr themes/theme
|
||||||
|
cp -rv ${theme} themes/theme
|
||||||
|
hugo --minify -d $out;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# TODO! fix conflicting definition values
|
||||||
|
/*
|
||||||
|
(lib.serviceMountDeps "caddy" [
|
||||||
|
service_configs.https.senior_project_dir
|
||||||
|
])
|
||||||
|
*/
|
||||||
|
];
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."senior-project.${service_configs.https.domain}".extraConfig = ''
|
||||||
|
root * ${hugoWebsite}
|
||||||
|
file_server browse
|
||||||
|
'';
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${service_configs.https.senior_project_dir} 770 ${config.services.caddy.user} ${config.services.caddy.group}"
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user