diff options
| author | Seth Flynn <[email protected]> | 2025-02-02 14:42:48 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-02 14:42:48 -0500 |
| commit | b8ba3056da39e2763094b7c695da0c9d5ee287c5 (patch) | |
| tree | af9fb4dac47a8a1be2af1ff9898e2526b2983845 /templates/standard/nix/module.nix | |
| parent | 2a05e0b50272f7ec681e33588bc5fc79f72f44af (diff) | |
templates/standard: expand
Diffstat (limited to 'templates/standard/nix/module.nix')
| -rw-r--r-- | templates/standard/nix/module.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/templates/standard/nix/module.nix b/templates/standard/nix/module.nix new file mode 100644 index 0000000..36e91ea --- /dev/null +++ b/templates/standard/nix/module.nix @@ -0,0 +1,27 @@ +self: +{ + config, + lib, + pkgs, + ... +}: + +let + namespace = "myProgram"; + cfg = config.services.${namespace}; + + inherit (pkgs.stdenv.hostPlatform) system; + packages = self.packages.${system} or throw "myProgram: ${system} is not supported"; +in + +{ + options.services.${namespace} = { + enable = lib.mkEnableOption "something amazing"; + + package = lib.mkPackageOption packages "hello" { }; + }; + + config = { + environment.systemPackages = [ cfg.package ]; + }; +} |
