Compare commits

...

2 Commits

Author SHA1 Message Date
Zynh Ludwig 13c97347f8 hm-modules: extract getModules function 2024-08-02 02:09:19 -07:00
Zynh Ludwig 3df5994159 tldr: module init 2024-08-02 01:41:52 -07:00
3 changed files with 31 additions and 5 deletions

View File

@ -1,14 +1,19 @@
{ lib, ... }: { lib, ... }:
let let
dirEntries = builtins.removeAttrs (builtins.readDir ./.) [ "default.nix" ]; getModules = path:
let
dirEntries = builtins.removeAttrs (builtins.readDir path) [ "default.nix" ];
moduleEntries = lib.attrsets.filterAttrs (n: v: v == "regular") dirEntries; moduleEntries = lib.attrsets.filterAttrs (n: v: v == "regular") dirEntries;
moduleNames = builtins.attrNames moduleEntries; moduleNames = builtins.attrNames moduleEntries;
modulePaths = builtins.map (name: ./${name}) moduleNames;
modulePaths = builtins.map (name: path + /${name}) moduleNames;
in
modulePaths;
in in
{ {
imports = modulePaths; imports = getModules ./.;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

20
home/modules/tldr.nix Normal file
View File

@ -0,0 +1,20 @@
{ lib, config, ... }:
let
cfg = config.snowhawk.tldr;
in
{
options.snowhawk.tldr = {
enable = lib.mkEnableOption "tldr";
};
config = lib.mkIf cfg.enable {
programs.tealdeer = {
enable = true;
settings = {
updates.auto_update = true;
};
};
};
}

View File

@ -24,6 +24,7 @@ in
redshift.enable = true; redshift.enable = true;
xivlauncher.enable = true; xivlauncher.enable = true;
flameshot.enable = true; flameshot.enable = true;
tldr.enable = true;
}; };
snowhawk.ssh = { snowhawk.ssh = {
enable = true; enable = true;