added: options
added: dev env
This commit is contained in:
parent
5042536c2d
commit
2a68518b56
@ -77,6 +77,9 @@
|
|||||||
printf "Rust version:"
|
printf "Rust version:"
|
||||||
rustc --version
|
rustc --version
|
||||||
printf "\nbuild inputs: ${pkgs.lib.concatStringsSep ", " (map (bi: bi.name) (buildInputs ++ nativeBuildInputs))}"
|
printf "\nbuild inputs: ${pkgs.lib.concatStringsSep ", " (map (bi: bi.name) (buildInputs ++ nativeBuildInputs))}"
|
||||||
|
function server() {
|
||||||
|
cargo watch -x "run --all-features -- server ''${@}"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -112,6 +115,12 @@
|
|||||||
homeManagerModules.default = {
|
homeManagerModules.default = {
|
||||||
imports = [ ./modules/home-manager.nix ];
|
imports = [ ./modules/home-manager.nix ];
|
||||||
};
|
};
|
||||||
|
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
self.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,4 +28,8 @@ in
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
cfg.directories);
|
cfg.directories);
|
||||||
|
config.home.sessionVariables = mkIf (cfg.enable && cfg.endpoint != null) {
|
||||||
|
SSH_CD_API = cfg.endpoint;
|
||||||
|
};
|
||||||
|
config.home.packages = mkIf cfg.enable [ cfg.package ];
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
endpointOption = mkOption {
|
endpointOption = mkOption {
|
||||||
type = types.str;
|
type = with types; nullOr str;
|
||||||
description = "API endpoint url";
|
description = "API endpoint url";
|
||||||
default = "https://pki.shimun.net";
|
default = "https://pki.shimun.net";
|
||||||
};
|
};
|
||||||
|
packageOption = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.ssh-cert-dist;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -28,6 +31,7 @@ in
|
|||||||
services.ssh-cert-dist = {
|
services.ssh-cert-dist = {
|
||||||
enable = mkEnableOption "ssh-cert-dist";
|
enable = mkEnableOption "ssh-cert-dist";
|
||||||
endpoint = endpointOption;
|
endpoint = endpointOption;
|
||||||
|
package = packageOption;
|
||||||
directories = mkOption {
|
directories = mkOption {
|
||||||
type = with types; attrsOf (submodule directoryModule);
|
type = with types; attrsOf (submodule directoryModule);
|
||||||
default = { };
|
default = { };
|
||||||
@ -35,6 +39,7 @@ in
|
|||||||
};
|
};
|
||||||
programs.ssh-cert-dist = {
|
programs.ssh-cert-dist = {
|
||||||
enable = mkEnableOption "ssh-cert-dist client";
|
enable = mkEnableOption "ssh-cert-dist client";
|
||||||
|
package = packageOption;
|
||||||
endpoint = endpointOption;
|
endpoint = endpointOption;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user