simplified namespace cause I dont wanna type that much and introduce colored man pages

This commit is contained in:
Christoph Hollizeck 2024-09-13 02:05:40 +02:00
parent fdbb3a8f3b
commit 70fdb9173a
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
15 changed files with 54 additions and 126 deletions

View file

@ -23,6 +23,8 @@ in
variables = {
EDITOR = "nvim";
SUDOEDITOR = "nvim";
PAGER = "less";
MANPAGER = "less";
};
};

View file

@ -19,7 +19,6 @@ in
wyrdgard = {
submodules = {
basics = enabled;
graphical-interface = enabled;
games = enabled;
socials = enabled;
};

View file

@ -7,7 +7,7 @@
...
}:
let
cfg = config.${namespace}.graphical-interface.desktop-manager.addons.rofi;
cfg = config.${namespace}.desktop.addons.rofi;
inherit (lib)
mkIf
@ -17,7 +17,7 @@ let
;
in
{
options.${namespace}.graphical-interface.desktop-manager.addons.rofi = {
options.${namespace}.desktop.addons.rofi = {
enable = mkEnableOption "Rofi";
package = mkOption {
type = types.package;

View file

@ -7,7 +7,7 @@
...
}:
let
cfg = config.${namespace}.graphical-interface.desktop-manager.addons.waybar;
cfg = config.${namespace}.desktop.addons.waybar;
inherit (lib)
mkEnableOption
@ -17,7 +17,7 @@ let
;
in
{
options.${namespace}.graphical-interface.desktop-manager.addons.waybar = {
options.${namespace}.desktop.addons.waybar = {
enable = mkEnableOption "Waybar";
package = mkOption {
type = types.package;

View file

@ -4,6 +4,7 @@
lib,
pkgs,
system,
namespace,
...
}:
with lib.wyrdgard;
@ -15,7 +16,7 @@ let
mkMerge
types
;
cfg = config.wyrdgard.graphical-interface.desktop-manager.hyprland;
cfg = config.${namespace}.desktop.hyprland;
cachix-url = "https://hyprland.cachix.org";
cachix-key = "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=";
@ -35,7 +36,7 @@ let
'';
in
{
options.wyrdgard.graphical-interface.desktop-manager.hyprland = {
options.${namespace}.desktop.hyprland = {
enable = mkEnableOption "Whether to enable hyprland";
settings = mkOption {
type = types.attrs;
@ -55,6 +56,8 @@ in
xfce.thunar
dunst
elegant-sddm
jq
focus-1password
];
@ -70,19 +73,14 @@ in
services = {
xserver = enabled;
greetd = {
displayManager.sddm = {
enable = true;
settings = {
default_session = {
command = "${lib.getExe pkgs.greetd.tuigreet} --cmd Hyprland";
user = config.wyrdgard.user.name;
};
};
theme = "Elegant";
};
};
wyrdgard = {
graphical-interface.desktop-manager.addons = {
desktop.addons = {
waybar = enabled;
rofi = {
enable = true;
@ -110,7 +108,7 @@ in
"[workspace 3 silent] steam"
"[workspace 2 silent] discord"
"[workspace 2 silent] noisetorch"
"[workspace 2 silent] noisetorch -i"
"[workspace 4 silent] 1password"
"[workspace 1 silent] zen"
];

View file

@ -1,16 +1,17 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.graphical-interface.desktop-manager.kde;
cfg = config.${namespace}.desktop.kde;
in
{
options.wyrdgard.graphical-interface.desktop-manager.kde = with types; {
options.${namespace}.desktop.kde = with types; {
enable = mkEnableOption "Whether to enable a kde plasma6";
};

View file

@ -1,43 +0,0 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.graphical-interface.display-manager.greetd;
hyperland = config.wyrdgard.graphical-interface.desktop-manager.hyperland;
hyprland-session = "${inputs.hyprland.packages.${pkgs.system}.hyperland}/share/wayland-sessions";
kde-session = "${inputs.plasma6.packages.${pkgs.system}.plasma6}/share/wayland-sessions";
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session";
command =
if hyperland.enable then
"${tuigreet} --sessions ${hyprland-session}"
else
"${tuigreet} --sessions ${kde-session}";
in
{
options.wyrdgard.graphical-interface.display-manager.greetd = with types; {
enable = mkEnableOption "Whether to enable a sddm";
};
config = mkIf cfg.enable {
services = {
xserver = enabled;
greetd = {
enable = true;
settings = {
default_session = {
command = command;
user = config.wyrdgard.user.name;
};
};
};
};
};
}

View file

@ -1,23 +0,0 @@
{ config, lib, ... }:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.graphical-interface.display-manager.sddm;
in
{
options.wyrdgard.graphical-interface.display-manager.sddm = with types; {
enable = mkEnableOption "Whether to enable a sddm";
};
config = mkIf cfg.enable {
services = {
xserver = enabled;
displayManager = {
sddm = {
enable = true;
wayland.enable = true;
};
};
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.submodules.graphical-interface;
in
{
options.wyrdgard.submodules.graphical-interface = with types; {
enable = mkBoolOpt false "Whether to enable a graphical interface";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ xdg-utils ];
wyrdgard.graphical-interface =
{
};
};
}

View file

@ -15,9 +15,13 @@ in
};
config = mkIf cfg.enable {
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
services.fstrim = enabled;
};