From 93fc78685925083bd7fa1ce488b468fb9ecb78ac Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Tue, 10 Sep 2024 20:51:16 +0100 Subject: [PATCH 01/24] add my custom packages --- flake.lock | 328 ++++++++++++++++++++++++++++++-- flake.nix | 16 ++ hosts/artemis/configuration.nix | 2 + packages/default.nix | 2 + 4 files changed, 335 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 47a3157..435842d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "advisory-db": { + "flake": false, + "locked": { + "lastModified": 1725883717, + "narHash": "sha256-QifFNLfu5bzKPO4iznCj1h+nHhqGZ8NR2Lo7tzh9FRc=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "7fbf1e630ae52b7b364791a107b5bee5ff929496", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, "agenix": { "inputs": { "darwin": [], @@ -168,6 +184,21 @@ } }, "crane": { + "locked": { + "lastModified": 1725409566, + "narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=", + "owner": "ipetkov", + "repo": "crane", + "rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { "inputs": { "nixpkgs": [ "omnix", @@ -332,6 +363,22 @@ } }, "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1673956053, @@ -347,7 +394,7 @@ "type": "github" } }, - "flake-compat_6": { + "flake-compat_7": { "flake": false, "locked": { "lastModified": 1673956053, @@ -445,6 +492,39 @@ "type": "indirect" } }, + "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-root": { + "locked": { + "lastModified": 1692742795, + "narHash": "sha256-f+Y0YhVCIJ06LemO+3Xx00lIcqQxSKJHXT/yk1RTKxw=", + "owner": "srid", + "repo": "flake-root", + "rev": "d9a70d9c7a5fd7f3258ccf48da9335e9b47c3937", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "flake-root", + "type": "github" + } + }, "flake-schemas": { "locked": { "lastModified": 1719857163, @@ -494,6 +574,24 @@ } }, "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -508,7 +606,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "inputs": { "systems": [ "stylix", @@ -833,16 +931,40 @@ "type": "github" } }, + "nish": { + "inputs": { + "advisory-db": "advisory-db", + "crane": "crane", + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "unstable" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1725999292, + "narHash": "sha256-nrzEuty76ZWGno9w74j7cDekvaRn9gtHN0gsuSyqRpw=", + "owner": "callumio", + "repo": "nish", + "rev": "fb22da828f4aad704123dd8dd31404eb545e9df3", + "type": "github" + }, + "original": { + "owner": "callumio", + "repo": "nish", + "type": "github" + } + }, "nix": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_6", "flake-parts": [ "omnix", "flake-parts" ], "flake-schemas": "flake-schemas", "libgit2": "libgit2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression", "pre-commit-hooks": "pre-commit-hooks" @@ -884,6 +1006,22 @@ "type": "github" } }, + "nix-visualize": { + "flake": false, + "locked": { + "lastModified": 1687577587, + "narHash": "sha256-Z1r8XHszoUnQinl63yXvQG6Czp5HnYNG37AY+EEiT4w=", + "owner": "craigmbooth", + "repo": "nix-visualize", + "rev": "cafaba50cd63ba9c759c56af71fd0d22fd60a548", + "type": "github" + }, + "original": { + "owner": "craigmbooth", + "repo": "nix-visualize", + "type": "github" + } + }, "nixinate": { "inputs": { "nixpkgs": [ @@ -948,6 +1086,24 @@ "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -997,6 +1153,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1711163522, + "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1717432640, "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", @@ -1067,9 +1239,39 @@ "type": "github" } }, + "nsbm": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "unstable" + ], + "sbomnix": "sbomnix", + "systems": [ + "systems" + ], + "treefmt-nix": [ + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1725996481, + "narHash": "sha256-dDobRr906wky/lH4hKkKAEnxmrnUzOYL0IuuCPv7t6Y=", + "owner": "callumio", + "repo": "nsbm", + "rev": "6146544f3ca96c1d8d27711ee1278d1973031df8", + "type": "github" + }, + "original": { + "owner": "callumio", + "repo": "nsbm", + "type": "github" + } + }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixvim", "nixvim", @@ -1133,7 +1335,7 @@ "omnix", "nix" ], - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "gitignore": [ "omnix", "nix" @@ -1212,25 +1414,27 @@ "flake-compat": "flake-compat", "flake-parts": "flake-parts", "home-manager": "home-manager_2", + "nish": "nish", "nixinate": "nixinate", "nixpkgs": "nixpkgs", "nixvim": "nixvim", + "nsbm": "nsbm", "omnix": "omnix", "pre-commit-hooks": "pre-commit-hooks_2", "stylix": "stylix", - "systems": "systems_4", - "treefmt-nix": "treefmt-nix_2", + "systems": "systems_5", + "treefmt-nix": "treefmt-nix_3", "unstable": "unstable" } }, "rust-flake": { "inputs": { - "crane": "crane", + "crane": "crane_2", "nixpkgs": [ "omnix", "nixpkgs" ], - "rust-overlay": "rust-overlay" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1725522236, @@ -1248,6 +1452,27 @@ } }, "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nish", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1725935143, + "narHash": "sha256-mVtTVQMlXkydSXVwFClE0ckxHrOQ9nb2DrCjNwW5pUE=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "c3c175c74cd0e8c2c40a0e22bc6e3005c4d28d64", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { "flake": false, "locked": { "lastModified": 1725243956, @@ -1263,6 +1488,30 @@ "type": "github" } }, + "sbomnix": { + "inputs": { + "flake-compat": "flake-compat_5", + "flake-parts": "flake-parts_5", + "flake-root": "flake-root", + "nix-visualize": "nix-visualize", + "nixpkgs": "nixpkgs_3", + "treefmt-nix": "treefmt-nix_2", + "vulnix": "vulnix" + }, + "locked": { + "lastModified": 1724929558, + "narHash": "sha256-3CkgwrPws+7Z+mEJbq4f8SNo2b4hrta+vdCCGoNrpiU=", + "owner": "tiiuae", + "repo": "sbomnix", + "rev": "444ba45f30dad718e51b7043418cff5ef83583ea", + "type": "github" + }, + "original": { + "owner": "tiiuae", + "repo": "sbomnix", + "type": "github" + } + }, "stylix": { "inputs": { "base16": "base16", @@ -1272,8 +1521,8 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_6", - "flake-utils": "flake-utils_4", + "flake-compat": "flake-compat_7", + "flake-utils": "flake-utils_5", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager" @@ -1281,7 +1530,7 @@ "nixpkgs": [ "unstable" ], - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1725290973, @@ -1357,6 +1606,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -1380,6 +1644,28 @@ } }, "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nsbm", + "sbomnix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1699786194, + "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -1414,6 +1700,22 @@ "repo": "nixpkgs", "type": "github" } + }, + "vulnix": { + "flake": false, + "locked": { + "lastModified": 1676379453, + "narHash": "sha256-KXvmnaMjv//zd4aSwu4qmbon1Iyzdod6CPms7LIxeVU=", + "owner": "henrirosten", + "repo": "vulnix", + "rev": "ad28b2924027a44a9b81493a0f9de1b0e8641005", + "type": "github" + }, + "original": { + "owner": "henrirosten", + "repo": "vulnix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 90a1e1b..af4b7cf 100644 --- a/flake.nix +++ b/flake.nix @@ -159,5 +159,21 @@ treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + + # my custom programs + nish = { + url = "github:callumio/nish"; + inputs.nixpkgs.follows = "unstable"; + }; + + nsbm = { + url = "github:callumio/nsbm"; + inputs = { + nixpkgs.follows = "unstable"; + treefmt-nix.follows = "treefmt-nix"; + flake-parts.follows = "flake-parts"; + systems.follows = "systems"; + }; + }; }; } diff --git a/hosts/artemis/configuration.nix b/hosts/artemis/configuration.nix index 2021cd0..7915feb 100644 --- a/hosts/artemis/configuration.nix +++ b/hosts/artemis/configuration.nix @@ -36,6 +36,8 @@ killall gcc pkg-config + nish + nsbm ]; environment = { diff --git a/packages/default.nix b/packages/default.nix index 028509c..d7249c1 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -9,6 +9,8 @@ agenix = inputs'.agenix.packages.default; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; devour-flake = pkgs.callPackage inputs.devour-flake {}; + nish = inputs'.nish.packages.default; + nsbm = inputs'.nsbm.packages.default; jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override { ffmpeg_6-full = pkgs.ffmpeg_6-full.override { withMfx = false; From d86345eecc4a9908e50719635d00de4e4cd391c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Sep 2024 05:10:36 +0000 Subject: [PATCH 02/24] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'firefox-addons': 'gitlab:rycee/nur-expressions/dcdb13af1b383cd8173c6dae0dbe2ea63a584507?dir=pkgs/firefox-addons&narHash=sha256-lZO7blI%2BA3MTKePQ5ZDOWhun5kE62f6YVe6NNSbI%2BS4%3D' (2024-09-09) → 'gitlab:rycee/nur-expressions/675f12f64b3b5fc8809ad0ae2abd99dbeaa0f6c7?dir=pkgs/firefox-addons&narHash=sha256-HkTiAImrog2T7roRrc2msWjTqPjr6Wth05u9e4P5ti8%3D' (2024-09-11) • Updated input 'omnix': 'github:juspay/omnix/4d9949f041798adaa351afbee98fdb7e25ff2029?narHash=sha256-2J0TtzkIpjeAfIZYU1ofzcPzvcCO1DXBMP2P7OPoQYg%3D' (2024-09-09) → 'github:juspay/omnix/8992c14a8b2425e385c4c7287bfde52de39ad408?narHash=sha256-GSJEbFgPCS5hW3%2B3Ti/h6OwnjuKbpKTFxKeahI/TLMY%3D' (2024-09-10) --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 435842d..5fa6014 100644 --- a/flake.lock +++ b/flake.lock @@ -287,11 +287,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1725896943, - "narHash": "sha256-lZO7blI+A3MTKePQ5ZDOWhun5kE62f6YVe6NNSbI+S4=", + "lastModified": 1726027388, + "narHash": "sha256-HkTiAImrog2T7roRrc2msWjTqPjr6Wth05u9e4P5ti8=", "owner": "rycee", "repo": "nur-expressions", - "rev": "dcdb13af1b383cd8173c6dae0dbe2ea63a584507", + "rev": "675f12f64b3b5fc8809ad0ae2abd99dbeaa0f6c7", "type": "gitlab" }, "original": { @@ -1316,11 +1316,11 @@ ] }, "locked": { - "lastModified": 1725898395, - "narHash": "sha256-2J0TtzkIpjeAfIZYU1ofzcPzvcCO1DXBMP2P7OPoQYg=", + "lastModified": 1726003074, + "narHash": "sha256-GSJEbFgPCS5hW3+3Ti/h6OwnjuKbpKTFxKeahI/TLMY=", "owner": "juspay", "repo": "omnix", - "rev": "4d9949f041798adaa351afbee98fdb7e25ff2029", + "rev": "8992c14a8b2425e385c4c7287bfde52de39ad408", "type": "github" }, "original": { From 49da33a9d33a2419f51011866c0d3ee7516d398d Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Tue, 10 Sep 2024 20:51:16 +0100 Subject: [PATCH 03/24] add my custom packages --- flake.lock | 311 +++++++++++++++++++++++++++++++- flake.nix | 22 +++ hosts/artemis/configuration.nix | 2 + packages/default.nix | 2 + 4 files changed, 331 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 47a3157..fc6a9f4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "advisory-db": { + "flake": false, + "locked": { + "lastModified": 1725883717, + "narHash": "sha256-QifFNLfu5bzKPO4iznCj1h+nHhqGZ8NR2Lo7tzh9FRc=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "7fbf1e630ae52b7b364791a107b5bee5ff929496", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, "agenix": { "inputs": { "darwin": [], @@ -168,6 +184,21 @@ } }, "crane": { + "locked": { + "lastModified": 1725409566, + "narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=", + "owner": "ipetkov", + "repo": "crane", + "rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { "inputs": { "nixpkgs": [ "omnix", @@ -247,6 +278,29 @@ "type": "github" } }, + "fenix": { + "inputs": { + "nixpkgs": [ + "nish", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1725437390, + "narHash": "sha256-W2ZnHE+FkPVap5Em6na4KP8XkhU8kpY07iX0d4+y4uM=", + "owner": "nix-community", + "repo": "fenix", + "rev": "29ad6b2023ccec4d4679244c233f0ea875cdf000", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "pull/163/head", + "repo": "fenix", + "type": "github" + } + }, "firefox-addons": { "inputs": { "flake-utils": "flake-utils", @@ -332,6 +386,22 @@ } }, "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1673956053, @@ -347,7 +417,7 @@ "type": "github" } }, - "flake-compat_6": { + "flake-compat_7": { "flake": false, "locked": { "lastModified": 1673956053, @@ -445,6 +515,39 @@ "type": "indirect" } }, + "flake-parts_5": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-root": { + "locked": { + "lastModified": 1692742795, + "narHash": "sha256-f+Y0YhVCIJ06LemO+3Xx00lIcqQxSKJHXT/yk1RTKxw=", + "owner": "srid", + "repo": "flake-root", + "rev": "d9a70d9c7a5fd7f3258ccf48da9335e9b47c3937", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "flake-root", + "type": "github" + } + }, "flake-schemas": { "locked": { "lastModified": 1719857163, @@ -833,16 +936,51 @@ "type": "github" } }, + "nish": { + "inputs": { + "advisory-db": "advisory-db", + "crane": "crane", + "fenix": "fenix", + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "unstable" + ], + "pre-commit-hooks": [ + "pre-commit-hooks" + ], + "systems": [ + "systems" + ], + "treefmt-nix": [ + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1726041657, + "narHash": "sha256-XYRmSQe3pOriVCXVPanYVJLSUbsRdyTLTTBhE8NNgcw=", + "owner": "callumio", + "repo": "nish", + "rev": "1c5a478ad499356e0c6a11eeba02fdd701ee43f1", + "type": "github" + }, + "original": { + "owner": "callumio", + "repo": "nish", + "type": "github" + } + }, "nix": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_6", "flake-parts": [ "omnix", "flake-parts" ], "flake-schemas": "flake-schemas", "libgit2": "libgit2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression", "pre-commit-hooks": "pre-commit-hooks" @@ -884,6 +1022,22 @@ "type": "github" } }, + "nix-visualize": { + "flake": false, + "locked": { + "lastModified": 1687577587, + "narHash": "sha256-Z1r8XHszoUnQinl63yXvQG6Czp5HnYNG37AY+EEiT4w=", + "owner": "craigmbooth", + "repo": "nix-visualize", + "rev": "cafaba50cd63ba9c759c56af71fd0d22fd60a548", + "type": "github" + }, + "original": { + "owner": "craigmbooth", + "repo": "nix-visualize", + "type": "github" + } + }, "nixinate": { "inputs": { "nixpkgs": [ @@ -948,6 +1102,24 @@ "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-regression": { "locked": { "lastModified": 1643052045, @@ -997,6 +1169,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1711163522, + "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1717432640, "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", @@ -1067,6 +1255,36 @@ "type": "github" } }, + "nsbm": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "unstable" + ], + "sbomnix": "sbomnix", + "systems": [ + "systems" + ], + "treefmt-nix": [ + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1725996481, + "narHash": "sha256-dDobRr906wky/lH4hKkKAEnxmrnUzOYL0IuuCPv7t6Y=", + "owner": "callumio", + "repo": "nsbm", + "rev": "6146544f3ca96c1d8d27711ee1278d1973031df8", + "type": "github" + }, + "original": { + "owner": "callumio", + "repo": "nsbm", + "type": "github" + } + }, "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils_2", @@ -1212,20 +1430,39 @@ "flake-compat": "flake-compat", "flake-parts": "flake-parts", "home-manager": "home-manager_2", + "nish": "nish", "nixinate": "nixinate", "nixpkgs": "nixpkgs", "nixvim": "nixvim", + "nsbm": "nsbm", "omnix": "omnix", "pre-commit-hooks": "pre-commit-hooks_2", "stylix": "stylix", "systems": "systems_4", - "treefmt-nix": "treefmt-nix_2", + "treefmt-nix": "treefmt-nix_3", "unstable": "unstable" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1725890120, + "narHash": "sha256-7bsWAKG/otbHj7wmCBrJ9P6ve2MFcoOlIh6wcx6ffKg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "e35227d186acd47d8e5f78cbd792d57ddf47d74b", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "rust-flake": { "inputs": { - "crane": "crane", + "crane": "crane_2", "nixpkgs": [ "omnix", "nixpkgs" @@ -1263,6 +1500,30 @@ "type": "github" } }, + "sbomnix": { + "inputs": { + "flake-compat": "flake-compat_5", + "flake-parts": "flake-parts_5", + "flake-root": "flake-root", + "nix-visualize": "nix-visualize", + "nixpkgs": "nixpkgs_3", + "treefmt-nix": "treefmt-nix_2", + "vulnix": "vulnix" + }, + "locked": { + "lastModified": 1724929558, + "narHash": "sha256-3CkgwrPws+7Z+mEJbq4f8SNo2b4hrta+vdCCGoNrpiU=", + "owner": "tiiuae", + "repo": "sbomnix", + "rev": "444ba45f30dad718e51b7043418cff5ef83583ea", + "type": "github" + }, + "original": { + "owner": "tiiuae", + "repo": "sbomnix", + "type": "github" + } + }, "stylix": { "inputs": { "base16": "base16", @@ -1272,7 +1533,7 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_6", + "flake-compat": "flake-compat_7", "flake-utils": "flake-utils_4", "gnome-shell": "gnome-shell", "home-manager": [ @@ -1380,6 +1641,28 @@ } }, "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nsbm", + "sbomnix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1699786194, + "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -1414,6 +1697,22 @@ "repo": "nixpkgs", "type": "github" } + }, + "vulnix": { + "flake": false, + "locked": { + "lastModified": 1676379453, + "narHash": "sha256-KXvmnaMjv//zd4aSwu4qmbon1Iyzdod6CPms7LIxeVU=", + "owner": "henrirosten", + "repo": "vulnix", + "rev": "ad28b2924027a44a9b81493a0f9de1b0e8641005", + "type": "github" + }, + "original": { + "owner": "henrirosten", + "repo": "vulnix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 90a1e1b..1064831 100644 --- a/flake.nix +++ b/flake.nix @@ -159,5 +159,27 @@ treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + + # my custom programs + nish = { + url = "github:callumio/nish"; + inputs = { + nixpkgs.follows = "unstable"; + flake-parts.follows = "flake-parts"; + systems.follows = "systems"; + treefmt-nix.follows = "treefmt-nix"; + pre-commit-hooks.follows = "pre-commit-hooks"; + }; + }; + + nsbm = { + url = "github:callumio/nsbm"; + inputs = { + nixpkgs.follows = "unstable"; + treefmt-nix.follows = "treefmt-nix"; + flake-parts.follows = "flake-parts"; + systems.follows = "systems"; + }; + }; }; } diff --git a/hosts/artemis/configuration.nix b/hosts/artemis/configuration.nix index 2021cd0..7915feb 100644 --- a/hosts/artemis/configuration.nix +++ b/hosts/artemis/configuration.nix @@ -36,6 +36,8 @@ killall gcc pkg-config + nish + nsbm ]; environment = { diff --git a/packages/default.nix b/packages/default.nix index 028509c..d7249c1 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -9,6 +9,8 @@ agenix = inputs'.agenix.packages.default; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; devour-flake = pkgs.callPackage inputs.devour-flake {}; + nish = inputs'.nish.packages.default; + nsbm = inputs'.nsbm.packages.default; jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override { ffmpeg_6-full = pkgs.ffmpeg_6-full.override { withMfx = false; From c8bc7c67bb935c417610498bf66696362f6a4b21 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 09:58:18 +0100 Subject: [PATCH 04/24] workflow updates --- .github/workflows/ci.yml | 1 + .github/workflows/update-flake.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b4926b..ebdd859 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ on: + workflow_dispatch: pull_request: push: branches: diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml index 22af47e..101de73 100644 --- a/.github/workflows/update-flake.yml +++ b/.github/workflows/update-flake.yml @@ -2,7 +2,7 @@ name: Update flake inputs on: schedule: # Every day, 5am - - cron: "0 5 * * *" + - cron: "0 5 * * 6" workflow_dispatch: jobs: From b2bcef1cde9b4e2d05bf3b50fd8e462c4d764ff8 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 10:03:02 +0100 Subject: [PATCH 05/24] use omnix cache --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebdd859..a21854c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,4 +23,4 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' pushFilter: '(nerdfonts)' extraPullNames: nix-community, om - - run: nix run github:juspay/omnix -- ci run "." + - run: nix run github:juspay/omnix --accept-flake-config -- ci run "." From 897e30d1dfab89820169f217d2aab40cf22b584c Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 10:44:13 +0100 Subject: [PATCH 06/24] manual clear cache action --- .github/workflows/clear-cache.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/clear-cache.yml diff --git a/.github/workflows/clear-cache.yml b/.github/workflows/clear-cache.yml new file mode 100644 index 0000000..4972601 --- /dev/null +++ b/.github/workflows/clear-cache.yml @@ -0,0 +1,30 @@ +name: Clear cache + +on: + workflow_dispatch: + +permissions: + actions: write + +jobs: + clear-cache: + runs-on: ubuntu-latest + steps: + - name: Clear cache + uses: actions/github-script@v6 + with: + script: | + console.log("About to clear") + const caches = await github.rest.actions.getActionsCacheList({ + owner: context.repo.owner, + repo: context.repo.repo, + }) + for (const cache of caches.data.actions_caches) { + console.log(cache) + github.rest.actions.deleteActionsCacheById({ + owner: context.repo.owner, + repo: context.repo.repo, + cache_id: cache.id, + }) + } + console.log("Clear completed") From a4591797a62376b69bde59165586f907917fa9c9 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 12:33:03 +0100 Subject: [PATCH 07/24] update flaresolverr --- hosts/hermes/containers.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/hermes/containers.nix b/hosts/hermes/containers.nix index 75b5365..6272ae4 100644 --- a/hosts/hermes/containers.nix +++ b/hosts/hermes/containers.nix @@ -7,7 +7,7 @@ flaresolverr = { #image = "ghcr.io/flaresolverr/flaresolverr:latest"; #image = "ghcr.io/flaresolverr/flaresolverr:pr-1282"; - image = "docker.io/alexfozor/flaresolverr:pr-1300"; + image = "docker.io/alexfozor/flaresolverr:pr-1300-experimental"; autoStart = true; ports = ["127.0.0.1:8191:8191"]; environment = { From 06c972ef26582ebfb73fc45d86df37f621f94a23 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 14:05:15 +0100 Subject: [PATCH 08/24] better fish --- home/c/programs/fish/default.nix | 42 ++++++++++---------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/home/c/programs/fish/default.nix b/home/c/programs/fish/default.nix index e6244c1..4b3c330 100644 --- a/home/c/programs/fish/default.nix +++ b/home/c/programs/fish/default.nix @@ -1,4 +1,9 @@ -{pkgs, ...}: { +{pkgs, ...}: let + mkFishPlug = pkg: { + name = pkg.pname; + inherit (pkg) src; + }; +in { programs.fish = { enable = true; @@ -20,34 +25,13 @@ }; plugins = with pkgs.fishPlugins; [ - { - name = "z"; - inherit (z) src; - } - { - name = "hydro"; - inherit (hydro) src; - } - { - name = "sponge"; - inherit (sponge) src; - } - { - name = "grc"; - inherit (grc) src; - } - { - name = "done"; - inherit (done) src; - } - { - name = "fzf-fish"; - inherit (fzf-fish) src; - } - { - name = "forgit"; - inherit (forgit) src; - } + (mkFishPlug z) + (mkFishPlug hydro) + (mkFishPlug sponge) + (mkFishPlug grc) + (mkFishPlug done) + (mkFishPlug fzf-fish) + (mkFishPlug git-abbr) ]; }; } From bf7d690ff5b1bd6b08829ef04f728745732c2dab Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 14:58:28 +0100 Subject: [PATCH 09/24] forgejo --- hosts/hermes/default.nix | 1 + hosts/hermes/forgejo.nix | 39 ++++++++++++++++++++++++++++++++++++ secrets/forgejo-password.age | 7 +++++++ secrets/secrets.nix | 1 + 4 files changed, 48 insertions(+) create mode 100644 hosts/hermes/forgejo.nix create mode 100644 secrets/forgejo-password.age diff --git a/hosts/hermes/default.nix b/hosts/hermes/default.nix index 1c45a90..8c91497 100644 --- a/hosts/hermes/default.nix +++ b/hosts/hermes/default.nix @@ -8,5 +8,6 @@ ./ssh.nix ./media.nix ./headscale.nix + ./forgejo.nix ]; } diff --git a/hosts/hermes/forgejo.nix b/hosts/hermes/forgejo.nix new file mode 100644 index 0000000..f4d79c6 --- /dev/null +++ b/hosts/hermes/forgejo.nix @@ -0,0 +1,39 @@ +{ + lib, + config, + ... +}: let + domain = "git.cleslie.uk"; +in { + services = { + forgejo = { + enable = true; + database.type = "postgres"; + settings = { + server = { + #DOMAIN = domain; + ROOT_URL = "https://${domain}"; + HTTP_PORT = 3000; + SSH_PORT = builtins.head config.services.openssh.ports; + }; + service.DISABLE_REGISTRATION = true; + }; + }; + + caddy.virtualHosts.${domain}.extraConfig = '' + reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT} + ''; + }; + + systemd.services.forgejo.preStart = '' + admin="${lib.getExe config.services.forgejo.package} admin user" + $admin create --admin --email "git@cleslie.uk" --username cleslie --password "$(tr -d '\n' < ${config.age.secrets.forgejo-password.path})" || true + # $admin change-password --username cleslie --password "$(tr -d '\n' < ${config.age.secrets.forgejo-password.path})" || true + ''; + + age.secrets."forgejo-password" = { + file = ../../secrets/forgejo-password.age; + mode = "400"; + owner = "forgejo"; + }; +} diff --git a/secrets/forgejo-password.age b/secrets/forgejo-password.age new file mode 100644 index 0000000..b34346e --- /dev/null +++ b/secrets/forgejo-password.age @@ -0,0 +1,7 @@ +age-encryption.org/v1 +-> ssh-ed25519 /RyXeg IjBz5+4Rk9Rg+jBgKWo/B5IoZmq/wTCWcqZRB/5lhAU +E2bov9sYropmovrjqTItnLLzgEECt6+9iD2zjHLvXbU +-> ssh-ed25519 aSaoJQ Rjq+7b3BFCrUFuVQhvrpxm8i4D7jpkkLleu36r4cinM +HpdvPeOUqUOxdcsnBd5QWiU00Di7xcKHLstI8Z9p6EM +--- 3Ku+G1FBZdVdS31q7fKd68Ai+FkD1rJg0eSKpYLd+2c +_PEڠ#]ȼlX"ba4ՖAlG8sot ~i#/ib1e7ޛ \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index b0f2843..5dec7e0 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -9,4 +9,5 @@ in { "wg-conf.age".publicKeys = keys.c ++ allSystems; "mesh-conf-infra.age".publicKeys = keys.c ++ allSystems; "mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems; + "forgejo-password.age".publicKeys = keys.c ++ [systems.hermes]; } From b121ac562fc2b0557217f83165330d1237a66958 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 16:14:53 +0100 Subject: [PATCH 10/24] rekey --- secrets/mesh-conf-cleslie.age | 16 ++++++++-------- secrets/mesh-conf-infra.age | Bin 481 -> 481 bytes secrets/wg-conf.age | Bin 697 -> 697 bytes 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/secrets/mesh-conf-cleslie.age b/secrets/mesh-conf-cleslie.age index ac1c8f7..e22c63d 100644 --- a/secrets/mesh-conf-cleslie.age +++ b/secrets/mesh-conf-cleslie.age @@ -1,9 +1,9 @@ age-encryption.org/v1 --> ssh-ed25519 /RyXeg RCXNBh7g6+X5buZJdDCd52elfUAnzgOUfINsdGCAcUg -0MOZk6dC51NyFWBu/4+6XY9bMgQ9JoCv6ekH9eaghI0 --> ssh-ed25519 ejjLpg ILRsr6hHJZrX4ssD1hj8FEH8VhqIouHpdLX0phc8qiM -0G6VMYbLtq+HcYurP8AIT5qCrLbQJQEpyyqNmRrjJ7I --> ssh-ed25519 aSaoJQ OVpC763FiqHOaD+uThjZcXgi215AE07aXitPi6Ar3wE -UGQ4Nnnxi2Z57XPJ+9DCUV+/U7aC+Wuprv4JcEHkFqE ---- ulRUBJuSDAodVNUVviwGJAYe7l/FOzVNNiQaVzGUWnI -&(fsRvKp**/-~j&I-Գ/pdE$u*nPnA0_E6 \ No newline at end of file +-> ssh-ed25519 /RyXeg 9XOLVh3LUWmQD98tT0JVXV87VObvZLYdEpFZfbdF0xg +ekxCG1bf0dBtxYn4MRNj5BrwfOEJQpH7NOLRGFTFfuo +-> ssh-ed25519 ejjLpg GmmHEVNJCsf4ABHzKSSkHmjqg4hblBvB/ob/223u1yY +Dh+VB4Z4eYyZBq7+ygyFCh9UuUrczcgAfGs4ZwG87bo +-> ssh-ed25519 aSaoJQ OIxgxGcuSoXb7S6Ae8+zf3DIKQzsGq0/W7i9I9MRfy4 +jhujSlaLTbtlUwIMeT8sVXPlh6gizyQ7GvI7Smk51mA +--- GRaOmf1hUdTF6KiamM+U9yW/QerPtQSmLEnPVdlk5Zw +sO-r*S0'ęs*q`xOp8_ї6"l7^ث@"u^j9d2/ \ No newline at end of file diff --git a/secrets/mesh-conf-infra.age b/secrets/mesh-conf-infra.age index 5e366a600b673483d8d73292ffbfb5dcecd737d9..0cf36d4a6741d7ed3aa3fefd752e834c5c8ed23d 100644 GIT binary patch delta 427 zcmaFJ{E&HqPQ9;@cS?XssB2}GMR;n7ewK+-a-L~%aavkta-pYBl7C22si$9%XQo@Y z0he#8r*>#@T5h(!Z=}1Mzmb_ylCOV`i+e?`iGO-{NI+>padBvBiMe~Z374*&LUD11 zZfc5=si~o*LTXl)PeHmuUUqV}ad1e8vr%!RN3ynKzMFojtG0HCadL7}Zeg)cU|N7{ zsj-u}YiMX7S7ByRs$-dfV}QO}UV(wPTajn6qm#c;Np6;9NvOHLezv8PPq4d1VvuR* z#E;_jsiE%ai6N1pMqa-8M!tc0mL5K#iGhJ;CFy?oNyb4L1tk@(UXjHnCP5ZlMV8?a zB~Hb;Mg9R{6_$Cf0YQ0zQD$yQPQ`hNg+^vcxn(8pFR z#bw%g;kmvUSs~??kw)18nW2Umg_YiAQO-_LIex)OPK6=)Tq%4a!na%UMD8zs@;mp& z<~q0j%PTUE^e;_Z`kvRhh=qIN4z63Q5AG}%|Ni^@h0@hJlRobB+tQTi{@{n&w#c0y XY6xdm?CNgn3;A?1NwQCYru zE|orcS;g+9r5+VQu2EV3;YmS3M&6l`#!04`2E}G!*#YU!CO#Hiy1Kdw73PWQ;Smvj z##NCXULh8_{!aO6o)tzGkr{=_rAB3$iNQfpLAm;-uqVf zw?RQ|LZ#mO_=f21q?T6#gd{XPKXLznFU diff --git a/secrets/wg-conf.age b/secrets/wg-conf.age index 8e4bf6e5e199ee82d223a54e88a8e2b0ef70b85a..3ec2d79bffe032f6cc5a6d5e36b750724c09faa3 100644 GIT binary patch delta 645 zcmdnVx|4N+PQ9C7dALcCYn7X~p=n@cQEqvWiDg!nNrY);aX?{eXrMuadsa?GQE6Uo zGFO0cazIFUnVY*|c9nl#W|3z|NtUO9letG#YGsL~ab}vgL5YE9ijhl*BbTn7LUD11 zZfc5=si~o*LTXl)PeHnZiHD?lACs3kyDDPsgqA+QF^FRmT^^) zQ9)5eiJzk{S43q}X-R63Nkmabg_D0(S!r=lKz^B*vAcIbmSvcBn3F|DcCc@Tp+$!0 z#E;_jmEjgyMuA@DfzH`x1^HzeAt_F)Es*e?mVmH#f1skjKAhBh~6n@EHUAZlG2KR$E!>(=Oo4ci7=83zp+uP uuC#EA-P{aC=F00GZ!dXT=UM?h7Si+f#cSgCsk6XD@xOqjYb5K;Veq~sgVXCW9 zijTg#Z%%GGm$Q*&N=Rz3e@U)SMN&mkfS*N(hg+$?nR`L8OGu`pqn}$vQlv{pSdPEJ z#E;_jA)&58mZ_GeiNV??7D^&d3|gCbm-i|*OLE(rzvype|`DYol9)%%;gR5)~j5zkKb|q&9p}soj+@& zXqZ~gwf=THu`pxDt*f!VM$gX6T}{8aq0#>CscTRA7pb<*@cDFO_cqJPCE{zQIag$N z>G8e1{ki6Bx8}p$$v$C%Z7xy!`-)p9JFGhERL8r~Y{!KDhbC=@d7Q3nT^F`vc3;3I tiH}je7TPn-`4<0K5TR{(tMP?uUTIb;r}0c9uEqPKgQ~ONM{Yax4*+kN35fsz From 351ad8d4949882e89c43acca47222812c601be03 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Wed, 11 Sep 2024 16:24:33 +0100 Subject: [PATCH 11/24] deploy with justfile --- justfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/justfile b/justfile index 2f24fab..a8b4607 100644 --- a/justfile +++ b/justfile @@ -9,6 +9,9 @@ alias c := cache rebuild: sudo nixos-rebuild switch --flake .# +deploy MACHINE: + nix run .#deploy-{{MACHINE}} + vim: nix flake lock --update-input nixvim From fe661455fe6ec9eae451d2ca076b342e10a0e99c Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Thu, 12 Sep 2024 08:55:46 +0100 Subject: [PATCH 12/24] update nish --- flake.lock | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index fc6a9f4..da43051 100644 --- a/flake.lock +++ b/flake.lock @@ -287,16 +287,15 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1725437390, - "narHash": "sha256-W2ZnHE+FkPVap5Em6na4KP8XkhU8kpY07iX0d4+y4uM=", + "lastModified": 1726116637, + "narHash": "sha256-tU2GhwU887mPg6C4c2k+CEBAnKY6R0tSeQYtoqjZmLM=", "owner": "nix-community", "repo": "fenix", - "rev": "29ad6b2023ccec4d4679244c233f0ea875cdf000", + "rev": "96a04a213838c5001619ad57400c5a176fa040b1", "type": "github" }, "original": { "owner": "nix-community", - "ref": "pull/163/head", "repo": "fenix", "type": "github" } @@ -958,11 +957,11 @@ ] }, "locked": { - "lastModified": 1726041657, - "narHash": "sha256-XYRmSQe3pOriVCXVPanYVJLSUbsRdyTLTTBhE8NNgcw=", + "lastModified": 1726125131, + "narHash": "sha256-b6wzPTyJTpxj75m+rklNY6FhTsXG+HAA9664qC+U+ew=", "owner": "callumio", "repo": "nish", - "rev": "1c5a478ad499356e0c6a11eeba02fdd701ee43f1", + "rev": "75e7c33a87873f2b4bbcf3d8cfd221bab91eba9f", "type": "github" }, "original": { From 497876d1c993445080028d9912135a8661da8d9a Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Thu, 12 Sep 2024 12:27:35 +0100 Subject: [PATCH 13/24] new gpg keys --- home/c/programs/git/default.nix | 4 ++-- home/c/services/default.nix | 3 ++- hosts/artemis/configuration.nix | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/home/c/programs/git/default.nix b/home/c/programs/git/default.nix index c10a2b2..48ba412 100644 --- a/home/c/programs/git/default.nix +++ b/home/c/programs/git/default.nix @@ -4,7 +4,7 @@ userName = "Callum Leslie"; userEmail = "git@cleslie.uk"; - signing.key = "D382C4AFEECEAA90"; + signing.key = "483E476D02ED580C"; signing.signByDefault = true; ignores = [".direnv/"]; @@ -15,7 +15,7 @@ contents = { user = { email = "psycl6@nottingham.ac.uk"; - signingKey = "5A944DF89B6F65AC"; + signingKey = "483E476D02ED580C"; }; credential = {helper = "store";}; }; diff --git a/home/c/services/default.nix b/home/c/services/default.nix index 5b065dc..803374c 100644 --- a/home/c/services/default.nix +++ b/home/c/services/default.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [./mako ./kanshi]; services = { network-manager-applet.enable = true; @@ -6,6 +6,7 @@ gpg-agent = { enable = true; enableSshSupport = true; + pinentryPackage = pkgs.pinentry-gnome3; }; }; } diff --git a/hosts/artemis/configuration.nix b/hosts/artemis/configuration.nix index 7915feb..13ce697 100644 --- a/hosts/artemis/configuration.nix +++ b/hosts/artemis/configuration.nix @@ -31,6 +31,7 @@ vim gnome.adwaita-icon-theme wget + pinentry fzf nil killall From 7dd119992fb4fec1ccb9653e47c925cf2749229e Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Thu, 12 Sep 2024 13:25:20 +0100 Subject: [PATCH 14/24] edit gpg keys --- home/c/programs/git/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/c/programs/git/default.nix b/home/c/programs/git/default.nix index 48ba412..b7e532b 100644 --- a/home/c/programs/git/default.nix +++ b/home/c/programs/git/default.nix @@ -4,7 +4,7 @@ userName = "Callum Leslie"; userEmail = "git@cleslie.uk"; - signing.key = "483E476D02ED580C"; + signing.key = "03B01F427831BCFD!"; signing.signByDefault = true; ignores = [".direnv/"]; @@ -15,7 +15,7 @@ contents = { user = { email = "psycl6@nottingham.ac.uk"; - signingKey = "483E476D02ED580C"; + signingKey = "14861F1282EFB5C8!"; }; credential = {helper = "store";}; }; From cd0e067dad413e846b7bf1043a942d59a742b3a1 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Thu, 12 Sep 2024 17:11:34 +0100 Subject: [PATCH 15/24] secure boot --- flake.lock | 273 ++++++++++++++++++++--- flake.nix | 11 +- hosts/artemis/configuration.nix | 1 + hosts/artemis/hardware-configuration.nix | 6 + 4 files changed, 256 insertions(+), 35 deletions(-) diff --git a/flake.lock b/flake.lock index da43051..f967239 100644 --- a/flake.lock +++ b/flake.lock @@ -184,6 +184,27 @@ } }, "crane": { + "inputs": { + "nixpkgs": [ + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717535930, + "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "55e7754ec31dac78980c8be45f8a28e80e370946", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { "locked": { "lastModified": 1725409566, "narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=", @@ -198,7 +219,7 @@ "type": "github" } }, - "crane_2": { + "crane_3": { "inputs": { "nixpkgs": [ "omnix", @@ -371,6 +392,22 @@ } }, "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-compat_5": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -384,7 +421,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_5": { + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1688025799, @@ -400,7 +437,7 @@ "type": "github" } }, - "flake-compat_6": { + "flake-compat_7": { "flake": false, "locked": { "lastModified": 1673956053, @@ -416,7 +453,7 @@ "type": "github" } }, - "flake-compat_7": { + "flake-compat_8": { "flake": false, "locked": { "lastModified": 1673956053, @@ -453,6 +490,27 @@ } }, "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, @@ -470,7 +528,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -492,7 +550,7 @@ "type": "github" } }, - "flake-parts_4": { + "flake-parts_5": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -514,7 +572,7 @@ "type": "indirect" } }, - "flake-parts_5": { + "flake-parts_6": { "inputs": { "nixpkgs-lib": "nixpkgs-lib_2" }, @@ -596,6 +654,24 @@ } }, "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -610,7 +686,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "inputs": { "systems": [ "stylix", @@ -649,8 +725,8 @@ }, "git-hooks": { "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore", + "flake-compat": "flake-compat_4", + "gitignore": "gitignore_2", "nixpkgs": [ "nixvim", "neovim-nightly-overlay", @@ -683,7 +759,7 @@ "nixvim", "flake-compat" ], - "gitignore": "gitignore_2", + "gitignore": "gitignore_3", "nixpkgs": [ "nixvim", "nixvim", @@ -710,6 +786,28 @@ } }, "gitignore": { + "inputs": { + "nixpkgs": [ + "lanzaboote", + "pre-commit-hooks-nix", + "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" + } + }, + "gitignore_2": { "inputs": { "nixpkgs": [ "nixvim", @@ -732,7 +830,7 @@ "type": "github" } }, - "gitignore_2": { + "gitignore_3": { "inputs": { "nixpkgs": [ "nixvim", @@ -755,7 +853,7 @@ "type": "github" } }, - "gitignore_3": { + "gitignore_4": { "inputs": { "nixpkgs": [ "pre-commit-hooks", @@ -795,7 +893,7 @@ }, "hercules-ci-effects": { "inputs": { - "flake-parts": "flake-parts_4", + "flake-parts": "flake-parts_5", "nixpkgs": [ "nixvim", "neovim-nightly-overlay", @@ -880,6 +978,33 @@ "type": "github" } }, + "lanzaboote": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts_2", + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1718178907, + "narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=", + "owner": "nix-community", + "repo": "lanzaboote", + "rev": "b627ccd97d0159214cee5c7db1412b75e4be6086", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v0.4.1", + "repo": "lanzaboote", + "type": "github" + } + }, "libgit2": { "flake": false, "locked": { @@ -898,8 +1023,8 @@ }, "neovim-nightly-overlay": { "inputs": { - "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts_3", + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts_4", "git-hooks": "git-hooks", "hercules-ci-effects": "hercules-ci-effects", "neovim-src": "neovim-src", @@ -938,7 +1063,7 @@ "nish": { "inputs": { "advisory-db": "advisory-db", - "crane": "crane", + "crane": "crane_2", "fenix": "fenix", "flake-parts": [ "flake-parts" @@ -972,7 +1097,7 @@ }, "nix": { "inputs": { - "flake-compat": "flake-compat_6", + "flake-compat": "flake-compat_7", "flake-parts": [ "omnix", "flake-parts" @@ -1136,6 +1261,22 @@ } }, "nixpkgs-stable": { + "locked": { + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1720386169, "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", @@ -1201,7 +1342,7 @@ }, "nixvim": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "neovim-nightly-overlay": "neovim-nightly-overlay", "nixpkgs": [ "unstable" @@ -1225,7 +1366,7 @@ "nixvim_2": { "inputs": { "devshell": "devshell", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-parts": [ "nixvim", "flake-parts" @@ -1286,7 +1427,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixvim", "nixvim", @@ -1350,7 +1491,7 @@ "omnix", "nix" ], - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "gitignore": [ "omnix", "nix" @@ -1380,16 +1521,43 @@ "type": "github" } }, + "pre-commit-hooks-nix": { + "inputs": { + "flake-compat": [ + "lanzaboote", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "lanzaboote", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "pre-commit-hooks_2": { "inputs": { "flake-compat": [ "flake-compat" ], - "gitignore": "gitignore_3", + "gitignore": "gitignore_4", "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1725513492, @@ -1429,6 +1597,7 @@ "flake-compat": "flake-compat", "flake-parts": "flake-parts", "home-manager": "home-manager_2", + "lanzaboote": "lanzaboote", "nish": "nish", "nixinate": "nixinate", "nixpkgs": "nixpkgs", @@ -1437,7 +1606,7 @@ "omnix": "omnix", "pre-commit-hooks": "pre-commit-hooks_2", "stylix": "stylix", - "systems": "systems_4", + "systems": "systems_5", "treefmt-nix": "treefmt-nix_3", "unstable": "unstable" } @@ -1461,12 +1630,12 @@ }, "rust-flake": { "inputs": { - "crane": "crane_2", + "crane": "crane_3", "nixpkgs": [ "omnix", "nixpkgs" ], - "rust-overlay": "rust-overlay" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1725522236, @@ -1484,6 +1653,31 @@ } }, "rust-overlay": { + "inputs": { + "flake-utils": [ + "lanzaboote", + "flake-utils" + ], + "nixpkgs": [ + "lanzaboote", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717813066, + "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { "flake": false, "locked": { "lastModified": 1725243956, @@ -1501,8 +1695,8 @@ }, "sbomnix": { "inputs": { - "flake-compat": "flake-compat_5", - "flake-parts": "flake-parts_5", + "flake-compat": "flake-compat_6", + "flake-parts": "flake-parts_6", "flake-root": "flake-root", "nix-visualize": "nix-visualize", "nixpkgs": "nixpkgs_3", @@ -1532,8 +1726,8 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_7", - "flake-utils": "flake-utils_4", + "flake-compat": "flake-compat_8", + "flake-utils": "flake-utils_5", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager" @@ -1541,7 +1735,7 @@ "nixpkgs": [ "unstable" ], - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1725290973, @@ -1617,6 +1811,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 1064831..4813367 100644 --- a/flake.nix +++ b/flake.nix @@ -20,8 +20,8 @@ nixpkgs.config.allowUnfree = true; nixpkgs.overlays = [self.overlays.default]; } - mod ] + ++ mod ++ mods.sharedModules; }; in @@ -38,8 +38,8 @@ inherit (mods) homeManagerModules nixosModules; # TODO: use ./hosts/ nixosConfigurations = { - artemis = mkLinuxSystem ./hosts/artemis; - hermes = mkLinuxSystem ./hosts/hermes; + artemis = mkLinuxSystem [./hosts/artemis inputs.lanzaboote.nixosModules.lanzaboote]; + hermes = mkLinuxSystem [./hosts/hermes]; }; diskoConfigurations = {}; # maybe? om.health.default = {nix-version.min-required = "2.18.5";}; @@ -160,6 +160,11 @@ treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.4.1"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # my custom programs nish = { url = "github:callumio/nish"; diff --git a/hosts/artemis/configuration.nix b/hosts/artemis/configuration.nix index 13ce697..e2e7c38 100644 --- a/hosts/artemis/configuration.nix +++ b/hosts/artemis/configuration.nix @@ -37,6 +37,7 @@ killall gcc pkg-config + sbctl nish nsbm ]; diff --git a/hosts/artemis/hardware-configuration.nix b/hosts/artemis/hardware-configuration.nix index ea07f90..3263411 100644 --- a/hosts/artemis/hardware-configuration.nix +++ b/hosts/artemis/hardware-configuration.nix @@ -13,6 +13,12 @@ kernelModules = ["kvm-intel"]; extraModulePackages = []; #kernelPackages = pkgs.linuxPackages_latest; + + loader.systemd-boot.enable = lib.mkForce false; + lanzaboote = { + enable = true; + pkiBundle = "/etc/secureboot"; + }; }; hardware = { bluetooth = { From 1d10befe6138105e9733ee099575b925cac959f9 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Thu, 12 Sep 2024 23:16:33 +0100 Subject: [PATCH 16/24] dont use literal programs, use paths --- flake.nix | 3 +- home/c/default.nix | 1 + home/c/programs/fish/default.nix | 14 +- home/c/programs/hypr/default.nix | 82 +++++--- home/c/programs/nvim/.luarc.json | 6 - home/c/programs/nvim/default.nix | 313 ----------------------------- home/c/programs/tmux/default.nix | 23 ++- home/c/programs/waybar/default.nix | 10 +- hosts/artemis/home.nix | 8 +- lib/default.nix | 6 + 10 files changed, 99 insertions(+), 367 deletions(-) delete mode 100644 home/c/programs/nvim/.luarc.json delete mode 100644 home/c/programs/nvim/default.nix create mode 100644 lib/default.nix diff --git a/flake.nix b/flake.nix index 4813367..a5c05d9 100644 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,10 @@ ... } @ inputs: let mods = import ./modules; + cLib = import ./lib {inherit (nixpkgs) lib;}; mkLinuxSystem = mod: nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + specialArgs = {inherit inputs cLib;}; modules = [ inputs.home-manager.nixosModules.home-manager diff --git a/home/c/default.nix b/home/c/default.nix index d7e7aa2..3f8bd92 100644 --- a/home/c/default.nix +++ b/home/c/default.nix @@ -19,6 +19,7 @@ }; home.packages = with pkgs; [ + # TODO: sort this out gnome.adwaita-icon-theme networkmanagerapplet libsecret diff --git a/home/c/programs/fish/default.nix b/home/c/programs/fish/default.nix index 4b3c330..4268b18 100644 --- a/home/c/programs/fish/default.nix +++ b/home/c/programs/fish/default.nix @@ -1,8 +1,13 @@ -{pkgs, ...}: let +{ + pkgs, + cLib, + ... +}: let mkFishPlug = pkg: { name = pkg.pname; inherit (pkg) src; }; + tmux = cLib.getProgFor pkgs "tmux"; in { programs.fish = { enable = true; @@ -12,14 +17,15 @@ in { trap __trap_exit_tmux EXIT ''; + # TODO: dont use this directly shellAliases = {v = "nvim";}; functions = { __trap_exit_tmux = { body = '' - test (tmux list-windows | wc -l) = 1 || exit - test (tmux list-panes | wc -l) = 1 || exit - tmux switch-client -t main + test (${tmux} list-windows | wc -l) = 1 || exit + test (${tmux} list-panes | wc -l) = 1 || exit + ${tmux} switch-client -t main ''; }; }; diff --git a/home/c/programs/hypr/default.nix b/home/c/programs/hypr/default.nix index bcdacdb..a3e9483 100644 --- a/home/c/programs/hypr/default.nix +++ b/home/c/programs/hypr/default.nix @@ -1,4 +1,28 @@ -{...}: { +{ + pkgs, + cLib, + ... +}: let + getProgFor' = cLib.getProgFor' pkgs; + getProgFor = cLib.getProgFor pkgs; + web = getProgFor "firefox"; + mail = getProgFor "betterbird"; + chat = getProgFor "discord"; + media = getProgFor "spotify"; + terminal = getProgFor "alacritty"; + runner = getProgFor "rofi"; + rofi-rbw = getProgFor "rofi-rbw-wayland"; + tmux = getProgFor "tmux"; + slurp = getProgFor "slurp"; + grim = getProgFor "grim"; + wl-copy = getProgFor' "wl-clipboard" "wl-copy"; + mullvad = getProgFor' "mullvad-vpn" "mullvad-gui"; + playerctl = getProgFor "playerctl"; + brightnessctl = getProgFor "brightnessctl"; + wpctl = getProgFor' "wireplumber" "wpctl"; + hyprlock = getProgFor "hyprlock"; + hyprctl = getProgFor' "hyprland" "hyprctl"; +in { services = { blueman-applet.enable = true; network-manager-applet.enable = true; @@ -65,7 +89,7 @@ enable = true; systemd.enable = true; xwayland.enable = true; - # TODO: move to nix config over text + settings = { "monitor" = ",prefered,auto,1"; @@ -137,13 +161,13 @@ "$mainMod SHIFT, q, exit" "$mainMod, F, fullscreen" "$mainMod SHIFT, f, togglefloating" - "$mainMod, d, exec, rofi -show drun" - "$mainMod, w, exec, rofi -show window" - "$mainMod, p, exec, rofi-rbw --no-folder" + "$mainMod, d, exec, ${runner} -show drun" + "$mainMod, w, exec, ${runner} -show window" + "$mainMod, p, exec, ${rofi-rbw} --no-folder" "$mainMod, s, togglesplit" - "$mainMod SHIFT, r, exec, hyprctl reload" - "$mainMod, return, exec, alacritty -e tmux new -A -s main" - "$mainMod SHIFT, return, exec, [float; pin] alacritty -e tmux new -A -s main" + "$mainMod SHIFT, r, exec, ${hyprctl} reload" + "$mainMod, return, exec, ${terminal} -e ${tmux} new -A -s main" + "$mainMod SHIFT, return, exec, [float; pin] ${terminal} -e ${tmux} new -A -s main" "$mainMod, b, workspace, name:web" "$mainMod, n, workspace, name:chat" @@ -172,9 +196,9 @@ "$mainMod SHIFT, l, movewindow, r" "$mainMod SHIFT, k, movewindow, u" "$mainMod SHIFT, j, movewindow, d" - ''SHIFT, Print, exec, grim -g "$(slurp)" - | wl-copy'' - ", Print, exec, grim - | wl-copy" - "$mainMod, 0, exec, hyprlock" + ''SHIFT, Print, exec, ${grim} -g "$(${slurp})" - | ${wl-copy}'' + ", Print, exec, ${grim} - | ${wl-copy}" + "$mainMod, 0, exec, ${hyprlock}" ] ++ (builtins.concatLists (builtins.genList (x: let ws = x + 1; @@ -187,10 +211,10 @@ 9)); workspace = [ - "name:web, on-created-empty: firefox" - "name:chat, on-created-empty: discord" - "name:media, on-created-empty: spotify" - "name:mail, on-created-empty: betterbird" + "name:web, on-created-empty: ${web}" + "name:chat, on-created-empty: ${chat}" + "name:media, on-created-empty: ${media}" + "name:mail, on-created-empty: ${mail}" ]; bindm = [ @@ -199,25 +223,19 @@ ]; bindle = [ - ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ", XF86AudioMute , exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioMicMute , exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ", XF86AudioPlay , exec, playerctl play-pause" - ", XF86AudioPause , exec, playerctl play-pause" - ", XF86AudioNext , exec, playerctl next" - ", XF86AudioPrev , exec, playerctl previous" - ", XF86MonBrightnessUp, exec, brightnessctl -c backlight set +5%" - ", XF86MonBrightnessDown, exec, brightnessctl -c backlight set 5%-" + ", XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ", XF86AudioMute , exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioMicMute , exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ", XF86AudioPlay , exec, ${playerctl} play-pause" + ", XF86AudioPause , exec, ${playerctl} play-pause" + ", XF86AudioNext , exec, ${playerctl} next" + ", XF86AudioPrev , exec, ${playerctl} previous" + ", XF86MonBrightnessUp, exec, ${brightnessctl} -c backlight set +5%" + ", XF86MonBrightnessDown, exec, ${brightnessctl} -c backlight set 5%-" ]; - exec = [ - #"pkill wpaperd & sleep 0.5 && wpaperd" - #"pkill waybar & sleep 0.5 && waybar" - #"pkill mako & sleep 0.5 && mako" - ]; - - exec-once = ["mullvad-gui"]; + exec-once = [(toString mullvad)]; }; }; } diff --git a/home/c/programs/nvim/.luarc.json b/home/c/programs/nvim/.luarc.json deleted file mode 100644 index 904146d..0000000 --- a/home/c/programs/nvim/.luarc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "diagnostics.globals": [ - "vim", - "lsp_on_attach" - ] -} diff --git a/home/c/programs/nvim/default.nix b/home/c/programs/nvim/default.nix deleted file mode 100644 index 000a085..0000000 --- a/home/c/programs/nvim/default.nix +++ /dev/null @@ -1,313 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - programs.neovim = let - leaders = '' - vim.g.mapleader = ' ' - vim.g.maplocalleader = ' ' - ''; - toLua = str: '' - lua << EOF - ${leaders} - ${str} - EOF - ''; - toLuaFile = file: '' - lua << EOF - ${leaders} - ${builtins.readFile file} - EOF - ''; - toLuaFileLSP = file: '' - lua << EOF - ${leaders} - ${builtins.readFile ./plugin/lsp/lsp-keys.lua} - ${builtins.readFile file} - EOF - ''; - - fromGit = ref: rev: repo: - pkgs.vimUtils.buildVimPlugin { - pname = "${lib.strings.sanitizeDerivationName repo}"; - version = ref; - src = builtins.fetchGit { - url = "https://github.com/${repo}.git"; - inherit ref; - inherit rev; - }; - }; - - # always installs latest version - pluginGit = fromGit "HEAD"; - in { - enable = true; - - # package = pkgs.neovim-nightly; - - extraPackages = with pkgs; [ - # Rust - rust-analyzer - cargo - rustc - rustfmt - - # YAML - yaml-language-server - - # JSON - nodePackages.vscode-json-languageserver - - # Go - gopls - - # Typescript - nodePackages.typescript - nodePackages.typescript-language-server - - # Javascript - eslint_d - - # Python - nodePackages.pyright - black - - # Util - ripgrep - fzf - - # C-Family - clang-tools - - # Shell - shellcheck - shfmt - - # Lua - lua-language-server - selene - stylua - - # Nix - rnix-lsp - nixfmt - statix - - # LLM - ollama - - # Haskell - haskellPackages.haskell-debug-adapter - haskellPackages.haskell-language-server - haskellPackages.fourmolu - ghc - - # Docker - dockerfile-language-server-nodejs - docker-compose-language-service - ]; - - defaultEditor = true; - - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - - extraLuaConfig = '' - ${builtins.readFile ./options.lua} - ''; - - plugins = with pkgs.vimPlugins; [ - { - plugin = nvim-lspconfig; - config = toLuaFileLSP ./plugin/lsp/lsp.lua; - } - - { - plugin = crates-nvim; - config = toLua "require('crates').setup()"; - } - - { - plugin = rustaceanvim; - config = toLuaFileLSP ./plugin/lsp/rust.lua; - } - - { - plugin = haskell-tools-nvim; - config = toLuaFileLSP ./plugin/lsp/haskell.lua; - } - - { - plugin = SchemaStore-nvim; - config = toLuaFileLSP ./plugin/lsp/schemastore.lua; - } - - { - plugin = todo-comments-nvim; - config = - toLua - "require('todo-comments').setup(); vim.api.nvim_set_keymap('n', 'vtd', ':TodoTelescope', { noremap = true });"; - } - - { - plugin = comment-nvim; - config = toLua "require('Comment').setup()"; - } - - { - plugin = onedark-nvim; - config = "colorscheme onedark"; - } - - neodev-nvim - - { - plugin = nvim-cmp; - config = toLuaFile ./plugin/cmp.lua; - } - - { - plugin = telescope-nvim; - config = toLuaFile ./plugin/telescope.lua; - } - - { - plugin = - pluginGit "951b163e55ce7639eb320c450bde9283c4fe968b" - "laytan/cloak.nvim"; - config = toLuaFile ./plugin/cloak.lua; - } - - { - plugin = - pluginGit "41ad952c8269fa7aa3a4b8a5abb44541cb628313" - "David-Kunz/gen.nvim"; - config = toLuaFile ./plugin/gen.lua; - } - - { - plugin = nvim-dap; - config = toLuaFile ./plugin/debugger.lua; - } - - { - plugin = - pluginGit "fd35a46f4b7c1b244249266bdcb2da3814f01724" - "xiyaowong/transparent.nvim"; - config = toLua "require('transparent').setup{}"; - } - - nvim-dap-ui - telescope-dap-nvim - nvim-dap-virtual-text - - telescope-fzf-native-nvim - - cmp_luasnip - cmp-nvim-lsp - - luasnip - friendly-snippets - - { - plugin = hardtime-nvim; - config = toLua "require('hardtime').setup()"; - } - - { - plugin = nvim-surround; - config = toLua "require('nvim-surround').setup{}"; - } - - { - plugin = harpoon; - config = toLuaFile ./plugin/harpoon.lua; - } - - { - plugin = lualine-nvim; - config = - toLua - "require('lualine').setup{options = {icons_enabled = true, theme = 'onedark', component_separators = '|', section_separators = ''}, sections = { lualine_a = { { 'buffers', } } }}"; - } - - { - plugin = nvim-autopairs; - config = toLua "require('nvim-autopairs').setup {}"; - } - - { - plugin = leap-nvim; - config = toLua "require('leap.user').add_default_mappings()"; - } - - { - plugin = none-ls-nvim; - config = toLuaFile ./plugin/lsp/none-ls.lua; - } - - { - plugin = oil-nvim; - config = toLuaFile ./plugin/oil.lua; - } - - { - plugin = zen-mode-nvim; - config = toLuaFile ./plugin/zen.lua; - } - twilight-nvim - - nvim-web-devicons - - { - plugin = undotree; - config = - toLua "vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle)"; - } - - { - plugin = gitsigns-nvim; - config = toLuaFile ./plugin/gitsigns.lua; - } - - { - plugin = nvim-treesitter.withPlugins (p: [ - p.tree-sitter-nix - p.tree-sitter-vim - p.tree-sitter-bash - p.tree-sitter-lua - p.tree-sitter-python - p.tree-sitter-rust - p.tree-sitter-json - p.tree-sitter-c - p.tree-sitter-comment - p.tree-sitter-javascript - p.tree-sitter-fish - p.tree-sitter-dockerfile - p.tree-sitter-cpp - p.tree-sitter-git_config - p.tree-sitter-git_rebase - p.tree-sitter-gitattributes - p.tree-sitter-gitcommit - p.tree-sitter-gitignore - p.tree-sitter-markdown - p.tree-sitter-markdown_inline - p.tree-sitter-make - p.tree-sitter-norg - p.tree-sitter-ssh_config - p.tree-sitter-typescript - p.tree-sitter-tsx - p.tree-sitter-haskell - p.tree-sitter-yaml - p.tree-sitter-zig - ]); - config = toLuaFile ./plugin/treesitter.lua; - } - - vim-nix - ]; - }; -} diff --git a/home/c/programs/tmux/default.nix b/home/c/programs/tmux/default.nix index ffabf71..0f4cfeb 100644 --- a/home/c/programs/tmux/default.nix +++ b/home/c/programs/tmux/default.nix @@ -1,4 +1,13 @@ -{pkgs, ...}: { +{ + pkgs, + cLib, + ... +}: let + getProgFor = cLib.getProgFor pkgs; + getProgFor' = cLib.getProgFor' pkgs; + tmux = getProgFor "tmux"; + tmux-sessionizer = getProgFor' "tmux-sessionizer-cl" "tmux-sessionizer"; +in { programs.tmux = { enable = true; shortcut = "x"; @@ -42,9 +51,9 @@ 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 m run-shell "tmux switch-client -t main" + 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 m run-shell "${tmux} switch-client -t main" bind S choose-tree bind -r k select-pane -U @@ -54,7 +63,7 @@ ''; }; - home.packages = [ - pkgs.tmux-sessionizer-cl - ]; + # home.packages = [ + # pkgs.tmux-sessionizer-cl + # ]; } diff --git a/home/c/programs/waybar/default.nix b/home/c/programs/waybar/default.nix index e5c5bfe..1d941fc 100644 --- a/home/c/programs/waybar/default.nix +++ b/home/c/programs/waybar/default.nix @@ -1,4 +1,10 @@ -{pkgs, ...}: { +{ + pkgs, + cLib, + ... +}: let + soundControl = cLib.getProgFor pkgs "pwvucontrol"; +in { programs.waybar = { enable = true; package = pkgs.waybar.override { @@ -35,7 +41,7 @@ tooltip = false; }; wireplumber = { - on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; + on-click = toString soundControl; format = "{icon} {volume}%"; format-muted = ""; format-icons = ["" "" ""]; diff --git a/hosts/artemis/home.nix b/hosts/artemis/home.nix index fb18af5..3bfde5c 100644 --- a/hosts/artemis/home.nix +++ b/hosts/artemis/home.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + cLib, + ... +}: { programs.hyprlock.enable = true; security.pam.services.hyprlock = {}; home-manager = { @@ -11,6 +15,6 @@ inputs.self.homeManagerModules.trayscale ]; users.c = import ../../home/c; - extraSpecialArgs = {inherit inputs;}; + extraSpecialArgs = {inherit inputs cLib;}; }; } diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 0000000..c8b84db --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,6 @@ +{lib, ...}: let + getProgFor' = pkgs: prog: progn: lib.getExe' pkgs.${prog} progn; + getProgFor = pkgs: prog: getProgFor' pkgs prog prog; +in { + inherit getProgFor getProgFor'; +} From 3bb23ce5d5284da1c8dc27af51c96b63738aa00a Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Fri, 13 Sep 2024 08:27:25 +0100 Subject: [PATCH 17/24] trayscale should not start before tailscaled --- modules/trayscale.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/trayscale.nix b/modules/trayscale.nix index f2707a8..9a67ec5 100644 --- a/modules/trayscale.nix +++ b/modules/trayscale.nix @@ -28,7 +28,7 @@ in { Unit = { Description = "An unofficial GUI wrapper around the Tailscale CLI client"; Requires = ["tray.target"]; - After = ["graphical-session-pre.target" "tray.target"]; + After = ["graphical-session-pre.target" "tray.target" "tailscaled.service"]; PartOf = ["graphical-session.target"]; }; Install = {WantedBy = ["graphical-session.target"];}; From b86629718d12afa136151086a3113373a4c9c804 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Fri, 13 Sep 2024 08:27:43 +0100 Subject: [PATCH 18/24] generalise kanshi --- home/c/programs/hypr/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/c/programs/hypr/default.nix b/home/c/programs/hypr/default.nix index a3e9483..16de424 100644 --- a/home/c/programs/hypr/default.nix +++ b/home/c/programs/hypr/default.nix @@ -26,7 +26,7 @@ in { services = { blueman-applet.enable = true; network-manager-applet.enable = true; - kanshi.systemdTarget = "hyprland-session.target"; + kanshi.systemdTarget = "graphical-session.target"; udiskie = { enable = true; tray = "auto"; From 3c5f85bbb1ac45f13f4624e2a73d32969c2ee321 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Fri, 13 Sep 2024 15:52:57 +0100 Subject: [PATCH 19/24] rofi fixes and quassel --- home/c/programs/hypr/default.nix | 4 ++-- hosts/artemis/configuration.nix | 5 +---- hosts/hermes/default.nix | 1 + hosts/hermes/quassel.nix | 6 ++++++ 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 hosts/hermes/quassel.nix diff --git a/home/c/programs/hypr/default.nix b/home/c/programs/hypr/default.nix index 16de424..5b31a78 100644 --- a/home/c/programs/hypr/default.nix +++ b/home/c/programs/hypr/default.nix @@ -10,8 +10,8 @@ chat = getProgFor "discord"; media = getProgFor "spotify"; terminal = getProgFor "alacritty"; - runner = getProgFor "rofi"; - rofi-rbw = getProgFor "rofi-rbw-wayland"; + runner = getProgFor' "rofi-wayland" "rofi"; + rofi-rbw = getProgFor' "rofi-rbw-wayland" "rofi-rbw"; tmux = getProgFor "tmux"; slurp = getProgFor "slurp"; grim = getProgFor "grim"; diff --git a/hosts/artemis/configuration.nix b/hosts/artemis/configuration.nix index e2e7c38..ae4f4d1 100644 --- a/hosts/artemis/configuration.nix +++ b/hosts/artemis/configuration.nix @@ -47,10 +47,7 @@ sessionVariables = {NIXOS_OZONE_WL = "1";}; shells = with pkgs; [fish]; - - # etc."greetd/environments".text = '' - # hyprland - # ''; }; + fonts.packages = with pkgs; [nerdfonts meslo-lgs-nf]; } diff --git a/hosts/hermes/default.nix b/hosts/hermes/default.nix index 8c91497..a49190c 100644 --- a/hosts/hermes/default.nix +++ b/hosts/hermes/default.nix @@ -2,6 +2,7 @@ imports = [ ./hardware-configuration.nix ./configuration.nix + ./quassel.nix ./fail2ban.nix ./containers.nix ./networking.nix diff --git a/hosts/hermes/quassel.nix b/hosts/hermes/quassel.nix new file mode 100644 index 0000000..6bd6c38 --- /dev/null +++ b/hosts/hermes/quassel.nix @@ -0,0 +1,6 @@ +{...}: { + services.quassel = { + enable = true; + interfaces = ["0.0.0.0"]; + }; +} From 967f911b5a6e7d44210547a06f71bb26f1754a8f Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Fri, 13 Sep 2024 23:47:02 +0100 Subject: [PATCH 20/24] justfile alias --- justfile | 1 + 1 file changed, 1 insertion(+) diff --git a/justfile b/justfile index a8b4607..82bf5a4 100644 --- a/justfile +++ b/justfile @@ -5,6 +5,7 @@ alias r := rebuild alias v := vim alias u := update alias c := cache +alias d := deploy rebuild: sudo nixos-rebuild switch --flake .# From 188d9cb439d681bbc9f78c37d379b5860cabd181 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Fri, 13 Sep 2024 23:45:54 +0100 Subject: [PATCH 21/24] ddns --- hosts/hermes/ddns.nix | 13 +++++++++++++ hosts/hermes/default.nix | 1 + hosts/hermes/forgejo.nix | 1 + hosts/hermes/headscale.nix | 1 + hosts/hermes/media.nix | 2 ++ secrets/cloudflare-api.age | 8 ++++++++ secrets/secrets.nix | 1 + 7 files changed, 27 insertions(+) create mode 100644 hosts/hermes/ddns.nix create mode 100644 secrets/cloudflare-api.age diff --git a/hosts/hermes/ddns.nix b/hosts/hermes/ddns.nix new file mode 100644 index 0000000..e8ea1c0 --- /dev/null +++ b/hosts/hermes/ddns.nix @@ -0,0 +1,13 @@ +{config, ...}: { + services.cloudflare-dyndns = { + enable = true; + ipv4 = true; + ipv6 = false; + proxied = false; + deleteMissing = false; + domains = []; + apiTokenFile = config.age.secrets.cloudflare-api.path; + }; + # services.cloudflare-dyndns.domains = []; + age.secrets."cloudflare-api".file = ../../secrets/cloudflare-api.age; +} diff --git a/hosts/hermes/default.nix b/hosts/hermes/default.nix index a49190c..da82c9e 100644 --- a/hosts/hermes/default.nix +++ b/hosts/hermes/default.nix @@ -2,6 +2,7 @@ imports = [ ./hardware-configuration.nix ./configuration.nix + ./ddns.nix ./quassel.nix ./fail2ban.nix ./containers.nix diff --git a/hosts/hermes/forgejo.nix b/hosts/hermes/forgejo.nix index f4d79c6..21ba439 100644 --- a/hosts/hermes/forgejo.nix +++ b/hosts/hermes/forgejo.nix @@ -6,6 +6,7 @@ domain = "git.cleslie.uk"; in { services = { + cloudflare-dyndns.domains = [domain]; forgejo = { enable = true; database.type = "postgres"; diff --git a/hosts/hermes/headscale.nix b/hosts/hermes/headscale.nix index d907330..5555b0b 100644 --- a/hosts/hermes/headscale.nix +++ b/hosts/hermes/headscale.nix @@ -13,6 +13,7 @@ in { ip_prefixes = "100.64.0.0/10"; }; }; + cloudflare-dyndns.domains = [domain]; caddy.virtualHosts.${domain}.extraConfig = '' reverse_proxy localhost:${toString config.services.headscale.port} ''; diff --git a/hosts/hermes/media.nix b/hosts/hermes/media.nix index 694a787..e1e5252 100644 --- a/hosts/hermes/media.nix +++ b/hosts/hermes/media.nix @@ -85,6 +85,8 @@ in { }; }; + cloudflare-dyndns.domains = ["media.cleslie.uk" "watch.cleslie.uk" "request.cleslie.uk"]; + jellyfin = { enable = true; package = pkgs.jellyfin; diff --git a/secrets/cloudflare-api.age b/secrets/cloudflare-api.age new file mode 100644 index 0000000..1ee3de6 --- /dev/null +++ b/secrets/cloudflare-api.age @@ -0,0 +1,8 @@ +age-encryption.org/v1 +-> ssh-ed25519 /RyXeg p2ROUhWiDQDOjALQnhhf566js8ivYTsgwNfCaaoe6yQ +UnCc2/4lb+PxnrKdAPVqwAyXavFGr8M3NV3+fSSdAU0 +-> ssh-ed25519 aSaoJQ hHqpvUCaH5RLAQwTdH1llfF/0aTraXtl25qFDaFhUwk ++4VMHc3PGR9HBlVTw4anbYORQPgFl24WGF5pwmt7w20 +--- qa7ctM764SNg3u/ITk+6DRXbLqF1Lom1xgKysY9DrkE +Z;Q +7k4%#pqvy] ieǺ]ɩi!4=s䉁JfpHs29sF}˪#i8 \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 5dec7e0..6aed516 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -10,4 +10,5 @@ in { "mesh-conf-infra.age".publicKeys = keys.c ++ allSystems; "mesh-conf-cleslie.age".publicKeys = keys.c ++ allSystems; "forgejo-password.age".publicKeys = keys.c ++ [systems.hermes]; + "cloudflare-api.age".publicKeys = keys.c ++ [systems.hermes]; } From cb51c7e09b35c8abad76496b879ee8bd97363cdc Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Sat, 14 Sep 2024 00:35:54 +0100 Subject: [PATCH 22/24] tmux patch for bar --- home/c/programs/tmux/bar.patch | 24 ++++++++++++++++++++++++ home/c/programs/tmux/default.nix | 12 ++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 home/c/programs/tmux/bar.patch diff --git a/home/c/programs/tmux/bar.patch b/home/c/programs/tmux/bar.patch new file mode 100644 index 0000000..02f604b --- /dev/null +++ b/home/c/programs/tmux/bar.patch @@ -0,0 +1,24 @@ +diff --git a/tmux-onedark-theme.tmux b/tmux-onedark-theme.tmux +index e440cc7..33ba373 100755 +--- a/tmux-onedark-theme.tmux ++++ b/tmux-onedark-theme.tmux +@@ -75,14 +75,14 @@ set "status-fg" "$onedark_white" + set "@prefix_highlight_fg" "$onedark_black" + set "@prefix_highlight_bg" "$onedark_green" + set "@prefix_highlight_copy_mode_attr" "fg=$onedark_black,bg=$onedark_green" +-set "@prefix_highlight_output_prefix" "  " ++set "@prefix_highlight_output_prefix" " " + + status_widgets=$(get "@onedark_widgets") + time_format=$(get "@onedark_time_format" "%R") + date_format=$(get "@onedark_date_format" "%d/%m/%Y") + +-set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format}  ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]" +-set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]" ++set "status-right" "#[fg=$onedark_white,bg=$onedark_black,nounderscore,noitalics]${time_format} ${date_format} #[fg=$onedark_visual_grey,bg=$onedark_black]#[fg=$onedark_visual_grey,bg=$onedark_visual_grey]#[fg=$onedark_white, bg=$onedark_visual_grey]${status_widgets} #[fg=$onedark_green,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_black,bg=$onedark_green,bold] #h #[fg=$onedark_yellow, bg=$onedark_green]#[fg=$onedark_red,bg=$onedark_yellow]" ++set "status-left" "#[fg=$onedark_black,bg=$onedark_green,bold] #S #{prefix_highlight}#[fg=$onedark_green,bg=$onedark_black,nobold,nounderscore,noitalics]" + +-set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I  #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]" +-set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I  #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]" ++set "window-status-format" "#[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_black] #I #W #[fg=$onedark_black,bg=$onedark_black,nobold,nounderscore,noitalics]" ++set "window-status-current-format" "#[fg=$onedark_black,bg=$onedark_visual_grey,nobold,nounderscore,noitalics]#[fg=$onedark_white,bg=$onedark_visual_grey,nobold] #I #W #[fg=$onedark_visual_grey,bg=$onedark_black,nobold,nounderscore,noitalics]" diff --git a/home/c/programs/tmux/default.nix b/home/c/programs/tmux/default.nix index 0f4cfeb..e71d8f5 100644 --- a/home/c/programs/tmux/default.nix +++ b/home/c/programs/tmux/default.nix @@ -20,15 +20,15 @@ in { sensible yank { - plugin = onedark-theme; + plugin = onedark-theme.overrideAttrs (_: { + patches = [./bar.patch]; + }); extraConfig = "\n"; } { plugin = resurrect; extraConfig = '' - set -g @resurrect-strategy-vim 'session' - set -g @resurrect-strategy-nvim 'session' - set -g @resurrect-capture-pane-contents 'on' + set -g @resurrect-capture-pane-contents 'off' ''; } { @@ -62,8 +62,4 @@ in { bind -r l select-pane -R ''; }; - - # home.packages = [ - # pkgs.tmux-sessionizer-cl - # ]; } From 1ed9ee409b491450057d66f0e6bd33c485c59b20 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Sat, 14 Sep 2024 00:36:20 +0100 Subject: [PATCH 23/24] use delta diff pager --- home/c/programs/git/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/c/programs/git/default.nix b/home/c/programs/git/default.nix index b7e532b..8e5f9f5 100644 --- a/home/c/programs/git/default.nix +++ b/home/c/programs/git/default.nix @@ -34,6 +34,6 @@ ghq = {root = "~/repos";}; }; - diff-so-fancy.enable = true; + delta.enable = true; }; } From 1863297ef5840e853eb3deeee09e09df84892713 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 14 Sep 2024 05:12:59 +0000 Subject: [PATCH 24/24] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'devour-flake': 'github:srid/devour-flake/17b711b9deadbbc5629cb7d2b64cf86ae72af3fa?narHash=sha256-Vey9n9hIlWiSAZ6CCTpkrL6jt4r2JvT2ik9wa2bjeC0%3D' (2024-03-08) → 'github:srid/devour-flake/9b96d31a55be119df8496ec5b7369823deec8a1c?narHash=sha256-Cvc84VzvvdmehafnaIPfdPylNWJcDmv79QQh/MH/4Qk%3D' (2024-09-14) • Updated input 'disko': 'github:nix-community/disko/e55f9a8678adc02024a4877c2a403e3f6daf24fe?narHash=sha256-tqoAO8oT6zEUDXte98cvA1saU9%2B1dLJQe3pMKLXv8ps%3D' (2024-09-03) → 'github:nix-community/disko/4ef99d8ec41369b6fbe83479b5566c2b8856972c?narHash=sha256-u/2xSCp/7sE7XViv6QR2jMw7Rrx/PXJtmeVLYv%2BQbpo%3D' (2024-09-13) • Updated input 'firefox-addons': 'gitlab:rycee/nur-expressions/dcdb13af1b383cd8173c6dae0dbe2ea63a584507?dir=pkgs/firefox-addons&narHash=sha256-lZO7blI%2BA3MTKePQ5ZDOWhun5kE62f6YVe6NNSbI%2BS4%3D' (2024-09-09) → 'gitlab:rycee/nur-expressions/70acbc15b24d567ce024a455ad2e93aa3302c9b0?dir=pkgs/firefox-addons&narHash=sha256-m6O7L5e%2B1Zv9XpI6zKbi7k4EzJgYoygzhU0ER6ZlXwU%3D' (2024-09-14) • Updated input 'flake-parts': 'github:hercules-ci/flake-parts/567b938d64d4b4112ee253b9274472dc3a346eb6?narHash=sha256-%2Bebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y%3D' (2024-09-01) → 'github:hercules-ci/flake-parts/bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a?narHash=sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U%3D' (2024-09-12) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/f4c846aee8e1e29062aa8514d5e0ab270f4ec2f9?narHash=sha256-L64N1rpLlXdc94H%2BF6scnrbuEu%2ButC03cDDVvvJGOME%3D' (2024-09-08) → 'github:NixOS/nixpkgs/44a71ff39c182edaf25a7ace5c9454e7cba2c658?narHash=sha256-RVhD9hnlTT2nJzPHlAqrWqCkA7T6CYrP41IoVRkciZM%3D' (2024-09-10) • Updated input 'omnix': 'github:juspay/omnix/4d9949f041798adaa351afbee98fdb7e25ff2029?narHash=sha256-2J0TtzkIpjeAfIZYU1ofzcPzvcCO1DXBMP2P7OPoQYg%3D' (2024-09-09) → 'github:juspay/omnix/eaa9f3e3dee251846d102813144328c08c62fb3a?narHash=sha256-kYL8a5T%2BlPH9eh91JzKKwDKFEpuh1StE4r3aTvNKWeE%3D' (2024-09-14) • Added input 'omnix/nix-systems-aarch64-darwin': 'github:nix-systems/aarch64-darwin/75e6c6912484d28ebba5769b794ffa4aff653ba2?narHash=sha256-PHVNQ7y0EQYzujQRYoRdb96K0m1KSeAjSrbz2b75S6Q%3D' (2023-04-08) • Added input 'omnix/nix-systems-aarch64-linux': 'github:nix-systems/aarch64-linux/aa1ce1b64c822dff925d63d3e771113f71ada1bb?narHash=sha256-1Zp7TRYLXj4P5FLhQ8jBChrgAmQxR3iTypmWf9EFTnc%3D' (2023-04-08) • Added input 'omnix/nix-systems-x86_64-darwin': 'github:nix-systems/x86_64-darwin/db0463cce4cd60fb791f33a83d29a1ed53edab9b?narHash=sha256-%2BxT9B1ZbhMg/zpJqd00S06UCZb/A2URW9bqqrZ/JTOg%3D' (2023-04-08) • Added input 'omnix/nix-systems-x86_64-linux': 'github:nix-systems/x86_64-linux/2ecfcac5e15790ba6ce360ceccddb15ad16d08a8?narHash=sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw%3D' (2023-04-08) • Updated input 'stylix': 'github:danth/stylix/ef81ad9e85e60420cc83d4642619c14b57139d33?narHash=sha256-%2BjwXF9KI0HfvDgpsoJGvOdfOGGSKOrID1wQB79zjUbo%3D' (2024-09-02) → 'github:danth/stylix/35233f929629c8eb64e939e35260fc8347f94df9?narHash=sha256-sobkRkGBaMX9pD0bwU1iVPWi0WtQvZqlHyl1YtvNDio%3D' (2024-09-12) • Updated input 'unstable': 'github:NixOS/nixpkgs/574d1eac1c200690e27b8eb4e24887f8df7ac27c?narHash=sha256-v3rIhsJBOMLR8e/RNWxr828tB%2BWywYIoajrZKFM%2B0Gg%3D' (2024-09-06) → 'github:NixOS/nixpkgs/4f807e8940284ad7925ebd0a0993d2a1791acb2f?narHash=sha256-IiA3jfbR7K/B5%2B9byVi9BZGWTD4VSbWe8VLpp9B/iYk%3D' (2024-09-11) --- flake.lock | 112 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 88 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index f967239..a391da9 100644 --- a/flake.lock +++ b/flake.lock @@ -244,11 +244,11 @@ "devour-flake": { "flake": false, "locked": { - "lastModified": 1709858306, - "narHash": "sha256-Vey9n9hIlWiSAZ6CCTpkrL6jt4r2JvT2ik9wa2bjeC0=", + "lastModified": 1726283167, + "narHash": "sha256-Cvc84VzvvdmehafnaIPfdPylNWJcDmv79QQh/MH/4Qk=", "owner": "srid", "repo": "devour-flake", - "rev": "17b711b9deadbbc5629cb7d2b64cf86ae72af3fa", + "rev": "9b96d31a55be119df8496ec5b7369823deec8a1c", "type": "github" }, "original": { @@ -286,11 +286,11 @@ ] }, "locked": { - "lastModified": 1725377834, - "narHash": "sha256-tqoAO8oT6zEUDXte98cvA1saU9+1dLJQe3pMKLXv8ps=", + "lastModified": 1726219040, + "narHash": "sha256-u/2xSCp/7sE7XViv6QR2jMw7Rrx/PXJtmeVLYv+Qbpo=", "owner": "nix-community", "repo": "disko", - "rev": "e55f9a8678adc02024a4877c2a403e3f6daf24fe", + "rev": "4ef99d8ec41369b6fbe83479b5566c2b8856972c", "type": "github" }, "original": { @@ -330,11 +330,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1725896943, - "narHash": "sha256-lZO7blI+A3MTKePQ5ZDOWhun5kE62f6YVe6NNSbI+S4=", + "lastModified": 1726286600, + "narHash": "sha256-m6O7L5e+1Zv9XpI6zKbi7k4EzJgYoygzhU0ER6ZlXwU=", "owner": "rycee", "repo": "nur-expressions", - "rev": "dcdb13af1b383cd8173c6dae0dbe2ea63a584507", + "rev": "70acbc15b24d567ce024a455ad2e93aa3302c9b0", "type": "gitlab" }, "original": { @@ -476,11 +476,11 @@ ] }, "locked": { - "lastModified": 1725234343, - "narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=", + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "567b938d64d4b4112ee253b9274472dc3a346eb6", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "type": "github" }, "original": { @@ -1146,6 +1146,66 @@ "type": "github" } }, + "nix-systems-aarch64-darwin": { + "locked": { + "lastModified": 1680978170, + "narHash": "sha256-PHVNQ7y0EQYzujQRYoRdb96K0m1KSeAjSrbz2b75S6Q=", + "owner": "nix-systems", + "repo": "aarch64-darwin", + "rev": "75e6c6912484d28ebba5769b794ffa4aff653ba2", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "aarch64-darwin", + "type": "github" + } + }, + "nix-systems-aarch64-linux": { + "locked": { + "lastModified": 1680978097, + "narHash": "sha256-1Zp7TRYLXj4P5FLhQ8jBChrgAmQxR3iTypmWf9EFTnc=", + "owner": "nix-systems", + "repo": "aarch64-linux", + "rev": "aa1ce1b64c822dff925d63d3e771113f71ada1bb", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "aarch64-linux", + "type": "github" + } + }, + "nix-systems-x86_64-darwin": { + "locked": { + "lastModified": 1680978224, + "narHash": "sha256-+xT9B1ZbhMg/zpJqd00S06UCZb/A2URW9bqqrZ/JTOg=", + "owner": "nix-systems", + "repo": "x86_64-darwin", + "rev": "db0463cce4cd60fb791f33a83d29a1ed53edab9b", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "x86_64-darwin", + "type": "github" + } + }, + "nix-systems-x86_64-linux": { + "locked": { + "lastModified": 1680978846, + "narHash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=", + "owner": "nix-systems", + "repo": "x86_64-linux", + "rev": "2ecfcac5e15790ba6ce360ceccddb15ad16d08a8", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "x86_64-linux", + "type": "github" + } + }, "nix-visualize": { "flake": false, "locked": { @@ -1184,11 +1244,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725826545, - "narHash": "sha256-L64N1rpLlXdc94H+F6scnrbuEu+utC03cDDVvvJGOME=", + "lastModified": 1725930920, + "narHash": "sha256-RVhD9hnlTT2nJzPHlAqrWqCkA7T6CYrP41IoVRkciZM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f4c846aee8e1e29062aa8514d5e0ab270f4ec2f9", + "rev": "44a71ff39c182edaf25a7ace5c9454e7cba2c658", "type": "github" }, "original": { @@ -1459,6 +1519,10 @@ "flake-parts" ], "nix": "nix", + "nix-systems-aarch64-darwin": "nix-systems-aarch64-darwin", + "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" ], @@ -1472,11 +1536,11 @@ ] }, "locked": { - "lastModified": 1725898395, - "narHash": "sha256-2J0TtzkIpjeAfIZYU1ofzcPzvcCO1DXBMP2P7OPoQYg=", + "lastModified": 1726274548, + "narHash": "sha256-kYL8a5T+lPH9eh91JzKKwDKFEpuh1StE4r3aTvNKWeE=", "owner": "juspay", "repo": "omnix", - "rev": "4d9949f041798adaa351afbee98fdb7e25ff2029", + "rev": "eaa9f3e3dee251846d102813144328c08c62fb3a", "type": "github" }, "original": { @@ -1738,11 +1802,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1725290973, - "narHash": "sha256-+jwXF9KI0HfvDgpsoJGvOdfOGGSKOrID1wQB79zjUbo=", + "lastModified": 1726170940, + "narHash": "sha256-sobkRkGBaMX9pD0bwU1iVPWi0WtQvZqlHyl1YtvNDio=", "owner": "danth", "repo": "stylix", - "rev": "ef81ad9e85e60420cc83d4642619c14b57139d33", + "rev": "35233f929629c8eb64e939e35260fc8347f94df9", "type": "github" }, "original": { @@ -1892,11 +1956,11 @@ }, "unstable": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "lastModified": 1726062873, + "narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f", "type": "github" }, "original": {