From 6ff05d1149a24e2baaaeadc411e7f16293cc3656 Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 26 Sep 2023 20:56:17 +0200 Subject: Create sample package and module --- modules/default.nix | 5 +++++ modules/meow.nix | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 modules/default.nix create mode 100644 modules/meow.nix (limited to 'modules') diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..02b72fd --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + imports = [ ./meow.nix ]; +} \ No newline at end of file diff --git a/modules/meow.nix b/modules/meow.nix new file mode 100644 index 0000000..ff72a0c --- /dev/null +++ b/modules/meow.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.programs.test.meow; +in { + options = { + programs.test.meow = { + enable = mkEnableOption "meow"; + + name = mkOption { + type = types.str; + default = "cat"; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.meow ]; + environment.etc."meow".text = cfg.name; + }; +} \ No newline at end of file -- cgit 1.4.1