diff --git a/flake.nix b/flake.nix index 9aa32f65..a90be405 100644 --- a/flake.nix +++ b/flake.nix @@ -33,76 +33,80 @@ }; nixConfig = { - extra-substituters = - [ "https://nixcache.raffauflabs.com" "https://hyprland.cachix.org" ]; + extra-substituters = ["https://nixcache.raffauflabs.com" "https://hyprland.cachix.org"]; extra-trusted-public-keys = [ "nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; }; - outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager - , home-manager-unstable, nixos-hardware, impermanence, disko, disko-unstable - , ... }: { + outputs = inputs @ { + nixpkgs, + nixpkgs-unstable, + home-manager, + home-manager-unstable, + nixos-hardware, + impermanence, + disko, + disko-unstable, + ... + }: { + homeConfigurations.aly = home-manager-unstable.lib.homeManagerConfiguration { + pkgs = import nixpkgs-unstable {system = "x86_64-linux";}; + modules = [./home.nix]; + }; - homeConfigurations.aly = - home-manager-unstable.lib.homeManagerConfiguration { - pkgs = import nixpkgs-unstable { system = "x86_64-linux"; }; - modules = [ ./home.nix ]; - }; + nixosConfigurations = { + # Framework 13 with AMD Ryzen 7640U and 32GB RAM. + lavaridge = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + nixos-hardware.nixosModules.framework-13-7040-amd + home-manager-unstable.nixosModules.home-manager + ./hosts/lavaridge + ./nixosModules + ]; + }; - nixosConfigurations = { + # Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700. + mauville = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + home-manager-unstable.nixosModules.home-manager + ./hosts/mauville + ./nixosModules + ]; + }; - # Framework 13 with AMD Ryzen 7640U and 32GB RAM. - lavaridge = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - nixos-hardware.nixosModules.framework-13-7040-amd - home-manager-unstable.nixosModules.home-manager - ./hosts/lavaridge - ./nixosModules - ]; - }; + # Lenovo Yoga 9i with i7-1360P and 16GB RAM. + petalburg = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + disko-unstable.nixosModules.disko + nixos-hardware.nixosModules.common-pc-laptop-ssd + nixos-hardware.nixosModules.common-cpu-intel + home-manager-unstable.nixosModules.home-manager + ./hosts/petalburg + ./nixosModules + ]; + }; - # Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700. - mauville = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - home-manager-unstable.nixosModules.home-manager - ./hosts/mauville - ./nixosModules - ]; - }; - - # Lenovo Yoga 9i with i7-1360P and 16GB RAM. - petalburg = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - disko-unstable.nixosModules.disko - nixos-hardware.nixosModules.common-pc-laptop-ssd - nixos-hardware.nixosModules.common-cpu-intel - home-manager-unstable.nixosModules.home-manager - ./hosts/petalburg - ./nixosModules - ]; - }; - - # T440p with i5-4210M and 16GB RAM. - rustboro = nixpkgs-unstable.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - disko-unstable.nixosModules.disko - impermanence.nixosModules.impermanence - nixos-hardware.nixosModules.lenovo-thinkpad-t440p - home-manager-unstable.nixosModules.home-manager - ./hosts/rustboro - ./nixosModules - ]; - }; + # T440p with i5-4210M and 16GB RAM. + rustboro = nixpkgs-unstable.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + disko-unstable.nixosModules.disko + impermanence.nixosModules.impermanence + nixos-hardware.nixosModules.lenovo-thinkpad-t440p + home-manager-unstable.nixosModules.home-manager + ./hosts/rustboro + ./nixosModules + ]; }; }; + }; } diff --git a/home.nix b/home.nix index ba1cb691..f81606f8 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,11 @@ -{ inputs, config, pkgs, lib, ... }: - { - imports = [ ./homeManagerModules ]; + inputs, + config, + pkgs, + lib, + ... +}: { + imports = [./homeManagerModules]; home.username = "aly"; home.homeDirectory = "/home/aly"; diff --git a/homeManagerModules/cliApps/bash/default.nix b/homeManagerModules/cliApps/bash/default.nix index 419aae03..8c76c5f9 100644 --- a/homeManagerModules/cliApps/bash/default.nix +++ b/homeManagerModules/cliApps/bash/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - options = { cliApps.bash.enable = lib.mkEnableOption "Enables bash."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {cliApps.bash.enable = lib.mkEnableOption "Enables bash.";}; config = lib.mkIf config.cliApps.bash.enable { programs.bash = { diff --git a/homeManagerModules/cliApps/default.nix b/homeManagerModules/cliApps/default.nix index 87da45f0..e2f58d83 100644 --- a/homeManagerModules/cliApps/default.nix +++ b/homeManagerModules/cliApps/default.nix @@ -1,7 +1,10 @@ -{ config, lib, pkgs, ... }: - { - imports = [ ./bash ./emacs ./eza ./fzf ./neovim ./tmux ./neofetch ]; + config, + lib, + pkgs, + ... +}: { + imports = [./bash ./emacs ./eza ./fzf ./neovim ./tmux ./neofetch]; home.packages = with pkgs; [ # backblaze-b2 diff --git a/homeManagerModules/cliApps/emacs/default.nix b/homeManagerModules/cliApps/emacs/default.nix index a67c27c1..9b174233 100644 --- a/homeManagerModules/cliApps/emacs/default.nix +++ b/homeManagerModules/cliApps/emacs/default.nix @@ -1,32 +1,35 @@ -{ pkgs, lib, config, ... }: { - - options = { cliApps.emacs.enable = lib.mkEnableOption "Enables emacs."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {cliApps.emacs.enable = lib.mkEnableOption "Enables emacs.";}; config = lib.mkIf config.cliApps.emacs.enable { - home.packages = with pkgs; [ nixfmt python3 ]; + home.packages = with pkgs; [nixfmt python3]; programs.emacs = { enable = true; - extraPackages = (epkgs: - (with epkgs; [ - better-defaults - catppuccin-theme - markdown-mode - nix-mode - org - org-bullets - org-journal - org-roam - ox-pandoc - projectile - python - treemacs - treemacs-projectile - treemacs-tab-bar - use-package - yaml - yaml-mode - ])); + extraPackages = epkgs: (with epkgs; [ + better-defaults + catppuccin-theme + markdown-mode + nix-mode + org + org-bullets + org-journal + org-roam + ox-pandoc + projectile + python + treemacs + treemacs-projectile + treemacs-tab-bar + use-package + yaml + yaml-mode + ]); package = pkgs.emacs-nox; extraConfig = builtins.readFile ./emacs.el; }; diff --git a/homeManagerModules/cliApps/eza/default.nix b/homeManagerModules/cliApps/eza/default.nix index 08e0db3e..23b77237 100644 --- a/homeManagerModules/cliApps/eza/default.nix +++ b/homeManagerModules/cliApps/eza/default.nix @@ -1,13 +1,17 @@ -{ pkgs, lib, config, ... }: { - - options = { cliApps.eza.enable = lib.mkEnableOption "Enables eza."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {cliApps.eza.enable = lib.mkEnableOption "Enables eza.";}; config = lib.mkIf config.cliApps.eza.enable { programs.eza = { enable = true; git = true; icons = true; - extraOptions = [ "--group-directories-first" "--header" ]; + extraOptions = ["--group-directories-first" "--header"]; }; }; } diff --git a/homeManagerModules/cliApps/fzf/default.nix b/homeManagerModules/cliApps/fzf/default.nix index 6ba0e673..ce572492 100644 --- a/homeManagerModules/cliApps/fzf/default.nix +++ b/homeManagerModules/cliApps/fzf/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - options = { cliApps.fzf.enable = lib.mkEnableOption "Enables fzf."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {cliApps.fzf.enable = lib.mkEnableOption "Enables fzf.";}; config = lib.mkIf config.cliApps.fzf.enable { programs.fzf = { diff --git a/homeManagerModules/cliApps/neofetch/default.nix b/homeManagerModules/cliApps/neofetch/default.nix index f3ad9446..d39ed950 100644 --- a/homeManagerModules/cliApps/neofetch/default.nix +++ b/homeManagerModules/cliApps/neofetch/default.nix @@ -1,13 +1,15 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { cliApps.neofetch.enable = lib.mkEnableOption "Enable neofetch."; }; config = lib.mkIf config.cliApps.neofetch.enable { - - home.packages = [ pkgs.neofetch ]; + home.packages = [pkgs.neofetch]; xdg.configFile."neofetch/config.conf".source = ./config.conf; - }; } diff --git a/homeManagerModules/cliApps/neovim/default.nix b/homeManagerModules/cliApps/neovim/default.nix index 9934bc51..7c7fbb1e 100644 --- a/homeManagerModules/cliApps/neovim/default.nix +++ b/homeManagerModules/cliApps/neovim/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - options = { cliApps.neovim.enable = lib.mkEnableOption "Enables neovim."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {cliApps.neovim.enable = lib.mkEnableOption "Enables neovim.";}; config = lib.mkIf config.cliApps.neovim.enable { programs.neovim = { diff --git a/homeManagerModules/cliApps/tmux/default.nix b/homeManagerModules/cliApps/tmux/default.nix index ef1793c2..f115a931 100644 --- a/homeManagerModules/cliApps/tmux/default.nix +++ b/homeManagerModules/cliApps/tmux/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - options = { cliApps.tmux.enable = lib.mkEnableOption "Enables tmux."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {cliApps.tmux.enable = lib.mkEnableOption "Enables tmux.";}; config = lib.mkIf config.cliApps.tmux.enable { programs.tmux = { @@ -22,7 +26,7 @@ set-option -g @tmux-weather-units "u" set -g status-right '#{cpu_percentage} CPU | #{battery_percentage} BAT | %I:%M %p | #{weather}' run-shell ${pkgs.tmuxPlugins.battery}/share/tmux-plugins/battery/battery.tmux - run-shell ${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/resurrect.tmux + run-shell ${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/resurrect.tmux run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux run-shell ${pkgs.tmuxPlugins.weather}/share/tmux-plugins/weather/tmux-weather.tmux ''; diff --git a/homeManagerModules/default.nix b/homeManagerModules/default.nix index b6a8a504..18d24f4a 100644 --- a/homeManagerModules/default.nix +++ b/homeManagerModules/default.nix @@ -1,7 +1,10 @@ -{ config, pkgs, lib, ... }: - { - imports = [ ./cliApps ./guiApps ./desktopEnv ./userServices ]; + config, + pkgs, + lib, + ... +}: { + imports = [./cliApps ./guiApps ./desktopEnv ./userServices]; nixpkgs = { # Configure nixpkgs instance @@ -22,6 +25,6 @@ pictures = lib.mkDefault "${config.home.homeDirectory}/pics"; publicShare = lib.mkDefault "${config.home.homeDirectory}/pub"; templates = lib.mkDefault "${config.home.homeDirectory}/tmplts"; - extraConfig = { XDG_SRC_DIR = "${config.home.homeDirectory}/src"; }; + extraConfig = {XDG_SRC_DIR = "${config.home.homeDirectory}/src";}; }; } diff --git a/homeManagerModules/desktopEnv/default.nix b/homeManagerModules/desktopEnv/default.nix index 528e5361..d1f73f4f 100644 --- a/homeManagerModules/desktopEnv/default.nix +++ b/homeManagerModules/desktopEnv/default.nix @@ -1,7 +1,10 @@ -{ config, lib, pkgs, ... }: - { - imports = [ ./gnome ./hypr ./sway ]; + config, + lib, + pkgs, + ... +}: { + imports = [./gnome ./hypr ./sway]; desktopEnv.hyprland.enable = lib.mkDefault true; } diff --git a/homeManagerModules/desktopEnv/gnome/default.nix b/homeManagerModules/desktopEnv/gnome/default.nix index 64cb6d19..bba710c9 100644 --- a/homeManagerModules/desktopEnv/gnome/default.nix +++ b/homeManagerModules/desktopEnv/gnome/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopEnv.gnome.enable = lib.mkEnableOption "Enables GNOME with basic settings configuration."; @@ -12,8 +16,7 @@ "org/gnome/desktop/interface".clock-format = "12h"; "org/gnome/desktop/interface".enable-hot-corners = true; "org/gnome/desktop/peripherals/touchpad".tap-to-click = true; - "org/gnome/desktop/search-providers".enabled = - "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']"; + "org/gnome/desktop/search-providers".enabled = "['org.gnome.Calendar.desktop', 'org.gnome.Weather.desktop', 'org.gnome.Contacts.desktop', 'org.gnome.Calculator.desktop', 'org.gnome.Characters.desktop', 'org.gnome.clocks.desktop']"; "org/gnome/desktop/wm/preferences".auto-raise = true; "org/gnome/mutter".dynamic-workspaces = true; "org/gnome/mutter".edge-tiling = true; @@ -42,8 +45,8 @@ "drive-menu@gnome-shell-extensions.gcampax.github.com" ]; "org/virt-manager/virt-manager/connections" = { - autoconnect = [ "qemu:///system" ]; - uris = [ "qemu:///system" ]; + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; }; }; }; diff --git a/homeManagerModules/desktopEnv/hypr/default.nix b/homeManagerModules/desktopEnv/hypr/default.nix index ebf4ade0..e17de500 100644 --- a/homeManagerModules/desktopEnv/hypr/default.nix +++ b/homeManagerModules/desktopEnv/hypr/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./hypridle ./hyprlock ./hyprpaper ./hyprshade ./theme.nix ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./hypridle ./hyprlock ./hyprpaper ./hyprshade ./theme.nix]; options = { desktopEnv.hyprland.enable = @@ -8,7 +12,6 @@ }; config = lib.mkIf config.desktopEnv.hyprland.enable { - # Hypr* modules, plguins, and tools. desktopEnv.hyprland.hypridle.enable = lib.mkDefault true; desktopEnv.hyprland.hyprlock.enable = lib.mkDefault true; @@ -58,8 +61,8 @@ xdg.portal = { enable = true; - configPackages = [ pkgs.xdg-desktop-portal-hyprland ]; - extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + configPackages = [pkgs.xdg-desktop-portal-hyprland]; + extraPortals = [pkgs.xdg-desktop-portal-hyprland]; }; wayland.windowManager.hyprland.enable = true; @@ -109,7 +112,6 @@ cursor_size = "24"; qt_platform_theme = "gtk2"; gdk_scale = "1.5"; - in '' monitor = desc:BOE 0x0BCA,preferred,auto,1.566667 # lavaridge fw13 matte display monitor = desc:BOE 0x095F,preferred,auto,1.566667# lavaridge fw13 glossy display @@ -242,13 +244,13 @@ bind = ${modifier}, R, exec, ${launcher} # Manage session. - bind = ${modifier}, C, killactive, + bind = ${modifier}, C, killactive, bind = ${modifier}, M, exec, ${logout} bind = ${modifier}, L, exec, ${lock} # Basic window management. bind = ${modifier} SHIFT, W, fullscreen - bind = ${modifier} SHIFT, V, togglefloating, + bind = ${modifier} SHIFT, V, togglefloating, bind = ${modifier} SHIFT, P, pseudo, # dwindle bind = ${modifier} SHIFT, J, togglesplit, # dwindle @@ -322,6 +324,5 @@ # Show/hide waybar. bind = ${modifier}, F11, exec, pkill -SIGUSR1 waybar ''; - }; } diff --git a/homeManagerModules/desktopEnv/hypr/hypridle/default.nix b/homeManagerModules/desktopEnv/hypr/hypridle/default.nix index 9aed8c99..bf0f09c2 100644 --- a/homeManagerModules/desktopEnv/hypr/hypridle/default.nix +++ b/homeManagerModules/desktopEnv/hypr/hypridle/default.nix @@ -1,14 +1,17 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopEnv.hyprland.hypridle.enable = lib.mkEnableOption "Enables hypridle."; }; config = lib.mkIf config.desktopEnv.hyprland.hypridle.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ hypridle brightnessctl ]; + home.packages = with pkgs; [hypridle brightnessctl]; xdg.configFile."hypr/hypridle.conf".text = '' general { @@ -24,7 +27,7 @@ } # turn off keyboard backlight, uncomment this section if have keyboard backlight. - #listener { + #listener { # timeout = 150 # 2.5min. # on-timeout = ${pkgs.brightnessctl}/bin/brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. # on-resume = ${pkgs.brightnessctl}/bin/brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. diff --git a/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix b/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix index 00cf2d04..47737daa 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix +++ b/homeManagerModules/desktopEnv/hypr/hyprlock/default.nix @@ -1,14 +1,17 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopEnv.hyprland.hyprlock.enable = lib.mkEnableOption "Enables hyprlock."; }; config = lib.mkIf config.desktopEnv.hyprland.hyprlock.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ hyprlock ]; + home.packages = with pkgs; [hyprlock]; xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; }; diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix b/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix index 599bf3a1..4a0f9495 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix +++ b/homeManagerModules/desktopEnv/hypr/hyprpaper/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./hyprpaper-random.nix ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./hyprpaper-random.nix]; options = { desktopEnv.hyprland.hyprpaper.enable = @@ -8,9 +12,8 @@ }; config = lib.mkIf config.desktopEnv.hyprland.hyprpaper.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ hyprpaper ]; + home.packages = with pkgs; [hyprpaper]; desktopEnv.hyprland.hyprpaper.randomWallpaper.enable = lib.mkDefault true; diff --git a/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix index 0b86230b..ea9bc8f3 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix +++ b/homeManagerModules/desktopEnv/hypr/hyprpaper/hyprpaper-random.nix @@ -1,6 +1,9 @@ -{ pkgs, lib, config, ... }: - -let +{ + pkgs, + lib, + config, + ... +}: let hyprpaper-random = pkgs.writeShellScriptBin "hyprpaper-random" '' directory=${config.home.homeDirectory}/.config/hypr/wallpapers monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'` @@ -24,13 +27,10 @@ in { lib.mkEnableOption "Enables hyprpaper random wallpaper script."; }; - config = - lib.mkIf config.desktopEnv.hyprland.hyprpaper.randomWallpaper.enable { + config = lib.mkIf config.desktopEnv.hyprland.hyprpaper.randomWallpaper.enable { + # Packages that should be installed to the user profile. + home.packages = with pkgs; [hyprpaper-random]; - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ hyprpaper-random ]; - - wayland.windowManager.hyprland.extraConfig = - "exec-once = ${hyprpaper-random}/bin/hyprpaper-random"; - }; + wayland.windowManager.hyprland.extraConfig = "exec-once = ${hyprpaper-random}/bin/hyprpaper-random"; + }; } diff --git a/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix b/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix index 6fcfda90..ea3a3c85 100644 --- a/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix +++ b/homeManagerModules/desktopEnv/hypr/hyprshade/default.nix @@ -1,14 +1,17 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopEnv.hyprland.hyprshade.enable = lib.mkEnableOption "Enables hyprshade with blue light filter."; }; config = lib.mkIf config.desktopEnv.hyprland.hyprshade.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [ hyprshade ]; + home.packages = with pkgs; [hyprshade]; xdg.configFile."hypr/shaders/custom-blue-light-filter.glsl".text = '' // from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437 diff --git a/homeManagerModules/desktopEnv/hypr/theme.nix b/homeManagerModules/desktopEnv/hypr/theme.nix index 497a3f71..eed9d562 100644 --- a/homeManagerModules/desktopEnv/hypr/theme.nix +++ b/homeManagerModules/desktopEnv/hypr/theme.nix @@ -1,12 +1,15 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopEnv.hyprland.theme.enable = lib.mkEnableOption "Hyprland GTK and Qt themes."; }; config = lib.mkIf config.desktopEnv.hyprland.theme.enable { - home.pointerCursor = { gtk.enable = true; x11.enable = true; @@ -26,10 +29,10 @@ theme = { package = pkgs.catppuccin-gtk.override { - accents = [ "mauve" ]; + accents = ["mauve"]; size = "compact"; variant = "frappe"; - tweaks = [ "normal" ]; + tweaks = ["normal"]; }; name = "Catppuccin-Frappe-Compact-Mauve-Dark"; }; @@ -44,14 +47,13 @@ font = { name = "NotoSans Nerd Font Regular"; - package = pkgs.nerdfonts.override { fonts = [ "Noto" ]; }; + package = pkgs.nerdfonts.override {fonts = ["Noto"];}; size = 11; }; - gtk3.extraConfig = { gtk-application-prefer-dark-theme = 1; }; - - gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; }; + gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;}; + gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;}; }; dconf.settings = { diff --git a/homeManagerModules/desktopEnv/sway/default.nix b/homeManagerModules/desktopEnv/sway/default.nix index 6f74e8cb..181f5d58 100644 --- a/homeManagerModules/desktopEnv/sway/default.nix +++ b/homeManagerModules/desktopEnv/sway/default.nix @@ -1,11 +1,14 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopEnv.sway.enable = lib.mkEnableOption "Sway with extra apps."; }; config = lib.mkIf config.desktopEnv.sway.enable { - # Basic apps needed to run a hyprland desktop. guiApps.waybar.enable = lib.mkDefault true; guiApps.mako.enable = lib.mkDefault true; @@ -46,8 +49,8 @@ xdg.portal = { enable = true; - configPackages = [ pkgs.xdg-desktop-portal-wlr ]; - extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; + configPackages = [pkgs.xdg-desktop-portal-wlr]; + extraPortals = [pkgs.xdg-desktop-portal-wlr]; }; home.pointerCursor = { @@ -69,10 +72,10 @@ theme = { package = pkgs.catppuccin-gtk.override { - accents = [ "mauve" ]; + accents = ["mauve"]; size = "compact"; variant = "frappe"; - tweaks = [ "normal" ]; + tweaks = ["normal"]; }; name = "Catppuccin-Frappe-Compact-Mauve-Dark"; }; @@ -87,7 +90,7 @@ font = { name = "NotoSans Nerd Font Regular"; - package = pkgs.nerdfonts.override { fonts = [ "Noto" ]; }; + package = pkgs.nerdfonts.override {fonts = ["Noto"];}; size = 11; }; }; diff --git a/homeManagerModules/guiApps/alacritty/default.nix b/homeManagerModules/guiApps/alacritty/default.nix index 47fc09f9..e80c777c 100644 --- a/homeManagerModules/guiApps/alacritty/default.nix +++ b/homeManagerModules/guiApps/alacritty/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { guiApps.alacritty.enable = lib.mkEnableOption "Enables alacritty."; }; @@ -34,4 +38,3 @@ }; }; } - diff --git a/homeManagerModules/guiApps/chromium/default.nix b/homeManagerModules/guiApps/chromium/default.nix index 03925c82..4056fb4f 100644 --- a/homeManagerModules/guiApps/chromium/default.nix +++ b/homeManagerModules/guiApps/chromium/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { guiApps.chromium.enable = lib.mkEnableOption "Enables Chromium."; }; @@ -8,15 +12,15 @@ programs.chromium = { enable = true; extensions = [ - { id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden - { id = "bfogiafebfohielmmehodmfbbebbbpei"; } # Keeper - { id = "aomidfkchockcldhbkggjokdkkebmdll"; } # Redirect Path - { id = "occjjkgifpmdgodlplnacmkejpdionan"; } # Autoscroll - { id = "ioalpmibngobedobkmbhgmadaphocjdn"; } # OneLogin - { id = "jldhpllghnbhlbpcmnajkpdmadaolakh"; } # Todoist - { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin - { id = "lcbjdhceifofjlpecfpeimnnphbcjgnc"; } # xBrowserSync - { id = "olhelnoplefjdmncknfphenjclimckaf"; } # catppuccin frappe + {id = "nngceckbapebfimnlniiiahkandclblb";} # Bitwarden + {id = "bfogiafebfohielmmehodmfbbebbbpei";} # Keeper + {id = "aomidfkchockcldhbkggjokdkkebmdll";} # Redirect Path + {id = "occjjkgifpmdgodlplnacmkejpdionan";} # Autoscroll + {id = "ioalpmibngobedobkmbhgmadaphocjdn";} # OneLogin + {id = "jldhpllghnbhlbpcmnajkpdmadaolakh";} # Todoist + {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # uBlock Origin + {id = "lcbjdhceifofjlpecfpeimnnphbcjgnc";} # xBrowserSync + {id = "olhelnoplefjdmncknfphenjclimckaf";} # catppuccin frappe ]; }; }; diff --git a/homeManagerModules/guiApps/default.nix b/homeManagerModules/guiApps/default.nix index 657c1cd6..07f582f0 100644 --- a/homeManagerModules/guiApps/default.nix +++ b/homeManagerModules/guiApps/default.nix @@ -1,6 +1,9 @@ -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { imports = [ ./alacritty ./chromium diff --git a/homeManagerModules/guiApps/firefox/default.nix b/homeManagerModules/guiApps/firefox/default.nix index b1ab7810..7b57f3ac 100644 --- a/homeManagerModules/guiApps/firefox/default.nix +++ b/homeManagerModules/guiApps/firefox/default.nix @@ -1,8 +1,12 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.firefox.enable = lib.mkEnableOption "Enables Firefox."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.firefox.enable = lib.mkEnableOption "Enables Firefox.";}; config = lib.mkIf config.guiApps.firefox.enable { - programs.firefox = { enable = true; }; + programs.firefox = {enable = true;}; }; } diff --git a/homeManagerModules/guiApps/fractal/default.nix b/homeManagerModules/guiApps/fractal/default.nix index 4364bd1b..79d4eacc 100644 --- a/homeManagerModules/guiApps/fractal/default.nix +++ b/homeManagerModules/guiApps/fractal/default.nix @@ -1,11 +1,15 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { guiApps.fractal.enable = lib.mkEnableOption "Enables Fractal Matrix client."; }; config = lib.mkIf config.guiApps.fractal.enable { - home.packages = with pkgs; [ fractal ]; + home.packages = with pkgs; [fractal]; }; } diff --git a/homeManagerModules/guiApps/fuzzel/default.nix b/homeManagerModules/guiApps/fuzzel/default.nix index decd2055..8a2c7ada 100644 --- a/homeManagerModules/guiApps/fuzzel/default.nix +++ b/homeManagerModules/guiApps/fuzzel/default.nix @@ -1,11 +1,14 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.fuzzel.enable = lib.mkEnableOption "Enables fuzzel."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.fuzzel.enable = lib.mkEnableOption "Enables fuzzel.";}; config = lib.mkIf config.guiApps.fuzzel.enable { - home.packages = with pkgs; [ - (nerdfonts.override { fonts = [ "Noto" ]; }) + (nerdfonts.override {fonts = ["Noto"];}) (catppuccin-papirus-folders.override { flavor = "frappe"; accent = "mauve"; @@ -21,7 +24,7 @@ layer = "overlay"; terminal = "${pkgs.alacritty}/bin/alacritty -e"; }; - border = { width = 2; }; + border = {width = 2;}; colors = { background = "#232634CC"; selection = "#232634FF"; diff --git a/homeManagerModules/guiApps/librewolf/default.nix b/homeManagerModules/guiApps/librewolf/default.nix index 3fe4ae64..5b2b4def 100644 --- a/homeManagerModules/guiApps/librewolf/default.nix +++ b/homeManagerModules/guiApps/librewolf/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { guiApps.librewolf.enable = lib.mkEnableOption "Enables librewolf."; }; @@ -12,17 +16,13 @@ "browser.safebrowsing.phishing.enabled" = true; "browser.safebrowsing.blockedURIs.enabled" = true; - "browser.safebrowsing.provider.google4.gethashURL" = - "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; + "browser.safebrowsing.provider.google4.gethashURL" = "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; - "browser.safebrowsing.provider.google4.updateURL" = - "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; + "browser.safebrowsing.provider.google4.updateURL" = "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST"; - "browser.safebrowsing.provider.google.gethashURL" = - "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"; + "browser.safebrowsing.provider.google.gethashURL" = "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2"; - "browser.safebrowsing.provider.google.updateURL" = - "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%"; + "browser.safebrowsing.provider.google.updateURL" = "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%"; "browser.safebrowsing.downloads.enabled" = true; "identity.fxaccounts.enabled" = true; diff --git a/homeManagerModules/guiApps/mako/default.nix b/homeManagerModules/guiApps/mako/default.nix index d2588b3c..b1e4c84a 100644 --- a/homeManagerModules/guiApps/mako/default.nix +++ b/homeManagerModules/guiApps/mako/default.nix @@ -1,10 +1,13 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.mako.enable = lib.mkEnableOption "Enables mako."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.mako.enable = lib.mkEnableOption "Enables mako.";}; config = lib.mkIf config.guiApps.mako.enable { - - home.packages = with pkgs; [ (nerdfonts.override { fonts = [ "Noto" ]; }) ]; + home.packages = with pkgs; [(nerdfonts.override {fonts = ["Noto"];})]; services.mako = { enable = true; diff --git a/homeManagerModules/guiApps/obsidian/default.nix b/homeManagerModules/guiApps/obsidian/default.nix index 8a609af8..7225c60f 100644 --- a/homeManagerModules/guiApps/obsidian/default.nix +++ b/homeManagerModules/guiApps/obsidian/default.nix @@ -1,10 +1,14 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { guiApps.obsidian.enable = lib.mkEnableOption "Enables Obsidian."; }; config = lib.mkIf config.guiApps.obsidian.enable { - home.packages = with pkgs; [ obsidian ]; + home.packages = with pkgs; [obsidian]; }; } diff --git a/homeManagerModules/guiApps/tauon/default.nix b/homeManagerModules/guiApps/tauon/default.nix index f9270c58..1f004779 100644 --- a/homeManagerModules/guiApps/tauon/default.nix +++ b/homeManagerModules/guiApps/tauon/default.nix @@ -1,8 +1,12 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.tauon.enable = lib.mkEnableOption "Enables Tauon."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.tauon.enable = lib.mkEnableOption "Enables Tauon.";}; config = lib.mkIf config.guiApps.tauon.enable { - home.packages = with pkgs; [ tauon ]; + home.packages = with pkgs; [tauon]; }; } diff --git a/homeManagerModules/guiApps/waybar/default.nix b/homeManagerModules/guiApps/waybar/default.nix index 090902cd..7ab72577 100644 --- a/homeManagerModules/guiApps/waybar/default.nix +++ b/homeManagerModules/guiApps/waybar/default.nix @@ -1,13 +1,17 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.waybar.enable = lib.mkEnableOption "Enables waybar."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.waybar.enable = lib.mkEnableOption "Enables waybar.";}; config = lib.mkIf config.guiApps.waybar.enable { # Packages that should be installed to the user profile. home.packages = with pkgs; [ blueberry pavucontrol - (nerdfonts.override { fonts = [ "Noto" ]; }) + (nerdfonts.override {fonts = ["Noto"];}) ]; xdg.configFile."waybar/style.css".source = ./waybar.css; @@ -17,11 +21,11 @@ mainBar = { height = 36; layer = "top"; - output = [ "*" ]; + output = ["*"]; position = "top"; reload_style_on_change = true; - modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; - modules-center = [ "hyprland/window" ]; + modules-left = ["hyprland/workspaces" "hyprland/submap"]; + modules-center = ["hyprland/window"]; modules-right = [ "tray" "bluetooth" @@ -39,18 +43,18 @@ "default" = "󰝥"; "active" = "󰪥"; }; - "persistent-workspaces" = { "*" = 4; }; + "persistent-workspaces" = {"*" = 4;}; }; - "hyprland/window" = { "max-length" = 100; }; + "hyprland/window" = {"max-length" = 100;}; "clock" = { "tooltip-format" = "{:%Y-%m-%d | %H:%M}"; "interval" = 60; "format" = "{:%I:%M%p}"; }; "battery" = { - "states" = { "critical" = 20; }; + "states" = {"critical" = 20;}; "format" = "{icon}"; - "format-icons" = [ "󰁺" "󰁼" "󰁿" "󰂁" "󰁹" ]; + "format-icons" = ["󰁺" "󰁼" "󰁿" "󰂁" "󰁹"]; "tooltip-format" = '' {capacity}%: {timeTo}. Using {power} watts.''; @@ -64,8 +68,7 @@ {controller_alias} {controller_address} {device_enumerate}''; - "tooltip-format-enumerate-connected" = - "{device_alias} {device_address}"; + "tooltip-format-enumerate-connected" = "{device_alias} {device_address}"; "on-click" = "${pkgs.blueberry}/bin/blueberry"; }; "pulseaudio" = { @@ -77,7 +80,7 @@ "handsfree" = "󰋎"; "headset" = "󰋎"; }; - "ignored-sinks" = [ "Easy Effects Sink" ]; + "ignored-sinks" = ["Easy Effects Sink"]; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol -t 3"; }; "network" = { @@ -88,10 +91,9 @@ "tooltip-format-wifi" = "{essid} ({signalStrength}%) 󰣾"; "tooltip-format-ethernet" = "{ifname} "; "tooltip-format-disconnected" = "Disconnected"; - "on-click" = - "${pkgs.alacritty}/bin/alacritty --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; + "on-click" = "${pkgs.alacritty}/bin/alacritty --class nmtui -e ${pkgs.networkmanager}/bin/nmtui"; }; - "tray" = { "spacing" = 10; }; + "tray" = {"spacing" = 10;}; "power-profiles-daemon" = { "format" = "{icon}"; "tooltip-format" = '' diff --git a/homeManagerModules/guiApps/webCord/default.nix b/homeManagerModules/guiApps/webCord/default.nix index 1a9ed61c..f6a8b944 100644 --- a/homeManagerModules/guiApps/webCord/default.nix +++ b/homeManagerModules/guiApps/webCord/default.nix @@ -1,8 +1,12 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.webCord.enable = lib.mkEnableOption "Enables WebCord."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.webCord.enable = lib.mkEnableOption "Enables WebCord.";}; config = lib.mkIf config.guiApps.webCord.enable { - home.packages = with pkgs; [ webcord ]; + home.packages = with pkgs; [webcord]; }; } diff --git a/homeManagerModules/guiApps/wlogout/default.nix b/homeManagerModules/guiApps/wlogout/default.nix index 584da65c..f0c58681 100644 --- a/homeManagerModules/guiApps/wlogout/default.nix +++ b/homeManagerModules/guiApps/wlogout/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.wlogout.enable = lib.mkEnableOption "Enables wlogout."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.wlogout.enable = lib.mkEnableOption "Enables wlogout.";}; config = lib.mkIf config.guiApps.wlogout.enable { programs.wlogout = { diff --git a/homeManagerModules/guiApps/zoom/default.nix b/homeManagerModules/guiApps/zoom/default.nix index 7be4efb4..ceca82ed 100644 --- a/homeManagerModules/guiApps/zoom/default.nix +++ b/homeManagerModules/guiApps/zoom/default.nix @@ -1,8 +1,12 @@ -{ pkgs, lib, config, ... }: { - - options = { guiApps.zoom.enable = lib.mkEnableOption "Enables Zoom."; }; +{ + pkgs, + lib, + config, + ... +}: { + options = {guiApps.zoom.enable = lib.mkEnableOption "Enables Zoom.";}; config = lib.mkIf config.guiApps.zoom.enable { - home.packages = with pkgs; [ zoom-us ]; + home.packages = with pkgs; [zoom-us]; }; } diff --git a/homeManagerModules/userServices/default.nix b/homeManagerModules/userServices/default.nix index 9a33e5e2..157aeb20 100644 --- a/homeManagerModules/userServices/default.nix +++ b/homeManagerModules/userServices/default.nix @@ -1,7 +1,10 @@ -{ config, lib, pkgs, ... }: - { - imports = [ ./syncthing ./easyeffects ]; + config, + lib, + pkgs, + ... +}: { + imports = [./syncthing ./easyeffects]; userServices.syncthing.enable = lib.mkDefault true; } diff --git a/homeManagerModules/userServices/easyeffects/default.nix b/homeManagerModules/userServices/easyeffects/default.nix index 675ca018..ed095aa7 100644 --- a/homeManagerModules/userServices/easyeffects/default.nix +++ b/homeManagerModules/userServices/easyeffects/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { userServices.easyeffects.enable = lib.mkEnableOption "EasyEffects user service."; @@ -11,7 +15,6 @@ }; config = lib.mkIf config.userServices.easyeffects.enable { - xdg.configFile."easyeffects/output/framework13.json".source = ./framework13.json; diff --git a/homeManagerModules/userServices/syncthing/default.nix b/homeManagerModules/userServices/syncthing/default.nix index d3ef60fc..8c67c190 100644 --- a/homeManagerModules/userServices/syncthing/default.nix +++ b/homeManagerModules/userServices/syncthing/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { userServices.syncthing.enable = lib.mkEnableOption "Enables syncthing as user."; diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 4dedab07..219dc695 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -1,8 +1,11 @@ # Framework Laptop 13 with AMD Ryzen 7640U, 32GB RAM, 1TB SSD. - -{ inputs, config, pkgs, lib, ... }: - { + inputs, + config, + pkgs, + lib, + ... +}: { imports = [ ./hardware-configuration.nix # Include the results of the hardware scan. ./home.nix @@ -22,13 +25,13 @@ services = { fwupd.enable = true; fprintd.package = pkgs.fprintd.overrideAttrs { - mesonCheckFlags = [ "--no-suite" "fprintd:TestPamFprintd" ]; + mesonCheckFlags = ["--no-suite" "fprintd:TestPamFprintd"]; }; }; systemConfig = { plymouth.enable = true; - zramSwap = { enable = true; }; + zramSwap = {enable = true;}; }; desktopConfig = { @@ -43,8 +46,7 @@ virt-manager.enable = true; }; - users.users.aly.hashedPassword = - "$y$j9T$O9NgTk6iRfh3mxiRDvfdm1$BjvsAKYEMB3C28652FF15cj/i.3TgQAObQvR0rN1E6C"; + users.users.aly.hashedPassword = "$y$j9T$O9NgTk6iRfh3mxiRDvfdm1$BjvsAKYEMB3C28652FF15cj/i.3TgQAObQvR0rN1E6C"; system.stateVersion = "23.11"; # Did you read the comment? } diff --git a/hosts/lavaridge/disko.nix b/hosts/lavaridge/disko.nix index aab5f743..54d34b71 100644 --- a/hosts/lavaridge/disko.nix +++ b/hosts/lavaridge/disko.nix @@ -23,25 +23,25 @@ size = "100%"; content = { type = "btrfs"; - extraArgs = [ "-f" ]; # Override existing partition + extraArgs = ["-f"]; # Override existing partition # Subvolumes must set a mountpoint in order to be mounted, # unless their parent is mounted subvolumes = { # Subvolume name is different from mountpoint - "rootfs" = { mountpoint = "/"; }; + "rootfs" = {mountpoint = "/";}; # For use with future impermanence setups "persist" = { mountpoint = "/persist"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = ["compress=zstd" "noatime"]; }; # Subvolume name is the same as the mountpoint "home" = { - mountOptions = [ "compress=zstd" ]; + mountOptions = ["compress=zstd"]; mountpoint = "/home"; }; # Parent is not mounted so the mountpoint must be set "nix" = { - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = ["compress=zstd" "noatime"]; mountpoint = "/nix"; }; }; diff --git a/hosts/lavaridge/hardware-configuration.nix b/hosts/lavaridge/hardware-configuration.nix index 202b1f63..c04c68c2 100644 --- a/hosts/lavaridge/hardware-configuration.nix +++ b/hosts/lavaridge/hardware-configuration.nix @@ -1,16 +1,19 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = - [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" "amd-gpu" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd" "amd-gpu"]; + boot.extraModulePackages = []; fileSystems."/" = { device = "/dev/disk/by-uuid/2a76d315-37f9-406d-b1b2-01fee209139a"; @@ -22,7 +25,7 @@ fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = []; hardware.opengl = { ## radv: an open-source Vulkan driver from freedesktop @@ -30,11 +33,11 @@ driSupport32Bit = true; ## amdvlk: an open-source Vulkan driver from AMD - extraPackages = [ pkgs.rocmPackages.clr.icd pkgs.amdvlk ]; - extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; + extraPackages = [pkgs.rocmPackages.clr.icd pkgs.amdvlk]; + extraPackages32 = [pkgs.driversi686Linux.amdvlk]; }; - services.xserver.videoDrivers = [ "amdgpu" ]; + services.xserver.videoDrivers = ["amdgpu"]; # 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 diff --git a/hosts/lavaridge/home.nix b/hosts/lavaridge/home.nix index 8d56d70d..dcb0e14e 100644 --- a/hosts/lavaridge/home.nix +++ b/hosts/lavaridge/home.nix @@ -1,8 +1,12 @@ -{ inputs, config, pkgs, lib, ... }: - { + inputs, + config, + pkgs, + lib, + ... +}: { home-manager.users.aly = { - imports = [ ../../homeManagerModules ]; + imports = [../../homeManagerModules]; home.username = "aly"; home.homeDirectory = "/home/aly"; diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index 3c931e31..3726dceb 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -1,9 +1,11 @@ # Custom desktop with AMD Ryzen 5 2600, 16GB RAM, AMD Rx 6700, and 1TB SSD + 2TB HDD. - -{ config, pkgs, lib, ... }: - { - imports = [ ./hardware-configuration.nix ./home.nix ]; + config, + pkgs, + lib, + ... +}: { + imports = [./hardware-configuration.nix ./home.nix]; # Bootloader. boot.loader.systemd-boot.enable = true; diff --git a/hosts/mauville/hardware-configuration.nix b/hosts/mauville/hardware-configuration.nix index 00ff5cde..776f00bb 100644 --- a/hosts/mauville/hardware-configuration.nix +++ b/hosts/mauville/hardware-configuration.nix @@ -1,26 +1,29 @@ -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" "amdgpu"]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd" "amdgpu"]; + boot.extraModulePackages = []; services.xserver = { # Add AMDGPU driver. - videoDrivers = [ "amdgpu" ]; + videoDrivers = ["amdgpu"]; }; hardware.opengl = { enable = true; # Add ROCM annd AMD Vulkan driver. - extraPackages = with pkgs; [ rocmPackages.clr.icd amdvlk ]; + extraPackages = with pkgs; [rocmPackages.clr.icd amdvlk]; # Add support for 32bit apps. driSupport32Bit = true; - extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + extraPackages32 = with pkgs; [driversi686Linux.amdvlk]; }; fileSystems."/" = { @@ -43,10 +46,12 @@ fsType = "ext4"; }; - swapDevices = [{ - device = "/dev/disk/by-uuid/26094ada-7ba4-4437-bacb-b3cdf6c3397b"; - priority = 1; - }]; + swapDevices = [ + { + device = "/dev/disk/by-uuid/26094ada-7ba4-4437-bacb-b3cdf6c3397b"; + priority = 1; + } + ]; # 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 diff --git a/hosts/mauville/home.nix b/hosts/mauville/home.nix index f9a22116..67c266c0 100644 --- a/hosts/mauville/home.nix +++ b/hosts/mauville/home.nix @@ -1,8 +1,12 @@ -{ inputs, config, pkgs, lib, ... }: - { + inputs, + config, + pkgs, + lib, + ... +}: { home-manager.users.aly = { - imports = [ ../../homeManagerModules ]; + imports = [../../homeManagerModules]; home.username = "aly"; home.homeDirectory = "/home/aly"; diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index e98d696f..c929daa7 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -1,8 +1,9 @@ # Lenovo Yoga 9i Convertible with Intel Core i7-1360P, 15GB RAM, 512GB SSD. - -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let cs-adjuster = pkgs.writeShellScriptBin "cs-adjuster" '' # Get current color scheme color_scheme=$(gsettings get org.gnome.desktop.interface color-scheme) @@ -33,7 +34,7 @@ let pp-adjuster = pkgs.writeShellApplication { name = "pp-adjuster"; - runtimeInputs = [ pkgs.libnotify pkgs.power-profiles-daemon ]; + runtimeInputs = [pkgs.libnotify pkgs.power-profiles-daemon]; text = '' current_profile=$(powerprofilesctl get | tr -d '[:space:]') @@ -50,7 +51,6 @@ let notify-send "Power profile set to $new_profile." ''; }; - in { imports = [ ./disko.nix @@ -69,7 +69,7 @@ in { networking.hostName = "petalburg"; # Define your hostname. - environment.systemPackages = [ cs-adjuster cs-adjuster-plasma pp-adjuster ]; + environment.systemPackages = [cs-adjuster cs-adjuster-plasma pp-adjuster]; desktopConfig = { enable = true; @@ -78,7 +78,7 @@ in { systemConfig = { plymouth.enable = true; - zramSwap = { enable = true; }; + zramSwap = {enable = true;}; }; apps = { diff --git a/hosts/petalburg/disko.nix b/hosts/petalburg/disko.nix index aab5f743..54d34b71 100644 --- a/hosts/petalburg/disko.nix +++ b/hosts/petalburg/disko.nix @@ -23,25 +23,25 @@ size = "100%"; content = { type = "btrfs"; - extraArgs = [ "-f" ]; # Override existing partition + extraArgs = ["-f"]; # Override existing partition # Subvolumes must set a mountpoint in order to be mounted, # unless their parent is mounted subvolumes = { # Subvolume name is different from mountpoint - "rootfs" = { mountpoint = "/"; }; + "rootfs" = {mountpoint = "/";}; # For use with future impermanence setups "persist" = { mountpoint = "/persist"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = ["compress=zstd" "noatime"]; }; # Subvolume name is the same as the mountpoint "home" = { - mountOptions = [ "compress=zstd" ]; + mountOptions = ["compress=zstd"]; mountpoint = "/home"; }; # Parent is not mounted so the mountpoint must be set "nix" = { - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = ["compress=zstd" "noatime"]; mountpoint = "/nix"; }; }; diff --git a/hosts/petalburg/hardware-configuration.nix b/hosts/petalburg/hardware-configuration.nix index c6b556d0..44f821ef 100644 --- a/hosts/petalburg/hardware-configuration.nix +++ b/hosts/petalburg/hardware-configuration.nix @@ -1,19 +1,21 @@ -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = - [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; + boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; # Intel drivers with accelerated video playback support. nixpkgs.config.packageOverrides = pkgs: { intel-vaapi-driver = - pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; + pkgs.intel-vaapi-driver.override {enableHybridCodec = true;}; }; hardware.opengl = { diff --git a/hosts/petalburg/home.nix b/hosts/petalburg/home.nix index bb1b33d3..4ba4367b 100644 --- a/hosts/petalburg/home.nix +++ b/hosts/petalburg/home.nix @@ -1,10 +1,13 @@ -{ inputs, config, pkgs, lib, ... }: - { - users.users.aly.hashedPassword = - "$y$j9T$Ug0ZLHQQuRciFJDgOI6r00$eHc.KyQY0oU4k0LKRiZiGWJ19jkKNWHpOoyCJbtJif8"; + inputs, + config, + pkgs, + lib, + ... +}: { + users.users.aly.hashedPassword = "$y$j9T$Ug0ZLHQQuRciFJDgOI6r00$eHc.KyQY0oU4k0LKRiZiGWJ19jkKNWHpOoyCJbtJif8"; home-manager.users.aly = { - imports = [ ../../homeManagerModules ]; + imports = [../../homeManagerModules]; home.username = "aly"; home.homeDirectory = "/home/aly"; @@ -16,5 +19,4 @@ preset = "LoudnessEqualizer.json"; }; }; - } diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index 05e19a2b..95a9c38f 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -1,8 +1,10 @@ # Lenovo Thinkpad T440p with a Core i5 4210M, 16GB RAM, 512GB SSD. - -{ config, lib, pkgs, ... }: - { + config, + lib, + pkgs, + ... +}: { imports = [ ./hardware-configuration.nix # Include the results of the hardware scan. ./home.nix diff --git a/hosts/rustboro/disko.nix b/hosts/rustboro/disko.nix index 77602494..f7ed3194 100644 --- a/hosts/rustboro/disko.nix +++ b/hosts/rustboro/disko.nix @@ -23,25 +23,25 @@ size = "100%"; content = { type = "btrfs"; - extraArgs = [ "-f" ]; # Override existing partition + extraArgs = ["-f"]; # Override existing partition # Subvolumes must set a mountpoint in order to be mounted, # unless their parent is mounted subvolumes = { # Subvolume name is different from mountpoint - "rootfs" = { mountpoint = "/"; }; + "rootfs" = {mountpoint = "/";}; # For use with future impermanence setups "persist" = { mountpoint = "/persist"; - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = ["compress=zstd" "noatime"]; }; # Subvolume name is the same as the mountpoint "home" = { - mountOptions = [ "compress=zstd" ]; + mountOptions = ["compress=zstd"]; mountpoint = "/home"; }; # Parent is not mounted so the mountpoint must be set "nix" = { - mountOptions = [ "compress=zstd" "noatime" ]; + mountOptions = ["compress=zstd" "noatime"]; mountpoint = "/nix"; }; }; diff --git a/hosts/rustboro/hardware-configuration.nix b/hosts/rustboro/hardware-configuration.nix index 4ada3845..4066f4e7 100644 --- a/hosts/rustboro/hardware-configuration.nix +++ b/hosts/rustboro/hardware-configuration.nix @@ -1,7 +1,11 @@ -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; boot.initrd.availableKernelModules = [ "xhci_pci" @@ -12,11 +16,11 @@ "sr_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; - fileSystems."/persist" = { neededForBoot = true; }; + fileSystems."/persist" = {neededForBoot = true;}; # Otherwise, CPU doesn't automatically clock down. powerManagement.cpuFreqGovernor = "ondemand"; @@ -24,7 +28,7 @@ # Intel drivers with accelerated video playback support. nixpkgs.config.packageOverrides = pkgs: { intel-vaapi-driver = - pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; + pkgs.intel-vaapi-driver.override {enableHybridCodec = true;}; }; hardware.opengl = { diff --git a/hosts/rustboro/home.nix b/hosts/rustboro/home.nix index f2c6da7f..d994995d 100644 --- a/hosts/rustboro/home.nix +++ b/hosts/rustboro/home.nix @@ -1,13 +1,16 @@ -{ inputs, config, pkgs, lib, ... }: - { + inputs, + config, + pkgs, + lib, + ... +}: { userConfig.dustin.enable = true; - users.users.dustin.hashedPassword = - "$y$j9T$OXQYhj4IWjRJWWYsSwcqf.$lCcdq9S7m0EAdej9KMHWj9flH8K2pUb2gitNhLTlLG/"; + users.users.dustin.hashedPassword = "$y$j9T$OXQYhj4IWjRJWWYsSwcqf.$lCcdq9S7m0EAdej9KMHWj9flH8K2pUb2gitNhLTlLG/"; home-manager.users.dustin = { - imports = [ ../../homeManagerModules ]; + imports = [../../homeManagerModules]; home.username = "dustin"; home.homeDirectory = "/home/dustin"; @@ -22,11 +25,10 @@ }; }; - users.users.aly.hashedPassword = - "$y$j9T$VdtiEyMOegHpcUwgmCVFD0$K8Ne6.zk//VJNq2zxVQ0xE0Wg3LohvAQd3Xm9aXdM15"; + users.users.aly.hashedPassword = "$y$j9T$VdtiEyMOegHpcUwgmCVFD0$K8Ne6.zk//VJNq2zxVQ0xE0Wg3LohvAQd3Xm9aXdM15"; home-manager.users.aly = { - imports = [ ../../homeManagerModules ]; + imports = [../../homeManagerModules]; home.username = "aly"; home.homeDirectory = "/home/aly"; diff --git a/nixosModules/apps/default.nix b/nixosModules/apps/default.nix index 1e11b1fc..46c233f3 100644 --- a/nixosModules/apps/default.nix +++ b/nixosModules/apps/default.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./flatpak ./steam ./podman ./virt-manager ]; - +{ + pkgs, + lib, + config, + ... +}: { + imports = [./flatpak ./steam ./podman ./virt-manager]; } diff --git a/nixosModules/apps/flatpak/default.nix b/nixosModules/apps/flatpak/default.nix index 4c0be246..3c7c55d9 100644 --- a/nixosModules/apps/flatpak/default.nix +++ b/nixosModules/apps/flatpak/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { apps.flatpak.enable = lib.mkEnableOption "Enables flatpak support with GUI."; @@ -12,23 +16,23 @@ fonts.fontDir.enable = true; # Allow access to system fonts. - system.fsPackages = [ pkgs.bindfs ]; + system.fsPackages = [pkgs.bindfs]; fileSystems = let mkRoSymBind = path: { device = path; fsType = "fuse.bindfs"; - options = [ "ro" "resolve-symlinks" "x-gvfs-hide" ]; + options = ["ro" "resolve-symlinks" "x-gvfs-hide"]; }; aggregatedFonts = pkgs.buildEnv { name = "system-fonts"; paths = config.fonts.packages; - pathsToLink = [ "/share/fonts" ]; + pathsToLink = ["/share/fonts"]; }; in { # Create an FHS mount to support flatpak host icons/fonts "/usr/share/icons" = mkRoSymBind (config.system.path + "/share/icons"); "/usr/share/fonts" = mkRoSymBind (aggregatedFonts + "/share/fonts"); }; - environment.systemPackages = with pkgs; [ gnome.gnome-software ]; + environment.systemPackages = with pkgs; [gnome.gnome-software]; }; } diff --git a/nixosModules/apps/podman/default.nix b/nixosModules/apps/podman/default.nix index f4648398..e98cbff3 100644 --- a/nixosModules/apps/podman/default.nix +++ b/nixosModules/apps/podman/default.nix @@ -1,20 +1,22 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { apps.podman.enable = lib.mkEnableOption "Enables Podman for OCI container support."; }; config = lib.mkIf config.apps.podman.enable { - virtualisation = { - oci-containers = { backend = "podman"; }; + oci-containers = {backend = "podman";}; podman = { # Required for containers under podman-compose to be able to talk to each other. defaultNetwork.settings.dns_enabled = true; enable = true; }; }; - }; } diff --git a/nixosModules/apps/steam/default.nix b/nixosModules/apps/steam/default.nix index a77ea042..142f319a 100644 --- a/nixosModules/apps/steam/default.nix +++ b/nixosModules/apps/steam/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { apps.steam.enable = lib.mkEnableOption "Enables Steam for video games."; }; diff --git a/nixosModules/apps/virt-manager/default.nix b/nixosModules/apps/virt-manager/default.nix index 91710dd2..77a2a4e6 100644 --- a/nixosModules/apps/virt-manager/default.nix +++ b/nixosModules/apps/virt-manager/default.nix @@ -1,15 +1,17 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { apps.virt-manager.enable = lib.mkEnableOption "Enables virt-manager with TPM and EFI support."; }; config = lib.mkIf config.apps.virt-manager.enable { - programs.virt-manager.enable = true; - virtualisation = { libvirtd.enable = true; }; - + virtualisation = {libvirtd.enable = true;}; }; } diff --git a/nixosModules/default.nix b/nixosModules/default.nix index 4376bf00..aeea0513 100644 --- a/nixosModules/default.nix +++ b/nixosModules/default.nix @@ -1,6 +1,7 @@ -{ config, pkgs, ... }: - { - imports = [ ./desktopConfig ./homeLab ./apps ./systemConfig ./userConfig ]; - + config, + pkgs, + ... +}: { + imports = [./desktopConfig ./homeLab ./apps ./systemConfig ./userConfig]; } diff --git a/nixosModules/desktopConfig/default.nix b/nixosModules/desktopConfig/default.nix index a7f8bf78..0bae4810 100644 --- a/nixosModules/desktopConfig/default.nix +++ b/nixosModules/desktopConfig/default.nix @@ -1,7 +1,10 @@ -{ pkgs, lib, config, ... }: { - - imports = - [ ./displayManagers/lightdm ./desktopEnvironments ./windowManagers ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./displayManagers/lightdm ./desktopEnvironments ./windowManagers]; options = { desktopConfig.enable = @@ -9,7 +12,6 @@ }; config = lib.mkIf config.desktopConfig.enable { - services = { gnome.gnome-keyring.enable = true; gvfs.enable = true; # Mount, trash, etc. @@ -18,7 +20,7 @@ enable = true; xkb.layout = "us"; xkb.variant = ""; - excludePackages = with pkgs; [ xterm ]; + excludePackages = with pkgs; [xterm]; }; }; @@ -26,7 +28,7 @@ fonts.packages = with pkgs; [ liberation_ttf (nerdfonts.override { - fonts = [ "DroidSansMono" "FiraCode" "FiraMono" "Hack" "Noto" ]; + fonts = ["DroidSansMono" "FiraCode" "FiraMono" "Hack" "Noto"]; }) ]; diff --git a/nixosModules/desktopConfig/desktopEnvironments/default.nix b/nixosModules/desktopConfig/desktopEnvironments/default.nix index bc727611..5f49e305 100644 --- a/nixosModules/desktopConfig/desktopEnvironments/default.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/default.nix @@ -1,4 +1,8 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./gnome ./plasma ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./gnome ./plasma]; } diff --git a/nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix b/nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix index d9f6eb39..3d81f24b 100644 --- a/nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/gnome/default.nix @@ -1,6 +1,11 @@ -{ pkgs, lib, config, ... }: { - - imports = [ # Include X settings. +{ + pkgs, + lib, + config, + ... +}: { + imports = [ + # Include X settings. ./fprintdFix.nix ./tripleBuffering.nix ]; @@ -11,7 +16,6 @@ }; config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.enable { - environment.systemPackages = with pkgs; [ gnomeExtensions.appindicator gnomeExtensions.blur-my-shell @@ -29,7 +33,7 @@ # Enable GNOME and GDM. services = { gnome.tracker-miners.enable = true; - udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + udev.packages = with pkgs; [gnome.gnome-settings-daemon]; xserver = { desktopManager.gnome.enable = true; displayManager.gdm.enable = true; diff --git a/nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix b/nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix index 4467f63e..25098730 100644 --- a/nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/gnome/fprintdFix.nix @@ -1,35 +1,37 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopConfig.desktopEnvironments.gnome.fprintdFix.enable = lib.mkEnableOption "Fixes fprintd and pam issues with GNOME Display Manager."; }; - config = - lib.mkIf config.desktopConfig.desktopEnvironments.gnome.fprintdFix.enable { - # Need to change the order pam loads its modules - # to get proper fingerprint behavior on GDM and the lockscreen. - security.pam.services.login.fprintAuth = false; - security.pam.services.gdm-fingerprint = - lib.mkIf (config.services.fprintd.enable) { - text = '' - auth required pam_shells.so - auth requisite pam_nologin.so - auth requisite pam_faillock.so preauth - auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so - auth optional pam_permit.so - auth required pam_env.so - auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so - auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so + config = lib.mkIf config.desktopConfig.desktopEnvironments.gnome.fprintdFix.enable { + # Need to change the order pam loads its modules + # to get proper fingerprint behavior on GDM and the lockscreen. + security.pam.services.login.fprintAuth = false; + security.pam.services.gdm-fingerprint = lib.mkIf (config.services.fprintd.enable) { + text = '' + auth required pam_shells.so + auth requisite pam_nologin.so + auth requisite pam_faillock.so preauth + auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so + auth optional pam_permit.so + auth required pam_env.so + auth [success=ok default=1] ${pkgs.gnome.gdm}/lib/security/pam_gdm.so + auth optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so - account include login + account include login - password required pam_deny.so + password required pam_deny.so - session include login - session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start - ''; - }; + session include login + session optional ${pkgs.gnome.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start + ''; }; + }; } diff --git a/nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix b/nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix index 85a3cefd..381808c0 100644 --- a/nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/gnome/tripleBuffering.nix @@ -1,11 +1,16 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for GNOME."; }; - config = lib.mkIf + config = + lib.mkIf config.desktopConfig.desktopEnvironments.gnome.tripleBuffering.enable { nixpkgs.overlays = [ (final: prev: { diff --git a/nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix b/nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix index 1f76fd87..9bc8b42c 100644 --- a/nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix +++ b/nixosModules/desktopConfig/desktopEnvironments/plasma/default.nix @@ -1,12 +1,15 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopConfig.plasma.enable = lib.mkEnableOption "Enables plasma desktop session."; }; config = lib.mkIf config.desktopConfig.plasma.enable { - # Enable SDDM + Plasma Desktop. services = { desktopManager.plasma6.enable = true; diff --git a/nixosModules/desktopConfig/displayManagers/default.nix b/nixosModules/desktopConfig/displayManagers/default.nix index 812d4a06..aad1486a 100644 --- a/nixosModules/desktopConfig/displayManagers/default.nix +++ b/nixosModules/desktopConfig/displayManagers/default.nix @@ -1,4 +1,8 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./lightdm ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./lightdm]; } diff --git a/nixosModules/desktopConfig/displayManagers/lightdm/default.nix b/nixosModules/desktopConfig/displayManagers/lightdm/default.nix index 151c9e26..0f4475d7 100644 --- a/nixosModules/desktopConfig/displayManagers/lightdm/default.nix +++ b/nixosModules/desktopConfig/displayManagers/lightdm/default.nix @@ -1,12 +1,16 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { - desktopConfig.displayManagers.lightdm.enable = lib.mkEnableOption + desktopConfig.displayManagers.lightdm.enable = + lib.mkEnableOption "Enables lightdm and slick greeter with Catppuccin theme."; }; config = lib.mkIf config.desktopConfig.displayManagers.lightdm.enable { - security.pam.services.lightdm.enableKwallet = true; security.pam.services.lightdm.enableGnomeKeyring = true; @@ -16,10 +20,10 @@ enable = true; theme.name = "Catppuccin-Frappe-Compact-Mauve-Dark"; theme.package = pkgs.catppuccin-gtk.override { - accents = [ "mauve" ]; + accents = ["mauve"]; size = "compact"; variant = "frappe"; - tweaks = [ "normal" ]; + tweaks = ["normal"]; }; iconTheme.name = "Papirus-Dark"; @@ -29,7 +33,7 @@ }; font.name = "NotoSans Nerd Font Regular"; - font.package = pkgs.nerdfonts.override { fonts = [ "Noto" ]; }; + font.package = pkgs.nerdfonts.override {fonts = ["Noto"];}; cursorTheme.package = pkgs.catppuccin-cursors.frappeDark; cursorTheme.name = "Catppuccin-Frappe-Dark-Cursors"; diff --git a/nixosModules/desktopConfig/windowManagers/default.nix b/nixosModules/desktopConfig/windowManagers/default.nix index f16f9236..35364c76 100644 --- a/nixosModules/desktopConfig/windowManagers/default.nix +++ b/nixosModules/desktopConfig/windowManagers/default.nix @@ -1,4 +1,8 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./hyprland ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./hyprland]; } diff --git a/nixosModules/desktopConfig/windowManagers/hyprland/default.nix b/nixosModules/desktopConfig/windowManagers/hyprland/default.nix index 0d295249..578f951f 100644 --- a/nixosModules/desktopConfig/windowManagers/hyprland/default.nix +++ b/nixosModules/desktopConfig/windowManagers/hyprland/default.nix @@ -1,20 +1,23 @@ -{ inputs, pkgs, lib, config, ... }: { - +{ + inputs, + pkgs, + lib, + config, + ... +}: { options = { desktopConfig.windowManagers.hyprland.enable = lib.mkEnableOption "Enables hyprland window manager session."; }; config = lib.mkIf config.desktopConfig.windowManagers.hyprland.enable { - desktopConfig.displayManagers.lightdm.enable = lib.mkDefault false; services.greetd = { enable = true; settings = rec { default_session = { - command = - "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland"; }; }; }; @@ -26,13 +29,13 @@ programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3; nix.settings = { - substituters = [ "https://hyprland.cachix.org" ]; + substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; }; - services.dbus.packages = [ pkgs.gcr ]; + services.dbus.packages = [pkgs.gcr]; environment.sessionVariables.NIXOS_OZONE_WL = "1"; }; diff --git a/nixosModules/desktopConfig/windowManagers/sway/default.nix b/nixosModules/desktopConfig/windowManagers/sway/default.nix index dc342e50..67628763 100644 --- a/nixosModules/desktopConfig/windowManagers/sway/default.nix +++ b/nixosModules/desktopConfig/windowManagers/sway/default.nix @@ -1,17 +1,20 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { desktopConfig.windowManagers.sway.enable = lib.mkEnableOption "Sway window manager session."; }; config = lib.mkIf config.desktopConfig.windowManagers.sway.enable { - desktopConfig.displayManagers.lightdm.enable = lib.mkDefault true; programs.sway.enable = true; - services.dbus.packages = [ pkgs.gcr ]; + services.dbus.packages = [pkgs.gcr]; environment.sessionVariables.NIXOS_OZONE_WL = "1"; }; diff --git a/nixosModules/homeLab/binaryCache/default.nix b/nixosModules/homeLab/binaryCache/default.nix index ce4e3a7e..9e578626 100644 --- a/nixosModules/homeLab/binaryCache/default.nix +++ b/nixosModules/homeLab/binaryCache/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { homeLab.binaryCache.enable = lib.mkEnableOption "Enables nixpkgs cache."; }; diff --git a/nixosModules/homeLab/default.nix b/nixosModules/homeLab/default.nix index 55a44028..e9caf176 100644 --- a/nixosModules/homeLab/default.nix +++ b/nixosModules/homeLab/default.nix @@ -1,7 +1,10 @@ -{ pkgs, lib, config, ... }: { - - imports = - [ ./binaryCache ./reverseProxy ./nixContainers ./ociContainers ./samba ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./binaryCache ./reverseProxy ./nixContainers ./ociContainers ./samba]; options = { homeLab.enable = lib.mkEnableOption "Enables fully functional Home Lab."; diff --git a/nixosModules/homeLab/nixContainers/default.nix b/nixosModules/homeLab/nixContainers/default.nix index 282d0786..c377e858 100644 --- a/nixosModules/homeLab/nixContainers/default.nix +++ b/nixosModules/homeLab/nixContainers/default.nix @@ -1,16 +1,24 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { homeLab.nixContainers.enable = lib.mkEnableOption "Enables select nix containers."; }; config = lib.mkIf config.homeLab.nixContainers.enable { - containers.navidrome = { autoStart = true; bindMounts."/Music".hostPath = "/mnt/Media/Music"; - config = { config, pkgs, lib, ... }: { + config = { + config, + pkgs, + lib, + ... + }: { system.stateVersion = "24.05"; services.navidrome = { enable = true; diff --git a/nixosModules/homeLab/ociContainers/default.nix b/nixosModules/homeLab/ociContainers/default.nix index 452d24e9..2995d3e6 100644 --- a/nixosModules/homeLab/ociContainers/default.nix +++ b/nixosModules/homeLab/ociContainers/default.nix @@ -1,26 +1,28 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { homeLab.ociContainers.enable = lib.mkEnableOption "Enables select OCI containers."; }; config = lib.mkIf config.homeLab.ociContainers.enable { - apps.podman.enable = lib.mkDefault true; virtualisation.oci-containers.containers = { audiobookshelf = { - ports = [ "0.0.0.0:13378:80" ]; + ports = ["0.0.0.0:13378:80"]; image = "ghcr.io/advplyr/audiobookshelf:latest"; - environment = { TZ = "America/New_York"; }; - volumes = - [ "abs_config:/config" "abs_metadata:/metadata" "/mnt/Media:/Media" ]; + environment = {TZ = "America/New_York";}; + volumes = ["abs_config:/config" "abs_metadata:/metadata" "/mnt/Media:/Media"]; }; plex-server = { - ports = [ "0.0.0.0:32400:32400" ]; + ports = ["0.0.0.0:32400:32400"]; image = "plexinc/pms-docker:public"; - environment = { TZ = "America/New_York"; }; + environment = {TZ = "America/New_York";}; volumes = [ "plex_config:/config" "plex_transcode:/transcode" @@ -29,7 +31,7 @@ ]; }; transmission-server = { - ports = [ "0.0.0.0:9091:9091" "0.0.0.0:51413:51413" ]; + ports = ["0.0.0.0:9091:9091" "0.0.0.0:51413:51413"]; image = "linuxserver/transmission:latest"; environment = { PGID = "1000"; @@ -43,9 +45,9 @@ ]; }; jellyfin = { - ports = [ "0.0.0.0:8096:8096" ]; + ports = ["0.0.0.0:8096:8096"]; image = "jellyfin/jellyfin"; - environment = { TZ = "America/New_York"; }; + environment = {TZ = "America/New_York";}; volumes = [ "jellyfin_config:/config" "jellyfin_cache:/cache" @@ -54,7 +56,7 @@ ]; }; freshrss = { - ports = [ "0.0.0.0:8080:80" ]; + ports = ["0.0.0.0:8080:80"]; image = "freshrss/freshrss:latest"; environment = { TZ = "America/New_York"; diff --git a/nixosModules/homeLab/reverseProxy/default.nix b/nixosModules/homeLab/reverseProxy/default.nix index 3f750bc0..ff58e22f 100644 --- a/nixosModules/homeLab/reverseProxy/default.nix +++ b/nixosModules/homeLab/reverseProxy/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { homeLab.reverseProxy.enable = lib.mkEnableOption "Enables nginx reverse proxy."; @@ -12,8 +16,8 @@ # Open TCP ports for audiobookshelf, plex-server, and transmission-server. networking = { firewall = { - allowedTCPPorts = [ 80 443 51413 9091 ]; - allowedUDPPorts = [ 51413 ]; + allowedTCPPorts = [80 443 51413 9091]; + allowedUDPPorts = [51413]; }; # My router doesn't expose settings for NAT loopback # So we have to use this workaround. @@ -67,10 +71,9 @@ virtualHosts."nixcache.raffauflabs.com" = { enableACME = true; forceSSL = true; - locations."/".proxyPass = - "http://${config.services.nix-serve.bindAddress}:${ - toString config.services.nix-serve.port - }"; + locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${ + toString config.services.nix-serve.port + }"; }; virtualHosts."plex.raffauflabs.com" = { diff --git a/nixosModules/homeLab/samba/default.nix b/nixosModules/homeLab/samba/default.nix index e9ecb814..da6bbcf0 100644 --- a/nixosModules/homeLab/samba/default.nix +++ b/nixosModules/homeLab/samba/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { homeLab.samba.enable = lib.mkEnableOption "Enables /Archive and /Media samba shares."; diff --git a/nixosModules/systemConfig/default.nix b/nixosModules/systemConfig/default.nix index a157cbfb..62e326d4 100644 --- a/nixosModules/systemConfig/default.nix +++ b/nixosModules/systemConfig/default.nix @@ -1,7 +1,10 @@ -{ config, pkgs, lib, ... }: - { - imports = [ ./network.nix ./plymouth ./power-profiles-daemon ./zramSwap ]; + config, + pkgs, + lib, + ... +}: { + imports = [./network.nix ./plymouth ./power-profiles-daemon ./zramSwap]; systemConfig.power-profiles-daemon.enable = lib.mkDefault true; @@ -102,7 +105,7 @@ # Automatically optimize the Nix store during every build. auto-optimise-store = false; # Enable experimental `nix` command and flakes. - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = ["nix-command" "flakes"]; substituters = [ "https://nixcache.raffauflabs.com" "https://cache.nixos.org/" diff --git a/nixosModules/systemConfig/network.nix b/nixosModules/systemConfig/network.nix index 72077830..a27ce8f3 100644 --- a/nixosModules/systemConfig/network.nix +++ b/nixosModules/systemConfig/network.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking = { networkmanager.enable = true; diff --git a/nixosModules/systemConfig/plymouth/default.nix b/nixosModules/systemConfig/plymouth/default.nix index 3ae00307..48a73200 100644 --- a/nixosModules/systemConfig/plymouth/default.nix +++ b/nixosModules/systemConfig/plymouth/default.nix @@ -1,7 +1,12 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { - systemConfig.plymouth.enable = lib.mkEnableOption + systemConfig.plymouth.enable = + lib.mkEnableOption "Enables plymouth boot screen with reduced text verbosity."; }; diff --git a/nixosModules/systemConfig/power-profiles-daemon/default.nix b/nixosModules/systemConfig/power-profiles-daemon/default.nix index 6f20fa01..159a7653 100644 --- a/nixosModules/systemConfig/power-profiles-daemon/default.nix +++ b/nixosModules/systemConfig/power-profiles-daemon/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { systemConfig.power-profiles-daemon.enable = lib.mkEnableOption "Enables power-profiles-daemon."; diff --git a/nixosModules/systemConfig/zramSwap/default.nix b/nixosModules/systemConfig/zramSwap/default.nix index cba721a8..d8b60979 100644 --- a/nixosModules/systemConfig/zramSwap/default.nix +++ b/nixosModules/systemConfig/zramSwap/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { systemConfig.zramSwap.enable = lib.mkEnableOption "Enables zram swap."; systemConfig.zramSwap.size = lib.mkOption { diff --git a/nixosModules/userConfig/aly/default.nix b/nixosModules/userConfig/aly/default.nix index e41a44b2..4724e0e5 100644 --- a/nixosModules/userConfig/aly/default.nix +++ b/nixosModules/userConfig/aly/default.nix @@ -1,5 +1,10 @@ -{ inputs, pkgs, lib, config, ... }: { - +{ + inputs, + pkgs, + lib, + config, + ... +}: { options = { userConfig.aly.enable = lib.mkEnableOption "Enables Aly's user."; }; @@ -9,7 +14,7 @@ users.users.aly = { isNormalUser = true; description = "Aly Raffauf"; - extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" "video" ]; + extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"]; }; }; } diff --git a/nixosModules/userConfig/default.nix b/nixosModules/userConfig/default.nix index f1c2e383..312c8c87 100644 --- a/nixosModules/userConfig/default.nix +++ b/nixosModules/userConfig/default.nix @@ -1,6 +1,10 @@ -{ pkgs, lib, config, ... }: { - - imports = [ ./aly ./dustin ]; +{ + pkgs, + lib, + config, + ... +}: { + imports = [./aly ./dustin]; userConfig.aly.enable = lib.mkDefault true; diff --git a/nixosModules/userConfig/dustin/default.nix b/nixosModules/userConfig/dustin/default.nix index d48bc6d9..506cc7e0 100644 --- a/nixosModules/userConfig/dustin/default.nix +++ b/nixosModules/userConfig/dustin/default.nix @@ -1,5 +1,9 @@ -{ pkgs, lib, config, ... }: { - +{ + pkgs, + lib, + config, + ... +}: { options = { userConfig.dustin.enable = lib.mkEnableOption "Enables Dustin's user."; }; @@ -9,7 +13,7 @@ users.users.dustin = { isNormalUser = true; description = "Dustin Raffauf"; - extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" "video" ]; + extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"]; }; }; }