Skip to content
Snippets Groups Projects
Verified Commit e73493c7 authored by Legy (Beini)'s avatar Legy (Beini)
Browse files

Add some example modules

parent 762328da
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,12 @@ ...@@ -11,9 +11,12 @@
}; };
outputs = flakes: flakes.wat.lib.mkWatRepo flakes ({ findMachines, ... }: { outputs = flakes: flakes.wat.lib.mkWatRepo flakes ({ findModules, findMachines, ... }: rec {
loadModules = outputs.nixosModules;
outputs = { outputs = {
nixosModules = findModules ["example"] ./modules;
nixosConfigurations = findMachines ./machines; nixosConfigurations = findMachines ./machines;
}; };
......
{ mkMachine, flakes, ... }: { mkMachine, flakes, ... }:
mkMachine flakes.nixpkgs "x86_64-linux" ({ ... }: { mkMachine flakes.nixpkgs "x86_64-linux" ({ pkgs, ... }: {
# your system here # your system here
fileSystems."/" = { fileSystems."/" = {
...@@ -8,4 +8,11 @@ mkMachine flakes.nixpkgs "x86_64-linux" ({ ... }: { ...@@ -8,4 +8,11 @@ mkMachine flakes.nixpkgs "x86_64-linux" ({ ... }: {
}; };
boot.loader.grub.device = "/dev/TODO"; boot.loader.grub.device = "/dev/TODO";
#enable some example modules
wat.example.simpleExample.enable = true;
wat.example.complexExample = {
enable = true;
specialExtraPackages = with pkgs; [ htop ];
};
}) })
{ lib, config, mkModule, liftToNamespace, ... }:
with lib;
mkModule {
options = liftToNamespace {
specialExtraPackages = mkOption {
default = [];
type = with types; listOf package;
};
};
config = cfg: {
environment.systemPackages = cfg.specialExtraPackages;
};
}
{ lib, pkgs, mkTrivialModule, ... }:
with lib;
mkTrivialModule {
environment.systemPackages = with pkgs; [
git
nixUnstable
];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment