diff --git a/flake.nix b/flake.nix index f0f9528..3e01c72 100644 --- a/flake.nix +++ b/flake.nix @@ -1,59 +1,57 @@ { - description = "lololo"; - outputs = inputs @ { self, nixpkgs, ... }: - { - inherit (nixpkgs) lib; - nixosConfigurations = import ./hosts { inherit inputs; }; + description = "lololo"; + outputs = inputs@{ self, nixpkgs, ... }: { + inherit (nixpkgs) lib; + nixosConfigurations = import ./hosts { inherit inputs; }; + }; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + + hyprland-plugins = { + url = "github:hyprwm/hyprland-plugins"; + inputs.hyprland.follows = "hyprland"; }; - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - - hyprland-plugins = { - url = "github:hyprwm/hyprland-plugins"; - inputs.hyprland.follows = "hyprland"; - }; - nixpak = { - url = "github:nixpak/nixpak"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; - - split-monitor-workspaces = { - url = "github:Duckonaut/split-monitor-workspaces"; - inputs.hyprland.follows = "hyprland"; - }; - anyrun = { - url = "github:Kirottu/anyrun"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - stylix.url = "github:danth/stylix"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - schizofox = { - url = "github:schizofox/schizofox"; - inputs = { - nixpkgs.follows = "nixpkgs"; - nixpak.follows = "nixpak"; - }; - }; - spicetify-nix.url = "github:the-argus/spicetify-nix"; - nur = { - url = "github:nix-community/NUR"; - #inputs.nixpkgs.follows = "nixpkgs"; - }; - - agenix.url = "github:ryantm/agenix"; - - neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; - - waybar.url = "github:Alexays/Waybar"; - fenix = { - url = "github:nix-community/fenix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - + nixpak = { + url = "github:nixpak/nixpak"; + inputs.nixpkgs.follows = "nixpkgs"; }; + nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; + split-monitor-workspaces = { + url = "github:Duckonaut/split-monitor-workspaces"; + inputs.hyprland.follows = "hyprland"; + }; + anyrun = { + url = "github:Kirottu/anyrun"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix.url = "github:danth/stylix"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + schizofox = { + url = "github:schizofox/schizofox"; + inputs = { + nixpkgs.follows = "nixpkgs"; + nixpak.follows = "nixpak"; + }; + }; + spicetify-nix.url = "github:the-argus/spicetify-nix"; + nur = { + url = "github:nix-community/NUR"; + #inputs.nixpkgs.follows = "nixpkgs"; + }; + + agenix.url = "github:ryantm/agenix"; + + neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + + waybar.url = "github:Alexays/Waybar"; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + }; } diff --git a/hosts/default.nix b/hosts/default.nix index 14d8ee6..c0bf28d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,5 +1,5 @@ { inputs, ... }: -let +let inherit (inputs) self; inherit (self) lib; in { @@ -7,11 +7,11 @@ in { system = "x86_64-linux"; specialArgs = { inherit lib inputs self; }; modules = [ - inputs.stylix.nixosModules.stylix - ./vali/mars - ../modules - inputs.home-manager.nixosModules.home-manager - inputs.agenix.nixosModules.default + inputs.stylix.nixosModules.stylix + ./vali/mars + ../modules + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default ]; }; diff --git a/hosts/vali/mars/awesome/awesome.nix b/hosts/vali/mars/awesome/awesome.nix index d3080eb..91f578c 100644 --- a/hosts/vali/mars/awesome/awesome.nix +++ b/hosts/vali/mars/awesome/awesome.nix @@ -1,23 +1,25 @@ { pkgs, lib, config, callPackage, ... }: -with lib; let +with lib; +let username = config.modules.other.system.username; cfg = config.modules.programs.awesome; in { options.modules.programs.awesome.enable = mkEnableOption "awesome"; config = mkIf cfg.enable { - services = { - displayManager.sddm.enable = true; - xserver = { - enable = true; - xkb = { - layout = "de, de"; - variant = ",neo "; - options = "grp:alt_space_toggle"; - }; - windowManager.awesome.enable = true; - displayManager.setupCommands = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1"; - }; + services = { + displayManager.sddm.enable = true; + xserver = { + enable = true; + xkb = { + layout = "de, de"; + variant = ",neo "; + options = "grp:alt_space_toggle"; + }; + windowManager.awesome.enable = true; + displayManager.setupCommands = + "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1"; }; + }; }; } diff --git a/hosts/vali/mars/configuration.nix b/hosts/vali/mars/configuration.nix index 57cf6f0..197e070 100644 --- a/hosts/vali/mars/configuration.nix +++ b/hosts/vali/mars/configuration.nix @@ -1,5 +1,4 @@ -{ config, inputs, pkgs, lib, ... }: -{ +{ config, inputs, pkgs, lib, ... }: { # allow unfree packages nixpkgs.config.allowUnfree = true; # Time Zone @@ -8,12 +7,12 @@ i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "de"; nix = { - settings = { - # enable flakes - experimental-features = [ "nix-command" "flakes" ]; - # reduce file size used & automatic garbage collector - auto-optimise-store = true; - }; + settings = { + # enable flakes + experimental-features = [ "nix-command" "flakes" ]; + # reduce file size used & automatic garbage collector + auto-optimise-store = true; + }; }; security.sudo.package = pkgs.sudo.override { withInsults = true; }; security.polkit.enable = true; @@ -21,51 +20,47 @@ programs.dconf.enable = true; boot.kernelModules = [ "v4l2loopback" ]; boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; -# services.picom.enable = true; + # services.picom.enable = true; modules = { - other = { - system = { - hostname = "mars"; - username = "vali"; - gitPath = "/home/vali/repos/nichts"; - }; - home-manager = { - enable = true; - enableDirenv = true; - }; + other = { + system = { + hostname = "mars"; + username = "vali"; + gitPath = "/home/vali/repos/nichts"; }; - programs = { - vesktop.enable = true; - ssh.enable = true; - btop.enable = true; - mpv.enable = true; - kitty.enable = true; -# awesome.enable = true; - hyprland.enable = true; - newsboat.enable = true; -# emacs.enable = true; - fish.enable = true; - stylix.enable = true; - helix.enable = true; - nh.enable = true; - schizofox.enable = true; -# spicetify.enable = true; - anyrun.enable = true; - }; - services = { - pipewire.enable = true; - }; - themes = { - gtk = { - enable = true; - }; - qt = { - enable = true; - package = pkgs.kde-gruvbox; - name = "Gruvbox-Dark"; - }; + home-manager = { + enable = true; + enableDirenv = true; }; }; + programs = { + vesktop.enable = true; + ssh.enable = true; + btop.enable = true; + mpv.enable = true; + kitty.enable = true; + # awesome.enable = true; + hyprland.enable = true; + newsboat.enable = true; + # emacs.enable = true; + fish.enable = true; + stylix.enable = true; + helix.enable = true; + nh.enable = true; + schizofox.enable = true; + # spicetify.enable = true; + anyrun.enable = true; + }; + services = { pipewire.enable = true; }; + themes = { + gtk = { enable = true; }; + qt = { + enable = true; + package = pkgs.kde-gruvbox; + name = "Gruvbox-Dark"; + }; + }; + }; system.stateVersion = "23.11"; } diff --git a/hosts/vali/mars/default.nix b/hosts/vali/mars/default.nix index 37c4e38..7a42f42 100644 --- a/hosts/vali/mars/default.nix +++ b/hosts/vali/mars/default.nix @@ -1,11 +1,11 @@ _: { - imports = [ - ./configuration.nix - ./programs.nix - ./hardware-configuration.nix - ./profile.nix - ./awesome/awesome.nix - ./hyprland/hyprland.nix + imports = [ + ./configuration.nix + ./programs.nix + ./hardware-configuration.nix + ./profile.nix + ./awesome/awesome.nix + ./hyprland/hyprland.nix - ]; + ]; } diff --git a/hosts/vali/mars/hardware-configuration.nix b/hosts/vali/mars/hardware-configuration.nix index 2f6e615..8d7af14 100644 --- a/hosts/vali/mars/hardware-configuration.nix +++ b/hosts/vali/mars/hardware-configuration.nix @@ -1,32 +1,31 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/0423508a-6906-4872-baeb-2b1e6bd017a4"; - fsType = "ext4"; - options = [ "noatime" "nodiratime" "discard" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/0423508a-6906-4872-baeb-2b1e6bd017a4"; + fsType = "ext4"; + options = [ "noatime" "nodiratime" "discard" ]; + }; - boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = "/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f"; + boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = + "/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/D299-5174"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D299-5174"; + fsType = "vfat"; + }; - swapDevices = - [ + swapDevices = [ # { device = "/dev/disk/by-uuid/bc68b3b5-1b58-4d8c-be8d-b06bbc4b6da7"; } - ]; + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -36,5 +35,6 @@ # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/vali/mars/hyprland/hyprland.nix b/hosts/vali/mars/hyprland/hyprland.nix index 9d51e9c..0c3a58c 100644 --- a/hosts/vali/mars/hyprland/hyprland.nix +++ b/hosts/vali/mars/hyprland/hyprland.nix @@ -1,310 +1,304 @@ -{ config, pkgs, lib, inputs, ... }: +{ config, pkgs, lib, inputs, ... }: with lib; -let +let cfg = config.modules.programs.hyprland; username = config.modules.other.system.username; inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; inherit (inputs.anyrun.packages.${pkgs.system}) anyrun; - inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) wl-clipboard swww wlsunset; + inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) + wl-clipboard swww wlsunset; inherit (inputs.waybar.packages.${pkgs.system}) waybar; in { options.modules.programs.hyprland.enable = mkEnableOption "hyprland"; config = mkIf cfg.enable { - - environment.sessionVariables = { - LIBVA_DRIVER_NAME = "nvidia"; - GTK_USE_PORTAL = "1"; - NIXOS_XDG_OPEN_USE_PORTAL = "1"; - XDG_CURRENT_DESKTOP = "Hyprland"; - XDG_SESSION_TYPE = "wayland"; - XDG_SESSION_DESKTOP = "Hyprland"; - SDL_VIDEODRIVER = "wayland"; - CLUTTER_BACKEND = "wayland"; - GDK_BACKEND = "wayland"; - QT_QPA_PLATFORM = "wayland"; - LIBSEAT_BACKEND = "logind"; - WLR_NO_HARDWARE_CURSORS = "1"; - NIXOS_OZONE_WL = "1"; - }; - xdg.portal = { + environment.sessionVariables = { + LIBVA_DRIVER_NAME = "nvidia"; + GTK_USE_PORTAL = "1"; + NIXOS_XDG_OPEN_USE_PORTAL = "1"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + XDG_SESSION_DESKTOP = "Hyprland"; + SDL_VIDEODRIVER = "wayland"; + CLUTTER_BACKEND = "wayland"; + GDK_BACKEND = "wayland"; + QT_QPA_PLATFORM = "wayland"; + LIBSEAT_BACKEND = "logind"; + WLR_NO_HARDWARE_CURSORS = "1"; + NIXOS_OZONE_WL = "1"; + }; + + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland + ]; + config.common.default = "*"; + }; + home-manager.users.${username} = { + wayland.windowManager.hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.system}.hyprland; + plugins = [ + inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces + ]; + xwayland.enable = true; + systemd = { enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland + variables = [ "--all" ]; + }; + settings = { + "$mainMod" = "SUPER"; + + monitor = [ + "DP-2,1920x1080,0x0,1" + "HDMI-A-2,1920x1080,1920x0,1" + "HDMI-A-1,1920x1080,3840x0,1" + "Unknown-1,disable" ]; - config.common.default = "*"; - }; - home-manager.users.${username} = { - wayland.windowManager.hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - plugins = [ - inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces - ]; - xwayland.enable = true; - systemd = { - enable = true; - variables = [ "--all" ]; - }; - settings = { - "$mainMod" = "SUPER"; + workspace = [ + "1, monitor:HDMI-A-1, default:true" + "2, monitor:HDMI-A-1" + "3, monitor:HDMI-A-1" + "4, monitor:HDMI-A-1" + "5, monitor:HDMI-A-1" + "6, monitor:HDMI-A-1" + "7, monitor:HDMI-A-1" + "8, monitor:HDMI-A-1" + "9, monitor:HDMI-A-1" + "10, monitor:HDMI-A-1" - monitor = [ - "DP-2,1920x1080,0x0,1" - "HDMI-A-2,1920x1080,1920x0,1" - "HDMI-A-1,1920x1080,3840x0,1" - "Unknown-1,disable" - ]; - workspace = [ - "1, monitor:HDMI-A-1, default:true" - "2, monitor:HDMI-A-1" - "3, monitor:HDMI-A-1" - "4, monitor:HDMI-A-1" - "5, monitor:HDMI-A-1" - "6, monitor:HDMI-A-1" - "7, monitor:HDMI-A-1" - "8, monitor:HDMI-A-1" - "9, monitor:HDMI-A-1" - "10, monitor:HDMI-A-1" + "11, monitor:HDMI-A-2, default:true" + "12, monitor:HDMI-A-2" + "13, monitor:HDMI-A-2" + "14, monitor:HDMI-A-2" + "15, monitor:HDMI-A-2" + "16, monitor:HDMI-A-2" + "17, monitor:HDMI-A-2" + "18, monitor:HDMI-A-2" + "19, monitor:HDMI-A-2" + "20, monitor:HDMI-A-2" - "11, monitor:HDMI-A-2, default:true" - "12, monitor:HDMI-A-2" - "13, monitor:HDMI-A-2" - "14, monitor:HDMI-A-2" - "15, monitor:HDMI-A-2" - "16, monitor:HDMI-A-2" - "17, monitor:HDMI-A-2" - "18, monitor:HDMI-A-2" - "19, monitor:HDMI-A-2" - "20, monitor:HDMI-A-2" + "21, monitor:DP-2, default:true" + "22, monitor:DP-2" + "23, monitor:DP-2" + "24, monitor:DP-2" + "25, monitor:DP-2" + "26, monitor:DP-2" + "27, monitor:DP-2" + "28, monitor:DP-2" + "29, monitor:DP-2" + "30, monitor:DP-2" + # scratchpads + "special:btop, decorate:false" + "special:pipewire, decorate:false" + "special:nixos, decorate:false" + "special:keepassxc, decorate:false" + ]; - "21, monitor:DP-2, default:true" - "22, monitor:DP-2" - "23, monitor:DP-2" - "24, monitor:DP-2" - "25, monitor:DP-2" - "26, monitor:DP-2" - "27, monitor:DP-2" - "28, monitor:DP-2" - "29, monitor:DP-2" - "30, monitor:DP-2" + input = { + kb_layout = "de"; + kb_variant = ""; + kb_model = ""; + kb_options = ""; + kb_rules = ""; - # scratchpads - "special:btop, decorate:false" - "special:pipewire, decorate:false" - "special:nixos, decorate:false" - "special:keepassxc, decorate:false" - ]; - - input = { - kb_layout = "de"; - kb_variant = ""; - kb_model = ""; - kb_options = ""; - kb_rules = ""; - - follow_mouse = true; - repeat_rate = 50; - repeat_delay = 250; - tablet = { - output = "HDMI-A-2"; - }; - }; - - general = { - sensitivity = 1.0; - gaps_in = 0; - gaps_out = 0; - border_size = 2; - #"col.active_border" = "0xFFF5C2E7"; - #"col.inactive_border" = "0xFF45475A"; - }; - - decoration = { - rounding = 0; - blur = { - enabled = true; - size = 3; - passes = 2; - }; - drop_shadow = 1; - shadow_range = 15; - shadow_render_power = 2; - shadow_ignore_window = 1; - shadow_offset = "2 4"; - shadow_scale = 1; - #active_opacity = 1; - #inactive_opacity = 1; - - #"col.shadow" = "0xAF1E1E2E"; - }; - - bezier = [ - "dupa, 0.1, 0.9, 0.1, 1.05" - "apf,0.76,0,0.24,1" - "fast,0.34,1.56,0.64,1" - ]; - - animations = { - enabled = true; - animation = [ - "windows, 1, 4, dupa, popin" - "windowsOut, 1, 4, dupa, slide" - "border, 1, 15, default" - "fade, 1, 10, default" - "workspaces, 1, 5, dupa, slidevert" - ]; - }; - - dwindle = { - no_gaps_when_only = true; - }; - - debug = { - disable_logs =false; - }; - - misc = { - enable_swallow = true; - swallow_regex = "kitty"; - focus_on_activate = true; - vrr = 1; - vfr = true; - animate_manual_resizes = false; - animate_mouse_windowdragging = false; - force_default_wallpaper = 0; - }; - - windowrulev2 = [ - "float, class:^(Tor Browser)$" - "float, class:^(mpv)$" - "float, class:^(imv)$" - "float, title:^(Picture-in-Picture)$" - "float, title:^(.*)(Choose User Profile)(.*)$" - "float, title:^(blob:null/)(.*)$" - "float, class:^(xdg-desktop-portal-gtk)$" - "float, class:^(code), title: ^(Open*)" - "size 70% 70%, class:^(code), title: ^(Open*)" - "center, class: ^(code), title: ^(Open*)" - "float, class:^(org.keepassxc.KeePassXC)$" - ]; - - bind = [ - "$mainMod, RETURN, exec, ${pkgs.kitty}/bin/kitty" - "$mainMod, Q, killactive" - "$mainMod, F, fullscreen, 0" - "$mainMod, D, exec, ${pkgs.procps}/bin/pkill anyrun || ${anyrun}/bin/anyrun" - "$mainMod, SPACE, togglefloating, active" - "$mainMod, O, exec, obsidian --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" - # workspaces - "$mainMod, 1, split-workspace, 1" - "$mainMod, 2, split-workspace, 2" - "$mainMod, 3, split-workspace, 3" - "$mainMod, 4, split-workspace, 4" - "$mainMod, 5, split-workspace, 5" - "$mainMod, 6, split-workspace, 6" - "$mainMod, 7, split-workspace, 7" - "$mainMod, 8, split-workspace, 8" - "$mainMod, 9, split-workspace, 9" - "$mainMod, 0, split-workspace, 10" - "$mainMod SHIFT, 1, split-movetoworkspacesilent, 1" - "$mainMod SHIFT, 2, split-movetoworkspacesilent, 2" - "$mainMod SHIFT, 3, split-movetoworkspacesilent, 3" - "$mainMod SHIFT, 4, split-movetoworkspacesilent, 4" - "$mainMod SHIFT, 5, split-movetoworkspacesilent, 5" - "$mainMod SHIFT, 6, split-movetoworkspacesilent, 6" - "$mainMod SHIFT, 7, split-movetoworkspacesilent, 7" - "$mainMod SHIFT, 8, split-movetoworkspacesilent, 8" - "$mainMod SHIFT, 9, split-movetoworkspacesilent, 9" - "$mainMod SHIFT, 0, split-movetoworkspacesilent, 10" - "$mainMod, S, exec, ${pkgs.grimblast}/bin/grimblast copy area" - "$mainMod, R, exec, ${hyprland}/bin/hyprctl reload" - "$mainMod, B, togglespecialworkspace, btop" - "$mainMod, V, togglespecialworkspace, pipewire" - "$mainMod, N, togglespecialworkspace, nixos" - "$mainMod, X, togglespecialworkspace, keepassxc" - "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${waybar}/bin/waybar" - ]; - - binde = [ - # window focus - "$mainMod, H, movefocus, l" - "$mainMod, J, movefocus, d" - "$mainMod, K, movefocus, k" - "$mainMod, L, movefocus, r" - - ]; - - bindl = let - play-pause = "${pkgs.playerctl}/bin/playerctl play-pause"; - stop = "${pkgs.playerctl}/bin/playerctl stop"; - prev = "${pkgs.playerctl}/bin/playerctl previous"; - next = "${pkgs.playerctl}/bin/playerctl next"; - toggle-mute = "${pkgs.pamixer}/bin/pamixer --toggle-mute"; - in [ - ", XF86AudioMedia, exec, ${play-pause}" - ", XF86AudioPlay, exec, ${play-pause}" - ", XF86AudioStop, exec, ${stop}" - ", XF86AudioPrev, exec, ${prev}" - ", XF86AudioNext, exec, ${next}" - ", XF86AudioMute, exec, ${toggle-mute}" - ]; - - # locked + repeat - bindle = let - volume_up = "${pkgs.pamixer}/bin/pamixer -ui 5"; - volume_down = "${pkgs.pamixer}/bin/pamixer -ud 5"; - in [ - ", XF86AudioRaiseVolume, exec, ${volume_up}" - ", XF86AudioLowerVolume, exec, ${volume_down}" - ]; - bindm = [ - "$mainMod, mouse:272, movewindow" - "$mainMod, mouse:273, resizewindow" - ]; - binds = { - pass_mouse_when_bound = false; - movefocus_cycles_fullscreen = false; - }; - exec-once = [ - #start waybar - "${waybar}/bin/waybar" - - # run persistent special workspace windows - "[workspace special:nixos silent;tile] ${pkgs.kitty}/bin/kitty -d ~/repos/nichts -e hx" - "[workspace special:keepassxc silent;tile] ${pkgs.keepassxc}/bin/keepassxc" - - "${swww}/bin/swww-daemon" - "${wlsunset}/bin/wlsunset -S 06:00 -s 20:00" - ]; - - exec = [ - # kill (almost) everything on special workspaces - "${pkgs.procps}/bin/pkill btop" - "${pkgs.procps}/bin/pkill helvum" - "${pkgs.procps}/bin/pkill pavucontrol" - # and run it all again - "[workspace special:btop silent;tile] ${pkgs.kitty}/bin/kitty -e ${pkgs.btop}/bin/btop" - "[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum" - "[workspace special:pipewire silent;tile] ${pkgs.pavucontrol}/bin/pavucontrol" - - "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator" - ]; - - plugin = { - split-monitor-workspaces = { - count = 10; - keep_focused = 0; - enable_notifications = 0; - }; - }; - }; + follow_mouse = true; + repeat_rate = 50; + repeat_delay = 250; + tablet = { output = "HDMI-A-2"; }; }; + + general = { + sensitivity = 1.0; + gaps_in = 0; + gaps_out = 0; + border_size = 2; + #"col.active_border" = "0xFFF5C2E7"; + #"col.inactive_border" = "0xFF45475A"; + }; + + decoration = { + rounding = 0; + blur = { + enabled = true; + size = 3; + passes = 2; + }; + drop_shadow = 1; + shadow_range = 15; + shadow_render_power = 2; + shadow_ignore_window = 1; + shadow_offset = "2 4"; + shadow_scale = 1; + #active_opacity = 1; + #inactive_opacity = 1; + + #"col.shadow" = "0xAF1E1E2E"; + }; + + bezier = [ + "dupa, 0.1, 0.9, 0.1, 1.05" + "apf,0.76,0,0.24,1" + "fast,0.34,1.56,0.64,1" + ]; + + animations = { + enabled = true; + animation = [ + "windows, 1, 4, dupa, popin" + "windowsOut, 1, 4, dupa, slide" + "border, 1, 15, default" + "fade, 1, 10, default" + "workspaces, 1, 5, dupa, slidevert" + ]; + }; + + dwindle = { no_gaps_when_only = true; }; + + debug = { disable_logs = false; }; + + misc = { + enable_swallow = true; + swallow_regex = "kitty"; + focus_on_activate = true; + vrr = 1; + vfr = true; + animate_manual_resizes = false; + animate_mouse_windowdragging = false; + force_default_wallpaper = 0; + }; + + windowrulev2 = [ + "float, class:^(Tor Browser)$" + "float, class:^(mpv)$" + "float, class:^(imv)$" + "float, title:^(Picture-in-Picture)$" + "float, title:^(.*)(Choose User Profile)(.*)$" + "float, title:^(blob:null/)(.*)$" + "float, class:^(xdg-desktop-portal-gtk)$" + "float, class:^(code), title: ^(Open*)" + "size 70% 70%, class:^(code), title: ^(Open*)" + "center, class: ^(code), title: ^(Open*)" + "float, class:^(org.keepassxc.KeePassXC)$" + ]; + + bind = [ + "$mainMod, RETURN, exec, ${pkgs.kitty}/bin/kitty" + "$mainMod, Q, killactive" + "$mainMod, F, fullscreen, 0" + "$mainMod, D, exec, ${pkgs.procps}/bin/pkill anyrun || ${anyrun}/bin/anyrun" + "$mainMod, SPACE, togglefloating, active" + "$mainMod, O, exec, obsidian --ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WaylandWindowDecorations --enable-features=WebRTCPipeWireCpaturer --disable-gpu" + # workspaces + "$mainMod, 1, split-workspace, 1" + "$mainMod, 2, split-workspace, 2" + "$mainMod, 3, split-workspace, 3" + "$mainMod, 4, split-workspace, 4" + "$mainMod, 5, split-workspace, 5" + "$mainMod, 6, split-workspace, 6" + "$mainMod, 7, split-workspace, 7" + "$mainMod, 8, split-workspace, 8" + "$mainMod, 9, split-workspace, 9" + "$mainMod, 0, split-workspace, 10" + "$mainMod SHIFT, 1, split-movetoworkspacesilent, 1" + "$mainMod SHIFT, 2, split-movetoworkspacesilent, 2" + "$mainMod SHIFT, 3, split-movetoworkspacesilent, 3" + "$mainMod SHIFT, 4, split-movetoworkspacesilent, 4" + "$mainMod SHIFT, 5, split-movetoworkspacesilent, 5" + "$mainMod SHIFT, 6, split-movetoworkspacesilent, 6" + "$mainMod SHIFT, 7, split-movetoworkspacesilent, 7" + "$mainMod SHIFT, 8, split-movetoworkspacesilent, 8" + "$mainMod SHIFT, 9, split-movetoworkspacesilent, 9" + "$mainMod SHIFT, 0, split-movetoworkspacesilent, 10" + "$mainMod, S, exec, ${pkgs.grimblast}/bin/grimblast copy area" + "$mainMod, R, exec, ${hyprland}/bin/hyprctl reload" + "$mainMod, B, togglespecialworkspace, btop" + "$mainMod, V, togglespecialworkspace, pipewire" + "$mainMod, N, togglespecialworkspace, nixos" + "$mainMod, X, togglespecialworkspace, keepassxc" + "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${waybar}/bin/waybar" + ]; + + binde = [ + # window focus + "$mainMod, H, movefocus, l" + "$mainMod, J, movefocus, d" + "$mainMod, K, movefocus, k" + "$mainMod, L, movefocus, r" + + ]; + + bindl = let + play-pause = "${pkgs.playerctl}/bin/playerctl play-pause"; + stop = "${pkgs.playerctl}/bin/playerctl stop"; + prev = "${pkgs.playerctl}/bin/playerctl previous"; + next = "${pkgs.playerctl}/bin/playerctl next"; + toggle-mute = "${pkgs.pamixer}/bin/pamixer --toggle-mute"; + in [ + ", XF86AudioMedia, exec, ${play-pause}" + ", XF86AudioPlay, exec, ${play-pause}" + ", XF86AudioStop, exec, ${stop}" + ", XF86AudioPrev, exec, ${prev}" + ", XF86AudioNext, exec, ${next}" + ", XF86AudioMute, exec, ${toggle-mute}" + ]; + + # locked + repeat + bindle = let + volume_up = "${pkgs.pamixer}/bin/pamixer -ui 5"; + volume_down = "${pkgs.pamixer}/bin/pamixer -ud 5"; + in [ + ", XF86AudioRaiseVolume, exec, ${volume_up}" + ", XF86AudioLowerVolume, exec, ${volume_down}" + ]; + bindm = [ + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + binds = { + pass_mouse_when_bound = false; + movefocus_cycles_fullscreen = false; + }; + exec-once = [ + #start waybar + "${waybar}/bin/waybar" + + # run persistent special workspace windows + "[workspace special:nixos silent;tile] ${pkgs.kitty}/bin/kitty -d ~/repos/nichts -e hx" + "[workspace special:keepassxc silent;tile] ${pkgs.keepassxc}/bin/keepassxc" + + "${swww}/bin/swww-daemon" + "${wlsunset}/bin/wlsunset -S 06:00 -s 20:00" + ]; + + exec = [ + # kill (almost) everything on special workspaces + "${pkgs.procps}/bin/pkill btop" + "${pkgs.procps}/bin/pkill helvum" + "${pkgs.procps}/bin/pkill pavucontrol" + # and run it all again + "[workspace special:btop silent;tile] ${pkgs.kitty}/bin/kitty -e ${pkgs.btop}/bin/btop" + "[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum" + "[workspace special:pipewire silent;tile] ${pkgs.pavucontrol}/bin/pavucontrol" + + "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator" + ]; + + plugin = { + split-monitor-workspaces = { + count = 10; + keep_focused = 0; + enable_notifications = 0; + }; + }; + }; }; - environment.sessionVariables = { - /* LIBVA_DRIVER_NAME = "nvidia"; + }; + environment.sessionVariables = { + /* LIBVA_DRIVER_NAME = "nvidia"; XDG_SESSION_TYPE = "wayland"; GBM_BACKEND = "nvidia-drm"; __GLX_VENDOR_LIBRARY_NAME = "nvidia"; @@ -316,19 +310,19 @@ in { XDG_SESSION_DESKTOP = "Hyprland"; GTK_USE_PORTAL = "1"; NIXOS_XDG_OPEN_USE_PORTAL = "1"; - */ - }; - hardware = { - opengl.enable = true; - nvidia.modesetting.enable = true; - }; - environment.systemPackages = with pkgs; [ - (waybar.overrideAttrs (oldAttrs: { - mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"]; - })) - dunst - libnotify - ]; + */ + }; + hardware = { + opengl.enable = true; + nvidia.modesetting.enable = true; + }; + environment.systemPackages = with pkgs; [ + (waybar.overrideAttrs (oldAttrs: { + mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; + })) + dunst + libnotify + ]; }; } diff --git a/hosts/vali/mars/profile.nix b/hosts/vali/mars/profile.nix index e6e632b..6ab615d 100644 --- a/hosts/vali/mars/profile.nix +++ b/hosts/vali/mars/profile.nix @@ -1,10 +1,10 @@ _: { - imports = [ - ../../../options/boot/grub-boot.nix - ../../../options/desktop/fonts.nix - ../../../options/common/networking.nix - ../../../options/common/gpu/nvidia.nix - ../../../options/desktop/monitors.nix - ../../../overlay.nix - ]; + imports = [ + ../../../options/boot/grub-boot.nix + ../../../options/desktop/fonts.nix + ../../../options/common/networking.nix + ../../../options/common/gpu/nvidia.nix + ../../../options/desktop/monitors.nix + ../../../overlay.nix + ]; } diff --git a/hosts/vali/mars/programs.nix b/hosts/vali/mars/programs.nix index 754dde2..538a5cd 100644 --- a/hosts/vali/mars/programs.nix +++ b/hosts/vali/mars/programs.nix @@ -4,109 +4,112 @@ let nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system}; username = config.modules.other.system.username; in { - environment.systemPackages = with pkgs; [ - alsa-utils - android-tools - asciinema - bibata-cursors - blanket - difftastic - dig - easyeffects - element-desktop - evince - eza - fastfetch - feh - (fenix.complete.withComponents [ - "cargo" "clippy" "rust-src" - "rustc" - "rustfmt" - ]) - ffmpeg-full - fftw - flameshot - grimblast - gcc - gdb - gnumake - grc - grimblast - git - helvum - heroic - httpie - i3lock - imagemagick - img2pdf - imv - keepassxc - krita - lazygit - librewolf - links2 - mars-mips - ncmpcpp - neofetch - neovim - networkmanagerapplet - nextcloud-client - nicotine-plus - nitch - nixpkgs-wayland.swww - nmap - notesnook - obs-studio - obsidian - onlyoffice-bin - pamixer - pavucontrol - picom - pcmanfm - pdfarranger - pfetch - pidgin - playerctl - polkit - python3 - qbittorrent - ripgrep - rustdesk - rofi - scc - scummvm - sherlock - signal-desktop-beta - smartmontools - spotube - steam - strawberry - teamspeak_client - telegram-desktop - texliveFull - trilium-desktop - thunderbird - tor-browser-bundle-bin - trash-cli - tree - unzip - util-linux - v4l-utils - ventoy-full - vlc - weechat - wget - wireguard-tools - xclip - xfce.thunar - xorg.libX11.dev - xorg.libXft - xorg.libXinerama - xournalpp - yt-dlp - zapzap - zathura - zip - zoxide - ]; + environment.systemPackages = with pkgs; [ + alsa-utils + android-tools + asciinema + bibata-cursors + blanket + difftastic + dig + easyeffects + element-desktop + evince + eza + fastfetch + feh + (fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + ffmpeg-full + fftw + flameshot + grimblast + gcc + gdb + gnumake + grc + grimblast + git + helvum + heroic + httpie + i3lock + imagemagick + img2pdf + imv + keepassxc + krita + lazygit + librewolf + links2 + mars-mips + ncmpcpp + neofetch + neovim + networkmanagerapplet + nextcloud-client + nicotine-plus + nil + nitch + nixpkgs-wayland.swww + nmap + notesnook + obs-studio + obsidian + onlyoffice-bin + pamixer + pavucontrol + picom + pcmanfm + pdfarranger + pfetch + pidgin + playerctl + polkit + python3 + qbittorrent + ripgrep + rustdesk + rofi + scc + scummvm + sherlock + signal-desktop-beta + smartmontools + spotube + steam + strawberry + teamspeak_client + telegram-desktop + texliveFull + trilium-desktop + thunderbird + tor-browser-bundle-bin + trash-cli + tree + unzip + util-linux + v4l-utils + ventoy-full + vlc + weechat + wget + wireguard-tools + xclip + xfce.thunar + xorg.libX11.dev + xorg.libXft + xorg.libXinerama + xournalpp + yt-dlp + zapzap + zathura + zip + zoxide + ]; } diff --git a/modules/cli/default.nix b/modules/cli/default.nix index e3bed3c..b5afc7b 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -1,7 +1 @@ -_: { - imports = [ - ./neovim.nix - ./fish.nix - ./nh.nix - ]; -} +_: { imports = [ ./neovim.nix ./fish.nix ./nh.nix ]; } diff --git a/modules/cli/fish.nix b/modules/cli/fish.nix index 09630a8..75ccfbd 100644 --- a/modules/cli/fish.nix +++ b/modules/cli/fish.nix @@ -1,65 +1,78 @@ -{ - config, - lib, - pkgs, - ... -}: with lib; let - cfg = config.modules.programs.fish; - username = config.modules.other.system.username; - hostname = config.modules.other.system.hostname; - gitPath = config.modules.other.system.gitPath; +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.modules.programs.fish; + username = config.modules.other.system.username; + hostname = config.modules.other.system.hostname; + gitPath = config.modules.other.system.gitPath; in { - options.modules.programs.fish = { - enable = mkEnableOption "fish"; - extraAliases = mkOption { - type = types.attrs; - description = "extra shell aliases"; - default = {}; - }; + options.modules.programs.fish = { + enable = mkEnableOption "fish"; + extraAliases = mkOption { + type = types.attrs; + description = "extra shell aliases"; + default = { }; + }; + }; + + config = mkIf cfg.enable { + programs.fish.enable = true; + + users.users.${username}.shell = pkgs.fish; + + environment = { + shells = [ pkgs.fish ]; + pathsToLink = [ "/share/fish" ]; }; - config = mkIf cfg.enable { - programs.fish.enable = true; - - users.users.${username}.shell = pkgs.fish; - - environment = { - shells = [ pkgs.fish ]; - pathsToLink = [ "/share/fish" ]; - }; - - home-manager.users.${username} = { - home.packages = with pkgs; [ nix-output-monitor ]; - programs.zoxide.enable = true; - programs.zoxide.enableFishIntegration = true; - programs.fish = { - enable = true; - interactiveShellInit = "set fish_greeting"; - plugins = [ - { name = "grc"; src = pkgs.fishPlugins.grc.src; } - { name = "sponge"; src = pkgs.fishPlugins.sponge.src; } - { name = "done"; src = pkgs.fishPlugins.done.src; } - { name = "colored_man_pages"; src = pkgs.fishPlugins.colored-man-pages.src; } - { name = "tide"; src = pkgs.fishPlugins.tide.src; } - ]; - shellAbbrs = { - c = "clear"; - cc = "cd ~ && clear"; - mv = "mv -iv"; - rm = "trash -v"; - ls = "eza"; - l = "eza -a --icons"; - la = "eza -lha --icons --git"; - kys = "shutdown now"; - lg = "lazygit"; - cd = "z"; - v = "nvim"; - h = "hx"; - e = "emacs"; - update = "sudo nixos-rebuild switch --flake \"${gitPath}#${hostname}\""; - flake = "cd '${gitPath}'"; - } // cfg.extraAliases; - }; - }; + home-manager.users.${username} = { + home.packages = with pkgs; [ nix-output-monitor ]; + programs.zoxide.enable = true; + programs.zoxide.enableFishIntegration = true; + programs.fish = { + enable = true; + interactiveShellInit = "set fish_greeting"; + plugins = [ + { + name = "grc"; + src = pkgs.fishPlugins.grc.src; + } + { + name = "sponge"; + src = pkgs.fishPlugins.sponge.src; + } + { + name = "done"; + src = pkgs.fishPlugins.done.src; + } + { + name = "colored_man_pages"; + src = pkgs.fishPlugins.colored-man-pages.src; + } + { + name = "tide"; + src = pkgs.fishPlugins.tide.src; + } + ]; + shellAbbrs = { + c = "clear"; + cc = "cd ~ && clear"; + mv = "mv -iv"; + rm = "trash -v"; + ls = "eza"; + l = "eza -a --icons"; + la = "eza -lha --icons --git"; + kys = "shutdown now"; + lg = "lazygit"; + cd = "z"; + v = "nvim"; + h = "hx"; + e = "emacs"; + update = + ''sudo nixos-rebuild switch --flake "${gitPath}#${hostname}"''; + flake = "cd '${gitPath}'"; + } // cfg.extraAliases; + }; }; + }; } diff --git a/modules/cli/neovim.nix b/modules/cli/neovim.nix index 1b4b503..73d0c42 100644 --- a/modules/cli/neovim.nix +++ b/modules/cli/neovim.nix @@ -1,35 +1,33 @@ { config, lib, pkgs, ... }: let - lazyvim-config = pkgs.fetchFromGitHub { - owner = "Dragyx"; - repo = "lazyvim-config"; - rev = "d799724f48199d81ca6c8abb5951860fbf8fa0df"; - hash = "sha256-NF92CweRFQ1qZS8NXoTUEljazRGXgXS2AuDt5IWmwBc="; + lazyvim-config = pkgs.fetchFromGitHub { + owner = "Dragyx"; + repo = "lazyvim-config"; + rev = "d799724f48199d81ca6c8abb5951860fbf8fa0df"; + hash = "sha256-NF92CweRFQ1qZS8NXoTUEljazRGXgXS2AuDt5IWmwBc="; + }; + cfg = config.modules.programs.neovim-old; + username = config.modules.other.system.username; +in { + options.modules.programs.neovim-old.enable = lib.mkEnableOption "neovim-old"; + + config = lib.mkIf cfg.enable { + home-manager.users.${username} = { + home.packages = with pkgs; [ lazygit ripgrep fd gcc xclip rust-analyzer ]; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + }; + + xdg.configFile."nvim" = { + enable = true; + source = lazyvim-config; + recursive = true; + }; }; - cfg = config.modules.programs.neovim-old; - username = config.modules.other.system.username; -in -{ - options.modules.programs.neovim-old.enable = lib.mkEnableOption "neovim-old"; - config = lib.mkIf cfg.enable { - home-manager.users.${username} = { - home.packages = with pkgs; [ lazygit ripgrep fd gcc xclip rust-analyzer ]; - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - defaultEditor = true; - }; - - xdg.configFile."nvim" = { - enable = true; - source = lazyvim-config; - recursive = true; - }; - }; - - - }; + }; } diff --git a/modules/cli/nh.nix b/modules/cli/nh.nix index 5eae12d..4df499c 100644 --- a/modules/cli/nh.nix +++ b/modules/cli/nh.nix @@ -1,16 +1,17 @@ { pkgs, lib, config, callPackage, ... }: -with lib; let +with lib; +let username = config.modules.other.system.username; cfg = config.modules.programs.nh; in { options.modules.programs.nh.enable = mkEnableOption "nh"; config = mkIf cfg.enable { - programs.nh = { - enable = true; - clean.enable = true; - clean.extraArgs = "--keep-since 4d --keep 3"; - flake = "/home/vali/repos/nichts"; - }; + programs.nh = { + enable = true; + clean.enable = true; + clean.extraArgs = "--keep-since 4d --keep 3"; + flake = "/home/vali/repos/nichts"; + }; }; } diff --git a/modules/default.nix b/modules/default.nix index 6e2b2ef..b326ffc 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,9 +1 @@ -_: { - imports = [ - ./cli - ./gui - ./tui - ./other - ./services - ]; -} +_: { imports = [ ./cli ./gui ./tui ./other ./services ]; } diff --git a/modules/gui/anyrun/anyrun.nix b/modules/gui/anyrun/anyrun.nix index d76bc2d..583fa2a 100644 --- a/modules/gui/anyrun/anyrun.nix +++ b/modules/gui/anyrun/anyrun.nix @@ -1,48 +1,48 @@ -{ config, pkgs, lib, inputs, ... }: +{ config, pkgs, lib, inputs, ... }: with lib; -let +let username = config.modules.other.system.username; cfg = config.modules.programs.anyrun; in { options.modules.programs.anyrun.enable = mkEnableOption "anyrun"; config = mkIf cfg.enable { - home-manager.users.${username} = { - imports = [ inputs.anyrun.homeManagerModules.default ]; - - programs.anyrun = { - enable = true; - config = { - plugins = with inputs.anyrun.packages.${pkgs.system}; [ - applications - dictionary - kidex - rink - shell - symbols - translate - ]; - hideIcons = false; - ignoreExclusiveZones = false; - layer = "overlay"; - hidePluginInfo = true; - closeOnClick = true; - showResultsImmediately = true; - maxEntries = 50; - width.fraction = 0.3; - y.absolute = 15; - }; - extraCss = builtins.readFile (./. + "/style.css"); + home-manager.users.${username} = { + imports = [ inputs.anyrun.homeManagerModules.default ]; - extraConfigFiles."applications.ron".text = '' - Config( - desktop_actions: false, - max_entries: 5, - terminal: Some("kitty"), - ) - ''; - }; + programs.anyrun = { + enable = true; + config = { + plugins = with inputs.anyrun.packages.${pkgs.system}; [ + applications + dictionary + kidex + rink + shell + symbols + translate + ]; + hideIcons = false; + ignoreExclusiveZones = false; + layer = "overlay"; + hidePluginInfo = true; + closeOnClick = true; + showResultsImmediately = true; + maxEntries = 50; + width.fraction = 0.3; + y.absolute = 15; + }; + extraCss = builtins.readFile (./. + "/style.css"); + + extraConfigFiles."applications.ron".text = '' + Config( + desktop_actions: false, + max_entries: 5, + terminal: Some("kitty"), + ) + ''; }; + }; }; } diff --git a/modules/gui/anyrun/default.nix b/modules/gui/anyrun/default.nix index 102ad3a..59c2ad1 100644 --- a/modules/gui/anyrun/default.nix +++ b/modules/gui/anyrun/default.nix @@ -1,3 +1 @@ -_: { - imports = [./anyrun.nix]; -} +_: { imports = [ ./anyrun.nix ]; } diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 00792f5..d15ea05 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -1,20 +1,20 @@ _: { - imports = [ - ./vesktop.nix - ./gtk.nix - ./mpv.nix - ./qt.nix - ./zathura.nix - ./stylix.nix - #./spicetify.nix - ./anyrun - ./rofi.nix - ./kitty.nix - ./vivado.nix - ./firefox.nix - ./steam.nix - ./schizofox.nix - ./minecraft.nix -# ./emacs - ]; + imports = [ + ./vesktop.nix + ./gtk.nix + ./mpv.nix + ./qt.nix + ./zathura.nix + ./stylix.nix + #./spicetify.nix + ./anyrun + ./rofi.nix + ./kitty.nix + ./vivado.nix + ./firefox.nix + ./steam.nix + ./schizofox.nix + ./minecraft.nix + # ./emacs + ]; } diff --git a/modules/gui/emacs/default.nix b/modules/gui/emacs/default.nix index 3d5ed87..4002377 100644 --- a/modules/gui/emacs/default.nix +++ b/modules/gui/emacs/default.nix @@ -1,5 +1 @@ -_:{ - imports = [ - ./emacs.nix - ]; -} +_: { imports = [ ./emacs.nix ]; } diff --git a/modules/gui/emacs/emacs.nix b/modules/gui/emacs/emacs.nix index 745d5ef..ec93acb 100644 --- a/modules/gui/emacs/emacs.nix +++ b/modules/gui/emacs/emacs.nix @@ -1,22 +1,23 @@ { config, lib, pkgs, inputs, ... }: -with lib; let - cfg = config.modules.programs.emacs; - username = config.modules.other.system.username; -in { - options.modules.programs.emacs.enable = mkEnableOption "emacs"; +with lib; +let + cfg = config.modules.programs.emacs; + username = config.modules.other.system.username; +in { + options.modules.programs.emacs.enable = mkEnableOption "emacs"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.doom-emacs = { - enable = true; - extraConfig = '' - (setq standard-indent 2) - (require 'evil) - (evil-mode 1) - ''; - doomPrivateDir = ./doom.d; - }; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.doom-emacs = { + enable = true; + extraConfig = '' + (setq standard-indent 2) + (require 'evil) + (evil-mode 1) + ''; + doomPrivateDir = ./doom.d; + }; }; + }; -} +} diff --git a/modules/gui/firefox.nix b/modules/gui/firefox.nix index b948b0b..96775d7 100644 --- a/modules/gui/firefox.nix +++ b/modules/gui/firefox.nix @@ -1,64 +1,72 @@ { config, lib, inputs, pkgs, ... }: -with lib; let +with lib; +let username = config.modules.other.system.username; cfg = config.modules.programs.firefox; in { - options.modules.programs.firefox = { - enable = mkEnableOption "firefox"; - extensions = mkOption { - description = "firefox extensions (format like https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265)"; - type = types.attrs; - default = {}; - }; + options.modules.programs.firefox = { + enable = mkEnableOption "firefox"; + extensions = mkOption { + description = + "firefox extensions (format like https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265)"; + type = types.attrs; + default = { }; }; + }; config = mkIf cfg.enable { home-manager.users.${username} = { programs.firefox = { enable = true; - policies = { - DisableTelemetry = true; - DisableFirefoxStudies = true; - EnableTrackingProtection = { - Value= true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - DisablePocket = true; - DisableFirefoxAccounts = true; - DisableAccounts = true; - DisableFirefoxScreenshots = true; - OverrideFirstRunPage = ""; - OverridePostUpdatePage = ""; - DontCheckDefaultBrowser = true; - DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab" - DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" - SearchBar = "unified"; # alternative: "separate" - FirefoxSuggest = { - WebSuggestions = true; - ImproveSuggest = true; - Locked = true; - }; - SearchSuggestEnabled = true; - theme = { - colors = { - background-darker = "181825"; - background = "1e1e2e"; - foreground = "cdd6f4"; + policies = { + DisableTelemetry = true; + DisableFirefoxStudies = true; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DisablePocket = true; + DisableFirefoxAccounts = true; + DisableAccounts = true; + DisableFirefoxScreenshots = true; + OverrideFirstRunPage = ""; + OverridePostUpdatePage = ""; + DontCheckDefaultBrowser = true; + DisplayBookmarksToolbar = + "never"; # alternatives: "always" or "newtab" + DisplayMenuBar = + "default-off"; # alternatives: "always", "never" or "default-on" + SearchBar = "unified"; # alternative: "separate" + FirefoxSuggest = { + WebSuggestions = true; + ImproveSuggest = true; + Locked = true; + }; + SearchSuggestEnabled = true; + theme = { + colors = { + background-darker = "181825"; + background = "1e1e2e"; + foreground = "cdd6f4"; + }; }; - }; - OfferToSaveLogins = false; + OfferToSaveLogins = false; font = "Lexend"; - ExtensionSettings = lib.mkMerge [{ - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "force_installed"; - }; - } cfg.extensions]; + ExtensionSettings = lib.mkMerge [ + { + "uBlock0@raymondhill.net" = { + install_url = + "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + } + cfg.extensions + ]; }; }; }; diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix index 180d78e..4fca6c2 100644 --- a/modules/gui/gtk.nix +++ b/modules/gui/gtk.nix @@ -1,55 +1,55 @@ { config, lib, pkgs, ... }: -with lib; let - cfg = config.modules.themes.gtk; - username = config.modules.other.system.username; - hmCfg = config.home-manager.users.${username}; +with lib; +let + cfg = config.modules.themes.gtk; + username = config.modules.other.system.username; + hmCfg = config.home-manager.users.${username}; in { - options.modules.themes.gtk = { - enable = mkEnableOption "gtk theming"; - name = mkOption { - description = "gtk theme name"; - type = types.str; - }; - package = mkOption { - description = "gtk theme package"; - type = types.package; - }; - # iconTheme = mkOption { - # description = "gtk icon theme"; - # type = with types; submodule { - # options = { - # name = mkOption { - # description = "gtk icon theme name"; - # type = str; - # }; - # package = mkOption { - # description = "gtk icon theme package"; - # type = package; - # }; - # }; - # }; - # }; + options.modules.themes.gtk = { + enable = mkEnableOption "gtk theming"; + name = mkOption { + description = "gtk theme name"; + type = types.str; }; - - config = mkIf cfg.enable { - home-manager.users.${username} = { - gtk = { - enable = true; - theme = { - #package = pkgs.gruvbox-gtk-theme; - #name = "Gruvbox-Dark-BL"; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.catppuccin-papirus-folders; - }; - }; - home.sessionVariables = { - #GTK_THEME = "Gruvbox-Dark-BL"; - # GTK_USE_PORTAL = "1"; - - - }; - }; + package = mkOption { + description = "gtk theme package"; + type = types.package; }; + # iconTheme = mkOption { + # description = "gtk icon theme"; + # type = with types; submodule { + # options = { + # name = mkOption { + # description = "gtk icon theme name"; + # type = str; + # }; + # package = mkOption { + # description = "gtk icon theme package"; + # type = package; + # }; + # }; + # }; + # }; + }; + + config = mkIf cfg.enable { + home-manager.users.${username} = { + gtk = { + enable = true; + theme = { + #package = pkgs.gruvbox-gtk-theme; + #name = "Gruvbox-Dark-BL"; + }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders; + }; + }; + home.sessionVariables = { + #GTK_THEME = "Gruvbox-Dark-BL"; + # GTK_USE_PORTAL = "1"; + + }; + }; + }; } diff --git a/modules/gui/kitty.nix b/modules/gui/kitty.nix index 4ed8860..145bb95 100644 --- a/modules/gui/kitty.nix +++ b/modules/gui/kitty.nix @@ -1,79 +1,79 @@ { config, lib, pkgs, ... }: -with lib; let - cfg = config.modules.programs.kitty; - username = config.modules.other.system.username; -in { - options.modules.programs.kitty.enable = mkEnableOption "kitty"; +with lib; +let + cfg = config.modules.programs.kitty; + username = config.modules.other.system.username; +in { + options.modules.programs.kitty.enable = mkEnableOption "kitty"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.kitty = { - enable = true; - settings = { - # font_size = "13.0"; - mouse_hide_wait = -1; - url_style = "curly"; - open_url_with = "default"; - #background_opacity = "0.9"; - confirm_os_window_close = "0"; - #font_family = "JetBrainsMono Nerd Font"; -/* - cursor_text_color = "background"; + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.kitty = { + enable = true; + settings = { + # font_size = "13.0"; + mouse_hide_wait = -1; + url_style = "curly"; + open_url_with = "default"; + #background_opacity = "0.9"; + confirm_os_window_close = "0"; + #font_family = "JetBrainsMono Nerd Font"; + /* cursor_text_color = "background"; - url_color = "#83a598"; + url_color = "#83a598"; - visual_bell_color = "#8ec07c"; - bell_border_color = "#8ec07c"; + visual_bell_color = "#8ec07c"; + bell_border_color = "#8ec07c"; - active_border_color = "#d3869b"; - inactive_border_color = "#665c54"; + active_border_color = "#d3869b"; + inactive_border_color = "#665c54"; - foreground = "#ebdbb2"; - background = "#282828"; - selection_foreground = "#928374"; - selection_background = "#ebdbb2"; + foreground = "#ebdbb2"; + background = "#282828"; + selection_foreground = "#928374"; + selection_background = "#ebdbb2"; - active_tab_foreground = "#fbf1c7"; - active_tab_background = "#665c54"; - inactive_tab_foreground = "#a89984"; - inactive_tab_background = "#3c3836"; + active_tab_foreground = "#fbf1c7"; + active_tab_background = "#665c54"; + inactive_tab_foreground = "#a89984"; + inactive_tab_background = "#3c3836"; - # black (bg3/bg4) - color0 = "#665c54"; - color8 = "#7c6f64"; + # black (bg3/bg4) + color0 = "#665c54"; + color8 = "#7c6f64"; - # red - color1 = "#cc241d"; - color9 = "#fb4934"; + # red + color1 = "#cc241d"; + color9 = "#fb4934"; - #: green - color2 = "#98971a"; - color10 = "#b8bb26"; + #: green + color2 = "#98971a"; + color10 = "#b8bb26"; - # yellow - color3 = "#d79921"; - color11 = "#fabd2f"; + # yellow + color3 = "#d79921"; + color11 = "#fabd2f"; - # blue - color4 = "#458588"; - color12 = "#83a598"; + # blue + color4 = "#458588"; + color12 = "#83a598"; - # purple - color5 = "#b16286"; - color13 = "#d3869b"; + # purple + color5 = "#b16286"; + color13 = "#d3869b"; - # aqua - color6 = "#689d6a"; - color14 = "#8ec07c"; + # aqua + color6 = "#689d6a"; + color14 = "#8ec07c"; - # white (fg4/fg3) - color7 = "#a89984"; - color15 = "#bdae93"; - */ - }; - - }; + # white (fg4/fg3) + color7 = "#a89984"; + color15 = "#bdae93"; + */ }; - }; -} + }; + }; + }; + +} diff --git a/modules/gui/minecraft.nix b/modules/gui/minecraft.nix index 72c4aa7..3b8d3ab 100644 --- a/modules/gui/minecraft.nix +++ b/modules/gui/minecraft.nix @@ -1,5 +1,6 @@ { config, lib, inputs, pkgs, ... }: -with lib; let +with lib; +let username = config.modules.other.system.username; cfg = config.modules.programs.minecraft; in { @@ -10,19 +11,17 @@ in { config = mkIf cfg.enable { # Set wayland environment flag - environment.variables = mkIf cfg.wayland { - __GL_THREADED_OPTIMIZATIONS=0; - }; + environment.variables = + mkIf cfg.wayland { __GL_THREADED_OPTIMIZATIONS = 0; }; # Install glfw-wayland-minecraft - environment.systemPackages = with pkgs; mkIf cfg.wayland [ + environment.systemPackages = with pkgs; + mkIf cfg.wayland [ glfw-wayland-minecraft # Use these parameters in the prism launcher: -Dfml.earlyprogresswindow=false -Dorg.lwjgl.glfw.libname=/nix/store/ypkdx5844pp1vdw2z2nmnf2nb9kgl0mp-glfw-wayland-minecraft-unstable-2023-06-01/lib/libglfw.so - ]; + ]; home-manager.users.${username} = { # Install minecraft - home.packages = with pkgs; [ - prismlauncher - ]; + home.packages = with pkgs; [ prismlauncher ]; }; }; } diff --git a/modules/gui/mpv.nix b/modules/gui/mpv.nix index cbe606e..de6dffa 100644 --- a/modules/gui/mpv.nix +++ b/modules/gui/mpv.nix @@ -1,32 +1,24 @@ -{ - config, - lib, - pkgs, - ... -}: with lib; let - cfg = config.modules.programs.mpv; - username = config.modules.other.system.username; +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.modules.programs.mpv; + username = config.modules.other.system.username; in { - options.modules.programs.mpv.enable = mkEnableOption "mpv"; + options.modules.programs.mpv.enable = mkEnableOption "mpv"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.mpv = { - enable = true; - config = { - hwdec = "auto"; - volume = 50; - osc = "no"; - osd-bar = "no"; - border = "no"; - }; - scripts = with pkgs.mpvScripts; [ - mpris - thumbfast - sponsorblock - uosc - ]; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.mpv = { + enable = true; + config = { + hwdec = "auto"; + volume = 50; + osc = "no"; + osd-bar = "no"; + border = "no"; }; + scripts = with pkgs.mpvScripts; [ mpris thumbfast sponsorblock uosc ]; + }; }; + }; } diff --git a/modules/gui/qt.nix b/modules/gui/qt.nix index 5ca8523..2e38b0d 100644 --- a/modules/gui/qt.nix +++ b/modules/gui/qt.nix @@ -1,61 +1,56 @@ -{ - config, - lib, - pkgs, - ... -}: with lib; let - theme = { - package = pkgs.gruvbox-gtk-theme; - name = "Gruvbox-Dark-BL"; - }; - cfg = config.modules.themes.qt; - username = config.modules.other.system.username; +{ config, lib, pkgs, ... }: +with lib; +let + theme = { + package = pkgs.gruvbox-gtk-theme; + name = "Gruvbox-Dark-BL"; + }; + cfg = config.modules.themes.qt; + username = config.modules.other.system.username; in { - options.modules.themes.qt = { - enable = mkEnableOption "qt theming"; - name = mkOption { - description = "qt theme name"; - type = types.str; - }; - variant = mkOption { - description = "qt theme variant"; - type = types.str; - }; - accentColour = mkOption { - description = "accent colour for qt theme"; - type = types.str; - }; - package = mkOption { - description = "qt theme package"; - type = types.package; - }; + options.modules.themes.qt = { + enable = mkEnableOption "qt theming"; + name = mkOption { + description = "qt theme name"; + type = types.str; + }; + variant = mkOption { + description = "qt theme variant"; + type = types.str; + }; + accentColour = mkOption { + description = "accent colour for qt theme"; + type = types.str; + }; + package = mkOption { + description = "qt theme package"; + type = types.package; + }; + }; + + config = mkIf cfg.enable { + environment.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; + environment.variables = { + QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; + GTK_THEME = theme.name; }; - config = mkIf cfg.enable { - environment.sessionVariables = { - QT_QPA_PLATFORMTHEME = "qt5ct"; - }; - environment.variables = { - QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; - GTK_THEME = theme.name; - }; - - home-manager.users.${username} = { - qt = { - enable = true; - platformTheme.name = "qt5ct"; - # style = { - # inherit (cfg) name package; - # }; - }; - home = { - packages = with pkgs; [ - qt5.qttools - libsForQt5.qt5ct - libsForQt5.qtstyleplugin-kvantum - breeze-icons - ]; - }; - }; + home-manager.users.${username} = { + qt = { + enable = true; + platformTheme.name = "qt5ct"; + # style = { + # inherit (cfg) name package; + # }; + }; + home = { + packages = with pkgs; [ + qt5.qttools + libsForQt5.qt5ct + libsForQt5.qtstyleplugin-kvantum + breeze-icons + ]; + }; }; + }; } diff --git a/modules/gui/rofi.nix b/modules/gui/rofi.nix index 3fe61e7..8827e49 100644 --- a/modules/gui/rofi.nix +++ b/modules/gui/rofi.nix @@ -1,13 +1,12 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: with lib; -let +let username = config.modules.other.system.username; cfg = config.modules.programs.rofi; in { options.modules.programs.rofi.enable = mkEnableOption "rofi"; - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ rofi ]; - }; + config = + mkIf cfg.enable { environment.systemPackages = with pkgs; [ rofi ]; }; } diff --git a/modules/gui/schizofox.nix b/modules/gui/schizofox.nix index b21ff31..500f26e 100644 --- a/modules/gui/schizofox.nix +++ b/modules/gui/schizofox.nix @@ -1,106 +1,114 @@ -{ config, inputs, lib, ... }: let - cfg = config.modules.programs.schizofox; - inherit (config.modules.other.system) username; +{ config, inputs, lib, ... }: +let + cfg = config.modules.programs.schizofox; + inherit (config.modules.other.system) username; - inherit (lib) mkEnableOption mkIf; + inherit (lib) mkEnableOption mkIf; in { - options.modules.programs.schizofox = { - enable = mkEnableOption "schizofox"; - }; + options.modules.programs.schizofox = { enable = mkEnableOption "schizofox"; }; - config = mkIf cfg.enable { - home-manager.users.${username} = { - imports = [ inputs.schizofox.homeManagerModule ]; + config = mkIf cfg.enable { + home-manager.users.${username} = { + imports = [ inputs.schizofox.homeManagerModule ]; - programs.schizofox = { - enable = true; - theme = { - background-darker = "181825"; - background = "1e1e2e"; - foreground = "cdd6f4"; - font = "Lexend"; - simplefox.enable = false; - darkreader.enable = true; - extraCss = '' - body { - color: red !important; - } - ''; - }; - search = { - defaultSearchEngine = "DuckDuckGo"; - removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"]; - addEngines = [ - { - Name = "NixOS Packages"; - Description = "NixOS Unstable package search"; - Alias = "!np"; - Method = "GET"; - URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; - } - { - Name = "NixOS Options"; - Description = "NixOS Unstable option search"; - Alias = "!no"; - Method = "GET"; - URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; - } - { - Name = "NixOS Wiki"; - Description = "NixOS Wiki search"; - Alias = "!nw"; - Method = "GET"; - URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; - } - { - Name = "Home Manager Options"; - Description = "Home Manager option search"; - Alias = "!hm"; - Method = "GET"; - URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; - } - { - Name = "Arch Wiki"; - Description = "Arch Wiki search"; - Alias = "!aw"; - Method = "GET"; - URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}"; - } - { - Name = "Gentoo Wiki"; - Description = "Gentoo Wiki search"; - Alias = "!gw"; - Method = "GET"; - URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}"; - } - { - Name = "Debian Wiki"; - Description = "Debian Wiki search"; - Alias = "!dw"; - Method = "GET"; - URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; - } - ]; - }; - extensions = { - # simplefox.enable = true; - darkreader.enable = true; - # vimium.enable = true; - extraExtensions = { - "webextension@vimium".install_url = "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi"; - }; - }; - security = { - sanitizeOnShutdown = true; - sandbox = true; - userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; - }; - - misc = { - drmFix = false; - disableWebgl = true; - }; - }; + programs.schizofox = { + enable = true; + theme = { + background-darker = "181825"; + background = "1e1e2e"; + foreground = "cdd6f4"; + font = "Lexend"; + simplefox.enable = false; + darkreader.enable = true; + extraCss = '' + body { + color: red !important; + } + ''; }; + search = { + defaultSearchEngine = "DuckDuckGo"; + removeEngines = + [ "Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" ]; + addEngines = [ + { + Name = "NixOS Packages"; + Description = "NixOS Unstable package search"; + Alias = "!np"; + Method = "GET"; + URLTemplate = + "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; + } + { + Name = "NixOS Options"; + Description = "NixOS Unstable option search"; + Alias = "!no"; + Method = "GET"; + URLTemplate = + "https://search.nixos.org/options?channel=unstable&query={searchTerms}"; + } + { + Name = "NixOS Wiki"; + Description = "NixOS Wiki search"; + Alias = "!nw"; + Method = "GET"; + URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}"; + } + { + Name = "Home Manager Options"; + Description = "Home Manager option search"; + Alias = "!hm"; + Method = "GET"; + URLTemplate = + "https://mipmip.github.io/home-manager-option-search?query={searchTerms}"; + } + { + Name = "Arch Wiki"; + Description = "Arch Wiki search"; + Alias = "!aw"; + Method = "GET"; + URLTemplate = + "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + { + Name = "Gentoo Wiki"; + Description = "Gentoo Wiki search"; + Alias = "!gw"; + Method = "GET"; + URLTemplate = + "https://wiki.gentoo.org/index.php?search={searchTerms}"; + } + { + Name = "Debian Wiki"; + Description = "Debian Wiki search"; + Alias = "!dw"; + Method = "GET"; + URLTemplate = + "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}"; + } + ]; + }; + extensions = { + # simplefox.enable = true; + darkreader.enable = true; + # vimium.enable = true; + extraExtensions = { + "webextension@vimium".install_url = + "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi"; + }; + }; + security = { + sanitizeOnShutdown = true; + sandbox = true; + userAgent = + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"; + }; + + misc = { + drmFix = false; + disableWebgl = true; + }; + }; }; + }; } diff --git a/modules/gui/spicetify.nix b/modules/gui/spicetify.nix index 2f1d7a8..2f37b6c 100644 --- a/modules/gui/spicetify.nix +++ b/modules/gui/spicetify.nix @@ -1,15 +1,12 @@ { config, pkgs, lib, inputs, ... }: -with lib; let - cfg = config.modules.programs.spicetify; - username = config.modules.other.system.username; - #inherit (inputs.spicetify-nix.packages.${pkgs.system}.default) spicePkgs; - inherit (inputs.spicetify-nix.packages.${pkgs.system}) spicetify-nix; +with lib; +let + cfg = config.modules.programs.spicetify; + username = config.modules.other.system.username; + #inherit (inputs.spicetify-nix.packages.${pkgs.system}.default) spicePkgs; + inherit (inputs.spicetify-nix.packages.${pkgs.system}) spicetify-nix; in { - options.modules.programs.spicetify.enable = mkEnableOption "spicetify"; - imports = [ spicetify-nix.homeManagerModule ]; - config = mkIf cfg.enable { - programs.spicetify = { - enable = true; - }; - }; + options.modules.programs.spicetify.enable = mkEnableOption "spicetify"; + imports = [ spicetify-nix.homeManagerModule ]; + config = mkIf cfg.enable { programs.spicetify = { enable = true; }; }; } diff --git a/modules/gui/steam.nix b/modules/gui/steam.nix index ca600f2..1f118b3 100644 --- a/modules/gui/steam.nix +++ b/modules/gui/steam.nix @@ -1,22 +1,21 @@ - { config, lib, inputs, pkgs, ... }: -with lib; let +with lib; +let username = config.modules.other.system.username; cfg = config.modules.programs.steam; in { options.modules.programs.steam = { - enable = mkEnableOption "steam"; - gamescope = mkEnableOption "gamescope"; + enable = mkEnableOption "steam"; + gamescope = mkEnableOption "gamescope"; }; config = mkIf cfg.enable { programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - gamescopeSession.enable = mkIf cfg.gamescope true; - }; - home-manager.users.${username} = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + gamescopeSession.enable = mkIf cfg.gamescope true; }; + home-manager.users.${username} = { }; }; } diff --git a/modules/gui/stylix.nix b/modules/gui/stylix.nix index a1da2dd..601d384 100644 --- a/modules/gui/stylix.nix +++ b/modules/gui/stylix.nix @@ -1,73 +1,78 @@ { config, pkgs, lib, ... }: -with lib; let - cfg = config.modules.programs.stylix; - username = config.modules.other.system.username; +with lib; +let + cfg = config.modules.programs.stylix; + username = config.modules.other.system.username; in { - options.modules.programs.stylix.enable = mkEnableOption "stylix"; + options.modules.programs.stylix.enable = mkEnableOption "stylix"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - stylix = { - polarity = "dark"; - image = ../../FreeBSD.png; - base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-soft.yaml"; - autoEnable = true; - targets = { - btop.enable = true; - fish.enable = true; - dunst.enable = true; - emacs.enable = true; - firefox.enable = true; - kitty.enable = true; - lazygit.enable = true; - rofi.enable = true; - foot.enable = true; - tmux.enable = true; - waybar.enable = true; - vim.enable = true; - zathura.enable = true; - gtk.enable = true; - hyprland.enable = true; - }; - opacity = { - applications = 0.9; - popups = 0.9; - desktop = 0.9; - terminal = 0.9; - }; - cursor = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 24; - }; - fonts = { - sizes = { - terminal = 14; - popups = 14; + config = mkIf cfg.enable { + home-manager.users.${username} = { + stylix = { + polarity = "dark"; + image = ../../FreeBSD.png; + base16Scheme = + "${pkgs.base16-schemes}/share/themes/gruvbox-dark-soft.yaml"; + autoEnable = true; + targets = { + btop.enable = true; + fish.enable = true; + dunst.enable = true; + emacs.enable = true; + firefox.enable = true; + kitty.enable = true; + lazygit.enable = true; + rofi.enable = true; + foot.enable = true; + tmux.enable = true; + waybar.enable = true; + vim.enable = true; + zathura.enable = true; + gtk.enable = true; + hyprland.enable = true; + }; + opacity = { + applications = 0.9; + popups = 0.9; + desktop = 0.9; + terminal = 0.9; + }; + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + fonts = { + sizes = { + terminal = 14; + popups = 14; - }; - monospace = { - package = (pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}); - name = "JetBrainsMono"; - }; - serif = { - package = (pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}); - name = "JetBrainsMono"; - }; - sansSerif = { - package = (pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}); - name = "JetBrainsMono"; - }; - emoji = { - package = pkgs.noto-fonts-emoji; - name = "Noto Color Emoji"; - }; - }; - }; - }; - stylix = { - image = ../../FreeBSD.png; - polarity = "dark"; + }; + monospace = { + package = + (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); + name = "JetBrainsMono"; + }; + serif = { + package = + (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); + name = "JetBrainsMono"; + }; + sansSerif = { + package = + (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); + name = "JetBrainsMono"; + }; + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; }; + }; }; + stylix = { + image = ../../FreeBSD.png; + polarity = "dark"; + }; + }; } diff --git a/modules/gui/vesktop.nix b/modules/gui/vesktop.nix index e1a652a..b930e6c 100644 --- a/modules/gui/vesktop.nix +++ b/modules/gui/vesktop.nix @@ -1,373 +1,371 @@ -{ - config, - lib, - pkgs, - ... -}: with lib; let - cfg = config.modules.programs.vesktop; - username = config.modules.other.system.username; +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.modules.programs.vesktop; + username = config.modules.other.system.username; in { - options.modules.programs.vesktop = { - enable = mkEnableOption "vesktop"; - }; + options.modules.programs.vesktop = { enable = mkEnableOption "vesktop"; }; - config = mkIf cfg.enable { - home-manager.users.${username} = { - home.packages = with pkgs; [ vesktop ]; - xdg.configFile."vesktop/settings.json".text = builtins.toJSON { - discordBranch = "ptb"; - firstLaunch = false; - arRPC = "on"; - splashColor = "rgb(219, 222, 225)"; - splashBackground = "rgb(49, 51, 56)"; - checkUpdates = false; - staticTitle = true; - disableMinSize = true; - minimizeToTray = false; - tray = false; - appBadge = false; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + home.packages = with pkgs; [ vesktop ]; + xdg.configFile."vesktop/settings.json".text = builtins.toJSON { + discordBranch = "ptb"; + firstLaunch = false; + arRPC = "on"; + splashColor = "rgb(219, 222, 225)"; + splashBackground = "rgb(49, 51, 56)"; + checkUpdates = false; + staticTitle = true; + disableMinSize = true; + minimizeToTray = false; + tray = false; + appBadge = false; + }; - xdg.configFile."vesktop/settings/settings.json".text = builtins.toJSON { - notifyAboutUpdates = false; - autoUpdate = false; - autoUpdateNotification = false; - useQuickCss = true; - themeLinks = ["https://github.com/Costeer/Gruvbox-Material-Themes/blob/main/Discord%20Theme/gruvboxmaterial.theme.css"]; - enabledThemes = ["gruvboxmaterial.theme.css"]; - enableReactDevtools = true; - frameless = false; - transparent = false; - winCtrlQ = false; - macosTranslucency = false; - disableMinSize = true; - winNativeTitleBar = false; - plugins = { - BadgeAPI.enabled = true; - CommandsAPI.enabled = true; - ContextMenuAPI.enabled = true; - MemberListDecoratorsAPI.enabled = true; - MessageAccessoriesAPI.enabled = true; - MessageDecorationsAPI.enabled = true; - MessageEventsAPI.enabled = true; - MessagePopoverAPI.enabled = true; - NoticesAPI.enabled = true; - ServerListAPI.enabled = true; - SettingsStoreAPI.enabled = true; - NoTrack.enabled = true; - Settings = { - enabled = true; - settingsLocation = "aboveActivity"; - }; - AlwaysAnimate.enabled = false; - AlwaysTrust.enabled = false; - AnonymiseFileNames.enabled = false; - "WebRichPresence (arRPC)".enabled = false; - BANger.enabled = false; - BetterFolders = { - enabled = true; - sidebar = true; - sidebarAnim = true; - closeAllFolders = false; - closeAllHomeButton = false; - closeOthers = false; - forceOpen = false; - keepIcons = false; - showFolderIcon = 1; - }; - BetterGifAltText.enabled = false; - BetterNotesBox.enabled = false; - BetterRoleDot.enabled = false; - BetterUploadButton.enabled = true; - BiggerStreamPreview.enabled = true; - BlurNSFW.enabled = false; - CallTimer = { - enabled = true; - format = "human"; - }; - ClearURLs.enabled = true; - ColorSighted.enabled = true; - ConsoleShortcuts.enabled = false; - CopyUserURLs.enabled = true; - CrashHandler.enabled = true; - CustomRPC.enabled = false; - Dearrow.enabled = true; - DisableDMCallIdle.enabled = true; - EmoteCloner.enabled = false; - Experiments = { - enabled = true; - enableIsStaff = false; - }; - F8Break.enabled = false; - FakeNitro = { - enabled = true; - enableEmojiBypass = true; - emojiSize = 48; - transformEmojis = true; - enableStickerBypass = true; - stickerSize = 160; - transformStickers = true; - transformCompoundSentence = false; - enableStreamQualityBypass = true; - }; - FakeProfileThemes = { - enabled = true; - nitroFirst = true; - }; - FavoriteEmojiFirst.enabled = true; - FavoriteGifSearch = { - enabled = true; - searchOption = "hostandpath"; - }; - FixImagesQuality.enabled = true; - FixSpotifyEmbed = { - enabled = true; - volume = 10; - }; - ForceOwnerCrown.enabled = true; - FriendInvites.enabled = false; - GameActivityToggle.enabled = true; - GifPaste.enabled = true; - HideAttachments.enabled = true; - iLoveSpam.enabled = true; - IgnoreActivities = { - enabled = true; - ignoredActivities = []; - }; - ImageZoom = { - enabled = true; - saveZoomValues = true; - invertScroll = true; - nearestNeighbour = false; - square = false; - zoom = 2; - size = 100; - zoomSpeed = 0.5; - }; - InvisibleChat = { - enabled = true; - savedPasswords = "password"; - }; - KeepCurrentChannel.enabled = true; - LastFMRichPresence.enabled = false; - LoadingQuotes.enabled = false; - MemberCount.enabled = true; - MessageClickActions = { - enabled = true; - enableDeleteOnClick = true; - enableDoubleClickToEdit = true; - enableDoubeClickToReply = true; - requireModifier = true; - }; - MessageLinkEmbeds = { - enabled = true; - automodEmbeds = "never"; - listMode = "blacklist"; - idList = ""; - }; - MessageLogger = { - enabled = true; - deleteStyle = "text"; - ignoreBots = false; - ignoreSelf = false; - ignoreUsers = ""; - ignoreChannels = ""; - ignoreGuilds = ""; - }; - MessageTags.enabled = false; - MoreCommands.enabled = true; - MoreKaomoji.enabled = true; - MoreUserTags.enabled = true; - Moyai.enabled = false; - MuteNewGuild = { - enabled = true; - guild = false; - everyone = true; - role = true; - }; - MutualGroupDMs.enabled = true; - NoBlockedMessages = { - enabled = false; - ignoreBlockedMessages = false; - }; - NoDevtoolsWarning.enabled = false; - NoF1.enabled = false; - NoPendingCount.enabled = false; - NoProfileThemes.enabled = true; - NoReplyMention = { - enabled = true; - userList = "372809091208445953"; - shouldPingListed = false; - inverseShiftReply = true; - }; - NoScreensharePreview.enabled = true; - NoTypingAnimation = true; - NoUnblockToJump.enabled = true; - NSFWGateBypass.enabled = true; - oneko.enabled = false; - OpenInApp.enabled = false; - "Party mode 🎉".enabled = false; - PermissionFreeWill = { - enabled = true; - lockout = true; - onboarding = true; - }; - PermissionsViewer = { - enabled = true; - permissionsSortOrder = 0; - defaultPermissionsDropdownState = false; - }; - petpet.enabled = true; - PictureInPicture = { - enabled = true; - loop = false; - }; - PinDMs.enabled = true; - PlainFolderIcon.enabled = false; - PlatformIndicators = { - enabled = true; - list = true; - badges = true; - messages = true; - colorMobileIndicator = true; - }; - PreviewMessage.enabled = true; - PronounDB.enabled = false; - QuickMention.enabled = false; - QuickReply.enabled = false; - ReactErrorDecoder.enabled = false; - ReadAllNotificationsButton.enabled = false; - RelationshipNotifier = { - enabled = true; - notices = true; - offlineRemovals = true; - friends = true; - friendRequestCancels = true; - servers = true; - groups = true; - }; - RevealAllSpoilers.enabled = true; - ReverseImageSearch.enabled = false; - ReviewDB.enabled = false; - RoleColorEverywhere = { - enabled = true; - chatMentions = true; - memberList = true; - voiceUsers = true; - }; - SearchReply.enabled = true; - SendTimestamps.enabled = false; - ServerListIndicators = { - enabled = true; - mode = 3; - }; - ServerProfile.enabled = true; - ShikiCodeblocks = { - enabled = true; - theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json"; - tryHljs = "SECONDARY"; - uesDevIcon = "GREYSCALE"; - }; - ShowAllMessageButtons.enabled = true; - ShowConnections = { - enabled = true; - iconSize = 32; - iconSpacing = 1; - }; - ShowHiddenChannels = { - enabled = true; - hideUnreads = true; - showMode = 0; - defaultAllowedUsersAndRolesDropdownState = true; - }; - ShowMeYourName.enabled = false; - ShowTimeouts.enabled = true; - SilentMessageToggle = { - enabled = true; - persistState = false; - autoDisable = true; - }; - SilentTyping = { - enabled = true; - showIcon = false; - isEnabled = true; - }; - SortFriendRequests.enabled = false; - SpotifyControls.enabled = false; - SpotifyCrack.enabled = false; - SpotifyShareCommands.enabled = false; - StartupTimings.enabled = false; - SupportHelper.enabled = true; - TextReplace.enabled = false; - TimeBarAllActivities.enabled = false; - Translate.enabled = false; - TypingIndicator = { - enabled = true; - includeMutedChannels = false; - includeBlockedUsers = true; - }; - TypingTweaks = { - enabled = true; - showAvatars = true; - showRoleColors = true; - alternativeFormatting = true; - }; - Unindent.enabled = true; - UnsuppressEmbeds.enabled = true; - UrbanDictionary.enabled = false; - UserVoiceShow = { - enabled = true; - showInUserProfileModal = true; - showVoiceChannelSectionHeader = true; - }; - USRBG.enabled = false; - UwUifier.enabled = false; - ValidUser.enabled = false; - VoiceChatDoubleClick.enabled = true; - VcNarrator.enabled = false; - VencordToolbox.enabled = false; - ViewIcons = { - enabled = true; - format = "png"; - imgSize = "2048"; - }; - ViewRaw = { - enabled = true; - clickMethod = "Left"; - }; - VoiceMessages = { - enabled = true; - noiseSuppression = true; - echoCancellation = true; - }; - WebContextMenus = { - enabled = true; - addBack = true; - }; - WebKeybinds.enabled = true; - GreetStickerPicker.enabled = false; - WhoReacted.enabled = true; - Wikisearch.enabled = false; - NormalizeMessageLinks.enabled = false; - "AI Noise Suppression" = { - enabled = true; - isEnabled = true; - }; - SecretRingToneEnabler.enabled = false; - }; - notifications = { - timeout = 5000; - position = "bottom-right"; - useNative = "not-focused"; - logLimit = 50; - }; - cloud = { - authenticated = false; - url = "https://api.vencord.dev/"; - settingsSync = false; - settingsSyncVersion = 1682768329526; - }; - }; + xdg.configFile."vesktop/settings/settings.json".text = builtins.toJSON { + notifyAboutUpdates = false; + autoUpdate = false; + autoUpdateNotification = false; + useQuickCss = true; + themeLinks = [ + "https://github.com/Costeer/Gruvbox-Material-Themes/blob/main/Discord%20Theme/gruvboxmaterial.theme.css" + ]; + enabledThemes = [ "gruvboxmaterial.theme.css" ]; + enableReactDevtools = true; + frameless = false; + transparent = false; + winCtrlQ = false; + macosTranslucency = false; + disableMinSize = true; + winNativeTitleBar = false; + plugins = { + BadgeAPI.enabled = true; + CommandsAPI.enabled = true; + ContextMenuAPI.enabled = true; + MemberListDecoratorsAPI.enabled = true; + MessageAccessoriesAPI.enabled = true; + MessageDecorationsAPI.enabled = true; + MessageEventsAPI.enabled = true; + MessagePopoverAPI.enabled = true; + NoticesAPI.enabled = true; + ServerListAPI.enabled = true; + SettingsStoreAPI.enabled = true; + NoTrack.enabled = true; + Settings = { + enabled = true; + settingsLocation = "aboveActivity"; + }; + AlwaysAnimate.enabled = false; + AlwaysTrust.enabled = false; + AnonymiseFileNames.enabled = false; + "WebRichPresence (arRPC)".enabled = false; + BANger.enabled = false; + BetterFolders = { + enabled = true; + sidebar = true; + sidebarAnim = true; + closeAllFolders = false; + closeAllHomeButton = false; + closeOthers = false; + forceOpen = false; + keepIcons = false; + showFolderIcon = 1; + }; + BetterGifAltText.enabled = false; + BetterNotesBox.enabled = false; + BetterRoleDot.enabled = false; + BetterUploadButton.enabled = true; + BiggerStreamPreview.enabled = true; + BlurNSFW.enabled = false; + CallTimer = { + enabled = true; + format = "human"; + }; + ClearURLs.enabled = true; + ColorSighted.enabled = true; + ConsoleShortcuts.enabled = false; + CopyUserURLs.enabled = true; + CrashHandler.enabled = true; + CustomRPC.enabled = false; + Dearrow.enabled = true; + DisableDMCallIdle.enabled = true; + EmoteCloner.enabled = false; + Experiments = { + enabled = true; + enableIsStaff = false; + }; + F8Break.enabled = false; + FakeNitro = { + enabled = true; + enableEmojiBypass = true; + emojiSize = 48; + transformEmojis = true; + enableStickerBypass = true; + stickerSize = 160; + transformStickers = true; + transformCompoundSentence = false; + enableStreamQualityBypass = true; + }; + FakeProfileThemes = { + enabled = true; + nitroFirst = true; + }; + FavoriteEmojiFirst.enabled = true; + FavoriteGifSearch = { + enabled = true; + searchOption = "hostandpath"; + }; + FixImagesQuality.enabled = true; + FixSpotifyEmbed = { + enabled = true; + volume = 10; + }; + ForceOwnerCrown.enabled = true; + FriendInvites.enabled = false; + GameActivityToggle.enabled = true; + GifPaste.enabled = true; + HideAttachments.enabled = true; + iLoveSpam.enabled = true; + IgnoreActivities = { + enabled = true; + ignoredActivities = [ ]; + }; + ImageZoom = { + enabled = true; + saveZoomValues = true; + invertScroll = true; + nearestNeighbour = false; + square = false; + zoom = 2; + size = 100; + zoomSpeed = 0.5; + }; + InvisibleChat = { + enabled = true; + savedPasswords = "password"; + }; + KeepCurrentChannel.enabled = true; + LastFMRichPresence.enabled = false; + LoadingQuotes.enabled = false; + MemberCount.enabled = true; + MessageClickActions = { + enabled = true; + enableDeleteOnClick = true; + enableDoubleClickToEdit = true; + enableDoubeClickToReply = true; + requireModifier = true; + }; + MessageLinkEmbeds = { + enabled = true; + automodEmbeds = "never"; + listMode = "blacklist"; + idList = ""; + }; + MessageLogger = { + enabled = true; + deleteStyle = "text"; + ignoreBots = false; + ignoreSelf = false; + ignoreUsers = ""; + ignoreChannels = ""; + ignoreGuilds = ""; + }; + MessageTags.enabled = false; + MoreCommands.enabled = true; + MoreKaomoji.enabled = true; + MoreUserTags.enabled = true; + Moyai.enabled = false; + MuteNewGuild = { + enabled = true; + guild = false; + everyone = true; + role = true; + }; + MutualGroupDMs.enabled = true; + NoBlockedMessages = { + enabled = false; + ignoreBlockedMessages = false; + }; + NoDevtoolsWarning.enabled = false; + NoF1.enabled = false; + NoPendingCount.enabled = false; + NoProfileThemes.enabled = true; + NoReplyMention = { + enabled = true; + userList = "372809091208445953"; + shouldPingListed = false; + inverseShiftReply = true; + }; + NoScreensharePreview.enabled = true; + NoTypingAnimation = true; + NoUnblockToJump.enabled = true; + NSFWGateBypass.enabled = true; + oneko.enabled = false; + OpenInApp.enabled = false; + "Party mode 🎉".enabled = false; + PermissionFreeWill = { + enabled = true; + lockout = true; + onboarding = true; + }; + PermissionsViewer = { + enabled = true; + permissionsSortOrder = 0; + defaultPermissionsDropdownState = false; + }; + petpet.enabled = true; + PictureInPicture = { + enabled = true; + loop = false; + }; + PinDMs.enabled = true; + PlainFolderIcon.enabled = false; + PlatformIndicators = { + enabled = true; + list = true; + badges = true; + messages = true; + colorMobileIndicator = true; + }; + PreviewMessage.enabled = true; + PronounDB.enabled = false; + QuickMention.enabled = false; + QuickReply.enabled = false; + ReactErrorDecoder.enabled = false; + ReadAllNotificationsButton.enabled = false; + RelationshipNotifier = { + enabled = true; + notices = true; + offlineRemovals = true; + friends = true; + friendRequestCancels = true; + servers = true; + groups = true; + }; + RevealAllSpoilers.enabled = true; + ReverseImageSearch.enabled = false; + ReviewDB.enabled = false; + RoleColorEverywhere = { + enabled = true; + chatMentions = true; + memberList = true; + voiceUsers = true; + }; + SearchReply.enabled = true; + SendTimestamps.enabled = false; + ServerListIndicators = { + enabled = true; + mode = 3; + }; + ServerProfile.enabled = true; + ShikiCodeblocks = { + enabled = true; + theme = + "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json"; + tryHljs = "SECONDARY"; + uesDevIcon = "GREYSCALE"; + }; + ShowAllMessageButtons.enabled = true; + ShowConnections = { + enabled = true; + iconSize = 32; + iconSpacing = 1; + }; + ShowHiddenChannels = { + enabled = true; + hideUnreads = true; + showMode = 0; + defaultAllowedUsersAndRolesDropdownState = true; + }; + ShowMeYourName.enabled = false; + ShowTimeouts.enabled = true; + SilentMessageToggle = { + enabled = true; + persistState = false; + autoDisable = true; + }; + SilentTyping = { + enabled = true; + showIcon = false; + isEnabled = true; + }; + SortFriendRequests.enabled = false; + SpotifyControls.enabled = false; + SpotifyCrack.enabled = false; + SpotifyShareCommands.enabled = false; + StartupTimings.enabled = false; + SupportHelper.enabled = true; + TextReplace.enabled = false; + TimeBarAllActivities.enabled = false; + Translate.enabled = false; + TypingIndicator = { + enabled = true; + includeMutedChannels = false; + includeBlockedUsers = true; + }; + TypingTweaks = { + enabled = true; + showAvatars = true; + showRoleColors = true; + alternativeFormatting = true; + }; + Unindent.enabled = true; + UnsuppressEmbeds.enabled = true; + UrbanDictionary.enabled = false; + UserVoiceShow = { + enabled = true; + showInUserProfileModal = true; + showVoiceChannelSectionHeader = true; + }; + USRBG.enabled = false; + UwUifier.enabled = false; + ValidUser.enabled = false; + VoiceChatDoubleClick.enabled = true; + VcNarrator.enabled = false; + VencordToolbox.enabled = false; + ViewIcons = { + enabled = true; + format = "png"; + imgSize = "2048"; + }; + ViewRaw = { + enabled = true; + clickMethod = "Left"; + }; + VoiceMessages = { + enabled = true; + noiseSuppression = true; + echoCancellation = true; + }; + WebContextMenus = { + enabled = true; + addBack = true; + }; + WebKeybinds.enabled = true; + GreetStickerPicker.enabled = false; + WhoReacted.enabled = true; + Wikisearch.enabled = false; + NormalizeMessageLinks.enabled = false; + "AI Noise Suppression" = { + enabled = true; + isEnabled = true; + }; + SecretRingToneEnabler.enabled = false; }; + notifications = { + timeout = 5000; + position = "bottom-right"; + useNative = "not-focused"; + logLimit = 50; + }; + cloud = { + authenticated = false; + url = "https://api.vencord.dev/"; + settingsSync = false; + settingsSyncVersion = 1682768329526; + }; + }; }; + }; } diff --git a/modules/gui/vivado.nix b/modules/gui/vivado.nix index 9f9a3c8..b6ecc86 100644 --- a/modules/gui/vivado.nix +++ b/modules/gui/vivado.nix @@ -1,5 +1,4 @@ -{ pkgs, nur, ...}: - +{ pkgs, nur, ... }: let vivado-desktop-symbol = pkgs.makeDesktopItem { @@ -7,17 +6,15 @@ let desktopName = "Vivado"; exec = "${pkgs.nur.repos.lschuermann.vivado-2022_2}/bin/vivado"; }; -in -{ +in { - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; [ # this propietary software is huge, but I need it for # university pkgs.nur.repos.lschuermann.vivado-2022_2 vivado-desktop-symbol ]; - # Create udev rules. Reference: https://blog.kotatsu.dev/posts/2021-09-14-vivado-on-nixos/ services.udev.packages = [ (pkgs.writeTextFile { diff --git a/modules/gui/zathura.nix b/modules/gui/zathura.nix index 10b222a..421f545 100644 --- a/modules/gui/zathura.nix +++ b/modules/gui/zathura.nix @@ -1,33 +1,29 @@ -{ - config, - lib, - pkgs, - ... -}: with lib; let - cfg = config.modules.programs.zathura; - username = config.modules.other.system.username; - catppuccin = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "zathura"; - rev = "4eb02fd206de63b2423f6deb58242d352545b52f"; - hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI="; - }; +{ config, lib, pkgs, ... }: +with lib; +let + cfg = config.modules.programs.zathura; + username = config.modules.other.system.username; + catppuccin = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "zathura"; + rev = "4eb02fd206de63b2423f6deb58242d352545b52f"; + hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI="; + }; in { - options.modules.programs.zathura.enable = mkEnableOption "zathura"; + options.modules.programs.zathura.enable = mkEnableOption "zathura"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - xdg.configFile."zathura/catppuccin-mocha".source = "${catppuccin}/src/catppuccin-mocha"; - programs.zathura = { - enable = true; - extraConfig = '' - include catppuccin-mocha - ''; - options = { - selection-clipboard = "clipboard"; - }; - }; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + xdg.configFile."zathura/catppuccin-mocha".source = + "${catppuccin}/src/catppuccin-mocha"; + programs.zathura = { + enable = true; + extraConfig = '' + include catppuccin-mocha + ''; + options = { selection-clipboard = "clipboard"; }; + }; }; + }; } diff --git a/modules/other/default.nix b/modules/other/default.nix index fa98cba..de04108 100644 --- a/modules/other/default.nix +++ b/modules/other/default.nix @@ -1,8 +1,2 @@ -_: { - imports = [ - ./home-manager.nix - ./system.nix - ./xdg.nix - ]; -} +_: { imports = [ ./home-manager.nix ./system.nix ./xdg.nix ]; } diff --git a/modules/other/home-manager.nix b/modules/other/home-manager.nix index ef5de08..40934c9 100644 --- a/modules/other/home-manager.nix +++ b/modules/other/home-manager.nix @@ -1,38 +1,34 @@ -{ - config, - inputs, - lib, - self, - ... -}: with lib; let - cfg = config.modules.other.home-manager; - username = config.modules.other.system.username; +{ config, inputs, lib, self, ... }: +with lib; +let + cfg = config.modules.other.home-manager; + username = config.modules.other.system.username; in { - options.modules.other.home-manager = { - enable = mkEnableOption "home-manager"; - enableDirenv = mkEnableOption "direnv"; - }; + options.modules.other.home-manager = { + enable = mkEnableOption "home-manager"; + enableDirenv = mkEnableOption "direnv"; + }; - config = mkIf cfg.enable { - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - extraSpecialArgs = {inherit inputs self;}; - users.${username} = { - programs = { - home-manager.enable = true; - direnv = mkIf cfg.enableDirenv { - enable = true; - nix-direnv.enable = true; - }; - }; - - home = { - inherit username; - homeDirectory = "/home/${username}"; - stateVersion = lib.mkDefault "23.11"; - }; - }; + config = mkIf cfg.enable { + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + extraSpecialArgs = { inherit inputs self; }; + users.${username} = { + programs = { + home-manager.enable = true; + direnv = mkIf cfg.enableDirenv { + enable = true; + nix-direnv.enable = true; + }; }; + + home = { + inherit username; + homeDirectory = "/home/${username}"; + stateVersion = lib.mkDefault "23.11"; + }; + }; }; + }; } diff --git a/modules/other/system.nix b/modules/other/system.nix index ab21d91..5ec68b6 100644 --- a/modules/other/system.nix +++ b/modules/other/system.nix @@ -1,33 +1,30 @@ -{ - config, - lib, - ... -}: with lib; let - cfg = config.modules.other.system; +{ config, lib, ... }: +with lib; +let cfg = config.modules.other.system; in { - options.modules.other.system = { - hostname = mkOption { - description = "hostname for this system"; - type = types.str; - }; - - username = mkOption { - description = "username for this system"; - type = types.str; - }; - - gitPath = mkOption { - description = "path to the flake directory"; - type = types.str; - }; + options.modules.other.system = { + hostname = mkOption { + description = "hostname for this system"; + type = types.str; }; - config = { - networking.hostName = cfg.hostname; - - users.users.${cfg.username} = { - isNormalUser = true; - extraGroups = [ "wheel" ]; - }; + username = mkOption { + description = "username for this system"; + type = types.str; }; + + gitPath = mkOption { + description = "path to the flake directory"; + type = types.str; + }; + }; + + config = { + networking.hostName = cfg.hostname; + + users.users.${cfg.username} = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + }; + }; } diff --git a/modules/other/xdg.nix b/modules/other/xdg.nix index ef08569..cb61b4b 100644 --- a/modules/other/xdg.nix +++ b/modules/other/xdg.nix @@ -1,68 +1,66 @@ { pkgs, config, ... }: let - username = config.modules.other.system.username; - hmCfg = config.home-manager.users.${username}; + username = config.modules.other.system.username; + hmCfg = config.home-manager.users.${username}; - primary_browser = "librewolf.desktop"; - mail_client = "thunderbird.desktop"; - file_manager = "pcmanfm.desktop"; - media_player = "mpv.desktop"; - image_viewer = "imv.desktop"; - text_editor = "helix.desktop"; - terminal = "kitty.desktop"; + primary_browser = "librewolf.desktop"; + mail_client = "thunderbird.desktop"; + file_manager = "pcmanfm.desktop"; + media_player = "mpv.desktop"; + image_viewer = "imv.desktop"; + text_editor = "helix.desktop"; + terminal = "kitty.desktop"; in { - environment.sessionVariables = { - TERMINAL = "${terminal}"; - }; - - home-manager.users.${username} = { - xdg = { - cacheHome = "${hmCfg.home.homeDirectory}/.cache"; - configHome = "${hmCfg.home.homeDirectory}/.config"; - dataHome = "${hmCfg.home.homeDirectory}/.local/share"; - stateHome = "${hmCfg.home.homeDirectory}/.local/state"; - mimeApps = { - enable = true; - defaultApplications = { - "text/html" = [ primary_browser ]; - "x-scheme-handler/http" = [ primary_browser ]; - "x-scheme-handler/https" = [ primary_browser ]; - "x-scheme-handler/about" = [ primary_browser ]; - "x-scheme-handler/unknown" = [ primary_browser ]; - "x-scheme-handler/mailto" = [ mail_client ]; - "message/rfc822" = [ mail_client ]; - "x-scheme-handler/mid" = [ mail_client ]; - "inode/directory" = [ file_manager ]; - "audio/mp3" = [ media_player ]; - "audio/ogg" = [ media_player ]; - "audio/mpeg" = [ media_player ]; - "audio/aac" = [ media_player ]; - "audio/opus" = [ media_player ]; - "audio/wav" = [ media_player ]; - "audio/webm" = [ media_player ]; - "audio/3gpp" = [ media_player ]; - "audio/3gpp2" = [ media_player ]; - "video/mp4" = [ media_player ]; - "video/x-msvideo" = [ media_player ]; - "video/mpeg" = [ media_player ]; - "video/ogg" = [ media_player ]; - "video/mp2t" = [ media_player ]; - "video/webm" = [ media_player ]; - "video/3gpp" = [ media_player ]; - "video/3gpp2" = [ media_player ]; - "image/png" = [ image_viewer ]; - "image/jpeg" = [ image_viewer ]; - "image/gif" = [ image_viewer ]; - "image/avif" = [ image_viewer ]; - "image/bmp" = [ image_viewer ]; - "image/vnd.microsoft.icon" = [ image_viewer ]; - "image/svg+xml" = [ image_viewer ]; - "image/tiff" = [ image_viewer ]; - "image/webp" = [ image_viewer ]; - "text/plain" = [ text_editor ]; - }; - }; + environment.sessionVariables = { TERMINAL = "${terminal}"; }; + + home-manager.users.${username} = { + xdg = { + cacheHome = "${hmCfg.home.homeDirectory}/.cache"; + configHome = "${hmCfg.home.homeDirectory}/.config"; + dataHome = "${hmCfg.home.homeDirectory}/.local/share"; + stateHome = "${hmCfg.home.homeDirectory}/.local/state"; + mimeApps = { + enable = true; + defaultApplications = { + "text/html" = [ primary_browser ]; + "x-scheme-handler/http" = [ primary_browser ]; + "x-scheme-handler/https" = [ primary_browser ]; + "x-scheme-handler/about" = [ primary_browser ]; + "x-scheme-handler/unknown" = [ primary_browser ]; + "x-scheme-handler/mailto" = [ mail_client ]; + "message/rfc822" = [ mail_client ]; + "x-scheme-handler/mid" = [ mail_client ]; + "inode/directory" = [ file_manager ]; + "audio/mp3" = [ media_player ]; + "audio/ogg" = [ media_player ]; + "audio/mpeg" = [ media_player ]; + "audio/aac" = [ media_player ]; + "audio/opus" = [ media_player ]; + "audio/wav" = [ media_player ]; + "audio/webm" = [ media_player ]; + "audio/3gpp" = [ media_player ]; + "audio/3gpp2" = [ media_player ]; + "video/mp4" = [ media_player ]; + "video/x-msvideo" = [ media_player ]; + "video/mpeg" = [ media_player ]; + "video/ogg" = [ media_player ]; + "video/mp2t" = [ media_player ]; + "video/webm" = [ media_player ]; + "video/3gpp" = [ media_player ]; + "video/3gpp2" = [ media_player ]; + "image/png" = [ image_viewer ]; + "image/jpeg" = [ image_viewer ]; + "image/gif" = [ image_viewer ]; + "image/avif" = [ image_viewer ]; + "image/bmp" = [ image_viewer ]; + "image/vnd.microsoft.icon" = [ image_viewer ]; + "image/svg+xml" = [ image_viewer ]; + "image/tiff" = [ image_viewer ]; + "image/webp" = [ image_viewer ]; + "text/plain" = [ text_editor ]; }; + }; }; + }; } diff --git a/modules/services/default.nix b/modules/services/default.nix index bb236b3..38d5a6a 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,7 +1 @@ -_: { - imports = [ - ./pipewire.nix - ./ssh.nix - ./greetd.nix - ]; - } +_: { imports = [ ./pipewire.nix ./ssh.nix ./greetd.nix ]; } diff --git a/modules/services/greetd.nix b/modules/services/greetd.nix index 297500c..b1e76a7 100644 --- a/modules/services/greetd.nix +++ b/modules/services/greetd.nix @@ -1,46 +1,56 @@ { config, inputs, lib, pkgs, ... }: -with lib; let - cfg = config.modules.services.greetd; - inherit (config.modules.other.system) username; +with lib; +let + cfg = config.modules.services.greetd; + inherit (config.modules.other.system) username; - hyprlandConfig = pkgs.writeText "greetd-hyprland-config" '' - misc { - force_default_wallpaper=0 - focus_on_activate=1 - } + hyprlandConfig = pkgs.writeText "greetd-hyprland-config" '' + misc { + force_default_wallpaper=0 + focus_on_activate=1 + } - animations { - enabled=0 - first_launch_animation=0 - } + animations { + enabled=0 + first_launch_animation=0 + } - workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false + workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false - #exec-once=[workspace 1;fullscreen;noanim] ${pkgs.greetd.${cfg.greeter}}/bin/${cfg.greeter} -l; ${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch exit - #exec-once=${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/hyprctl dispatch focuswindow ${cfg.greeter} - ''; + #exec-once=[workspace 1;fullscreen;noanim] ${ + pkgs.greetd.${cfg.greeter} + }/bin/${cfg.greeter} -l; ${ + inputs.hyprland.packages.${pkgs.system}.hyprland + }/bin/hyprctl dispatch exit + #exec-once=${ + inputs.hyprland.packages.${pkgs.system}.hyprland + }/bin/hyprctl dispatch focuswindow ${cfg.greeter} + ''; in { - options.modules.services.greetd = { - enable = mkEnableOption "greetd"; - greeter = mkOption { - description = "greetd frontend to use"; - type = types.str; - }; - launchOptions = mkOption { - description = "/etc/greetd/environments as list of strings"; - type = with types; listOf str; - }; + options.modules.services.greetd = { + enable = mkEnableOption "greetd"; + greeter = mkOption { + description = "greetd frontend to use"; + type = types.str; + }; + launchOptions = mkOption { + description = "/etc/greetd/environments as list of strings"; + type = with types; listOf str; + }; + }; + + config = mkIf cfg.enable { + services.greetd = { + enable = true; + settings.default_session = { + command = "${ + inputs.hyprland.packages.${pkgs.system}.hyprland + }/bin/Hyprland --config ${hyprlandConfig}"; + user = username; + }; }; - config = mkIf cfg.enable { - services.greetd = { - enable = true; - settings.default_session = { - command = "${inputs.hyprland.packages.${pkgs.system}.hyprland}/bin/Hyprland --config ${hyprlandConfig}"; - user = username; - }; - }; - - environment.etc."greetd/environments".text = concatStringsSep "\n" cfg.launchOptions; - }; + environment.etc."greetd/environments".text = + concatStringsSep "\n" cfg.launchOptions; + }; } diff --git a/modules/services/pipewire.nix b/modules/services/pipewire.nix index 618f98e..fcf32d3 100644 --- a/modules/services/pipewire.nix +++ b/modules/services/pipewire.nix @@ -1,6 +1,6 @@ { config, lib, ... }: -with lib; let - cfg = config.modules.services.pipewire; +with lib; +let cfg = config.modules.services.pipewire; in { options.modules.services.pipewire.enable = mkEnableOption "pipewire"; diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix index b44d94b..759bb6e 100644 --- a/modules/services/ssh.nix +++ b/modules/services/ssh.nix @@ -1,14 +1,11 @@ { config, lib, pkgs, ... }: -with lib; let - cfg = config.modules.programs.ssh; - username = config.modules.other.system.username; -in { - options.modules.programs.ssh.enable = mkEnableOption "ssh"; +with lib; +let + cfg = config.modules.programs.ssh; + username = config.modules.other.system.username; +in { + options.modules.programs.ssh.enable = mkEnableOption "ssh"; - config = mkIf cfg.enable { - programs.ssh = { - startAgent = true; - }; - }; + config = mkIf cfg.enable { programs.ssh = { startAgent = true; }; }; -} +} diff --git a/modules/tui/btop.nix b/modules/tui/btop.nix index 105b008..c2627d9 100644 --- a/modules/tui/btop.nix +++ b/modules/tui/btop.nix @@ -1,27 +1,28 @@ { config, lib, ... }: -with lib; let - cfg = config.modules.programs.btop; - username = config.modules.other.system.username; +with lib; +let + cfg = config.modules.programs.btop; + username = config.modules.other.system.username; in { - options.modules.programs.btop.enable = mkEnableOption "btop"; + options.modules.programs.btop.enable = mkEnableOption "btop"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.btop = { - enable = true; - settings = { - theme_background = false; - vim_keys = true; - update_ms = 1000; - cpu_single_graph = true; - clock_format = "%X"; - use_fstab = true; - io_mode = true; - net_sync = true; - net_iface = "enp4s0"; - log_level = "WARNING"; - }; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.btop = { + enable = true; + settings = { + theme_background = false; + vim_keys = true; + update_ms = 1000; + cpu_single_graph = true; + clock_format = "%X"; + use_fstab = true; + io_mode = true; + net_sync = true; + net_iface = "enp4s0"; + log_level = "WARNING"; }; + }; }; + }; } diff --git a/modules/tui/default.nix b/modules/tui/default.nix index 400ffec..79e26f1 100644 --- a/modules/tui/default.nix +++ b/modules/tui/default.nix @@ -1,10 +1,10 @@ _: { - imports = [ - ./btop.nix - ./helix.nix - ./neovim.nix - ./newsboat.nix - ./ncmpcpp.nix - ./yazi.nix - ]; + imports = [ + ./btop.nix + ./helix.nix + ./neovim.nix + ./newsboat.nix + ./ncmpcpp.nix + ./yazi.nix + ]; } diff --git a/modules/tui/helix.nix b/modules/tui/helix.nix index 4cea684..03a7489 100644 --- a/modules/tui/helix.nix +++ b/modules/tui/helix.nix @@ -1,30 +1,41 @@ { config, lib, pkgs, inputs, ... }: -with lib; let - cfg = config.modules.programs.helix; - username = config.modules.other.system.username; -in { - options.modules.programs.helix.enable = mkEnableOption "helix"; +with lib; +let + cfg = config.modules.programs.helix; + username = config.modules.other.system.username; +in { + options.modules.programs.helix.enable = mkEnableOption "helix"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.helix = { - enable = true; - settings = { - editor = { - line-number = "relative"; - mouse = false; - bufferline = "multiple"; - lsp.display-messages = true; - cursor-shape = { - insert = "bar"; - }; - }; - keys.normal = { - C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"]; - esc = ["collapse_selection" "keep_primary_selection"]; - }; - }; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.helix = { + enable = true; + settings = { + editor = { + line-number = "relative"; + mouse = false; + bufferline = "multiple"; + lsp.display-messages = true; + cursor-shape = { insert = "bar"; }; + statusline.left = + [ "mode" "spinner" "version-control" "file-name" ]; + }; + keys.normal = { + C-g = + [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ]; + C-t = [ ":new" ":insert-output fish" ":buffer-close!" ":redraw" ]; + esc = [ "collapse_selection" "keep_primary_selection" ]; + A-H = "goto_previous_buffer"; + A-L = "goto_next_buffer"; + A-w = ":buffer-close"; + }; }; + languages.language = [{ + name = "nix"; + auto-format = true; + formatter.command = "${pkgs.nixfmt}/bin/nixfmt"; + }]; + }; }; + }; } diff --git a/modules/tui/ncmpcpp.nix b/modules/tui/ncmpcpp.nix index e3036c6..733bbb7 100644 --- a/modules/tui/ncmpcpp.nix +++ b/modules/tui/ncmpcpp.nix @@ -1,81 +1,86 @@ { config, lib, pkgs, ... }: -with lib; let - cfg = config.modules.programs.ncmpcpp; - username = config.modules.other.system.username; -in { - options.modules.programs.ncmpcpp.enable = mkEnableOption "ncmpcpp"; +with lib; +let + cfg = config.modules.programs.ncmpcpp; + username = config.modules.other.system.username; +in { + options.modules.programs.ncmpcpp.enable = mkEnableOption "ncmpcpp"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - xdg.configFile."ncmpcpp/config".source = ./config; - programs.ncmpcpp = { - enable = true; - package = (pkgs.ncmpcpp.override {visualizerSupport = true;}); - mpdMusicDir = "/home/vali/Nextcloud/Media/Music"; - settings = { - mpd_host = "127.0.0.1"; - mpd_port = "6600"; - alternative_header_first_line_format = "$5{$b%t$/b}$9"; - alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}"; - song_list_format = "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)"; - song_columns_list_format ="(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}"; - song_status_format = "$b $8%A $8•$3• $3%t $3•$5• $5%b $5•$2• $2%y $2•$8• %g"; - playlist_display_mode = "columns"; - browser_display_mode = "columns"; - search_engine_display_mode = "columns"; - now_playing_prefix = "$b"; - now_playing_suffix = "$/b"; - browser_playlist_prefix = "$2 ♥ $5 "; - playlist_disable_highlight_delay = "1"; - message_delay_time = "1"; - progressbar_look = "━━━"; - colors_enabled = "yes"; - empty_tag_color = "red"; - statusbar_color = "blue"; - state_line_color = "black"; - state_flags_color = "default"; - main_window_color = "blue"; - header_window_color = "white"; - alternative_ui_separator_color = "black"; - window_border_color = "green"; - active_window_border = "red"; - volume_color = "default"; - progressbar_color = "black"; - progressbar_elapsed_color = "blue"; - statusbar_time_color = "blue"; - player_state_color = "default"; - display_bitrate = "yes"; - autocenter_mode = "yes"; - centered_cursor = "yes"; - titles_visibility = "no"; - enable_window_title = "yes"; - statusbar_visibility = "yes"; - empty_tag_marker=""; - mouse_support = "yes"; - header_visibility = "no"; - display_remaining_time = "no"; - ask_before_clearing_playlists = "yes"; - discard_colors_if_item_is_selected = "yes"; - user_interface = "alternative"; - default_find_mode = "wrapped"; - lyrics_directory = "~/.lyrics"; - follow_now_playing_lyrics = "yes"; - store_lyrics_in_song_dir = "no"; - ignore_leading_the = "yes"; - lines_scrolled = "1"; - mouse_list_scroll_whole_page = "no"; - show_hidden_files_in_local_browser = "no"; - startup_screen = "playlist"; - execute_on_song_change="/home/dobbie/.bin/np"; - connected_message_on_startup = "no"; - playlist_separate_albums = "no"; - allow_for_physical_item_deletion = "no"; - visualizer_in_stereo = "yes"; - visualizer_data_source = "/tmp/mpd.fifo"; - visualizer_type = "wave_filled"; - visualizer_look = "▉▋"; - }; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + xdg.configFile."ncmpcpp/config".source = ./config; + programs.ncmpcpp = { + enable = true; + package = (pkgs.ncmpcpp.override { visualizerSupport = true; }); + mpdMusicDir = "/home/vali/Nextcloud/Media/Music"; + settings = { + mpd_host = "127.0.0.1"; + mpd_port = "6600"; + alternative_header_first_line_format = "$5{$b%t$/b}$9"; + alternative_header_second_line_format = + "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}"; + song_list_format = + "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)"; + song_columns_list_format = + "(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}"; + song_status_format = + "$b $8%A $8•$3• $3%t $3•$5• $5%b $5•$2• $2%y $2•$8• %g"; + playlist_display_mode = "columns"; + browser_display_mode = "columns"; + search_engine_display_mode = "columns"; + now_playing_prefix = "$b"; + now_playing_suffix = "$/b"; + browser_playlist_prefix = "$2 ♥ $5 "; + playlist_disable_highlight_delay = "1"; + message_delay_time = "1"; + progressbar_look = "━━━"; + colors_enabled = "yes"; + empty_tag_color = "red"; + statusbar_color = "blue"; + state_line_color = "black"; + state_flags_color = "default"; + main_window_color = "blue"; + header_window_color = "white"; + alternative_ui_separator_color = "black"; + window_border_color = "green"; + active_window_border = "red"; + volume_color = "default"; + progressbar_color = "black"; + progressbar_elapsed_color = "blue"; + statusbar_time_color = "blue"; + player_state_color = "default"; + display_bitrate = "yes"; + autocenter_mode = "yes"; + centered_cursor = "yes"; + titles_visibility = "no"; + enable_window_title = "yes"; + statusbar_visibility = "yes"; + empty_tag_marker = ""; + mouse_support = "yes"; + header_visibility = "no"; + display_remaining_time = "no"; + ask_before_clearing_playlists = "yes"; + discard_colors_if_item_is_selected = "yes"; + user_interface = "alternative"; + default_find_mode = "wrapped"; + lyrics_directory = "~/.lyrics"; + follow_now_playing_lyrics = "yes"; + store_lyrics_in_song_dir = "no"; + ignore_leading_the = "yes"; + lines_scrolled = "1"; + mouse_list_scroll_whole_page = "no"; + show_hidden_files_in_local_browser = "no"; + startup_screen = "playlist"; + execute_on_song_change = "/home/dobbie/.bin/np"; + connected_message_on_startup = "no"; + playlist_separate_albums = "no"; + allow_for_physical_item_deletion = "no"; + visualizer_in_stereo = "yes"; + visualizer_data_source = "/tmp/mpd.fifo"; + visualizer_type = "wave_filled"; + visualizer_look = "▉▋"; }; + }; }; -} + }; +} diff --git a/modules/tui/neovim.nix b/modules/tui/neovim.nix index a05a53d..4ce9966 100644 --- a/modules/tui/neovim.nix +++ b/modules/tui/neovim.nix @@ -1,196 +1,190 @@ { config, inputs, lib, pkgs, ... }: -with lib; let - cfg = config.modules.programs.neovim; - username = config.modules.other.system.username; +with lib; +let + cfg = config.modules.programs.neovim; + username = config.modules.other.system.username; in { - options.modules.programs.neovim.enable = mkEnableOption "neovim"; + options.modules.programs.neovim.enable = mkEnableOption "neovim"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - imports = [ inputs.nixvim.homeManagerModules.nixvim ]; - programs.nixvim = { - enable = true; - enableMan = true; - defaultEditor = true; + config = mkIf cfg.enable { + home-manager.users.${username} = { + imports = [ inputs.nixvim.homeManagerModules.nixvim ]; + programs.nixvim = { + enable = true; + enableMan = true; + defaultEditor = true; - opts = { - background = "dark"; - shiftwidth = 4; - autoread = true; - cmdheight = 1; - encoding = "utf8"; - expandtab = true; - hidden = true; - ignorecase = true; - linebreak = true; - mousemoveevent = true; - number = true; - relativenumber = true; - showmatch = true; - smartcase = true; - smartindent = true; - smarttab = true; - so = 7; - timeoutlen = 500; - tabstop = 4; - updatetime = 50; - }; - - globals.mapleader = " "; - - plugins = { - lualine = { - enable = true; - theme = "catppuccin"; - }; - treesitter = { - enable = true; - folding = false; - indent = true; - nixvimInjections = true; - incrementalSelection.enable = true; - }; - treesitter-context = { - enable = true; - }; - coq-nvim = { - enable = true; - installArtifacts = true; - settings = { - auto_start = "shut-up"; - keymap.recommended = true; - completion.always = false; - }; - }; - neo-tree = { - enable = true; - }; - # TODO laytan/cloak.nvim - lsp = { - enable = true; - servers = { - rust-analyzer = { - enable = true; - installCargo = false; - installRustc = false; - }; - lua-ls.enable = true; - ccls.enable = true; - nil_ls.enable = true; - bashls.enable = true; - tsserver.enable = true; - java-language-server.enable = true; - #pylyzer.enable = true; - rnix-lsp.enable = true; - pyright.enable = true; - }; - #onAttach = '' - # vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - - # local bufopts = { noremap = true, silent = true, buffer = bufnr } - # vim.keymap.set('n', 'wl', function() - # print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - # end, bufopts) - # vim.keymap.set('n', '', function() vim.lsp.buf.format { async = true } end, bufopts) - #''; - keymaps = { - lspBuf = { - gD = "declaration"; - gd = "definition"; - K = "hover"; - gi = "implementation"; - "" = "signature_help"; - "wa" = "add_workspace_folder"; - "wr" = "remove_workspace_folder"; - "wl" = "list_workspace_folders"; - "D" = "type_definition"; - "r" = "rename"; - "a" = "code_action"; - gr = "references"; - "" = "format"; - }; - diagnostic = { - "e" = "open_float"; - "j" = "goto_prev"; - "k" = "goto_next"; - "q" = "setloclist"; - }; - silent = true; - }; - }; - rust-tools = { - enable = true; - crateGraph = { - enabledGraphvizBackends = ["png" "svg"]; - backend = "x11"; - }; - inlayHints = { - auto = true; - onlyCurrentLine = true; - showParameterHints = true; - }; - }; - fidget.enable = true; - telescope = { - enable = true; - keymaps = { - "ff" = "find_files"; - "fg" = "git_files"; - "fs" = "live_grep"; - "fb" = "buffers"; - "fh" = "help_tags"; - }; - keymapsSilent = true; - }; - comment.enable = true; - harpoon = { - enable = true; - package = pkgs.vimPlugins.harpoon.overrideAttrs { - src = pkgs.fetchFromGitHub { - owner = "ThePrimeagen"; - repo = "harpoon"; - rev = "a38be6e0dd4c6db66997deab71fc4453ace97f9c"; - hash = "sha256-RjwNUuKQpLkRBX3F9o25Vqvpu3Ah1TCFQ5Dk4jXhsbI="; - }; - }; - enableTelescope = true; - keymapsSilent = false; - }; - markdown-preview = { - enable = true; - settings.theme = "dark"; - }; - - }; - - extraPlugins = with pkgs.vimPlugins; [ - zen-mode-nvim - lazygit-nvim - ]; - - keymaps = [ - { - mode = "n"; - key = "pv"; - action = "Explore"; - } - { - mode = "n"; - key = "w"; - action = "w"; - } - { - mode = "n"; - key = "qw"; - action = "q"; - } - { - mode = "n"; - key = "gg"; - action = "LazyGit"; - } - ]; - }; + opts = { + background = "dark"; + shiftwidth = 4; + autoread = true; + cmdheight = 1; + encoding = "utf8"; + expandtab = true; + hidden = true; + ignorecase = true; + linebreak = true; + mousemoveevent = true; + number = true; + relativenumber = true; + showmatch = true; + smartcase = true; + smartindent = true; + smarttab = true; + so = 7; + timeoutlen = 500; + tabstop = 4; + updatetime = 50; }; + + globals.mapleader = " "; + + plugins = { + lualine = { + enable = true; + theme = "catppuccin"; + }; + treesitter = { + enable = true; + folding = false; + indent = true; + nixvimInjections = true; + incrementalSelection.enable = true; + }; + treesitter-context = { enable = true; }; + coq-nvim = { + enable = true; + installArtifacts = true; + settings = { + auto_start = "shut-up"; + keymap.recommended = true; + completion.always = false; + }; + }; + neo-tree = { enable = true; }; + # TODO laytan/cloak.nvim + lsp = { + enable = true; + servers = { + rust-analyzer = { + enable = true; + installCargo = false; + installRustc = false; + }; + lua-ls.enable = true; + ccls.enable = true; + nil_ls.enable = true; + bashls.enable = true; + tsserver.enable = true; + java-language-server.enable = true; + #pylyzer.enable = true; + rnix-lsp.enable = true; + pyright.enable = true; + }; + #onAttach = '' + # vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') + + # local bufopts = { noremap = true, silent = true, buffer = bufnr } + # vim.keymap.set('n', 'wl', function() + # print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + # end, bufopts) + # vim.keymap.set('n', '', function() vim.lsp.buf.format { async = true } end, bufopts) + #''; + keymaps = { + lspBuf = { + gD = "declaration"; + gd = "definition"; + K = "hover"; + gi = "implementation"; + "" = "signature_help"; + "wa" = "add_workspace_folder"; + "wr" = "remove_workspace_folder"; + "wl" = "list_workspace_folders"; + "D" = "type_definition"; + "r" = "rename"; + "a" = "code_action"; + gr = "references"; + "" = "format"; + }; + diagnostic = { + "e" = "open_float"; + "j" = "goto_prev"; + "k" = "goto_next"; + "q" = "setloclist"; + }; + silent = true; + }; + }; + rust-tools = { + enable = true; + crateGraph = { + enabledGraphvizBackends = [ "png" "svg" ]; + backend = "x11"; + }; + inlayHints = { + auto = true; + onlyCurrentLine = true; + showParameterHints = true; + }; + }; + fidget.enable = true; + telescope = { + enable = true; + keymaps = { + "ff" = "find_files"; + "fg" = "git_files"; + "fs" = "live_grep"; + "fb" = "buffers"; + "fh" = "help_tags"; + }; + keymapsSilent = true; + }; + comment.enable = true; + harpoon = { + enable = true; + package = pkgs.vimPlugins.harpoon.overrideAttrs { + src = pkgs.fetchFromGitHub { + owner = "ThePrimeagen"; + repo = "harpoon"; + rev = "a38be6e0dd4c6db66997deab71fc4453ace97f9c"; + hash = "sha256-RjwNUuKQpLkRBX3F9o25Vqvpu3Ah1TCFQ5Dk4jXhsbI="; + }; + }; + enableTelescope = true; + keymapsSilent = false; + }; + markdown-preview = { + enable = true; + settings.theme = "dark"; + }; + + }; + + extraPlugins = with pkgs.vimPlugins; [ zen-mode-nvim lazygit-nvim ]; + + keymaps = [ + { + mode = "n"; + key = "pv"; + action = "Explore"; + } + { + mode = "n"; + key = "w"; + action = "w"; + } + { + mode = "n"; + key = "qw"; + action = "q"; + } + { + mode = "n"; + key = "gg"; + action = "LazyGit"; + } + ]; + }; }; + }; } diff --git a/modules/tui/newsboat.nix b/modules/tui/newsboat.nix index ac50c83..816f778 100644 --- a/modules/tui/newsboat.nix +++ b/modules/tui/newsboat.nix @@ -1,82 +1,82 @@ -{ - config, - lib, - ... -}: with lib; let - cfg = config.modules.programs.newsboat; - username = config.modules.other.system.username; +{ config, lib, ... }: +with lib; +let + cfg = config.modules.programs.newsboat; + username = config.modules.other.system.username; in { - options.modules.programs.newsboat.enable = mkEnableOption "newsboat"; + options.modules.programs.newsboat.enable = mkEnableOption "newsboat"; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.newsboat = { - enable = true; - autoReload = true; - extraConfig = '' - download-full-page yes - download-retries 3 - error-log /dev/null - cookie-cache ~/.cache/newsboat/cookies.txt - bind-key j down - bind-key k up - bind-key G end - bind-key g home - bind-key d pagedown - bind-key u pageup - bind-key a toggle-article-read - macro x set browser "setsid -f mpv --really-quiet --no-terminal" ; open-in-browser ; set browser librewolf + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.newsboat = { + enable = true; + autoReload = true; + extraConfig = '' + download-full-page yes + download-retries 3 + error-log /dev/null + cookie-cache ~/.cache/newsboat/cookies.txt + bind-key j down + bind-key k up + bind-key G end + bind-key g home + bind-key d pagedown + bind-key u pageup + bind-key a toggle-article-read + macro x set browser "setsid -f mpv --really-quiet --no-terminal" ; open-in-browser ; set browser librewolf - color listnormal color15 default - color listnormal_unread color2 default - color listfocus_unread color2 color0 - color listfocus default color0 - color background default default - color article default default - color end-of-text-marker color8 default - color info color4 color8 - color hint-separator default color8 - color hint-description default color8 - color title color14 color8 + color listnormal color15 default + color listnormal_unread color2 default + color listfocus_unread color2 color0 + color listfocus default color0 + color background default default + color article default default + color end-of-text-marker color8 default + color info color4 color8 + color hint-separator default color8 + color hint-description default color8 + color title color14 color8 - highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold - highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold - highlight article "\\((link|image|video)\\)" color8 default - highlight article "https?://[^ ]+" color4 default - highlight article "\[[0-9]+\]" color6 default bold - user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" - ''; - urls = [ - { - title = "NixOS Weekly"; - url = "https://weekly.nixos.org/feeds/all.rss.xml"; - } - { - title = "Veronica Explains"; - url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ"; - } - { - title = "Mental Outlaw"; - url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA"; - } - { - title = "Hacker News"; - url = "https://hnrss.org/newest"; - } - { - title = "Phoronix"; - url = "https://www.phoronix.com/rss.php"; - } - { - title = "LWN"; - url = "https://lwn.net/headlines/rss"; - } - { - title = "Hyprland Commit Feed"; - url = "https://github.com/hyprwm/Hyprland/commits/main.atom"; - } - ]; - }; - }; + highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold + highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold + highlight article "\\((link|image|video)\\)" color8 default + highlight article "https?://[^ ]+" color4 default + highlight article "\[[0-9]+\]" color6 default bold + user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" + ''; + urls = [ + { + title = "NixOS Weekly"; + url = "https://weekly.nixos.org/feeds/all.rss.xml"; + } + { + title = "Veronica Explains"; + url = + "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ"; + } + { + title = "Mental Outlaw"; + url = + "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA"; + } + { + title = "Hacker News"; + url = "https://hnrss.org/newest"; + } + { + title = "Phoronix"; + url = "https://www.phoronix.com/rss.php"; + } + { + title = "LWN"; + url = "https://lwn.net/headlines/rss"; + } + { + title = "Hyprland Commit Feed"; + url = "https://github.com/hyprwm/Hyprland/commits/main.atom"; + } + ]; + }; }; + }; } diff --git a/modules/tui/yazi.nix b/modules/tui/yazi.nix index 251d67e..bad9797 100644 --- a/modules/tui/yazi.nix +++ b/modules/tui/yazi.nix @@ -1,18 +1,17 @@ { config, lib, ... }: -with lib; let - cfg = config.modules.programs.yazi; - username = config.modules.other.system.username; +with lib; +let + cfg = config.modules.programs.yazi; + username = config.modules.other.system.username; in { - options.modules.programs.yazi = { - enable = mkEnableOption "yazi"; - }; + options.modules.programs.yazi = { enable = mkEnableOption "yazi"; }; - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.yazi = { - enable = true; - enableZshIntegration = true; - }; - }; + config = mkIf cfg.enable { + home-manager.users.${username} = { + programs.yazi = { + enable = true; + enableZshIntegration = true; + }; }; + }; } diff --git a/options/boot/grub-boot.nix b/options/boot/grub-boot.nix index 8f69f77..e6e4fc7 100644 --- a/options/boot/grub-boot.nix +++ b/options/boot/grub-boot.nix @@ -1,10 +1,10 @@ -_:{ +_: { boot.loader = { efi.canTouchEfiVariables = true; grub = { - enable = true; - efiSupport = true; - device = "nodev"; - }; - }; + enable = true; + efiSupport = true; + device = "nodev"; + }; + }; } diff --git a/options/common/bluetooth.nix b/options/common/bluetooth.nix index 3d24814..62f98a1 100644 --- a/options/common/bluetooth.nix +++ b/options/common/bluetooth.nix @@ -1,19 +1,18 @@ { config, lib, pkgs, ... }: -let - username = config.modules.other.system.username; +let username = config.modules.other.system.username; in { - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - }; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; - services.blueman.enable = true; + services.blueman.enable = true; - # Bluetooth headset media control buttons - systemd.user.services.mpris-proxy = { - description = "Mpris proxy"; - after = [ "network.target" "sound.target" ]; - wantedBy = [ "default.target" ]; - serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; - }; + # Bluetooth headset media control buttons + systemd.user.services.mpris-proxy = { + description = "Mpris proxy"; + after = [ "network.target" "sound.target" ]; + wantedBy = [ "default.target" ]; + serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; + }; } diff --git a/options/common/gpu/nvidia.nix b/options/common/gpu/nvidia.nix index c40c5e1..db36aee 100644 --- a/options/common/gpu/nvidia.nix +++ b/options/common/gpu/nvidia.nix @@ -1,5 +1,4 @@ -{ config, lib, pkgs, ...}: -{ +{ config, lib, pkgs, ... }: { services.xserver.videoDrivers = [ "nvidia" ]; hardware.opengl = { enable = true; diff --git a/options/common/networking.nix b/options/common/networking.nix index 3c8d6d7..4622d6d 100644 --- a/options/common/networking.nix +++ b/options/common/networking.nix @@ -1,19 +1,15 @@ { config, lib, ... }: -let - username = config.modules.other.system.username; +let username = config.modules.other.system.username; in { -networking = { + networking = { networkmanager = { - enable = true; - dns = "systemd-resolved"; + enable = true; + dns = "systemd-resolved"; }; }; services.resolved = { - enable = true; - fallbackDns = [ - "9.9.9.9" - "2620::fe::fe" - ]; + enable = true; + fallbackDns = [ "9.9.9.9" "2620::fe::fe" ]; }; users.users.${username}.extraGroups = [ "networkmanager" ]; } diff --git a/options/common/pin-registry.nix b/options/common/pin-registry.nix index 4c93bff..1cdd25a 100644 --- a/options/common/pin-registry.nix +++ b/options/common/pin-registry.nix @@ -1,4 +1,3 @@ -{ inputs, lib, ...}: -{ - nix.registry = lib.mapAttrs (_: v: {flake = v; }) inputs; +{ inputs, lib, ... }: { + nix.registry = lib.mapAttrs (_: v: { flake = v; }) inputs; } diff --git a/options/common/preserve-system.nix b/options/common/preserve-system.nix index 51c84f5..c226a09 100644 --- a/options/common/preserve-system.nix +++ b/options/common/preserve-system.nix @@ -1,6 +1 @@ -{ - self, - ... -}: { - environment.etc."current-flake".source = self; -} +{ self, ... }: { environment.etc."current-flake".source = self; } diff --git a/options/desktop/fonts.nix b/options/desktop/fonts.nix index 4496e88..c22be04 100644 --- a/options/desktop/fonts.nix +++ b/options/desktop/fonts.nix @@ -1,10 +1,7 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { fonts.packages = with pkgs; [ material-design-icons - (nerdfonts.override { - fonts = [ "JetBrainsMono"]; - }) + (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif diff --git a/options/desktop/monitors.nix b/options/desktop/monitors.nix index 42f40b5..114cef7 100644 --- a/options/desktop/monitors.nix +++ b/options/desktop/monitors.nix @@ -1,75 +1,73 @@ -{ config, lib, ... }: +{ config, lib, ... }: -with lib; -{ +with lib; { options.modules.other.system.monitors = mkOption { - description = " - List of monitors to use - "; - default = []; - type = with types; types.listOf (submodule { - options = { - name = mkOption { - type = types.str; - description = "Give your monitor a cute name"; - default = "monitor0(I am lazy)"; - }; - device = mkOption { - type = types.str; - description = "The actual device name of the monitor"; - }; - resolution = mkOption { - type = types.submodule { - options = { - x = mkOption { - type = types.int; - description = "monitor width"; - default = "1920"; - }; - y = mkOption { - type = types.int; - description = "monitor height"; - default = "1080"; + description = "\n List of monitors to use\n "; + default = [ ]; + type = with types; + types.listOf (submodule { + options = { + name = mkOption { + type = types.str; + description = "Give your monitor a cute name"; + default = "monitor0(I am lazy)"; + }; + device = mkOption { + type = types.str; + description = "The actual device name of the monitor"; + }; + resolution = mkOption { + type = types.submodule { + options = { + x = mkOption { + type = types.int; + description = "monitor width"; + default = "1920"; + }; + y = mkOption { + type = types.int; + description = "monitor height"; + default = "1080"; + }; }; }; }; - }; - scale = mkOption { + scale = mkOption { type = types.number; description = "monitor scale"; default = 1.0; - }; - refresh_rate = mkOption { - type = types.int; - description = "monitor refresh rate (in Hz)"; - default = 60; - }; - position = mkOption { - type = types.submodule { - options = { - x = mkOption { - type = types.int; - default = 0; - }; - y = mkOption { - type = types.int; - default = 0; + }; + refresh_rate = mkOption { + type = types.int; + description = "monitor refresh rate (in Hz)"; + default = 60; + }; + position = mkOption { + type = types.submodule { + options = { + x = mkOption { + type = types.int; + default = 0; + }; + y = mkOption { + type = types.int; + default = 0; + }; }; }; + description = "absolute monitor posititon"; + default = { + x = 0; + y = 0; + }; }; - description = "absolute monitor posititon"; - default = { - x = 0; - y = 0; + transform = mkOption { + type = types.ints.between 0 3; + description = "Rotation of the monitor counterclockwise"; + default = 0; }; }; - transform = mkOption { - type = types.ints.between 0 3; - description = "Rotation of the monitor counterclockwise"; - default = 0; - }; - }; - }); + }); }; } diff --git a/overlay.nix b/overlay.nix index 1db6ef0..3466fa4 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,16 +1,17 @@ -{ inputs, outputs, ... }: +{ inputs, outputs, ... }: -let -add_nur = self: super: { - # nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; }; - nur = import inputs.nur { - pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; # .legacyPackages.${profile-config.system}; - nurpkgs = import inputs.nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; }; #.legacyPackages.${profile-config.system}; +let + add_nur = self: super: { + # nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; }; + nur = import inputs.nur { + pkgs = import inputs.nixpkgs { + system = "x86_64-linux"; + config.allowUnfree = true; + }; # .legacyPackages.${profile-config.system}; + nurpkgs = import inputs.nixpkgs { + system = "x86_64-linux"; + config.allowUnfree = true; + }; # .legacyPackages.${profile-config.system}; + }; }; -}; -in -{ - nixpkgs.overlays = [ - add_nur - ]; -} +in { nixpkgs.overlays = [ add_nur ]; }