mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
* switch to sway * Add greetd pam integration, Add waybar base config * waybar (multiple modules do not behave as documented) * nm-applet * systemd-integration due to "normal" call via greetd configure mako adding base commands for nm-applet, blueman-applet * add kanshi * swayconfig keybindings for special multimedia keys * waybar base stylefile + basic modules * Add more portals to wayland/sway and fix fonts * Add nixosConfiguration-awareness to the homemanager module * Add alacritty.nix for home-manager configuration * Add formatter to flake * Format with alejandra style * Add apheleia to emacs * Add local configuration to use alejandra in this flake with emacs
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
final: prev:
|
|
with prev; rec {
|
|
moduleNames = dir:
|
|
pipe dir [
|
|
builtins.readDir
|
|
(filterAttrs
|
|
(name: type: (!hasPrefix "." name
|
|
&& !hasPrefix "_" name
|
|
&& (hasSuffix ".nix" name || type == "directory"))))
|
|
attrNames
|
|
];
|
|
withModules = dir: f:
|
|
listToAttrs (map
|
|
(filename: let
|
|
path = dir + "/${filename}";
|
|
name = removeSuffix ".nix" filename;
|
|
in
|
|
nameValuePair name (f {inherit path name;}))
|
|
(moduleNames dir));
|
|
discoverModules = dir:
|
|
withModules dir ({
|
|
path,
|
|
name,
|
|
}:
|
|
import path);
|
|
discoverMachines = dir: args:
|
|
withModules dir ({
|
|
path,
|
|
name,
|
|
}:
|
|
{modules = [path];} // args);
|
|
discoverTemplates = dir: overrides:
|
|
pipe dir [
|
|
builtins.readDir
|
|
(filterAttrs (_name: type: type == "directory"))
|
|
attrNames
|
|
(map (template:
|
|
nameValuePair template (recursiveUpdate
|
|
{
|
|
path = "${dir}/${template}";
|
|
description = "a template for ${template} projects";
|
|
}
|
|
(
|
|
if hasAttr template overrides
|
|
then getAttr template overrides
|
|
else {}
|
|
))))
|
|
listToAttrs
|
|
];
|
|
}
|