home: automatically create set of HM modules
This commit is contained in:
parent
cfe49c73fc
commit
0a0cdf7188
4 changed files with 9 additions and 36 deletions
8
home/modules.nix
Normal file
8
home/modules.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ lib, ... }:
|
||||
with lib; let
|
||||
modules' = dir: filterAttrs (name: type: (hasSuffix ".nix" name) || (type == "directory"))
|
||||
(builtins.readDir dir);
|
||||
modules = dir: mapAttrs' (name: _: nameValuePair (removeSuffix ".nix" name) (import (dir + "/${name}")))
|
||||
(modules' dir);
|
||||
in
|
||||
(modules ./modules)
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
alacritty = import ./alacritty;
|
||||
colors = import ./colors.nix;
|
||||
direnv = import ./direnv.nix;
|
||||
git = import ./git.nix;
|
||||
gpg = import ./gpg.nix;
|
||||
gtk = import ./gtk.nix;
|
||||
helix = import ./helix;
|
||||
keyring = import ./keyring.nix;
|
||||
session = import ./session.nix;
|
||||
ssh = import ./ssh.nix;
|
||||
syncthing = import ./syncthing.nix;
|
||||
tmux = import ./tmux.nix;
|
||||
xdg = import ./xdg.nix;
|
||||
zsh = import ./zsh.nix;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
[
|
||||
./colors.nix
|
||||
./direnv.nix
|
||||
./fish.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./gtk.nix
|
||||
./keyring.nix
|
||||
./kitty
|
||||
./mako.nix
|
||||
./session.nix
|
||||
./ssh.nix
|
||||
./sway
|
||||
./syncthing.nix
|
||||
./termite.nix
|
||||
./tmux.nix
|
||||
./xdg.nix
|
||||
./zsh.nix
|
||||
]
|
|
@ -36,7 +36,7 @@
|
|||
}))
|
||||
// {
|
||||
|
||||
hmModules = import ./home/modules;
|
||||
hmModules = import ./home/modules.nix { lib = nixpkgs.lib; };
|
||||
|
||||
nixosConfigurations = import ./nixos/configurations.nix inputs;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue