mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
feat: simplified themes module
This commit is contained in:
parent
b0fdd1d958
commit
a5ec879db0
119 changed files with 2045 additions and 4624 deletions
|
@ -1,37 +1,68 @@
|
|||
let
|
||||
modulesPath = ./modules;
|
||||
moduleImport = path: nameTransform:
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = nameTransform name;
|
||||
value = import (path + "/${name}");
|
||||
}) (builtins.filter (name:
|
||||
(builtins.readDir path).${name} == "regular"
|
||||
&& builtins.match ".*\\.nix$" name != null)
|
||||
(builtins.attrNames (builtins.readDir path))));
|
||||
modules = moduleImport modulesPath
|
||||
(name: builtins.replaceStrings [ ".nix" ] [ "" ] name) // (path:
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = name;
|
||||
value = import (path + "/${name}");
|
||||
}) (builtins.filter (name: (builtins.readDir path).${name} == "directory")
|
||||
(builtins.attrNames (builtins.readDir path))))) modulesPath;
|
||||
in {
|
||||
moduleImport =
|
||||
path: nameTransform:
|
||||
builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = nameTransform name;
|
||||
value = import (path + "/${name}");
|
||||
})
|
||||
(
|
||||
builtins.filter (
|
||||
name: (builtins.readDir path).${name} == "regular" && builtins.match ".*\\.nix$" name != null
|
||||
) (builtins.attrNames (builtins.readDir path))
|
||||
)
|
||||
);
|
||||
modules =
|
||||
moduleImport modulesPath (name: builtins.replaceStrings [ ".nix" ] [ "" ] name)
|
||||
// (
|
||||
path:
|
||||
builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = name;
|
||||
value = import (path + "/${name}");
|
||||
})
|
||||
(
|
||||
builtins.filter (name: (builtins.readDir path).${name} == "directory") (
|
||||
builtins.attrNames (builtins.readDir path)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
modulesPath;
|
||||
in
|
||||
{
|
||||
flake.nixosModules = {
|
||||
personal = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
android audio bluetooth corectrl dconf disks firejail flatpak fonts
|
||||
printing steam sysstat virtualization;
|
||||
android
|
||||
audio
|
||||
bluetooth
|
||||
corectrl
|
||||
dconf
|
||||
disks
|
||||
firejail
|
||||
flatpak
|
||||
fonts
|
||||
printing
|
||||
steam
|
||||
sysstat
|
||||
virtualization
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
desktop = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
syncthing ollama
|
||||
syncthing
|
||||
ollama
|
||||
# plasma
|
||||
# sddm
|
||||
;
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -39,13 +70,27 @@ in {
|
|||
imports = builtins.attrValues { inherit (modules) hyprland; };
|
||||
};
|
||||
|
||||
server = { imports = builtins.attrValues { inherit (modules) services; }; };
|
||||
server = {
|
||||
imports = builtins.attrValues { inherit (modules) services; };
|
||||
};
|
||||
|
||||
shared = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
accounts doas environment gvfs home-manager locale nh nix rsyncd sops
|
||||
ssh system xserver;
|
||||
accounts
|
||||
doas
|
||||
environment
|
||||
gvfs
|
||||
home-manager
|
||||
locale
|
||||
nh
|
||||
nix
|
||||
rsyncd
|
||||
sops
|
||||
ssh
|
||||
system
|
||||
xserver
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue