diff --git a/flake.lock b/flake.lock index 6f2416d..8058dc5 100644 --- a/flake.lock +++ b/flake.lock @@ -54,6 +54,21 @@ "type": "github" } }, + "crane": { + "locked": { + "lastModified": 1737689766, + "narHash": "sha256-ivVXYaYlShxYoKfSo5+y5930qMKKJ8CLcAoIBPQfJ6s=", + "owner": "ipetkov", + "repo": "crane", + "rev": "6fe74265bbb6d016d663b1091f015e2976c4a527", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "f1multiviewer": { "inputs": { "nixpkgs": [ @@ -90,6 +105,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "lix-attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": [ @@ -496,6 +532,38 @@ "url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz" } }, + "lix-attic": { + "inputs": { + "crane": "crane", + "flake-compat": [], + "flake-parts": "flake-parts", + "lix": [ + "lix-module", + "lix" + ], + "lix-module": [ + "lix-module" + ], + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1738514772, + "narHash": "sha256-ng38xM+7MfmoWYcQj6/Ejgt732nbFIDx14QvWVpG0d4=", + "ref": "refs/heads/main", + "rev": "b691dd3a7746afd73e944db98c0b000c1424cd5e", + "revCount": 362, + "type": "git", + "url": "https://git.lix.systems/nrabulinski/attic.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/nrabulinski/attic.git" + } + }, "lix-module": { "inputs": { "flake-utils": [ @@ -557,6 +625,27 @@ "type": "github" } }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "lix-attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737420293, + "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -654,6 +743,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-wayland": { "inputs": { "flake-compat": [], @@ -740,6 +845,7 @@ "jj": "jj", "lib-aggregate": "lib-aggregate", "lix": "lix", + "lix-attic": "lix-attic", "lix-module": "lix-module", "my-nixpkgs": "my-nixpkgs", "nim2nix": "nim2nix", diff --git a/flake.nix b/flake.nix index 246094c..b0351bf 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,14 @@ flake = false; }; lix-module.inputs.lix.follows = "lix"; + + lix-attic.url = "git+https://git.lix.systems/nrabulinski/attic.git"; + lix-attic.inputs.nixpkgs.follows = "nixpkgs"; + lix-attic.inputs.lix-module.follows = "lix-module"; + lix-attic.inputs.lix.follows = "lix-module/lix"; + lix-attic.inputs.flake-compat.follows = ""; + + # keep for when lix breaks :/ # lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz"; diff --git a/hosts/algiz/services.nix b/hosts/algiz/services.nix index 25c2cff..5c688fb 100644 --- a/hosts/algiz/services.nix +++ b/hosts/algiz/services.nix @@ -2,6 +2,7 @@ config, pkgs, enabled, + flake, ... }: let @@ -25,12 +26,13 @@ in }; security.polkit = enabled; # attic was looking for this... - environment.systemPackages = [ pkgs.attic-client ]; - # allow docker to forward the request to the host running attic - # https://discourse.nixos.org/t/docker-container-not-resolving-to-host/30259/6 - # networking.firewall.extraCommands = "iptables -A INPUT -p tcp --destination-port ${atticPort} -s 172.16.0.0/12 -j ACCEPT"; + environment.systemPackages = [ + (flake.pkgs "self").attic-client + ]; + services.atticd = enabled // { + package = (flake.pkgs "self").attic-server; # Replace with absolute path to your credentials file environmentFile = config.sops.secrets."atticd-env".path; diff --git a/hosts/othalan/default.nix b/hosts/othalan/default.nix index 34a8b6e..c5bbd36 100644 --- a/hosts/othalan/default.nix +++ b/hosts/othalan/default.nix @@ -1,6 +1,7 @@ { config, pkgs, + flake, enabled, ... @@ -29,5 +30,8 @@ }; }; - environment.systemPackages = [ pkgs.stable.quarto ]; + environment.systemPackages = [ + pkgs.stable.quarto + (flake.pkgs "self").attic-client + ]; } diff --git a/hosts/othalan/settings/pkgs b/hosts/othalan/settings/pkgs index db1fc01..1c4864d 100644 --- a/hosts/othalan/settings/pkgs +++ b/hosts/othalan/settings/pkgs @@ -10,4 +10,3 @@ charm-freeze # pandoc -> texmath -> typst-symbols? # quarto calibre -attic-client diff --git a/pkgs/default.nix b/pkgs/default.nix index bf9aff4..6d49b2e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -22,6 +22,9 @@ in lix = (flake.pkg "lix-module"); roc = (flake.pkgs "roc").cli; roc-lang-server = (flake.pkgs "roc").lang-server; + + attic-client = (flake.pkgs "lix-attic").attic-client; + attic-server = (flake.pkgs "lix-attic").attic-server; } // (flake.toPackageAttrs [ "pixi"