diff --git a/flake.lock b/flake.lock index 68c783a..278c190 100644 --- a/flake.lock +++ b/flake.lock @@ -126,17 +126,17 @@ }, "nixpkgs-chia": { "locked": { - "lastModified": 1661317206, - "narHash": "sha256-AlIqr/oyha8JnmVYmeDIb2ENR9wq0aZwI0XYVoshU0Q=", - "owner": "nixos", + "lastModified": 1685960109, + "narHash": "sha256-uTuKV5ua048dIGdaC+lexSUK/9A/X4la4BEJXODZm9U=", + "owner": "lourkeur", "repo": "nixpkgs", - "rev": "0305391fb65b5bdaa8af3c48275ec0df1cdcc34e", + "rev": "e2b683787475d344892bddea9ab413dc611b894e", "type": "github" }, "original": { - "owner": "nixos", + "owner": "lourkeur", "repo": "nixpkgs", - "rev": "0305391fb65b5bdaa8af3c48275ec0df1cdcc34e", + "rev": "e2b683787475d344892bddea9ab413dc611b894e", "type": "github" } }, diff --git a/flake.nix b/flake.nix index b6eac4a..ea11250 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs-chia.url = "github:nixos/nixpkgs?rev=0305391fb65b5bdaa8af3c48275ec0df1cdcc34e"; + nixpkgs-chia.url = "github:lourkeur/nixpkgs?rev=e2b683787475d344892bddea9ab413dc611b894e"; darwin.url = "github:lnl7/nix-darwin/master"; darwin.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/chia.nix b/modules/chia.nix index 238a9e0..ac7ba51 100644 --- a/modules/chia.nix +++ b/modules/chia.nix @@ -16,6 +16,10 @@ in type = with lib.types; nullOr str; default = null; }; + keyLabel = lib.mkOption { + type = lib.types.str; + default = "default"; + }; targetAddress = lib.mkOption { type = with lib.types; nullOr str; default = null; @@ -46,7 +50,7 @@ in wantedBy = [ "multi-user.target" ]; preStart = lib.strings.concatStringsSep "\n" ([ "${chia}/bin/chia init" ] - ++ (if cfg.keyFile == null then [ ] else [ "${chia}/bin/chia keys add -f ${cfg.keyFile}" ]) + ++ (if cfg.keyFile == null then [ ] else [ "${chia}/bin/chia keys add -f ${cfg.keyFile} -l '${cfg.keyLabel}'" ]) ++ (if cfg.targetAddress == null then [ ] else [ '' ${pkgs.yq-go}/bin/yq e \ @@ -88,3 +92,4 @@ in }; } +