From d51e338b1d232021163deebea1cd046dc5142a88 Mon Sep 17 00:00:00 2001 From: serenity-F Date: Tue, 22 Sep 2026 17:32:27 +1000 Subject: [PATCH] chore: tidying formatting and comments --- modules/features/desktop/default.nix | 166 ++++---- modules/features/desktop/niri.nix | 469 ++++++++++++----------- modules/features/desktop/noctalia.nix | 1 + modules/features/desktop/wofi.nix | 96 ++--- modules/features/programs/gaming.nix | 6 +- modules/features/programs/multimedia.nix | 84 ++-- modules/features/programs/music.nix | 70 ++-- modules/features/terminal/btop.nix | 36 +- modules/features/terminal/default.nix | 46 ++- modules/features/terminal/fastfetch.nix | 41 +- modules/features/terminal/fish.nix | 127 +++--- modules/features/terminal/git.nix | 67 ++-- modules/features/terminal/helix.nix | 15 +- modules/features/terminal/kitty.nix | 120 +++--- modules/features/terminal/yazi.nix | 58 +-- modules/hosts/hades/configuration.nix | 1 + modules/hosts/hades/hardware.nix | 1 + modules/system/core-packages.nix | 231 +++++------ modules/system/core.nix | 2 + modules/system/flake-parts.nix | 4 +- 20 files changed, 854 insertions(+), 787 deletions(-) diff --git a/modules/features/desktop/default.nix b/modules/features/desktop/default.nix index 82f5bfb..91a33d0 100644 --- a/modules/features/desktop/default.nix +++ b/modules/features/desktop/default.nix @@ -2,100 +2,104 @@ { - # desktop supermodule - flake.nixosModules.desktop = { + # desktop supermodule declaration + flake.nixosModules.desktop = - # modules to include - imports = [ + { ... }: - # session management - #self.nixosModules.${greeter} + { - # window manager - self.nixosModules.niri + # modules to include + imports = [ - # application launcher - self.nixosModules.wofi + # session management + #self.nixosModules.${greeter} - # desktop shell/status bar - self.nixosModules.noctalia + # window manager + self.nixosModules.niri - # theme management - #self.nixosModules.stylix + # application launcher + self.nixosModules.wofi - # for home manager functionality - inputs.home-manager.nixosModules.home-manager + # desktop shell/status bar + self.nixosModules.noctalia - ]; + # theme management + #self.nixosModules.stylix + + # for home manager functionality + inputs.home-manager.nixosModules.home-manager - # Boot/GRUB options - boot = { - #bootspec.enable = true; - consoleLogLevel = 3; - initrd = { - verbose = false; - systemd = { - enable = true; - }; - }; - kernelParams = [ - # grub kernel parameters, set to prevent excessive output on boot - #"vga=current" # use current video adapater - #"splash" # unsure ? - "quiet" # quiet log level - "loglevel=3" # minimal output on boot - #"udev.log_priority=3" # more minimising of output on boot - #"rd.systemd.show_status=false" # unsure ? - #"rd.udev.log_level=0" # more minimising of output on boot - #"boot.shell_on_fail" # reboots to basic uefi shell on boot failure - #"i915.fastboot=1" # unsure ? - #"plymouth.debug" # I NEED ANSWERS - #"plymouth.use-simpledrm" # tweak to allow plymouth animations to run smoother - #"plymouth.ignore-serial-consoles" # unsure ? ]; - loader = { - timeout = 5; # 5 second timeout to default selection - #grub = { - #splashImage = null; # hides splashimage - #timeoutStyle = "hidden"; # hides timeout - #}; - }; - plymouth = { - # enables plymouth boot animations - enable = false; - extraConfig = "ShowDelay=0"; - #theme = "sygil-plymouth"; - #themePackages = sygil-plymouth; - #themePackages = with pkgs; [ - #(adi1090x-plymouth-themes.override { - #selected_themes = [ "circle" ]; - #}) - #]; - }; - }; - # I put fonts here because i didn't know where tf else to put them lol - # duplicate to home-manager config ? - fonts = { - packages = - with pkgs; - [ - spleen - terminus_font - terminus_font_ttf - nerd-fonts.symbols-only - ] - ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); - fontDir.enable = true; - fontconfig = { - defaultFonts = { - serif = [ "spleen-32x64" ]; - sansSerif = [ "spleen-32x64" ]; - monospace = [ "TerminusTTF" ]; + # Boot/GRUB options + boot = { + #bootspec.enable = true; + consoleLogLevel = 3; + initrd = { + verbose = false; + systemd = { + enable = true; + }; + }; + kernelParams = [ + # grub kernel parameters, set to prevent excessive output on boot + #"vga=current" # use current video adapater + #"splash" # unsure ? + "quiet" # quiet log level + "loglevel=3" # minimal output on boot + #"udev.log_priority=3" # more minimising of output on boot + #"rd.systemd.show_status=false" # unsure ? + #"rd.udev.log_level=0" # more minimising of output on boot + #"boot.shell_on_fail" # reboots to basic uefi shell on boot failure + #"i915.fastboot=1" # unsure ? + #"plymouth.debug" # I NEED ANSWERS + #"plymouth.use-simpledrm" # tweak to allow plymouth animations to run smoother + #"plymouth.ignore-serial-consoles" # unsure ? + ]; + loader = { + timeout = 5; # 5 second timeout to default selection + #grub = { + #splashImage = null; # hides splashimage + #timeoutStyle = "hidden"; # hides timeout + #}; + }; + plymouth = { + # enables plymouth boot animations + enable = false; + extraConfig = "ShowDelay=0"; + #theme = "sygil-plymouth"; + #themePackages = sygil-plymouth; + #themePackages = with pkgs; [ + #(adi1090x-plymouth-themes.override { + #selected_themes = [ "circle" ]; + #}) + #]; }; }; - }; - }; + # I put fonts here because i didn't know where tf else to put them lol + # duplicate to home-manager config ? + fonts = { + packages = + with pkgs; + [ + spleen + terminus_font + terminus_font_ttf + nerd-fonts.symbols-only + ] + ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); + fontDir.enable = true; + fontconfig = { + defaultFonts = { + serif = [ "spleen-32x64" ]; + sansSerif = [ "spleen-32x64" ]; + monospace = [ "TerminusTTF" ]; + }; + }; + }; + + }; } diff --git a/modules/features/desktop/niri.nix b/modules/features/desktop/niri.nix index 7f8002b..97f11d1 100644 --- a/modules/features/desktop/niri.nix +++ b/modules/features/desktop/niri.nix @@ -1,12 +1,11 @@ -{ self, inputs, ... }: { +{ self, inputs, ... }: + +{ # niri window manager module declaration flake.nixosModules.niri = - { - pkgs, - lib, - ... - }: + + { pkgs, lib, ... }: { @@ -43,262 +42,268 @@ }; # niri personalisation - home-manager.users.serenity = { config, ... }: { + home-manager.users.serenity = - # for niri home manager module - imports = [ inputs.niri.homeModules.niri ]; + { config, ... }: - programs.niri = { - # enables niri within home manager - enable = true; - # use latest nixpkgs version - package = with pkgs; niri; - settings = { + { - # xwayland implementation - xwayland-satellite = { - enable = true; - # use niri-stable matching version - path = lib.getExe pkgs.xwayland-satellite; - }; + # for niri home manager module + imports = [ inputs.niri.homeModules.niri ]; - # environment variables - environment = { - # display - DISPLAY = ":0"; - WLR_RENDERER = "vulkan"; - NIXOS_OZONE_WL = "1"; - SDL_VIDEODRIVER = "wayland"; - # xdg variables - XDG_SESSION_TYPE = "wayland"; - XDG_CURRENT_DESKTOP = "niri"; - # qt variables - QT_QPA_PLATFORM = "wayland;xcb"; - QT_QPA_PLATFORMTHEME = "qt5ct"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; - # native wayland firefox - MOZ_ENABLE_WAYLAND = "1"; - }; + programs.niri = { + # enables niri within home manager + enable = true; + # use latest nixpkgs version + package = with pkgs; niri; + settings = { - # display configuration - outputs."DP-4" = { - # display scaling - scale = 1.2; - # window focus? - focus-at-startup = true; - # resolution config - variable-refresh-rate = true; - mode = { - width = 3440; - height = 1440; - refresh = 74.924; - }; - # grid position for this display - position = { - x = 0; - y = 0; - }; - }; - - # input settings - keybinds further below - input = { - # window focus - focus-follows-mouse = { + # xwayland implementation + xwayland-satellite = { enable = true; - max-scroll-amount = "0%"; + # use niri-stable matching version + path = lib.getExe pkgs.xwayland-satellite; }; - # keyboard and pointing devices - keyboard.numlock = true; - trackpoint = { - enable = true; - }; - touchpad = { - enable = true; - natural-scroll = true; - }; - mouse = { - enable = true; - natural-scroll = false; - accel-speed = 1.0; - accel-profile = "flat"; - }; - }; - # workspaces - workspaces."01sys" = { - name = "System"; - open-on-output = "DP-4"; - }; - - # autostart - spawn-at-startup = [ - { - # necessary for xwayland functionality - argv = [ "xwayland-satellite" ]; - } - { - # spawns the desktop shell - argv = [ "noctalia" ]; - } - { - # spawns a terminal running btop - argv = [ - "kitty" - "btop" - ]; - } - ]; - - # visual settings - prefer-no-csd = true; - overview = { - workspace-shadow.enable = false; - }; - animations = { - enable = true; - slowdown = 1.25; - }; - layout = { - # remove backdrop colour - background-color = "transparent"; - center-focused-column = "never"; - # window|window gaps - gaps = 8; - #window|screen edge gaps - struts = { - left = 2; - right = 2; - top = 2; - bottom = 4; + # environment variables + environment = { + # display + DISPLAY = ":0"; + WLR_RENDERER = "vulkan"; + NIXOS_OZONE_WL = "1"; + SDL_VIDEODRIVER = "wayland"; + # xdg variables + XDG_SESSION_TYPE = "wayland"; + XDG_CURRENT_DESKTOP = "niri"; + # qt variables + QT_QPA_PLATFORM = "wayland;xcb"; + QT_QPA_PLATFORMTHEME = "qt5ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + # native wayland firefox + MOZ_ENABLE_WAYLAND = "1"; }; - # using focus ring instead of a border - border.enable = false; - # highlights the focused window bounds - focus-ring = { - enable = true; - width = 2; - #focus ring colour - active.gradient = { - angle = 45; - from = "#00cdff"; - to = "#80c8ff"; + + # display configuration + outputs."DP-4" = { + # display scaling + scale = 1.2; + # window focus? + focus-at-startup = true; + # resolution config + variable-refresh-rate = true; + mode = { + width = 3440; + height = 1440; + refresh = 74.924; + }; + # grid position for this display + position = { + x = 0; + y = 0; }; }; - # used when increasing window size in steps - preset-column-widths = [ + + # input settings - keybinds further below + input = { + # window focus + focus-follows-mouse = { + enable = true; + max-scroll-amount = "0%"; + }; + # keyboard and pointing devices + keyboard.numlock = true; + trackpoint = { + enable = true; + }; + touchpad = { + enable = true; + natural-scroll = true; + }; + mouse = { + enable = true; + natural-scroll = false; + accel-speed = 1.0; + accel-profile = "flat"; + }; + }; + + # workspaces + workspaces."01sys" = { + name = "System"; + open-on-output = "DP-4"; + }; + + # autostart + spawn-at-startup = [ { - proportion = 0.33; + # necessary for xwayland functionality + argv = [ "xwayland-satellite" ]; } { - proportion = 0.5; + # spawns the desktop shell + argv = [ "noctalia" ]; } { - proportion = 0.67; - } - { - proportion = 1.0; + # spawns a terminal running btop + argv = [ + "kitty" + "btop" + ]; } ]; - }; - - layer-rules = [ - - # pushes wallpaper set by noctalia to lowest layer - { - matches = [ { namespace = "^noctalia-wallpaper*"; } ]; - place-within-backdrop = true; - } - - ]; - - window-rules = [ - - # sets corner radius for all windows - { - clip-to-geometry = true; - draw-border-with-background = false; - geometry-corner-radius = - let - radius = 16.0; - in - { - bottom-left = radius; - bottom-right = radius; - top-left = radius; - top-right = radius; - }; - } - - # sets sizing and position of floating windows - { - matches = [ { is-floating = true; } ]; - opacity = 0.95; - shadow.enable = true; - max-width = 1720; - max-height = 720; - default-floating-position = { - relative-to = "top-left"; - x = 1720; - y = 720; + # visual settings + prefer-no-csd = true; + overview = { + workspace-shadow.enable = false; + }; + animations = { + enable = true; + slowdown = 1.25; + }; + layout = { + # remove backdrop colour + background-color = "transparent"; + center-focused-column = "never"; + # window|window gaps + gaps = 8; + #window|screen edge gaps + struts = { + left = 2; + right = 2; + top = 2; + bottom = 4; }; - } - - # rules for specific windows - { - # kitty opacity - matches = [ { app-id = "kitty"; } ]; - opacity = 0.95; - } - { - # startup btop spawns on specific workspace - matches = [ + # using focus ring instead of a border + border.enable = false; + # highlights the focused window bounds + focus-ring = { + enable = true; + width = 2; + #focus ring colour + active.gradient = { + angle = 45; + from = "#00cdff"; + to = "#80c8ff"; + }; + }; + # used when increasing window size in steps + preset-column-widths = [ { - at-startup = true; - title = "btop"; + proportion = 0.33; + } + { + proportion = 0.5; + } + { + proportion = 0.67; + } + { + proportion = 1.0; } ]; - open-on-output = "DP-4"; - open-on-workspace = "System"; - open-maximized = true; - } - { - # calculator spawns floating - matches = [ { title = "calculator"; } ]; - open-floating = true; - open-focused = true; - } - ]; - - # keybinds - hotkey-overlay = { - hide-not-bound = true; - skip-at-startup = true; - }; - binds = with config.lib.niri.actions; { - #binds = { - - # debug and utility - "Mod+Shift+Slash".action = show-hotkey-overlay; # shows help - "Mod+Shift+Escape" = { - action = toggle-keyboard-shortcuts-inhibit; - allow-inhibiting = false; # ensures niri binds are read }; - "Mod+Shift+P".action = power-off-monitors; # turn displays off - "Ctrl+Alt+Delete".action = quit; # log out - # task management + layer-rules = [ - # terminal + # pushes wallpaper set by noctalia to lowest layer + { + matches = [ { namespace = "^noctalia-wallpaper*"; } ]; + place-within-backdrop = true; + } - # screen capture + ]; - # focus controls + window-rules = [ - # movement controls + # sets corner radius for all windows + { + clip-to-geometry = true; + draw-border-with-background = false; + geometry-corner-radius = + let + radius = 16.0; + in + { + bottom-left = radius; + bottom-right = radius; + top-left = radius; + top-right = radius; + }; + } - # size controls + # sets sizing and position of floating windows + { + matches = [ { is-floating = true; } ]; + opacity = 0.95; + shadow.enable = true; + max-width = 1720; + max-height = 720; + default-floating-position = { + relative-to = "top-left"; + x = 1720; + y = 720; + }; + } + + # rules for specific windows + { + # kitty opacity + matches = [ { app-id = "kitty"; } ]; + opacity = 0.95; + } + { + # startup btop spawns on specific workspace + matches = [ + { + at-startup = true; + title = "btop"; + } + ]; + open-on-output = "DP-4"; + open-on-workspace = "System"; + open-maximized = true; + } + { + # calculator spawns floating + matches = [ { title = "calculator"; } ]; + open-floating = true; + open-focused = true; + } + + ]; + + # keybinds + hotkey-overlay = { + hide-not-bound = true; + skip-at-startup = true; + }; + binds = with config.lib.niri.actions; { + #binds = { + + # debug and utility + "Mod+Shift+Slash".action = show-hotkey-overlay; # shows help + "Mod+Shift+Escape" = { + action = toggle-keyboard-shortcuts-inhibit; + allow-inhibiting = false; # ensures niri binds are read + }; + "Mod+Shift+P".action = power-off-monitors; # turn displays off + "Ctrl+Alt+Delete".action = quit; # log out + + # task management + + # terminal + + # screen capture + + # focus controls + + # movement controls + + # size controls + + }; }; @@ -306,8 +311,6 @@ }; - }; - }; } diff --git a/modules/features/desktop/noctalia.nix b/modules/features/desktop/noctalia.nix index 8553f90..8de348f 100644 --- a/modules/features/desktop/noctalia.nix +++ b/modules/features/desktop/noctalia.nix @@ -4,6 +4,7 @@ # noctalia shell module declaration flake.nixosModules.noctalia = + { pkgs, ... }: { diff --git a/modules/features/desktop/wofi.nix b/modules/features/desktop/wofi.nix index e61f1fd..28ffa92 100755 --- a/modules/features/desktop/wofi.nix +++ b/modules/features/desktop/wofi.nix @@ -1,55 +1,61 @@ -{ self, inputs, ... }: { +{ self, inputs, ... }: + +{ # wofi launcher module declaration - flake.nixosModules.wofi = { config, ... }: { + flake.nixosModules.wofi = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { config, ... }: - # home manager options - home-manager.users.serenity = { + { - # enables wofi - programs.wofi = { - enable = true; + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - # wofi settings - settings = { - term = "kitty"; - show = "drun"; - width = 500; - height = 300; - prompt = "Programs"; - normal_window = true; - key_exit = "Escape"; - key_expand = "Tab"; - layer = "top"; - gtk_dark = true; - orientation = "vertical"; - halign = "fill"; - line_wrap = "off"; - dynamic_lines = false; - allow_markup = true; - allow_images = true; - image_size = 24; - hide_scroll = true; - hide_search = false; - exec_search = false; - parse_search = false; - insensitive = true; - no_actions = true; - sort_order = "default"; - filter_rate = 100; - ## Steam not launching from wofi, but will launch in terminal - ## See: core/modules/gaming.nix - ## https://github.com/ValveSoftware/steam-for-linux/issues/9940 - disable_prime = false; + # home manager options + home-manager.users.serenity = { + + # enables wofi + programs.wofi = { + enable = true; + + # wofi settings + settings = { + term = "kitty"; + show = "drun"; + width = 500; + height = 300; + prompt = "Programs"; + normal_window = true; + key_exit = "Escape"; + key_expand = "Tab"; + layer = "top"; + gtk_dark = true; + orientation = "vertical"; + halign = "fill"; + line_wrap = "off"; + dynamic_lines = false; + allow_markup = true; + allow_images = true; + image_size = 24; + hide_scroll = true; + hide_search = false; + exec_search = false; + parse_search = false; + insensitive = true; + no_actions = true; + sort_order = "default"; + filter_rate = 100; + ## Steam not launching from wofi, but will launch in terminal + ## See: core/modules/gaming.nix + ## https://github.com/ValveSoftware/steam-for-linux/issues/9940 + disable_prime = false; + }; + + # NOT YET IMPLEMENTED + # wofi theme + #style = '' ''; }; - - # NOT YET IMPLEMENTED - # wofi theme - #style = '' ''; }; }; - }; } diff --git a/modules/features/programs/gaming.nix b/modules/features/programs/gaming.nix index 574afe9..1bff254 100644 --- a/modules/features/programs/gaming.nix +++ b/modules/features/programs/gaming.nix @@ -1,13 +1,17 @@ -{ inputs, ... }: { +{ inputs, ... }: + +{ # general gaming module declaration flake.nixosModules.gaming = + { inputs, pkgs, user, ... }: + { # 32bit graphics support diff --git a/modules/features/programs/multimedia.nix b/modules/features/programs/multimedia.nix index f2ebbe6..410fb8a 100644 --- a/modules/features/programs/multimedia.nix +++ b/modules/features/programs/multimedia.nix @@ -1,49 +1,55 @@ -{ inputs, ... }: { +{ inputs, ... }: + +{ # general multimedia module declaration - flake.nixosModules.multimedia = { pkgs, ... }: { + flake.nixosModules.multimedia = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, ... }: - home-manager.users.sernity = { + { - # alternative youtube frontend - programs.freetube = { - enable = true; - settings.defaultQuality = "1080"; + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; + + home-manager.users.sernity = { + + # alternative youtube frontend + programs.freetube = { + enable = true; + settings.defaultQuality = "1080"; + }; + + # other multimedia programs + home.packages = with pkgs; [ + + #browsing and fileshare + transmission_4-gtk # torrent client + nicotine-plus # p2p media sharing + carburetor # gui for tor proxying + chromium # google browser + #lagrange # gemini network browser + tractor # cli for tor proxying + tor # the onion router + + # messaging and social + vesktop + + # images + gimp # general image editing + #inkscape # vector image editing + + # video + vlc # video player + #shotcut # video editor + + # 3d creative + blender # 3d modelling software + orca-slicer # 3d printer slicer + + ]; }; - # other multimedia programs - home.packages = with pkgs; [ - - #browsing and fileshare - transmission_4-gtk # torrent client - nicotine-plus # p2p media sharing - carburetor # gui for tor proxying - chromium # google browser - #lagrange # gemini network browser - tractor # cli for tor proxying - tor # the onion router - - # messaging and social - vesktop - - # images - gimp # general image editing - #inkscape # vector image editing - - # video - vlc # video player - #shotcut # video editor - - # 3d creative - blender # 3d modelling software - orca-slicer # 3d printer slicer - - ]; }; - }; - } diff --git a/modules/features/programs/music.nix b/modules/features/programs/music.nix index 7b53bf2..139ae9e 100644 --- a/modules/features/programs/music.nix +++ b/modules/features/programs/music.nix @@ -1,54 +1,64 @@ -{ inputs, ... }: { +{ inputs, ... }: + +{ # general music module declaration - flake.nixosModules.music = { pkgs, ... }: { + flake.nixosModules.music = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, ... }: - home-manager.users.serenity = { + { - # audio effects - services.easyeffects.enable = true; + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - home.packages = with pkgs; [ + home-manager.users.serenity = { - # players - spotify # corporate garbage - strawberry # qt music player + # audio effects + services.easyeffects.enable = true; - # misc - audacity # audio editing - puddletag # file tagger + home.packages = with pkgs; [ - ]; + # players + spotify # corporate garbage + strawberry # qt music player + + # misc + audacity # audio editing + puddletag # file tagger + + ]; + + }; }; - }; - # music production module declaration - flake.nixosModules.music-production = { pkgs, musnix, ... }: { + flake.nixosModules.music-production = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, musnix, ... }: - boot = { }; + { - musnix.enable = true; + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - users.users.serenity.extraGroups = [ "audio" ]; - home-manager.users.serenity = { + boot = { }; - home.packages = with pkgs; [ + musnix.enable = true; - # daws - bespokesynth + users.users.serenity.extraGroups = [ "audio" ]; + home-manager.users.serenity = { - ]; + home.packages = with pkgs; [ + + # daws + bespokesynth + + ]; + + }; }; - }; - } diff --git a/modules/features/terminal/btop.nix b/modules/features/terminal/btop.nix index 889be9f..100ace4 100644 --- a/modules/features/terminal/btop.nix +++ b/modules/features/terminal/btop.nix @@ -3,25 +3,33 @@ { # defines a custom btop module - flake.nixosModules.btop = { ... }: { + flake.nixosModules.btop = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, ... }: - # home manager options - home-manager.users.serenity = { + { - programs = { + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - btop = { + environment.systemPackages = with pkgs; [ btop ]; - # enables btop - enable = true; + # home manager options + home-manager.users.serenity = { + + programs = { + + btop = { + + # enables btop + enable = true; + + # btop settings + settings = { + color_theme = "adapta"; + theme_background = false; + }; - # btop settings - settings = { - color_theme = "adapta"; - theme_background = false; }; }; @@ -30,6 +38,4 @@ }; - }; - } diff --git a/modules/features/terminal/default.nix b/modules/features/terminal/default.nix index 11c7239..f585c7f 100644 --- a/modules/features/terminal/default.nix +++ b/modules/features/terminal/default.nix @@ -3,37 +3,41 @@ { # terminal supermodule - flake.nixosModules.terminal = { pkgs, ... }: { + flake.nixosModules.terminal = - # list of modules to include - imports = [ + { pkgs, ... }: - # home manager - inputs.home-manager.nixosModules.home-manager + { - # terminal emulator - self.nixosModules.kitty + # list of modules to include + imports = [ - # text editor - self.nixosModules.helix + # home manager + inputs.home-manager.nixosModules.home-manager - # for showing off, lol - self.nixosModules.fetch + # terminal emulator + self.nixosModules.kitty - # file manager - self.nixosModules.yazi + # text editor + self.nixosModules.helix - # shell and prompt - self.nixosModules.fish + # for showing off, lol + self.nixosModules.fetch - # system monitor - self.nixosModules.btop + # file manager + self.nixosModules.yazi - # version control - self.nixosModules.git + # shell and prompt + self.nixosModules.fish - ]; + # system monitor + self.nixosModules.btop - }; + # version control + self.nixosModules.git + + ]; + + }; } diff --git a/modules/features/terminal/fastfetch.nix b/modules/features/terminal/fastfetch.nix index ab62bea..fce24e0 100644 --- a/modules/features/terminal/fastfetch.nix +++ b/modules/features/terminal/fastfetch.nix @@ -1,26 +1,33 @@ -{ self, inputs, ... }: { +{ self, inputs, ... }: - flake.nixosModules.fetch = { pkgs, ... }: { +{ - # needed for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + # fetch module declaration + flake.nixosModules.fetch = - # home manager options - home-manager.users.serenity = { + { pkgs, ... }: - # stuff in those screenshots on r/unixporn - home.packages = with pkgs; [ - peaclock # terminal clock program - cmatrix # terminal matrix rain - ]; + { + + # needed for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; + + # home manager options + home-manager.users.serenity = { + + # stuff in those screenshots on r/unixporn + home.packages = with pkgs; [ + peaclock # terminal clock program + cmatrix # terminal matrix rain + ]; + + # fetch options + programs.fastfetch = { + enable = true; + #settings = { }; + }; - # fetch options - programs.fastfetch = { - enable = true; - #settings = { }; }; }; - - }; } diff --git a/modules/features/terminal/fish.nix b/modules/features/terminal/fish.nix index 78074a7..bd65d4d 100644 --- a/modules/features/terminal/fish.nix +++ b/modules/features/terminal/fish.nix @@ -3,72 +3,87 @@ { # defines a custom fish module - flake.nixosModules.fish = { pkgs, ... }: { + flake.nixosModules.fish = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, ... }: - # home manager options - home-manager.users.serenity = { + { - # program settings - programs = { + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - # starship prompt - starship = { - enable = true; - }; + # adding shell packages to system, unsure if necessary + environment.systemPackages = with pkgs; [ + fish # primary shell + bash # backup shell + ]; - # fish shell - fish = { + # system level fish declaration + programs.fish.enable = true; - # enables fish - enable = true; + # home manager options + home-manager.users.serenity = { - # shell initialisation - loginShellInit = ""; - interactiveShellInit = ""; + # program settings + programs = { - # fish plugins - plugins = [ - - { - name = "done"; - src = pkgs.fishPlugins.done.src; - } - - { - name = "puffer"; - src = pkgs.fishPlugins.puffer.src; - } - - { - name = "autopair"; - src = pkgs.fishPlugins.autopair.src; - } - ]; - - # command aliases & abbreviations - shellAbbrs = { - nv = "hx"; - nvim = "hx"; - trc = "tree -C"; - }; - shellAliases = { - rbu = "sudo systemctl reboot --firmware-setup"; + # starship prompt + starship = { + enable = true; }; - # fish functions - functions = { + # fish shell + fish = { + + # enables fish + enable = true; + + # shell initialisation + loginShellInit = ""; + interactiveShellInit = ""; + + # fish plugins + plugins = [ + + { + name = "done"; + src = pkgs.fishPlugins.done.src; + } + + { + name = "puffer"; + src = pkgs.fishPlugins.puffer.src; + } + + { + name = "autopair"; + src = pkgs.fishPlugins.autopair.src; + } + ]; + + # command aliases & abbreviations + shellAbbrs = { + nv = "hx"; + nvim = "hx"; + trc = "tree -C"; + }; + shellAliases = { + rbu = "sudo systemctl reboot --firmware-setup"; + }; + + # fish functions + functions = { + + # foo + foo = '' + if bar + printf 'foo' + else + echo loser + end + ''; + }; - # foo - foo = '' - if bar - printf 'foo' - else - echo loser - end - ''; }; }; @@ -77,6 +92,4 @@ }; - }; - } diff --git a/modules/features/terminal/git.nix b/modules/features/terminal/git.nix index 49cbee2..73165b3 100644 --- a/modules/features/terminal/git.nix +++ b/modules/features/terminal/git.nix @@ -3,51 +3,58 @@ { # defines a custom git module - flake.nixosModules.git = { ... }: { + flake.nixosModules.git = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, ... }: - # home manager options - home-manager.users.serenity = { + { - programs = { + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - git = { + # system level git declaration + programs.git.enable = true; - # enables git - enable = true; + # home manager options + home-manager.users.serenity = { - # git settings - settings = { + programs = { - # user details - user = { - name = "serenity-F"; - email = "serenity-F@noreply.codeberg.org"; + git = { - #path to signing key - signingKey = "/home/serenity/.ssh/id_ed25519.pub"; + # enables git + enable = true; + + # git settings + settings = { + + # user details + user = { + name = "serenity-F"; + email = "serenity-F@noreply.codeberg.org"; + + #path to signing key + signingKey = "/home/serenity/.ssh/id_ed25519.pub"; + + }; + + # use ssh keys for auth + gpg.format = "ssh"; + commit.gpgSign = true; + + # use 'main' as default branch + init.defaultBranch = "main"; + + # automatically track remote branch + push.autoSetupRemote = true; }; - - # use ssh keys for auth - gpg.format = "ssh"; - commit.gpgSign = true; - - # use 'main' as default branch - init.defaultBranch = "main"; - - # automatically track remote branch - push.autoSetupRemote = true; - }; + }; }; }; - }; - } diff --git a/modules/features/terminal/helix.nix b/modules/features/terminal/helix.nix index f38a9f0..82718ff 100644 --- a/modules/features/terminal/helix.nix +++ b/modules/features/terminal/helix.nix @@ -4,6 +4,7 @@ # defines a custom helix module flake.nixosModules.helix = + { lib, pkgs, ... }: { @@ -11,14 +12,18 @@ # needed for home manager functionality imports = [ inputs.home-manager.nixosModules.home-manager ]; + # editor variables + environment.variables = { + EDITOR = "helix"; + VISUAL = "helix"; + SYSTEMD_EDITOR = "helix"; + }; + + environment.systemPackages = with pkgs; [ helix ]; + # home manager options home-manager.users.serenity = { - # redundancy, not sure this is needed? - home.packages = with pkgs; [ - helix - ]; - programs.helix = { # enables helix diff --git a/modules/features/terminal/kitty.nix b/modules/features/terminal/kitty.nix index 28adb89..1e65c7a 100644 --- a/modules/features/terminal/kitty.nix +++ b/modules/features/terminal/kitty.nix @@ -3,82 +3,86 @@ { # defines a custom kitty module - flake.nixosModules.kitty = { pkgs, ... }: { + flake.nixosModules.kitty = - # needed for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { pkgs, ... }: - # home manager options - home-manager.users.serenity = { + { - # packages to include - home.packages = with pkgs; [ - kitty - ]; + # needed for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - # cli fuzzy finder - programs.fzf = { - enable = true; - enableFishIntegration = true; - }; + # home manager options + home-manager.users.serenity = { - programs.kitty = { + # packages to include + home.packages = with pkgs; [ + kitty + ]; - # enables kitty - enable = true; - - # kitty integrations - enableGitIntegration = true; - shellIntegration.enableFishIntegration = true; - - # font settings - font = { - name = "spleen 32x64"; - size = 12; + # cli fuzzy finder + programs.fzf = { + enable = true; + enableFishIntegration = true; }; - # kitty settings - settings = { + programs.kitty = { - # sets fish as the default shell - shell = "${pkgs.fish}/bin/fish"; + # enables kitty + enable = true; - # misc. settings - url_style = "curly"; - disable_ligutures = "never"; - scrollback_lines = 10000; - enable_audio_bell = false; - update_check_interval = 0; + # kitty integrations + enableGitIntegration = true; + shellIntegration.enableFishIntegration = true; - # cursor settings - cursor_shape = "Underline"; - cursor_shape_unfocused = "unchanged"; - cursor_underline_thickness = 1; - cursor_trail = 1; + # font settings + font = { + name = "spleen 32x64"; + size = 12; + }; - # window settings - window_padding_width = 5; - remember_window_size = "no"; - initial_window_width = 1200; - initial_window_height = 600; - confirm_os_window_close = "0"; - hide_window_decorations = true; - show_window_resize_notification = false; + # kitty settings + settings = { - # Colours - # NOT YET IMPLEMENTED + # sets fish as the default shell + shell = "${pkgs.fish}/bin/fish"; + + # misc. settings + url_style = "curly"; + disable_ligutures = "never"; + scrollback_lines = 10000; + enable_audio_bell = false; + update_check_interval = 0; + + # cursor settings + cursor_shape = "Underline"; + cursor_shape_unfocused = "unchanged"; + cursor_underline_thickness = 1; + cursor_trail = 1; + + # window settings + window_padding_width = 5; + remember_window_size = "no"; + initial_window_width = 1200; + initial_window_height = 600; + confirm_os_window_close = "0"; + hide_window_decorations = true; + show_window_resize_notification = false; + + # Colours + # NOT YET IMPLEMENTED + + }; + + # misecellaneous kitty config + extraConfig = '' + window_padding_width 0 20 + ''; }; - # misecellaneous kitty config - extraConfig = '' - window_padding_width 0 20 - ''; - }; }; - }; - } diff --git a/modules/features/terminal/yazi.nix b/modules/features/terminal/yazi.nix index 759c4d3..5a44072 100644 --- a/modules/features/terminal/yazi.nix +++ b/modules/features/terminal/yazi.nix @@ -3,40 +3,46 @@ { # yazi module declaration - flake.nixosModules.yazi = { ... }: { + flake.nixosModules.yazi = - # for home manager functionality - imports = [ inputs.home-manager.nixosModules.home-manager ]; + { ... }: - # home manager options - home-manager.users.serenity = { + { - # yazi settings - programs = { + # for home manager functionality + imports = [ inputs.home-manager.nixosModules.home-manager ]; - yazi = { + # home manager options + home-manager.users.serenity = { - # enables yazi - enable = true; + # yazi settings + programs = { - # shell integration - shellWrapperName = "y"; - enableFishIntegration = true; + yazi = { - # yazi settings - settings = { - log.enabled = false; - mgr = { - show_hidden = true; - linemode = "none"; - sort_by = "mtime"; - sort_reverse = false; - sort_dir_first = true; + # enables yazi + enable = true; + + # shell integration + shellWrapperName = "y"; + enableFishIntegration = true; + + # yazi settings + settings = { + log.enabled = false; + mgr = { + show_hidden = true; + linemode = "none"; + sort_by = "mtime"; + sort_reverse = false; + sort_dir_first = true; + }; }; - }; - # NOT YET IMPLEMENTED - #theme = { }; + # NOT YET IMPLEMENTED + #theme = { }; + + }; }; @@ -44,6 +50,4 @@ }; - }; - } diff --git a/modules/hosts/hades/configuration.nix b/modules/hosts/hades/configuration.nix index 5bcee35..3f00128 100644 --- a/modules/hosts/hades/configuration.nix +++ b/modules/hosts/hades/configuration.nix @@ -4,6 +4,7 @@ # host module declaration flake.nixosModules.hades = + { pkgs, lib, ... }: { diff --git a/modules/hosts/hades/hardware.nix b/modules/hosts/hades/hardware.nix index 6efd955..9e58f5f 100644 --- a/modules/hosts/hades/hardware.nix +++ b/modules/hosts/hades/hardware.nix @@ -3,6 +3,7 @@ { # hardware module declaration flake.nixosModules.hadesHardware = + { config, lib, diff --git a/modules/system/core-packages.nix b/modules/system/core-packages.nix index ef03b6a..faaa9bc 100644 --- a/modules/system/core-packages.nix +++ b/modules/system/core-packages.nix @@ -1,139 +1,116 @@ -{ inputs, ... }: { +{ inputs, ... }: - # module declaration - flake.nixosModules.core-packages = { pkgs, ... }: { +{ - # nix settings - nix.settings = { + # system packages module declaration + flake.nixosModules.core-packages = - # for packages not in nixpkgs - #substituters = [ - #"name.here" - #]; + { pkgs, ... }: - # keys to sign aforementioned packages - #trusted-public-keys = [ - #"name.here" - #]; + { - }; - - # nixpkgs settings - nixpkgs = { - - # allows broken and ideologically impure packages - config = { - allowUnfree = true; - allowBroken = true; + # nix settings + nix.settings = { + # for packages not in nixpkgs + #substituters = [ + #"name.here" + #]; + # keys to sign aforementioned packages + #trusted-public-keys = [ + #"name.here" + #]; }; - # nixpkgs overlays - overlays = [ - #niri.overlays.niri + # nixpkgs settings + nixpkgs = { + # allows broken and ideologically impure packages + config = { + allowUnfree = true; + allowBroken = true; + }; + # nixpkgs overlays + overlays = [ + #niri.overlays.niri + ]; + }; + + # flatpak + services.flatpak = { + enable = true; + }; + + # core programs to include in base system + programs = { + # necessary terminal programs + gnupg.agent = { + enable = true; + enableSSHSupport = true; + #pinentryPackage = [ ]; + }; + # binary support + nix-ld.enable = true; + appimage = { + enable = true; + binfmt = true; + }; + }; + + # installs a stub elf loader to print an error + # message in the event that a user attempts + # to run an elf binary not compiled for nixos. + environment.stub-ld.enable = true; + + # core packages to include in base system + environment.systemPackages = with pkgs; [ + + # nix utilities + nvd + nix-tree + nix-init + nix-index + nix-prefetch + nix-output-monitor + + # filesystem + ddrutility + smartmontools + ntfs3g + exfatprogs + btrfs-progs + + # compat tools + steam-run + android-cli + android-tools + + # cli tools + fd + bc + zip + icu + doas + tldr + wget + curl + file + tree + unzip + gnupg + s-tui + udiskie + busybox + ripgrep + killall + usbutils + pciutils + moreutils + libsecret + git-crypt + undervolt + magic-wormhole + ]; }; - # services to include in base system - services = { - - # flatpak software - flatpak = { - enable = true; - }; - - }; - - # environment variables - environment.variables = { - EDITOR = "helix"; - VISUAL = "helix"; - SYSTEMD_EDITOR = "helix"; - }; - - # core programs to include in base system - programs = { - - # necessary terminal programs - git.enable = true; - fish.enable = true; - gnupg.agent = { - enable = true; - enableSSHSupport = true; - #pinentryPackage = [ ]; - }; - - # binary support - nix-ld.enable = true; - appimage = { - enable = true; - binfmt = true; - }; - - }; - - # installs a stub elf loader to print an error - # message in the event that a user attempts - # to run an elf binary not compiled for nixos. - environment.stub-ld.enable = true; - - # core packages to include in base system - environment.systemPackages = with pkgs; [ - - # nix utilities - nvd - nix-tree - nix-init - nix-index - nix-prefetch - nix-output-monitor - - # filesystem - ddrutility - smartmontools - ntfs3g - exfatprogs - btrfs-progs - - # shells - fish - bash - - # core tools - btop - helix - steam-run - android-cli - android-tools - magic-wormhole - - # cli tools - fd - bc - zip - icu - doas - tldr - wget - curl - file - tree - unzip - gnupg - s-tui - udiskie - busybox - ripgrep - killall - usbutils - pciutils - moreutils - libsecret - git-crypt - undervolt - - ]; - - }; - } diff --git a/modules/system/core.nix b/modules/system/core.nix index c95ea2a..dc022be 100644 --- a/modules/system/core.nix +++ b/modules/system/core.nix @@ -2,7 +2,9 @@ { + # common module declaration flake.nixosModules.core = + { lib, pkgs, ... }: { diff --git a/modules/system/flake-parts.nix b/modules/system/flake-parts.nix index 7b04ce8..02812e9 100644 --- a/modules/system/flake-parts.nix +++ b/modules/system/flake-parts.nix @@ -1,4 +1,6 @@ -{ inputs, ... }: { +{ inputs, ... }: + +{ # needed for home manager functionality imports = [ inputs.home-manager.flakeModules.home-manager ];