diff --git a/flake.lock b/flake.lock index 67d4072..7d95f34 100644 --- a/flake.lock +++ b/flake.lock @@ -114,11 +114,11 @@ ] }, "locked": { - "lastModified": 1757543518, - "narHash": "sha256-6tx7gyQ8uwbTGL4CnAZuov9Xmta38byekiNucz78DIM=", + "lastModified": 1758322349, + "narHash": "sha256-ZFjhqGox/z6EZTpVp1XlM627R+roPj2PjeeCGcnl2AI=", "owner": "9001", "repo": "copyparty", - "rev": "5c1a43c71172e115c9cda1f1fe0474a4035b1bb0", + "rev": "e1ea9852c6127d48ad3d54a2b219463261834898", "type": "github" }, "original": { @@ -211,11 +211,11 @@ ] }, "locked": { - "lastModified": 1757508292, - "narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=", + "lastModified": 1758287904, + "narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=", "owner": "nix-community", "repo": "disko", - "rev": "146f45bee02b8bd88812cfce6ffc0f933788875a", + "rev": "67ff9807dd148e704baadbd4fd783b54282ca627", "type": "github" }, "original": { @@ -269,11 +269,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1757736223, - "narHash": "sha256-4yhWsAvejkPRNdx9eKAVOQt1t8vI6qF/kITCRSIIiK8=", + "lastModified": 1758295658, + "narHash": "sha256-PsQSN226ZZ4KnweNspxKTzF8ztdPOAT6+gpGkxnygpg=", "owner": "rycee", "repo": "nur-expressions", - "rev": "a73f8d6c29ea0e05c0dc570d4047e0aed1edd00d", + "rev": "7c0e1d343108cbaaf448353fadb62190246251a8", "type": "gitlab" }, "original": { @@ -346,6 +346,22 @@ "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": { "inputs": { "nixpkgs-lib": [ @@ -513,6 +529,24 @@ "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": { "flake": false, "locked": { @@ -545,6 +579,29 @@ "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": { "inputs": { "nixpkgs": [ @@ -588,6 +645,28 @@ "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": { "flake": false, "locked": { @@ -633,11 +712,11 @@ ] }, "locked": { - "lastModified": 1756679287, - "narHash": "sha256-Xd1vOeY9ccDf5VtVK12yM0FS6qqvfUop8UQlxEB+gTQ=", + "lastModified": 1758313341, + "narHash": "sha256-SsI6INUzWwPcRKRaxvi50RttnD9rcC4EjV+67TOEfrQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "07fc025fe10487dd80f2ec694f1cd790e752d0e8", + "rev": "6f656618ebc71ca82d93d306a8aecb2c5f6f2ab2", "type": "github" }, "original": { @@ -838,11 +917,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1757545623, - "narHash": "sha256-mCxPABZ6jRjUQx3bPP4vjA68ETbPLNz9V2pk9tO7pRQ=", + "lastModified": 1758216857, + "narHash": "sha256-h1BW2y7CY4LI9w61R02wPaOYfmYo82FyRqHIwukQ6SY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8cd5ce828d5d1d16feff37340171a98fc3bf6526", + "rev": "d2ed99647a4b195f0bcc440f76edfa10aeb3b743", "type": "github" }, "original": { @@ -902,6 +981,22 @@ } }, "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": { "lastModified": 1711163522, "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", @@ -917,7 +1012,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1750215678, "narHash": "sha256-Rc/ytpamXRf6z8UA2SGa4aaWxUXRbX2MAWIu2C8M+ok=", @@ -933,7 +1028,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -949,6 +1044,25 @@ "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": { "inputs": { "flake-parts": [ @@ -1031,7 +1145,7 @@ "flake-parts": "flake-parts_4", "flake-utils": "flake-utils_2", "mnw": "mnw", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "systems": "systems_3" }, "locked": { @@ -1059,7 +1173,7 @@ "nix-systems-aarch64-linux": "nix-systems-aarch64-linux", "nix-systems-x86_64-darwin": "nix-systems-x86_64-darwin", "nix-systems-x86_64-linux": "nix-systems-x86_64-linux", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "rust-flake": "rust-flake", "systems": [ "systems" @@ -1091,11 +1205,11 @@ ] }, "locked": { - "lastModified": 1757588530, - "narHash": "sha256-tJ7A8mID3ct69n9WCvZ3PzIIl3rXTdptn/lZmqSS95U=", + "lastModified": 1758108966, + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "b084b2c2b6bc23e83bbfe583b03664eb0b18c411", + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", "type": "github" }, "original": { @@ -1145,12 +1259,14 @@ "nish": "nish", "nixinate": "nixinate", "nixpkgs": "nixpkgs", + "nocodb": "nocodb", "nsbm": "nsbm", "nvf": "nvf", "omnix": "omnix", "pre-commit-hooks": "pre-commit-hooks", + "scenics": "scenics", "stylix": "stylix", - "systems": "systems_5", + "systems": "systems_6", "treefmt-nix": "treefmt-nix_3", "unstable": "unstable" } @@ -1244,7 +1360,7 @@ "flake-parts": "flake-parts_3", "flake-root": "flake-root", "nix-visualize": "nix-visualize", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "treefmt-nix": "treefmt-nix", "vulnix": "vulnix" }, @@ -1262,6 +1378,28 @@ "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": { "inputs": { "base16": "base16", @@ -1275,7 +1413,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems_4", + "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1283,11 +1421,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1757361712, - "narHash": "sha256-GwObJtrAqVim66e4Jb5VzAKT6zGFJ3KOi63rfcrfMV4=", + "lastModified": 1757957798, + "narHash": "sha256-FT4O5imFJ+FUIGhYj/aFwEEgyvLhuyJ2my8f6mCLtTY=", "owner": "danth", "repo": "stylix", - "rev": "3bf1430ed85a4484e4e1facee2344d2bb20288e6", + "rev": "e6fc25cd12e8f461e402cf34649cc73ad93c7bdd", "type": "github" }, "original": { @@ -1343,6 +1481,21 @@ } }, "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": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1357,7 +1510,7 @@ "type": "github" } }, - "systems_5": { + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1504,11 +1657,11 @@ ] }, "locked": { - "lastModified": 1756662192, - "narHash": "sha256-F1oFfV51AE259I85av+MAia221XwMHCOtZCMcZLK2Jk=", + "lastModified": 1758206697, + "narHash": "sha256-/DbPkh6PZOgfueCbs3uzlk4ASU2nPPsiVWhpMCNkAd0=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "1aabc6c05ccbcbf4a635fb7a90400e44282f61c4", + "rev": "128222dc911b8e2e18939537bed1762b7f3a04aa", "type": "github" }, "original": { @@ -1534,11 +1687,11 @@ }, "unstable": { "locked": { - "lastModified": 1757487488, - "narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=", + "lastModified": 1758198701, + "narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0", + "rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index eab8f66..9ec84a4 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,7 @@ # TODO: use ./hosts/ nixosConfigurations = { 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? om.health.default = {nix-version.min-required = "2.18.5";}; @@ -54,7 +54,12 @@ ... }: { _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 = { check.enable = false; @@ -86,6 +91,9 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + scenics.url = "github:callumio/scenics"; + scenics.inputs.nixpkgs.follows = "unstable"; + nixinate = { url = "github:callumio/nixinate"; inputs.nixpkgs.follows = "unstable"; @@ -182,5 +190,10 @@ url = "github:9001/copyparty"; inputs.nixpkgs.follows = "unstable"; }; + + nocodb = { + url = "github:nocodb/nocodb?ref=bec1fa4"; + #inputs.nixpkgs.follows = "unstable"; + }; }; } diff --git a/home/c/programs/default.nix b/home/c/programs/default.nix index 0321340..feff4cc 100644 --- a/home/c/programs/default.nix +++ b/home/c/programs/default.nix @@ -4,6 +4,7 @@ ./waybar ./git ./fish + ./jj ./rofi ./rbw ./firefox diff --git a/home/c/programs/hypr/default.nix b/home/c/programs/hypr/default.nix index 90560a0..fccc19f 100644 --- a/home/c/programs/hypr/default.nix +++ b/home/c/programs/hypr/default.nix @@ -7,8 +7,7 @@ getProgFor' = cLib.getProgFor' pkgs; getProgFor = cLib.getProgFor pkgs; web = getProgFor "firefox"; - #mail = getProgFor "betterbird"; - mail = ""; + # mail = ""; chat = getProgFor "discord"; media = getProgFor "spotify"; terminal = getProgFor "alacritty"; @@ -218,7 +217,7 @@ in { "name:web, on-created-empty: ${web}" "name:chat, on-created-empty: ${chat}" "name:media, on-created-empty: ${media}" - "name:mail, on-created-empty: ${mail}" + #"name:mail, on-created-empty: ${mail}" ]; bindm = [ diff --git a/home/c/programs/jj/default.nix b/home/c/programs/jj/default.nix new file mode 100644 index 0000000..3029dea --- /dev/null +++ b/home/c/programs/jj/default.nix @@ -0,0 +1,36 @@ +{lib, ...}: { + programs.jujutsu = { + enable = true; + settings = { + user = { + name = "Callum Leslie"; + email = "git@cleslie.uk"; + }; + signing = { + behavior = "own"; + backend = "gpg"; + }; + + ui = { + pager = "delta"; + diff-formatter = ":git"; + }; + git = { + private-commits = "description(glob:'wip:*') | description(glob:'private:*') | description(glob:'fixup*')"; + }; + + "--scope" = [ + { + "--when".repositories = ["~/repos/projects.cs.nott.ac.uk"]; + user = { + email = "psycl6@nottingham.ac.uk"; + }; + } + { + "--when".commands = ["status"]; + ui.paginate = "never"; + } + ]; + }; + }; +} diff --git a/home/c/programs/tmux/default.nix b/home/c/programs/tmux/default.nix index e71d8f5..f8c4a70 100644 --- a/home/c/programs/tmux/default.nix +++ b/home/c/programs/tmux/default.nix @@ -4,9 +4,9 @@ ... }: let getProgFor = cLib.getProgFor pkgs; - getProgFor' = cLib.getProgFor' pkgs; tmux = getProgFor "tmux"; - tmux-sessionizer = getProgFor' "tmux-sessionizer-cl" "tmux-sessionizer"; + getProgFor' = cLib.getProgFor pkgs.scenics; + tmux-githop = getProgFor' "tmux-githop"; in { programs.tmux = { enable = true; @@ -51,8 +51,8 @@ in { bind \\ split-window -v -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}" - bind-key -r s run-shell "${tmux} display-popup -E '${tmux-sessionizer} -s'" - bind-key -r f run-shell "${tmux} display-popup -E '${tmux-sessionizer} -p'" + bind-key -r s run-shell "${tmux} display-popup -E '${tmux-githop} -s -y'" + bind-key -r f run-shell "${tmux} display-popup -E '${tmux-githop} -p -y'" bind-key -r m run-shell "${tmux} switch-client -t main" bind S choose-tree diff --git a/hosts/hermes/copyparty.nix b/hosts/hermes/copyparty.nix index 8fc9923..345f198 100644 --- a/hosts/hermes/copyparty.nix +++ b/hosts/hermes/copyparty.nix @@ -16,7 +16,12 @@ in { "/media" = { path = "/var/lib/media/library"; access = { - r = "*"; + rw = ["c"]; + }; + }; + "/paperless" = { + path = "/var/lib/media/library"; + access = { rw = ["c"]; }; }; diff --git a/hosts/hermes/default.nix b/hosts/hermes/default.nix index 6487805..11aaf6f 100644 --- a/hosts/hermes/default.nix +++ b/hosts/hermes/default.nix @@ -7,7 +7,9 @@ ./quassel.nix ./fail2ban.nix ./containers.nix + ./n8n.nix ./networking.nix + ./nocodb.nix ./ssh.nix ./media.nix ./headscale.nix diff --git a/hosts/hermes/n8n.nix b/hosts/hermes/n8n.nix new file mode 100644 index 0000000..5054b60 --- /dev/null +++ b/hosts/hermes/n8n.nix @@ -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]; +} diff --git a/hosts/hermes/nocodb.nix b/hosts/hermes/nocodb.nix new file mode 100644 index 0000000..db5658f --- /dev/null +++ b/hosts/hermes/nocodb.nix @@ -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 + ''; + }; +}