no idea what I changed but im sure its fine
This commit is contained in:
parent
a448ce3f39
commit
23942b961e
8 changed files with 305 additions and 2 deletions
72
modules/wishlist.nix
Normal file
72
modules/wishlist.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
description = "Wishlist: Your SSH directory."
|
||||
|
||||
inputs = {
|
||||
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self
|
||||
}: let
|
||||
nixosModule = {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.services.wishlist = {
|
||||
enable = lib.mkEnableOption "Your SSH directory.";
|
||||
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 22;
|
||||
description = "Port to listen on";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.wishlist.enable {
|
||||
# configure the systemd service
|
||||
systemd.services.wishlist = {
|
||||
description = "Your SSH directory.";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${self.packages.${pkgs.system}.default}/bin/wishlist";
|
||||
Restart = "always";
|
||||
Type = "simple";
|
||||
DynamicUser = "yes";
|
||||
};
|
||||
# environment variables
|
||||
environment = {
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
(flake-utils.lib.eachDefaultSystem (system: let
|
||||
gopkg = go-nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.default = gopkg.buildGoModule ############################
|
||||
}))
|
||||
buildGoModule rec { # is rec necessary?
|
||||
pname = "wishlist";
|
||||
version = "0.15.1"
|
||||
|
||||
src = fetchFromGithub {
|
||||
owner = "charmbracelet";
|
||||
repo = "wishlist";
|
||||
rev = "v${version}";
|
||||
hash = "0c9g1s8j9znzd1mw61d0klc6sqri0wx6hljibxdwzi3cabfy3ld6";
|
||||
};
|
||||
|
||||
vendorSha256 = lib.fakeSha256;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/charmbracelet/wishlist";
|
||||
description = "Your SSH directory.";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ caarlos0 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue