From 737aecaba6ef15b572cfe0a343e78bbb6400b94c Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Mon, 30 Jun 2025 12:44:53 +0200 Subject: [PATCH] set default value for nixops4Package (#412) Co-authored-by: Valentin Gagarin Reviewed-on: https://git.fediversity.eu/Fediversity/Fediversity/pulls/412 Reviewed-by: Valentin Gagarin Co-authored-by: Kiara Grouwstra Co-committed-by: Kiara Grouwstra --- deployment/check/panel/nixosTest.nix | 1 - panel/README.md | 4 ++-- panel/default.nix | 3 +-- panel/nix/configuration.nix | 1 + panel/nix/overlay.nix | 13 +++++++++++++ panel/nix/tests.nix | 1 - 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/deployment/check/panel/nixosTest.nix b/deployment/check/panel/nixosTest.nix index da1a438f..357c9a24 100644 --- a/deployment/check/panel/nixosTest.nix +++ b/deployment/check/panel/nixosTest.nix @@ -155,7 +155,6 @@ in SECRET_KEY = dummyFile; }; port = panelPort; - nixops4Package = inputs.nixops4.packages.${pkgs.system}.default; deployment = { flake = "/run/fedipanel/flake"; diff --git a/panel/README.md b/panel/README.md index 09c0151c..5dcab93c 100644 --- a/panel/README.md +++ b/panel/README.md @@ -4,9 +4,9 @@ The Fediversity Panel is a web service for managing Fediversity deployments with ## Development -- To obtain all tools related to this project, enter the development environment in the root directory by `nix-shell`, then similar from this directory. +- To obtain all tools related to this project, enter the development environment with `nix-shell`. - If you want to do that automatically on entering a directory: + If you want to do that automatically on entering this directory: - [Set up `direnv`](https://github.com/nix-community/nix-direnv#installation) - Run `direnv allow` in the directory where repository is stored on your machine diff --git a/panel/default.nix b/panel/default.nix index 9da9fef5..09d3c45a 100644 --- a/panel/default.nix +++ b/panel/default.nix @@ -21,8 +21,7 @@ in pkgs.npins manage - # NixOps4 and its dependencies - # FIXME: grab NixOps4 and add it here + pkgs.nixops4 pkgs.nix pkgs.openssh ]; diff --git a/panel/nix/configuration.nix b/panel/nix/configuration.nix index 429a6b73..41bb293f 100644 --- a/panel/nix/configuration.nix +++ b/panel/nix/configuration.nix @@ -147,6 +147,7 @@ in NixOps4 from the package's npins-based code, we will have to do with this workaround. ''; + default = pkgs.nixops4; }; deployment = { diff --git a/panel/nix/overlay.nix b/panel/nix/overlay.nix index 88c8df9c..cbb7b8eb 100644 --- a/panel/nix/overlay.nix +++ b/panel/nix/overlay.nix @@ -8,4 +8,17 @@ let in { python3 = prev.lib.attrsets.recursiveUpdate prev.python3 { pkgs = extraPython3Packages; }; + nixops4 = + let + sources = import ../../npins; + inherit (import sources.flake-inputs) import-flake; + inherit + (import-flake { + src = ../../.; + }) + inputs + ; + inherit (inputs) nixops4; + in + nixops4.packages.${prev.system}.default; } diff --git a/panel/nix/tests.nix b/panel/nix/tests.nix index e76eaed0..11009213 100644 --- a/panel/nix/tests.nix +++ b/panel/nix/tests.nix @@ -13,7 +13,6 @@ let secrets = { SECRET_KEY = pkgs.writeText "SECRET_KEY" "secret"; }; - nixops4Package = pkgs.hello; # FIXME: actually pass NixOps4 }; virtualisation = {