new meat
This commit is contained in:
parent
914788cd30
commit
8003d9b2a6
10 changed files with 379 additions and 121 deletions
28
flakes/meat/meat-module.nix
Normal file
28
flakes/meat/meat-module.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
cfg = config.programs.meat;
|
||||
in {
|
||||
options.programs.meat = {
|
||||
enable = mkEnableOption "meat";
|
||||
flake = mkOption {
|
||||
type = with types; nullOr (either path str);
|
||||
default = null;
|
||||
description = "path to your system flake";
|
||||
};
|
||||
};
|
||||
config =
|
||||
lib.mkIf
|
||||
cfg.enable
|
||||
{
|
||||
environment.systemPackages = [pkgs.meat];
|
||||
environment.sessionVariables.FLAKE =
|
||||
if (cfg.flake == null)
|
||||
then abort "Please set the programs.meat.flake option to your system flake."
|
||||
else config.programs.meat.flake;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue