This commit is contained in:
Callum Leslie 2025-09-16 10:36:32 +01:00
parent 7789097c17
commit fedd077861
Signed by: cleslie
GPG key ID: 5A944DF89B6F65AC
6 changed files with 220 additions and 11 deletions

169
flake.lock generated
View file

@ -361,6 +361,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -528,6 +544,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -560,6 +594,29 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_4",
"gitignore": "gitignore_3",
"nixpkgs": [
"scenics",
"nixpkgs"
]
},
"locked": {
"lastModified": 1757239681,
"narHash": "sha256-E9spYi9lxm2f1zWQLQ7xQt8Xs2nWgr1T4QM7ZjLFphM=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "ab82ab08d6bf74085bd328de2a8722c12d97bd9d",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -603,6 +660,28 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_3": {
"inputs": {
"nixpkgs": [
"scenics",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gnome-shell": { "gnome-shell": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -917,6 +996,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1737469691,
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=",
"owner": "NixOs",
"repo": "nixpkgs",
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab",
"type": "github"
},
"original": {
"owner": "NixOs",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1711163522, "lastModified": 1711163522,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
@ -932,7 +1027,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1750215678, "lastModified": 1750215678,
"narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=", "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=",
@ -948,7 +1043,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1725194671, "lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
@ -964,6 +1059,25 @@
"type": "github" "type": "github"
} }
}, },
"nocodb": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1753527533,
"narHash": "sha256-UoOwtvkNicWrlxEVNR9RL7r39mOFEwyV6BpBd5Fa1is=",
"owner": "nocodb",
"repo": "nocodb",
"rev": "bec1fa46dd23996cad16e16150c959ce587b0750",
"type": "github"
},
"original": {
"owner": "nocodb",
"ref": "bec1fa4",
"repo": "nocodb",
"type": "github"
}
},
"nsbm": { "nsbm": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": [
@ -1046,7 +1160,7 @@
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_4",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"mnw": "mnw", "mnw": "mnw",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": { "locked": {
@ -1075,7 +1189,7 @@
"nix-systems-aarch64-linux": "nix-systems-aarch64-linux", "nix-systems-aarch64-linux": "nix-systems-aarch64-linux",
"nix-systems-x86_64-darwin": "nix-systems-x86_64-darwin", "nix-systems-x86_64-darwin": "nix-systems-x86_64-darwin",
"nix-systems-x86_64-linux": "nix-systems-x86_64-linux", "nix-systems-x86_64-linux": "nix-systems-x86_64-linux",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"rust-flake": "rust-flake", "rust-flake": "rust-flake",
"systems": [ "systems": [
"systems" "systems"
@ -1161,12 +1275,14 @@
"nish": "nish", "nish": "nish",
"nixinate": "nixinate", "nixinate": "nixinate",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nocodb": "nocodb",
"nsbm": "nsbm", "nsbm": "nsbm",
"nvf": "nvf", "nvf": "nvf",
"omnix": "omnix", "omnix": "omnix",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"scenics": "scenics",
"stylix": "stylix", "stylix": "stylix",
"systems": "systems_5", "systems": "systems_6",
"treefmt-nix": "treefmt-nix_3", "treefmt-nix": "treefmt-nix_3",
"unstable": "unstable" "unstable": "unstable"
} }
@ -1260,7 +1376,7 @@
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"flake-root": "flake-root", "flake-root": "flake-root",
"nix-visualize": "nix-visualize", "nix-visualize": "nix-visualize",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"treefmt-nix": "treefmt-nix", "treefmt-nix": "treefmt-nix",
"vulnix": "vulnix" "vulnix": "vulnix"
}, },
@ -1278,6 +1394,28 @@
"type": "github" "type": "github"
} }
}, },
"scenics": {
"inputs": {
"flake-utils": "flake-utils_3",
"git-hooks": "git-hooks_2",
"nixpkgs": [
"unstable"
]
},
"locked": {
"lastModified": 1757517057,
"narHash": "sha256-FOovR2vgYev9BoNmbacqpB6i3Tk5NxWjRj9hFr2fB/4=",
"owner": "callumio",
"repo": "scenics",
"rev": "6afe932b2c78782e6b2e7423926eb1995fd4f5be",
"type": "github"
},
"original": {
"owner": "callumio",
"repo": "scenics",
"type": "github"
}
},
"stylix": { "stylix": {
"inputs": { "inputs": {
"base16": "base16", "base16": "base16",
@ -1291,7 +1429,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems_4", "systems": "systems_5",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -1359,6 +1497,21 @@
} }
}, },
"systems_4": { "systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_5": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -1373,7 +1526,7 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": { "systems_6": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View file

@ -40,7 +40,7 @@
# TODO: use ./hosts/ # TODO: use ./hosts/
nixosConfigurations = { nixosConfigurations = {
artemis = mkLinuxSystem [./hosts/artemis inputs.lanzaboote.nixosModules.lanzaboote] []; artemis = mkLinuxSystem [./hosts/artemis inputs.lanzaboote.nixosModules.lanzaboote] [];
hermes = mkLinuxSystem [./hosts/hermes inputs.copyparty.nixosModules.default] [inputs.copyparty.overlays.default]; hermes = mkLinuxSystem [./hosts/hermes inputs.nocodb.nixosModules.nocodb inputs.copyparty.nixosModules.default] [inputs.copyparty.overlays.default];
}; };
diskoConfigurations = {}; # maybe? diskoConfigurations = {}; # maybe?
om.health.default = {nix-version.min-required = "2.18.5";}; om.health.default = {nix-version.min-required = "2.18.5";};
@ -54,7 +54,12 @@
... ...
}: { }: {
_module.args.pkgs = inputs'.nixpkgs.legacyPackages.extend self.overlays.default; _module.args.pkgs = inputs'.nixpkgs.legacyPackages.extend self.overlays.default;
overlayAttrs = config.packages // {unstable = inputs'.unstable.legacyPackages;}; overlayAttrs =
config.packages
// {
unstable = inputs'.unstable.legacyPackages;
scenics = inputs'.scenics.packages;
};
pre-commit = { pre-commit = {
check.enable = false; check.enable = false;
@ -86,6 +91,9 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
scenics.url = "github:callumio/scenics";
scenics.inputs.nixpkgs.follows = "unstable";
nixinate = { nixinate = {
url = "github:callumio/nixinate"; url = "github:callumio/nixinate";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
@ -182,5 +190,10 @@
url = "github:9001/copyparty"; url = "github:9001/copyparty";
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
nocodb = {
url = "github:nocodb/nocodb?ref=bec1fa4";
#inputs.nixpkgs.follows = "unstable";
};
}; };
} }

View file

@ -16,7 +16,12 @@ in {
"/media" = { "/media" = {
path = "/var/lib/media/library"; path = "/var/lib/media/library";
access = { access = {
r = "*"; rw = ["c"];
};
};
"/paperless" = {
path = "/var/lib/media/library";
access = {
rw = ["c"]; rw = ["c"];
}; };
}; };

View file

@ -7,7 +7,9 @@
./quassel.nix ./quassel.nix
./fail2ban.nix ./fail2ban.nix
./containers.nix ./containers.nix
./n8n.nix
./networking.nix ./networking.nix
./nocodb.nix
./ssh.nix ./ssh.nix
./media.nix ./media.nix
./headscale.nix ./headscale.nix

18
hosts/hermes/n8n.nix Normal file
View file

@ -0,0 +1,18 @@
{pkgs, ...}: let
domain = "automation.cleslie.uk";
in {
services = {
cloudflare-dyndns.domains = [domain];
n8n = {
enable = true;
webhookUrl = "https://" + domain + "/";
settings = {
port = 5678;
};
};
caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy http://127.0.0.1:5678
'';
};
environment.systemPackages = with pkgs; [mupdf-headless];
}

18
hosts/hermes/nocodb.nix Normal file
View file

@ -0,0 +1,18 @@
_: let
domain = "hub.cleslie.uk";
in {
services = {
cloudflare-dyndns.domains = [domain];
nocodb = {
enable = true;
environment = {
NC_PUBLIC_URL = "https://" + domain;
#NC_INVITE_ONLY_SIGNUP = 1;
PORT = "4690";
};
};
caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy http://127.0.0.1:4690
'';
};
}