-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
74 lines (64 loc) · 2.29 KB
/
flake.nix
File metadata and controls
74 lines (64 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
description = "process-tracker-cli";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = {
self,
nixpkgs,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
appVersion = "1.0.841";
dotnetVersion = "10_0";
in {
inherit system;
packages."${system}" = {
process-tracker-cli = pkgs.buildDotnetModule rec {
pname = "process-tracker-cli";
version = "${appVersion}";
meta = with pkgs.lib; {
description = "A cross-platform tool to track and report running processes";
license = licenses.mit;
platforms = [ system ];
};
dotnet-sdk = pkgs.dotnetCorePackages."sdk_${dotnetVersion}";
dotnet-runtime = pkgs.dotnetCorePackages."runtime_${dotnetVersion}";
src = self;
projectFile = [
"ProcessTracker/ProcessTracker.csproj"
];
# to manually update dependencies:
# dotnet restore --use-current-runtime --packages nuget-restore ./ProcessTrackerCLI.sln
# nuget-to-json nuget-restore > deps.json
# rm -r nuget-restore
nugetDeps = ./deps.json;
executables = [ "processtrackercli" ];
};
};
defaultPackage."${system}" = self.packages."${system}".process-tracker-cli;
nixosModules.process-tracker-cli = { config, lib, pkgs, ... }:
let
cfg = config.programs.process-tracker-cli;
in {
options.programs.process-tracker-cli = {
enable = lib.mkEnableOption "Enable the process tracker cli";
package = lib.mkOption {
type = lib.types.package;
default = self.packages.${system}.process-tracker-cli;
description = "The package to install as the process tracker cli.";
};
# Extra service options (if needed)
# serviceConfig = lib.mkOption {
# type = lib.types.attrs;
# default = {};
# description = "Extra configuration options for the process tracker systemd unit.";
# };
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
};
};
};
}