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 767922cdd0
commit 80a4ed8f70
15 changed files with 54 additions and 126 deletions

View file

@ -16,27 +16,37 @@ in
};
config = mkIf cfg.enable {
home.packages = with pkgs.fishPlugins; [
forgit
sponge
];
programs = {
fish = {
enable = true;
shellInit = "
shellInit = ''
zoxide init fish | source
direnv hook fish | source
source ~/.config/op/plugins.sh
";
set -x LESS_TERMCAP_mb \e'[01;32m'
set -x LESS_TERMCAP_md \e'[01;32m'
set -x LESS_TERMCAP_me \e'[0m'
set -x LESS_TERMCAP_se \e'[0m'
set -x LESS_TERMCAP_so \e'[01;47;34m'
set -x LESS_TERMCAP_ue \e'[0m'
set -x LESS_TERMCAP_us \e'[01;36m'
set -x LESS -R
set -x GROFF_NO_SGR 1
'';
shellAliases = {
vim = "nvim";
ls = "colorls --gs";
l = "ls -l";
la = "ls -a";
lla = "ls -la";
la = "ls -la";
lt = "ls --tree";
};
plugins = with pkgs.fishPlugins; [
{
name = "forgit";
src = forgit.src;
}
];
};
zoxide = {

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;
};

View file

@ -11,13 +11,17 @@ in
environment.systemPackages = with pkgs; [
path-of-building
steamcmd
pkgs.most
pkgs.man-pages
pkgs.man-pages-posix
];
environment.pathsToLink = [ "/libexec" ];
virtualisation.waydroid = enabled;
services.xserver.displayManager.setupCommands = "xrandr --output HDMI-A-1 --off";
wyrdgard = {
archetypes = {
gaming.enable = true;
@ -28,7 +32,7 @@ in
obs-studio = enabled;
};
graphical-interface.desktop-manager.hyprland = {
desktop.hyprland = {
enable = true;
settings = {
monitor = [
@ -39,7 +43,7 @@ in
];
exec-once = [
"xrandr --output DP-2 --primary"
"xrandr --output DP-2 --primary --output HDMI-A-1 --on"
"hyprctl dispatch moveworkspacetomonitor 4 HDMI-A-1"
];