uhhh
uhhh the 2nd rendition
This commit is contained in:
parent
132a109da8
commit
565aac949c
37 changed files with 2606 additions and 36 deletions
47
modules/desktop/default.nix
Normal file
47
modules/desktop/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop;
|
||||
in {
|
||||
options.modules.desktop = {
|
||||
envProto = mkOption {
|
||||
type = types.nullOr (types.enum ["x11" "wayland"]);
|
||||
description = "What display protocol to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = "adwaita-dark";
|
||||
};
|
||||
|
||||
modules.desktop.fonts.enable = builtins.trace "enabling fonts" true;
|
||||
modules.desktop.fonts.baseFonts = builtins.trace "enabling basefonts" true;
|
||||
}
|
||||
(mkIf (cfg.envProto == "wayland") {
|
||||
hm.home.packages = with pkgs; [ wl-clipboard-x11 ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
# magic, dont ask
|
||||
NIXOS_OZONE_WL = "1";
|
||||
_JAVA_AWT_WM_NONEREPARENTING = "1";
|
||||
GDK_BACKEND = "wayland,x11";
|
||||
ANKI_WAYLAND = "1";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
# this fixes cursors on nvidia, maybe move all nvidia stuff to a module? or put this in hardware
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.envProto == "x11") {
|
||||
hm.home.packages = with pkgs; [ xclip ];
|
||||
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
})
|
||||
];
|
||||
}
|
17
modules/desktop/dunst.nix
Normal file
17
modules/desktop/dunst.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.dunst;
|
||||
in {
|
||||
options.modules.desktop.dunst = {
|
||||
enable = mkEnableOption "Enable dunst, a lightweight replacement for the notification daemons provided by most desktop environments";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.services.dunst = {
|
||||
enable = true;
|
||||
configFile = ../../config/dunst.conf;
|
||||
};
|
||||
};
|
||||
}
|
117
modules/desktop/fonts.nix
Normal file
117
modules/desktop/fonts.nix
Normal file
|
@ -0,0 +1,117 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
# ty https://github.com/Misterio77/nix-config/blob/main/modules/home-manager/fonts.nix
|
||||
mkFontOption = kind: default: {
|
||||
family = mkOption {
|
||||
type = types.str;
|
||||
default = default.family;
|
||||
description = "Family name for ${kind} font profile";
|
||||
example = "Fira Code";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = default.package;
|
||||
description = "Package for ${kind} font profile";
|
||||
example = "pkgs.fira-code";
|
||||
};
|
||||
size = mkOption {
|
||||
type = types.number;
|
||||
default = default.size;
|
||||
description = "${kind} font profile size, px";
|
||||
example = "11";
|
||||
};
|
||||
};
|
||||
cfg = config.modules.desktop.fonts;
|
||||
in {
|
||||
options.modules.desktop.fonts = {
|
||||
enable = mkEnableOption "Enable the font configuration module, containing system fonts";
|
||||
baseFonts = mkEnableOption "Add an extra set of extra base fonts";
|
||||
|
||||
fonts = {
|
||||
sans = mkFontOption "sans" {
|
||||
package = pkgs.my.atkinson-hyperlegible-pro;
|
||||
family = "Atkinson Hyperlegible Pro";
|
||||
|
||||
size = 11;
|
||||
};
|
||||
sansSerif = mkFontOption "sans-serif" {
|
||||
package = pkgs.my.atkinson-hyperlegible-pro;
|
||||
family = "Atkinson Hyperlegible Pro";
|
||||
|
||||
size = 11;
|
||||
};
|
||||
monospace = mkFontOption "monospace" {
|
||||
package = pkgs.cozette;
|
||||
family = "CozetteVector";
|
||||
|
||||
size = 10;
|
||||
};
|
||||
monospaceBitmap = mkFontOption "bitmap monospace" {
|
||||
package = pkgs.cozette;
|
||||
family = "Cozette";
|
||||
|
||||
size = 10;
|
||||
};
|
||||
emoji = mkFontOption "emoji" {
|
||||
package = pkgs.twitter-color-emoji;
|
||||
family = "Twitter Color Emoji";
|
||||
|
||||
size = 10; # not applicable, but whatever
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fontconfig.enable = true;
|
||||
fontconfig.defaultFonts = {
|
||||
sans = [ cfg.fonts.sans.family ];
|
||||
sansSerif = [ cfg.fonts.sansSerif.family ];
|
||||
monospace = [ cfg.fonts.monospace.family ];
|
||||
emoji = [ cfg.fonts.emoji.family ];
|
||||
};
|
||||
enableGhostscriptFonts = true;
|
||||
packages = with pkgs; [
|
||||
corefonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
liberation_ttf
|
||||
] ++ [
|
||||
cfg.fonts.sans.package
|
||||
cfg.fonts.sansSerif.package
|
||||
cfg.fonts.monospace.package
|
||||
cfg.fonts.monospaceBitmap.package
|
||||
cfg.fonts.emoji.package
|
||||
];
|
||||
};
|
||||
|
||||
hm.gtk.enable = true;
|
||||
hm.gtk.font = {
|
||||
inherit (cfg.fonts.sans) package name size;
|
||||
};
|
||||
|
||||
hm.dconf.settings = {
|
||||
"org/gnome/desktop/interface".font-name = with cfg.fonts.sans; "${family} ${toString size}";
|
||||
"org/gnome/desktop/interface".document-font-name = with cfg.fonts.sansSerif; "${family} ${toString size}";
|
||||
"org/gnome/desktop/interface".monospace-font-name = with cfg.fonts.monospace; "${family} ${toString size}";
|
||||
};
|
||||
} // (mkIf cfg.baseFonts {
|
||||
fonts.enableDefaultPackages = true;
|
||||
fonts.packages = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
mplus-outline-fonts.githubRelease
|
||||
dina-font
|
||||
proggyfonts
|
||||
atkinson-hyperlegible
|
||||
cozette
|
||||
twemoji-color-font
|
||||
noto-fonts-color-emoji
|
||||
noto-fonts-monochrome-emoji
|
||||
font-awesome
|
||||
];
|
||||
});
|
||||
}
|
43
modules/desktop/hypridle.nix
Normal file
43
modules/desktop/hypridle.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib, config, pkgs, system, inputs , ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.hypridle;
|
||||
in {
|
||||
options.modules.desktop.hypridle = {
|
||||
enable = mkEnableOption "Enable hypridle, hyprland's idle daemon";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = inputs.hypridle.packages.${system}.hypridle;
|
||||
example = "pkgs.hypridle";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.services.hypridle = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
|
||||
lockCmd = "${lib.getExe config.modules.desktop.hyprlock.package}";
|
||||
unlockCmd = "pkill -USR1 hyprlock";
|
||||
|
||||
listeners = let
|
||||
hyprctl = "${config.modules.desktop.hyprland.package}/bin/hyprctl";
|
||||
in [
|
||||
{
|
||||
timeout = 90; # 1.5 min
|
||||
onTimeout = "${hyprctl} dispatch dpms off"; # turn off screen
|
||||
onResume = "${hyprctl} dispatch dpms on"; # turn it back on
|
||||
}
|
||||
{
|
||||
timeout = 60 * 2; # 2 min
|
||||
onTimeout = "loginctl lock-session"; # lock computer
|
||||
}
|
||||
{
|
||||
timeout = 60 * 30; # 15 min
|
||||
onTimeout = "systemctl suspend"; # sleep/suspend
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
201
modules/desktop/hyprland.nix
Normal file
201
modules/desktop/hyprland.nix
Normal file
|
@ -0,0 +1,201 @@
|
|||
{ inputs, lib, config, system, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
hyprpkgs = inputs.hyprland.packages.${system};
|
||||
in {
|
||||
options.modules.desktop.hyprland = {
|
||||
enable = mkEnableOption "Enable hyprland, a dynamic tiling wayland compositor based on wlroots that doesn't sacrifice on its looks";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = hyprpkgs.hyprland;
|
||||
example = "pkgs.hyprland";
|
||||
};
|
||||
portalPackage = mkOption {
|
||||
type = types.package;
|
||||
default = hyprpkgs.xdg-desktop-portal-hyprland;
|
||||
example = "pkgs.xdg-desktop-portal-hyprland";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.displayManager.sessionPackages = [ cfg.package ];
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk cfg.portalPackage ];
|
||||
config = {
|
||||
common = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
hm.wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
package = cfg.package;
|
||||
|
||||
settings = {
|
||||
source = [];
|
||||
|
||||
"$mod" = "SUPER";
|
||||
bindm = [ # "bind mouse"
|
||||
# move/resize windows with mod + lmb/rmb and dragging
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
bindel = [ # "bind held & locked"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 10%-"
|
||||
];
|
||||
bindl = [ # "bind locked"
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
bindr = [ # "bind released"
|
||||
"SUPER, Super_L, exec, ${lib.getExe pkgs.nwg-drawer}"
|
||||
];
|
||||
bind = [
|
||||
"$mod, R, exec, ${lib.getExe pkgs.rofi-wayland} -show run"
|
||||
", print, exec, ${lib.getExe pkgs.grimblast} copy area"
|
||||
"$mod, T, exec, ${lib.getExe pkgs.wezterm}"
|
||||
|
||||
"$mod, Q, killactive, "
|
||||
"$mod, V, togglefloating, "
|
||||
"$mod, P, pseudo, "
|
||||
"$mod, J, togglesplit, "
|
||||
|
||||
# scroll through workspaces with mod + scroll
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
] ++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
)
|
||||
10)
|
||||
);
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
|
||||
follow_mouse = 1;
|
||||
};
|
||||
|
||||
monitor= [
|
||||
"DVI-D-1, 1920x1080@60, 0x0, 1"
|
||||
"DP-1, 1920x1080@60, 1920x0, 1"
|
||||
];
|
||||
|
||||
exec-once = [ "${lib.getExe pkgs.networkmanagerapplet}" ];
|
||||
|
||||
env = [
|
||||
"XCURSOR_THEME,${config.modules.desktop.themes.cursorTheme.name}"
|
||||
"XCURSOR_SIZE,24"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 6;
|
||||
gaps_out = 6;
|
||||
border_size = 2;
|
||||
no_border_on_floating = true;
|
||||
|
||||
layout = "dwindle";
|
||||
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
# common popups
|
||||
"float, class:file-roller"
|
||||
"float, class:org.gnome.Loupe"
|
||||
"float, initialTitle:^Open Folder$"
|
||||
"float, initialTitle:^Open File$"
|
||||
|
||||
# fix focus
|
||||
"stayfocused, class:^pinentry-"
|
||||
"stayfocused, class:^rofi-"
|
||||
|
||||
# workspace moving
|
||||
"workspace 1, class:^firefox"
|
||||
"workspace 2, class:code-url-handler"
|
||||
"workspace 4, class:ArmCord"
|
||||
];
|
||||
|
||||
blurls = [
|
||||
"gtk-layer-shell" # nwg-drawer
|
||||
"waybar"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 4;
|
||||
passes = 2;
|
||||
# popups = true;
|
||||
};
|
||||
|
||||
drop_shadow = false;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = [
|
||||
"outCubic, 0.33, 1, 0.68, 1"
|
||||
"outExpo, 0.16, 1, 0.3, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 5, outExpo, popin"
|
||||
"windowsOut, 1, 5, outCubic, popin 80%"
|
||||
"border, 1, 2, outExpo"
|
||||
"fade, 1, 3, outCubic"
|
||||
"workspaces, 1, 6, outExpo"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = "yes";
|
||||
|
||||
preserve_split = "yes";
|
||||
};
|
||||
|
||||
master = {
|
||||
new_is_master = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_splash_rendering = true;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
general {
|
||||
col.active_border=$pink
|
||||
col.inactive_border=$surface0
|
||||
}
|
||||
decoration {
|
||||
col.shadow=$surface0
|
||||
col.shadow_inactive=$surface0
|
||||
}
|
||||
misc {
|
||||
background_color=$crust
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
72
modules/desktop/hyprlock.nix
Normal file
72
modules/desktop/hyprlock.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{ lib, config, inputs, system, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.hyprlock;
|
||||
in {
|
||||
options.modules.desktop.hyprlock = {
|
||||
enable = mkEnableOption "Enable hyprlock, a simple, fast, multithreaded screen lock for hyprland";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = inputs.hyprlock.packages.${system}.hyprlock;
|
||||
example = "pkgs.hyprlock";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.pam.services.hyprlock.text = "auth include login";
|
||||
powerManagement.resumeCommands = ''
|
||||
${cfg.package}
|
||||
'';
|
||||
hm.programs.hyprlock = with config.colorScheme.palette; {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
general = {
|
||||
hide_cursor = false;
|
||||
no_fade_in = true;
|
||||
no_fade_out = true;
|
||||
};
|
||||
backgrounds = [
|
||||
{
|
||||
path = toString ../../assets/lockscreen.png;
|
||||
blur_passes = 3;
|
||||
blur_size = 6;
|
||||
}
|
||||
];
|
||||
labels = [
|
||||
{
|
||||
text = "cmd[update:1000] echo \"$(date +'%H:%M')\"";
|
||||
font_size = 58;
|
||||
color = "rgb(${base05})";
|
||||
font_family = config.modules.desktop.fonts.fonts.sansSerif.family;
|
||||
position = { x = 0; y = 30; };
|
||||
}
|
||||
{
|
||||
text = "cmd[update:1000] echo \"$(date + '%A %B %e')\"";
|
||||
font_size = 14;
|
||||
color = "rgb(${base05})";
|
||||
font_family = config.modules.desktop.fonts.fonts.sansSerif.family;
|
||||
position = { x = 0; y = 10; };
|
||||
}
|
||||
];
|
||||
input-fields = [
|
||||
{
|
||||
size = { width = 300; height = 28; };
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2;
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "";
|
||||
|
||||
outer_color = "rgb(${base0E})";
|
||||
inner_color = "rgb(${base00})";
|
||||
font_color = "rgb(${base05})";
|
||||
check_color = "rgb(${base02})";
|
||||
fail_color = "rgb(${base08})";
|
||||
capslock_color = "rgb(${base09})";
|
||||
|
||||
position = { x = 0; y = -30; };
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
28
modules/desktop/hyprpaper.nix
Normal file
28
modules/desktop/hyprpaper.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, config, inputs, system, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.hyprpaper;
|
||||
in {
|
||||
options.modules.desktop.hyprpaper = {
|
||||
enable = mkEnableOption "Enable hyprpaper, a wayland wallpaper utility";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = inputs.hyprpaper.packages.${system}.hyprpaper;
|
||||
example = "pkgs.hyperpaper";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe cfg.package}" ];
|
||||
hm.xdg.configFile."hypr/hyprpaper.conf" = let
|
||||
img = ../../assets/wallpaper.png;
|
||||
in {
|
||||
text = ''
|
||||
preload = ${img}
|
||||
wallpaper = ,${img}
|
||||
splash = false
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
18
modules/desktop/nwg-drawer.nix
Normal file
18
modules/desktop/nwg-drawer.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.nwg-drawer;
|
||||
in {
|
||||
options.modules.desktop.nwg-drawer = {
|
||||
enable = mkEnableOption "Enable nwg-drawer, a GTK based application launcher for wayland";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe pkgs.nwg-drawer} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus" ];
|
||||
hm.xdg.configFile."nwg-drawer/drawer.css".text = builtins.concatStringsSep "\n" [
|
||||
"@import \"${inputs.waybar-catppuccin}/themes/mocha.css\";"
|
||||
(lib.readFile ../../config/nwg-drawer.css)
|
||||
];
|
||||
};
|
||||
}
|
22
modules/desktop/rofi.nix
Normal file
22
modules/desktop/rofi.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.rofi;
|
||||
in {
|
||||
options.modules.desktop.rofi = {
|
||||
enable = mkEnableOption "Enable rofi, a window switcher, run dialog and dmenu replacement";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = with config.modules.desktop.fonts.fonts.monospace; "${family} ${toString size}";
|
||||
extraConfig = {
|
||||
show-icons = true;
|
||||
};
|
||||
theme = ../../config/rofi.rasi;
|
||||
};
|
||||
};
|
||||
}
|
30
modules/desktop/sddm.nix
Normal file
30
modules/desktop/sddm.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.sddm;
|
||||
in {
|
||||
options.modules.desktop.sddm = {
|
||||
enable = mkEnableOption "Enable SDDM, a display manager for X11 and Wayland windowing systems";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.enable = true; # this is needed, unfortunately!
|
||||
environment.systemPackages = with pkgs; [
|
||||
config.modules.desktop.themes.sddmTheme.package
|
||||
libsForQt5.qt5.qtsvg
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
libsForQt5.qt5.qtquickcontrols2
|
||||
];
|
||||
services.xserver.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
theme = config.modules.desktop.themes.sddmTheme.name;
|
||||
settings = {
|
||||
Theme = {
|
||||
CursorTheme = config.modules.desktop.themes.cursorTheme.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
69
modules/desktop/themes/catppuccin/default.nix
Normal file
69
modules/desktop/themes/catppuccin/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ inputs, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.themes;
|
||||
accent = "pink";
|
||||
variant = "mocha";
|
||||
in {
|
||||
config = mkIf (cfg.active == "catppuccin") {
|
||||
colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha;
|
||||
|
||||
modules.desktop.themes = {
|
||||
dark = true;
|
||||
|
||||
gtkTheme = {
|
||||
name = "Catppuccin-Mocha-Compact-Pink-Dark"; # TODO: put accent in here
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
variant = variant;
|
||||
accents = [ accent ];
|
||||
tweaks = [ "rimless" ];
|
||||
size = "compact";
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "WhiteSur-dark";
|
||||
package = pkgs.whitesur-icon-theme;
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = "graphite-dark";
|
||||
package = pkgs.graphite-cursors;
|
||||
};
|
||||
|
||||
sddmTheme = {
|
||||
name = "catppuccin-sddm-corners";
|
||||
package = (pkgs.my.catppuccin-sddm-corners.override {
|
||||
config.General = {
|
||||
Background = ../../../../assets/lockscreen.png;
|
||||
Font = config.modules.desktop.fonts.fonts.sansSerif.family;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
editor = {
|
||||
vscode = {
|
||||
colorTheme = {
|
||||
name = "Catppuccin Mocha";
|
||||
extension = (pkgs.vscode-extensions.catppuccin.catppuccin-vsc.override {
|
||||
accent = accent;
|
||||
boldKeywords = false;
|
||||
italicComments = false;
|
||||
italicKeywords = false;
|
||||
extraBordersEnabled = false;
|
||||
workbenchMode = "flat";
|
||||
bracketMode = "rainbow";
|
||||
});
|
||||
};
|
||||
iconTheme = {
|
||||
name = "material-icon-theme";
|
||||
extension = pkgs.vscode-extensions.pkief.material-icon-theme;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hyprland = "${inputs.hyprland-catppuccin}/themes/${variant}.conf";
|
||||
};
|
||||
};
|
||||
}
|
88
modules/desktop/themes/default.nix
Normal file
88
modules/desktop/themes/default.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
let
|
||||
cfg = config.modules.desktop.themes;
|
||||
in {
|
||||
options.modules.desktop.themes = with types; {
|
||||
active = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Name of the theme to apply; see modules/desktop/themes for a list of valid options";
|
||||
};
|
||||
|
||||
dark = mkOpt bool false;
|
||||
|
||||
gtkTheme = {
|
||||
name = mkOpt str "";
|
||||
package = mkPackageOption pkgs "gtk" {};
|
||||
};
|
||||
iconTheme = {
|
||||
name = mkOpt str "";
|
||||
package = mkPackageOption pkgs "icon" {};
|
||||
};
|
||||
cursorTheme = {
|
||||
name = mkOpt str "";
|
||||
package = mkPackageOption pkgs "cursor" {};
|
||||
};
|
||||
sddmTheme = {
|
||||
name = mkOpt str "";
|
||||
package = mkPackageOption pkgs "sddm" {};
|
||||
};
|
||||
|
||||
editor = {
|
||||
vscode = {
|
||||
colorTheme = {
|
||||
name = mkOpt str "";
|
||||
extension = mkPackageOption pkgs "extension" {};
|
||||
};
|
||||
iconTheme = {
|
||||
name = mkOpt str "";
|
||||
extension = mkPackageOption pkgs "extension" {};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hyprland = mkOpt (nullOr str) null;
|
||||
};
|
||||
|
||||
config = mkIf (cfg.active != null) {
|
||||
programs.dconf.enable = true;
|
||||
|
||||
hm.dconf = {
|
||||
enable = true;
|
||||
settings."org/gnome/desktop/interface".color-scheme = mkIf cfg.dark "prefer-dark";
|
||||
settings."org/gnome/desktop/interface".gtk-theme = cfg.gtkTheme.name;
|
||||
settings."org/gnome/desktop/interface".icon-theme = cfg.iconTheme.name;
|
||||
settings."org/gnome/desktop/interface".cursor-theme = cfg.cursorTheme.name;
|
||||
|
||||
settings."org/gnome/shell/extensions/user-theme".name = cfg.gtkTheme.name;
|
||||
};
|
||||
|
||||
hm.gtk = {
|
||||
enable = true;
|
||||
cursorTheme = cfg.cursorTheme;
|
||||
iconTheme = cfg.iconTheme;
|
||||
theme = cfg.gtkTheme;
|
||||
};
|
||||
|
||||
hm.services.dunst.iconTheme = {
|
||||
name = cfg.iconTheme.name;
|
||||
package = cfg.iconTheme.package;
|
||||
};
|
||||
|
||||
hm.programs.vscode = {
|
||||
extensions = [
|
||||
cfg.editor.vscode.colorTheme.extension
|
||||
cfg.editor.vscode.iconTheme.extension
|
||||
];
|
||||
userSettings = {
|
||||
"workbench.colorTheme" = cfg.editor.vscode.colorTheme.name;
|
||||
"workbench.iconTheme" = cfg.editor.vscode.iconTheme.name;
|
||||
};
|
||||
};
|
||||
|
||||
hm.wayland.windowManager.hyprland.settings.source = mkIf (cfg.hyprland != null) [ cfg.hyprland ];
|
||||
};
|
||||
}
|
199
modules/desktop/waybar.nix
Normal file
199
modules/desktop/waybar.nix
Normal file
|
@ -0,0 +1,199 @@
|
|||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.waybar;
|
||||
in {
|
||||
options.modules.desktop.waybar = {
|
||||
enable = mkEnableOption "Enable Waybar, a lightweight desktop environment based on GTK+";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.wayland.windowManager.hyprland.settings.exec-once = [ "${lib.getExe pkgs.waybar}" ];
|
||||
hm.programs.waybar = {
|
||||
enable = true;
|
||||
style = builtins.concatStringsSep "\n" [
|
||||
"@import \"${inputs.waybar-catppuccin}/themes/mocha.css\";"
|
||||
(lib.readFile ../../config/waybar.css)
|
||||
];
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
#spacing = 4;
|
||||
height = 30;
|
||||
margin-top = 6;
|
||||
margin-left = 6;
|
||||
margin-right = 6;
|
||||
margin-bottom = 0;
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"group/status"
|
||||
"tray"
|
||||
"group/power"
|
||||
];
|
||||
|
||||
"group/status" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
#"network"
|
||||
];
|
||||
};
|
||||
"group/power" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 200;
|
||||
children-class = "not-power";
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"custom/power"
|
||||
"custom/lock"
|
||||
"custom/reboot"
|
||||
"custom/quit"
|
||||
];
|
||||
};
|
||||
"custom/quit" = {
|
||||
format = "";
|
||||
tooltip = true;
|
||||
tooltip-format = "Exit Hyprland";
|
||||
on-click = "${config.modules.desktop.hyprland.package}/bin/hyprctl dispatch exit";
|
||||
};
|
||||
"custom/lock" = {
|
||||
format = "";
|
||||
tooltip = true;
|
||||
tooltip-format = "Lock the system";
|
||||
on-click = "${lib.getExe config.modules.desktop.hyprlock.package}";
|
||||
};
|
||||
"custom/reboot" = {
|
||||
format = "↻";
|
||||
tooltip = true;
|
||||
tooltip-format = "Reboot";
|
||||
on-click = "reboot";
|
||||
};
|
||||
"custom/power" = {
|
||||
format = "⏻";
|
||||
tooltip = true;
|
||||
tooltip-format = "Power off";
|
||||
on-click = "shutdown now";
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
urgent = "";
|
||||
default = "•";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"1" = [];
|
||||
"2" = [];
|
||||
"3" = [];
|
||||
"4" = [];
|
||||
};
|
||||
};
|
||||
"hyprland/window" = {
|
||||
format = "{}";
|
||||
icon = true;
|
||||
icon-size = 16;
|
||||
rewrite = {
|
||||
"(.*) - Mozilla Firefox" = "$1";
|
||||
"(.*) - Visual Studio Code" = "$1";
|
||||
#"(.*\\.nix\\s.*)" = "";
|
||||
"(\\S+\\.js\\s.*)" = " $1";
|
||||
"(\\S+\\.ts\\s.*)" = " $1";
|
||||
"(\\S+\\.go\\s.*)" = " $1";
|
||||
"(\\S+\\.lua\\s.*)" = " $1";
|
||||
"(\\S+\\.java\\s.*)" = " $1";
|
||||
"(\\S+\\.rb\\s.*)" = " $1";
|
||||
"(\\S+\\.php\\s.*)" = " $1";
|
||||
"(\\S+\\.jsonc?\\s.*)" = " $1";
|
||||
"(\\S+\\.md\\s.*)" = " $1";
|
||||
"(\\S+\\.txt\\s.*)" = " $1";
|
||||
"(\\S+\\.cs\\s.*)" = " $1";
|
||||
"(\\S+\\.c\\s.*)" = " $1";
|
||||
"(\\S+\\.cpp\\s.*)" = " $1";
|
||||
"(\\S+\\.hs\\s.*)" = " $1";
|
||||
".*Discord | (.*) | .*" = "$1 - ArmCord";
|
||||
#"(.*) - ArmCord" = "$1";
|
||||
};
|
||||
separate-outputs = true;
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format-bluetooth = "{icon} {volume}%";
|
||||
format-muted = "婢 {volume}%";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
scroll-step = 1;
|
||||
on-click = "${lib.getExe pkgs.pavucontrol}";
|
||||
ignored-sinks = ["Easy Effects Sink"];
|
||||
};
|
||||
cpu = {
|
||||
interval = 4;
|
||||
format = " {usage}%";
|
||||
};
|
||||
memory = {
|
||||
interval = 4;
|
||||
format = " {percentage}%";
|
||||
tooltip-format = "{used:0.1f}GiB/{avail:0.1f}GiB used\n{swapUsed:0.1f}GiB/{swapAvail:0.1f}GiB swap";
|
||||
};
|
||||
"network" = {
|
||||
format = "";
|
||||
format-ethernet = "";
|
||||
format-wifi = " {signalStrength}%";
|
||||
format-disconnected = "";
|
||||
tooltip-format = "{ifname} via {gwaddr}";
|
||||
tooltip-format-wifi = "connected to {essid}";
|
||||
tooltip-format-ethernet = "{ifname}";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
};
|
||||
"clock" = {
|
||||
format = "{:%H:%M}";
|
||||
format-alt = "{:%a %b %d %R}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
23
modules/hardware/pipewire.nix
Normal file
23
modules/hardware/pipewire.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.hardware.pipewire;
|
||||
in {
|
||||
options.modules.hardware.pipewire = {
|
||||
enable = mkEnableOption "Enable pipewire, a modern audio server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
51
modules/software/dev/git.nix
Normal file
51
modules/software/dev/git.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.dev.git;
|
||||
in {
|
||||
options.modules.software.dev.git = {
|
||||
enable = mkEnableOption "Enable git. You know what git is";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
|
||||
userName = ''Reid "reidlab"'';
|
||||
userEmail = "reidlab325@gmail.com";
|
||||
|
||||
ignores = [
|
||||
# OS related
|
||||
".DS_Store?"
|
||||
".DS_Store"
|
||||
".CFUserTextEncoding"
|
||||
".Trash"
|
||||
".Xauthority"
|
||||
"thumbs.db"
|
||||
"Thumbs.db"
|
||||
"Icon?"
|
||||
];
|
||||
|
||||
aliases = {
|
||||
ranked-authors = "!git authors | sort | uniq -c | sort -n";
|
||||
emails = ''
|
||||
!git log --format="%aE" | sort -u
|
||||
'';
|
||||
email-domains = ''
|
||||
!git log --format="%aE" | awk -F'@' '{print $2}' | sort -u
|
||||
'';
|
||||
graph = ''
|
||||
log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
pull.rebase = true;
|
||||
init.defaltBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
43
modules/software/distractions/discord.nix
Normal file
43
modules/software/distractions/discord.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.distractions.discord;
|
||||
in {
|
||||
options.modules.software.distractions.discord = {
|
||||
enable = mkEnableOption "Enable discord, a social messaging app";
|
||||
armcord = mkEnableOption "Use armcord, an alternative discord client.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf (!cfg.armcord) {
|
||||
user.packages = let
|
||||
flags =
|
||||
[
|
||||
"--flag-switches-begin"
|
||||
"--flag-switches-end"
|
||||
"--disable-gpu-memory-buffer-video-frames"
|
||||
"--enable-accelerated-mjpeg-decode"
|
||||
"--enable-accelerated-video"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-native-gpu-memory-buffers"
|
||||
"--enable-zero-copy"
|
||||
"--ignore-gpu-blocklist"
|
||||
"--disable-features=UseOzonePlatform"
|
||||
"--enable-features=VaapiVideoDecoder"
|
||||
];
|
||||
discord = (pkgs.discord-canary.override {
|
||||
withOpenASAR = true;
|
||||
withVencord = true;
|
||||
}).overrideAttrs (old: {
|
||||
preInstall = ''
|
||||
gappsWrapperArgs=+("--add-flags" "${concatStringsSep " " flags}")
|
||||
'';
|
||||
});
|
||||
in [ discord ];
|
||||
})
|
||||
(mkIf cfg.armcord {
|
||||
user.packages = with pkgs; [ armcord ];
|
||||
})
|
||||
]);
|
||||
}
|
64
modules/software/editors/micro.nix
Normal file
64
modules/software/editors/micro.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.editors.micro;
|
||||
in {
|
||||
options.modules.software.editors.micro = {
|
||||
enable = mkEnableOption "Enable micro, a simple CLI code editor";
|
||||
};
|
||||
|
||||
config = let
|
||||
schemeName = "generated";
|
||||
in mkIf cfg.enable {
|
||||
environment.variables.EDITOR = "micro";
|
||||
|
||||
hm.programs.micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autosu = true;
|
||||
clipboard = "external";
|
||||
savecursor = true;
|
||||
scrollbar = true;
|
||||
tabsize = 2;
|
||||
tabstospaces = true;
|
||||
|
||||
colorScheme = schemeName;
|
||||
};
|
||||
};
|
||||
|
||||
hm.home.file.".config/micro/colorschemes/${schemeName}.micro".text = with config.colorScheme.palette; ''
|
||||
color-link default "#${base05},#${base00}"
|
||||
color-link comment "#${base03},#${base00}"
|
||||
color-link identifier "#${base0D},#${base00}"
|
||||
color-link constant "#${base0E},#${base00}"
|
||||
color-link constant.string "#E6DB74,#${base00}"
|
||||
color-link constant.string.char "#BDE6AD,#${base00}"
|
||||
color-link statement "#${base08},#${base00}"
|
||||
color-link symbol.operator "#${base08},#${base00}"
|
||||
color-link preproc "#CB4B16,#${base00}"
|
||||
color-link type "#${base0D},#${base00}"
|
||||
color-link special "#${base0B},#${base00}"
|
||||
color-link underlined "#D33682,#${base00}"
|
||||
color-link error "bold #CB4B16,#${base00}"
|
||||
color-link todo "bold #D33682,#${base00}"
|
||||
color-link hlsearch "#${base00},#E6DB74"
|
||||
color-link statusline "#${base00},#${base05}"
|
||||
color-link tabbar "#${base00},#${base05}"
|
||||
color-link indent-char "#505050,#${base00}"
|
||||
color-link line-number "#AAAAAA,#${base01}"
|
||||
color-link current-line-number "#AAAAAA,#${base00}"
|
||||
color-link diff-added "#00AF00"
|
||||
color-link diff-modified "#FFAF00"
|
||||
color-link diff-deleted "#D70000"
|
||||
color-link gutter-error "#CB4B16,#${base00}"
|
||||
color-link gutter-warning "#E6DB74,#${base00}"
|
||||
color-link cursor-line "#${base01}"
|
||||
color-link color-column "#${base01}"
|
||||
#No extended types; Plain brackets.
|
||||
color-link type.extended "default"
|
||||
#color-link symbol.brackets "default"
|
||||
color-link symbol.tag "#${base0E},#${base00}"
|
||||
'';
|
||||
};
|
||||
}
|
59
modules/software/editors/vscode.nix
Normal file
59
modules/software/editors/vscode.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.editors.vscode;
|
||||
in {
|
||||
options.modules.software.editors.vscode = {
|
||||
enable = mkEnableOption "Enable visual studio code, microsoft's gui code editor + IDE";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.programs.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
oderwat.indent-rainbow
|
||||
usernamehw.errorlens
|
||||
ms-vsliveshare.vsliveshare
|
||||
];
|
||||
mutableExtensionsDir = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
enableUpdateCheck = false;
|
||||
userSettings = with config.modules.desktop.fonts.fonts; {
|
||||
"editor.fontFamily" = "'${monospace.family}', monospace";
|
||||
"editor.fontSize" = monospace.size + 3; # needed??
|
||||
|
||||
"terminal.integrated.fontFamily" = "\"${monospace.family}\"";
|
||||
"terminal.integrated.fontSize" = monospace.size + 3; # needed??
|
||||
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
|
||||
"editor.tabSize" = 4;
|
||||
"editor.cursorSmoothCaretAnimation" = "on";
|
||||
|
||||
"window.dialogStyle" = "custom";
|
||||
"window.titleBarStyle" = "custom";
|
||||
|
||||
"workbench.tips.enabled" = false;
|
||||
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${lib.getExe pkgs.nil}";
|
||||
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = true;
|
||||
|
||||
"editor.smoothScrolling" = true;
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.wrappingStrategy" = "advanced";
|
||||
"editor.fontWeight" = "normal";
|
||||
"editor.semanticHighlighting.enabled" = true;
|
||||
|
||||
# prevent vscode from modifying the terminal colors
|
||||
"terminal.integrated.minimumContrastRatio" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
30
modules/software/system/fish.nix
Normal file
30
modules/software/system/fish.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.system.fish;
|
||||
nix-colors-lib = inputs.nix-colors.lib.contrib { inherit pkgs; };
|
||||
in {
|
||||
options.modules.software.system.fish = {
|
||||
enable = mkEnableOption "Enable fish, the friendly interpreted shell";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
user.packages = [ pkgs.grc ];
|
||||
|
||||
environment.systemPackages = with pkgs.fishPlugins; [ fzf-fish tide ];
|
||||
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
programs.fish.enable = true;
|
||||
hm.programs.fish = let
|
||||
colorScript = nix-colors-lib.shellThemeFromScheme { scheme = config.colorScheme; };
|
||||
in {
|
||||
enable = true;
|
||||
plugins = [ { name = "grc"; src = pkgs.fishPlugins.grc.src; } ];
|
||||
interactiveShellInit = ''
|
||||
sh ${colorScript}
|
||||
'';
|
||||
# TODO: add fish greeting?
|
||||
};
|
||||
};
|
||||
}
|
42
modules/software/system/wezterm.nix
Normal file
42
modules/software/system/wezterm.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.software.system.wezterm;
|
||||
in {
|
||||
options.modules.software.system.wezterm = {
|
||||
enable = mkEnableOption "Enable wezterm, a blazingly fast terminal emulator";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.variables.TERM = "wezterm";
|
||||
|
||||
hm.programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig = let
|
||||
fonts = config.modules.desktop.fonts.fonts;
|
||||
in ''
|
||||
local wezterm = require 'wezterm'
|
||||
|
||||
local config = {}
|
||||
|
||||
config.font = wezterm.font '${fonts.monospaceBitmap.family}'
|
||||
config.font_size = ${toString fonts.monospaceBitmap.size}
|
||||
config.freetype_load_flags = 'MONOCHROME'
|
||||
config.enable_wayland = false
|
||||
config.color_scheme = 'Catppuccin Mocha'
|
||||
config.use_fancy_tab_bar = false
|
||||
config.use_resize_increments = true
|
||||
config.initial_cols = 120
|
||||
config.initial_rows = 40
|
||||
|
||||
config.window_frame = {
|
||||
font = wezterm.font '${fonts.sans.family}',
|
||||
font_size = ${toString fonts.sans.size}
|
||||
}
|
||||
|
||||
return config
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,7 +10,7 @@ with lib.my;
|
|||
config = {
|
||||
user = rec {
|
||||
name = "reidlab";
|
||||
description = "awesome guy";
|
||||
description = "reid";
|
||||
extraGroups = ["wheel" "input" "audio" "video" "storage"];
|
||||
isNormalUser = true;
|
||||
home = "/home/${name}";
|
||||
|
@ -22,8 +22,16 @@ with lib.my;
|
|||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
||||
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
hm.home.username = config.user.name;
|
||||
hm.home.homeDirectory = lib.mkForce config.user.home;
|
||||
|
||||
nix.settings = let
|
||||
users = ["root" config.user.name];
|
||||
in {
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue