better consistency, add dotfiles for takamaki and new features
This commit is contained in:
35 files changed
+2455
-190
No files matched your search
@@ -1,33 +1,22 @@
|
||||
{ inputs, self, ... }: {
|
||||
{ inputs, self, ... }: let
|
||||
wm-option-type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/window-managers");
|
||||
shell-option-type = inputs.helpers.mkOptionalListOfType (inputs.helpers.mkEnumFromDirContents "${self}/modules/components/shells");
|
||||
in {
|
||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||
options.components = {
|
||||
displayManager = lib.mkOption {
|
||||
# enum that dynamically populates itself with the contents of the display-managers directory
|
||||
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/display-managers")
|
||||
));
|
||||
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/components/display-managers";
|
||||
default = "lightdm";
|
||||
};
|
||||
|
||||
windowManagers = lib.mkOption {
|
||||
type = lib.types.either (lib.types.listOf (
|
||||
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
|
||||
))
|
||||
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
|
||||
)));
|
||||
type = wm-option-type;
|
||||
default = [];
|
||||
};
|
||||
|
||||
shells = lib.mkOption {
|
||||
type = lib.types.either (lib.types.listOf (
|
||||
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
|
||||
))
|
||||
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
|
||||
)));
|
||||
type = shell-option-type;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
@@ -49,24 +38,12 @@
|
||||
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
||||
options.components = {
|
||||
windowManagers = lib.mkOption {
|
||||
type = lib.types.either (lib.types.listOf (
|
||||
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
|
||||
))
|
||||
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
|
||||
)));
|
||||
type = wm-option-type;
|
||||
default = [];
|
||||
};
|
||||
|
||||
shells = lib.mkOption {
|
||||
type = lib.types.either (lib.types.listOf (
|
||||
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
|
||||
))
|
||||
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
|
||||
)));
|
||||
type = shell-option-type;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
@@ -100,7 +77,7 @@
|
||||
enable = true;
|
||||
colorScheme = "dark";
|
||||
|
||||
gtk2.configLocation = "${config.home.homeDirectory}/.config/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config
|
||||
gtk2.configLocation = "${config.xdg.configHome}/.gtkrc-2.0"; # prevents file conflicts between this and other parts of the nix config
|
||||
gtk2.force = true;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user