updated flake
This commit is contained in:
parent
3dbbd5713a
commit
09f272de15
1 changed files with 4 additions and 43 deletions
47
flake.nix
47
flake.nix
|
@ -18,7 +18,7 @@ Some utility commands:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
description = "";
|
description = "A utility written in rust that my eww configuration uses";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
@ -39,8 +39,8 @@ Some utility commands:
|
||||||
cargoHash = nixpkgs.lib.fakeHash;
|
cargoHash = nixpkgs.lib.fakeHash;
|
||||||
};
|
};
|
||||||
meta = with nixpkgs.lib; {
|
meta = with nixpkgs.lib; {
|
||||||
#homepage = "https://example.com";
|
homepage = "https://git.nickiel.net";
|
||||||
#license = [ licenses.gpl3 ];
|
license = [ licenses.gpl3 ];
|
||||||
platforms = [ system ];
|
platforms = [ system ];
|
||||||
#maintainers = with maintainers; [ ];
|
#maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
|
@ -61,50 +61,11 @@ Some utility commands:
|
||||||
pname = "ewwtilities";
|
pname = "ewwtilities";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
buildAndTestSubdir = "ewwtilities";
|
buildAndTestSubdir = "ewwtilities";
|
||||||
cargoHash = "sha256-+TaGIiKf+Pz2bTABeG8aCZz0/ZTCKl5398+qbas4Nvo=";
|
cargoHash = "sha256-vY+2bCWlW2SxzAxB9nPighjaa63qW1XttC2vLGqBGWI=";
|
||||||
meta = meta // {
|
meta = meta // {
|
||||||
description = "";
|
description = "";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
nixosModules.default = { config, ... }: let
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
in {
|
|
||||||
options.services.ewwtilities = {
|
|
||||||
enable = lib.mkEnableOption (lib.mdDoc "ewwtilities service");
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = self.packages.${system}.ewwtilities;
|
|
||||||
defaultText = "pkgs.ewwtilities";
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
The ewwtilities package that should be used.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
port = lib.mkOption {
|
|
||||||
type = lib.types.port;
|
|
||||||
default = 8000;
|
|
||||||
description = lib.mdDoc ''
|
|
||||||
The port at which to run.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config.systemd.services.ewwtilities = let
|
|
||||||
cfg = config.services.ewwtilities;
|
|
||||||
pkg = self.packages.${system}.ewwtilities;
|
|
||||||
in lib.mkIf cfg.enable {
|
|
||||||
description = pkg.meta.description;
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "network.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = ''
|
|
||||||
${cfg.package}/bin/ewwtilities --port ${builtins.toString cfg.port}
|
|
||||||
'';
|
|
||||||
Restart = "always";
|
|
||||||
DynamicUser = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue