From 85645f37f9d1bfa94d4267089cb0f7c0073e4528 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Wed, 29 Mar 2023 21:48:55 +0530 Subject: [PATCH] switch to nixpkgs-fmt --- flake.nix | 59 ++++---- home/default.nix | 17 +-- home/dev.nix | 10 +- home/downloader.nix | 2 +- home/firefox.nix | 7 +- home/kitty.nix | 8 +- home/media.nix | 8 +- home/nvim.nix | 4 +- home/persistence.nix | 2 +- home/scripts.nix | 159 +++++++++++---------- home/sway/default.nix | 22 +-- home/sway/dunst.nix | 13 +- home/sway/gnome-keyring.nix | 2 +- home/sway/gtk.nix | 13 +- home/sway/kanshi.nix | 2 +- home/sway/rofi/default.nix | 2 +- home/sway/swayidle.nix | 2 +- home/sway/wallpapers.nix | 2 +- home/sway/waybar/default.nix | 39 ++--- home/terminal.nix | 9 +- home/tmux.nix | 3 +- home/virt-manager.nix | 12 +- packages/adi1090x-plymouth/default.nix | 12 +- packages/catppuccin-wallpapers/default.nix | 8 +- packages/default.nix | 8 +- packages/dracula-gtk/default.nix | 18 +-- packages/newaita-icon-theme/default.nix | 22 +-- system/default.nix | 15 +- system/disk.nix | 4 +- system/filesystem.nix | 10 +- system/gnome-keyring.nix | 2 +- system/gtk.nix | 2 +- system/hardware.nix | 15 +- system/kernel.nix | 11 +- system/nix.nix | 4 +- system/packages.nix | 6 +- system/persistence.nix | 2 +- system/plymouth.nix | 4 +- system/secureboot.nix | 7 +- system/services.nix | 6 +- system/swaylock.nix | 4 +- system/virtualisation.nix | 4 +- users/default.nix | 8 +- 43 files changed, 291 insertions(+), 278 deletions(-) diff --git a/flake.nix b/flake.nix index 7ca2933..0054b01 100644 --- a/flake.nix +++ b/flake.nix @@ -21,37 +21,40 @@ }; }; - outputs = { - self, - nixpkgs, - home-manager, - impermanence, - lanzaboote, - } @ inputs: let - system = "x86_64-linux"; - lib = nixpkgs.lib; - in { - formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra; - nixosConfigurations = { - Skipper = lib.nixosSystem { - specialArgs = inputs; - modules = [ - ./system/nix.nix + outputs = + { self + , nixpkgs + , home-manager + , impermanence + , lanzaboote + , + } @ inputs: + let + system = "x86_64-linux"; + lib = nixpkgs.lib; + in + { + formatter.${system} = nixpkgs.legacyPackages.${system}.nixpkgs-fmt; + nixosConfigurations = { + Skipper = lib.nixosSystem { + specialArgs = inputs; + modules = [ + ./system/nix.nix - { - nixpkgs.overlays = [(import ./packages)]; - system.configurationRevision = lib.mkIf (self ? rev) self.rev; - } + { + nixpkgs.overlays = [ (import ./packages) ]; + system.configurationRevision = lib.mkIf (self ? rev) self.rev; + } - home-manager.nixosModules.home-manager - impermanence.nixosModules.impermanence - lanzaboote.nixosModules.lanzaboote + home-manager.nixosModules.home-manager + impermanence.nixosModules.impermanence + lanzaboote.nixosModules.lanzaboote - ./system - ./users - ./home - ]; + ./system + ./users + ./home + ]; + }; }; }; - }; } diff --git a/home/default.nix b/home/default.nix index 150d7f2..2b0ec83 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,21 +1,22 @@ -{ - impermanence, - pkgs, - ... -}: let +{ impermanence +, pkgs +, ... +}: +let user = import ../users/user.nix; -in { +in +{ programs.fuse.userAllowOther = true; fileSystems."/home/${user.primary.userName}" = { device = "tmpfs"; fsType = "tmpfs"; - options = ["mode=0755" "uid=1000" "gid=100"]; + options = [ "mode=0755" "uid=1000" "gid=100" ]; }; home-manager.useUserPackages = true; home-manager.useGlobalPkgs = true; - home-manager.users.${user.primary.userName} = {pkgs, ...}: { + home-manager.users.${user.primary.userName} = { pkgs, ... }: { imports = [ impermanence.nixosModules.home-manager.impermanence diff --git a/home/dev.nix b/home/dev.nix index dd44652..7b9ca25 100644 --- a/home/dev.nix +++ b/home/dev.nix @@ -1,6 +1,8 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let user = import ../users/user.nix; -in { +in +{ imports = [ ./nvim.nix ]; @@ -14,7 +16,7 @@ in { gh = { enable = true; settings.git_protocol = "ssh"; - extensions = [pkgs.gh-dash]; + extensions = [ pkgs.gh-dash ]; }; git = { enable = true; @@ -31,7 +33,7 @@ in { init.defaultBranch = "main"; push.autoSetupRemote = true; }; - ignores = ["/.nix" "/.direnv"]; + ignores = [ "/.nix" "/.direnv" ]; }; lazygit = { enable = true; diff --git a/home/downloader.nix b/home/downloader.nix index e75dccd..f1eb38d 100644 --- a/home/downloader.nix +++ b/home/downloader.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { programs = { aria2 = { enable = true; diff --git a/home/firefox.nix b/home/firefox.nix index 254b9fc..d572cca 100644 --- a/home/firefox.nix +++ b/home/firefox.nix @@ -1,7 +1,6 @@ -{ - pkgs, - osConfig, - ... +{ pkgs +, osConfig +, ... }: { programs = { firefox = { diff --git a/home/kitty.nix b/home/kitty.nix index 515b563..aed4858 100644 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -1,14 +1,16 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let dracula = pkgs.fetchFromGitHub { owner = "dracula"; repo = "kitty"; rev = "87717a3f00e3dff0fc10c93f5ff535ea4092de70"; hash = "sha256-78PTH9wE6ktuxeIxrPp0ZgRI8ST+eZ3Ok2vW6BCIZkc="; }; -in { +in +{ programs.kitty = { enable = true; - font.package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; + font.package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }; font.name = "FiraCode Nerd Font"; extraConfig = '' font_size 14 diff --git a/home/media.nix b/home/media.nix index 7838888..767e538 100644 --- a/home/media.nix +++ b/home/media.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg.desktopEntries."mpv".name = "mpv Media Player"; xdg.desktopEntries."mpv".exec = "mpv --player-operation-mode=pseudo-gui -- %U"; xdg.desktopEntries."mpv".noDisplay = true; @@ -14,13 +14,13 @@ ]; programs.mpv = { enable = true; - package = pkgs.mpv.override {youtubeSupport = true;}; + package = pkgs.mpv.override { youtubeSupport = true; }; config = { hwdec = "auto-safe"; gpu-context = "wayland"; }; - defaultProfiles = ["gpu-hq"]; - scripts = with pkgs.mpvScripts; [mpris]; + defaultProfiles = [ "gpu-hq" ]; + scripts = with pkgs.mpvScripts; [ mpris ]; }; services = { spotifyd = { diff --git a/home/nvim.nix b/home/nvim.nix index 447dc7b..bd61277 100644 --- a/home/nvim.nix +++ b/home/nvim.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg.desktopEntries."nvim".name = "Neovim wrapper"; xdg.desktopEntries."nvim".exec = "nvim %F"; xdg.desktopEntries."nvim".noDisplay = true; @@ -23,7 +23,7 @@ ]; plugins = with pkgs.vimPlugins; [ dracula-nvim - (nvim-treesitter.withPlugins (plugins: with plugins; [bash dockerfile gitcommit gitignore git_rebase go markdown markdown_inline nix rust toml yaml])) + (nvim-treesitter.withPlugins (plugins: with plugins; [ bash dockerfile gitcommit gitignore git_rebase go markdown markdown_inline nix rust toml yaml ])) nvim-treesitter-context nvim-treesitter-refactor telescope-nvim diff --git a/home/persistence.nix b/home/persistence.nix index cf2d0e4..3c44a0f 100644 --- a/home/persistence.nix +++ b/home/persistence.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { home.persistence."/persist/home" = { allowOther = true; directories = [ diff --git a/home/scripts.nix b/home/scripts.nix index 0f6f67a..3968d6d 100644 --- a/home/scripts.nix +++ b/home/scripts.nix @@ -1,11 +1,12 @@ -{ - osConfig, - pkgs, - ... -}: let +{ osConfig +, pkgs +, ... +}: +let notify-send = "${pkgs.libnotify}/bin/notify-send"; dmenu = "${pkgs.rofi-wayland}/bin/rofi -dmenu"; -in { +in +{ xdg.configFile = { "scripts/power_menu.sh" = { executable = true; @@ -42,82 +43,88 @@ in { ''; }; - "scripts/volume_up.sh" = let - wpctl = "${pkgs.wireplumber}/bin/wpctl"; - in { - executable = true; - text = '' - #!/bin/sh + "scripts/volume_up.sh" = + let + wpctl = "${pkgs.wireplumber}/bin/wpctl"; + in + { + executable = true; + text = '' + #!/bin/sh - set -eu + set -eu - ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0 - [ $(${wpctl} get-volume @DEFAULT_AUDIO_SINK@ | awk -F': ' '{print $2}' | sed 's/\.//') -lt 100 ] && ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ - ''; - }; + ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0 + [ $(${wpctl} get-volume @DEFAULT_AUDIO_SINK@ | awk -F': ' '{print $2}' | sed 's/\.//') -lt 100 ] && ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ + ''; + }; - "scripts/tmux_sessions.sh" = let - kitty = "${pkgs.kitty}/bin/kitty"; - tmux = "${pkgs.tmux}/bin/tmux"; - in { - executable = true; - text = '' - #!/bin/sh + "scripts/tmux_sessions.sh" = + let + kitty = "${pkgs.kitty}/bin/kitty"; + tmux = "${pkgs.tmux}/bin/tmux"; + in + { + executable = true; + text = '' + #!/bin/sh - set -eu + set -eu - SESSION="$(${tmux} list-sessions -F "(#{session_attached}) #S [#{pane_current_command} in #{pane_current_path}] #{pane_title}" | sort | ${dmenu} -p "Running TMUX Sessions" | awk '{print $2}')" - case "$SESSION" in - "") + SESSION="$(${tmux} list-sessions -F "(#{session_attached}) #S [#{pane_current_command} in #{pane_current_path}] #{pane_title}" | sort | ${dmenu} -p "Running TMUX Sessions" | awk '{print $2}')" + case "$SESSION" in + "") + ;; + *) + ${kitty} ${tmux} -u attach-session -dEt "$SESSION" + ;; + esac''; + }; + "scripts/power_profile.sh" = + let + sudo = "/run/wrappers/bin/sudo"; + cpupower = "${osConfig.boot.kernelPackages.cpupower}/bin/cpupower"; + powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl"; + in + { + executable = true; + text = '' + #!/bin/sh + + set -eu + + POWER_PROFILE_FILE="$HOME/.cache/power_profile" + POWER_PROFILE="powersave" + + if [ -f "$POWER_PROFILE_FILE" ]; then + POWER_PROFILE="$(<$POWER_PROFILE_FILE)" + fi + + case "$1" in + "toggle") + if [ "$POWER_PROFILE" == "powersave" ]; then + ${sudo} ${cpupower} frequency-set --governor performance > /dev/null + ${powerprofilesctl} set performance + POWER_PROFILE="performance" + elif [ "$POWER_PROFILE" == "performance" ]; then + ${sudo} ${cpupower} frequency-set --governor powersave > /dev/null + ${powerprofilesctl} set power-saver + POWER_PROFILE="powersave" + fi + echo $POWER_PROFILE > $POWER_PROFILE_FILE + ${notify-send} -u normal "Power Profile" "Switched to $POWER_PROFILE mode." ;; - *) - ${kitty} ${tmux} -u attach-session -dEt "$SESSION" + "icon") + if [ "$POWER_PROFILE" == "powersave" ]; then + echo "󰌪" + elif [ "$POWER_PROFILE" == "performance" ]; then + echo "󰓅" + fi ;; - esac''; - }; - "scripts/power_profile.sh" = let - sudo = "/run/wrappers/bin/sudo"; - cpupower = "${osConfig.boot.kernelPackages.cpupower}/bin/cpupower"; - powerprofilesctl = "${pkgs.power-profiles-daemon}/bin/powerprofilesctl"; - in { - executable = true; - text = '' - #!/bin/sh - - set -eu - - POWER_PROFILE_FILE="$HOME/.cache/power_profile" - POWER_PROFILE="powersave" - - if [ -f "$POWER_PROFILE_FILE" ]; then - POWER_PROFILE="$(<$POWER_PROFILE_FILE)" - fi - - case "$1" in - "toggle") - if [ "$POWER_PROFILE" == "powersave" ]; then - ${sudo} ${cpupower} frequency-set --governor performance > /dev/null - ${powerprofilesctl} set performance - POWER_PROFILE="performance" - elif [ "$POWER_PROFILE" == "performance" ]; then - ${sudo} ${cpupower} frequency-set --governor powersave > /dev/null - ${powerprofilesctl} set power-saver - POWER_PROFILE="powersave" - fi - echo $POWER_PROFILE > $POWER_PROFILE_FILE - ${notify-send} -u normal "Power Profile" "Switched to $POWER_PROFILE mode." - ;; - "icon") - if [ "$POWER_PROFILE" == "powersave" ]; then - echo "󰌪" - elif [ "$POWER_PROFILE" == "performance" ]; then - echo "󰓅" - fi - ;; - *) - ;; - esac - ''; - }; + *) + ;; + esac + ''; + }; }; } diff --git a/home/sway/default.nix b/home/sway/default.nix index 18402fb..8b000fa 100644 --- a/home/sway/default.nix +++ b/home/sway/default.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - pkgs, - ... +{ config +, lib +, pkgs +, ... }: { imports = [ ./gnome-keyring.nix @@ -22,10 +21,10 @@ wayland.windowManager.sway.enable = true; wayland.windowManager.sway.package = pkgs.sway; wayland.windowManager.sway.config.modifier = "Mod4"; - wayland.windowManager.sway.config.bars = []; + wayland.windowManager.sway.config.bars = [ ]; wayland.windowManager.sway.xwayland = true; wayland.windowManager.sway.config.fonts = { - names = ["FiraCode Nerd Font"]; + names = [ "FiraCode Nerd Font" ]; size = 11.0; }; wayland.windowManager.sway.config.input = { @@ -85,9 +84,10 @@ }; }; - wayland.windowManager.sway.config.keybindings = let - modifier = config.wayland.windowManager.sway.config.modifier; - in + wayland.windowManager.sway.config.keybindings = + let + modifier = config.wayland.windowManager.sway.config.modifier; + in lib.mkOptionDefault { "${modifier}+Return" = "exec ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux new"; "${modifier}+Shift+Return" = "exec ${pkgs.kitty}/bin/kitty"; @@ -114,7 +114,7 @@ }; wayland.windowManager.sway.config.startup = [ - {command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";} + { command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; } { command = "~/.config/scripts/chpaper.sh"; always = true; diff --git a/home/sway/dunst.nix b/home/sway/dunst.nix index 399fb45..4bf7daf 100644 --- a/home/sway/dunst.nix +++ b/home/sway/dunst.nix @@ -1,11 +1,12 @@ -{ - config, - pkgs, - ... -}: let +{ config +, pkgs +, ... +}: +let dmenu = "${config.programs.rofi.package}/bin/rofi -dmenu"; firefox = "${config.programs.firefox.package}/bin/firefox"; -in { +in +{ services.dunst = { enable = true; iconTheme.name = config.gtk.iconTheme.name; diff --git a/home/sway/gnome-keyring.nix b/home/sway/gnome-keyring.nix index b0d3e1b..4538313 100644 --- a/home/sway/gnome-keyring.nix +++ b/home/sway/gnome-keyring.nix @@ -1,3 +1,3 @@ -{pkgs, ...}: { +{ pkgs, ... }: { services.gnome-keyring.enable = true; } diff --git a/home/sway/gtk.nix b/home/sway/gtk.nix index 700d595..89e7b60 100644 --- a/home/sway/gtk.nix +++ b/home/sway/gtk.nix @@ -1,8 +1,8 @@ -{ - lib, - pkgs, - ... -}: let +{ lib +, pkgs +, ... +}: +let gtkTheme = { name = "Dracula"; package = pkgs.dracula-gtk; @@ -20,7 +20,8 @@ name = "Bibata-Modern-Classic"; package = pkgs.bibata-cursors; }; -in { +in +{ gtk.enable = true; gtk.theme = gtkTheme; home.sessionVariables.GTK_THEME = gtkTheme.name; diff --git a/home/sway/kanshi.nix b/home/sway/kanshi.nix index ea6336f..82bb1d6 100644 --- a/home/sway/kanshi.nix +++ b/home/sway/kanshi.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { services.kanshi.enable = true; services.kanshi.profiles = { undocked = { diff --git a/home/sway/rofi/default.nix b/home/sway/rofi/default.nix index 4620d0d..a6b1587 100644 --- a/home/sway/rofi/default.nix +++ b/home/sway/rofi/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg.desktopEntries."rofi".name = "Rofi"; xdg.desktopEntries."rofi".exec = "rofi -show"; xdg.desktopEntries."rofi".noDisplay = true; diff --git a/home/sway/swayidle.nix b/home/sway/swayidle.nix index 3dbafe3..00c6426 100644 --- a/home/sway/swayidle.nix +++ b/home/sway/swayidle.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { services.swayidle.enable = true; services.swayidle.events = [ { diff --git a/home/sway/wallpapers.nix b/home/sway/wallpapers.nix index 8215859..62d385c 100644 --- a/home/sway/wallpapers.nix +++ b/home/sway/wallpapers.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { xdg.dataFile."wallpapers/catppuccin".source = "${pkgs.catppuccin-wallpapers}/share/wallpapers"; xdg.configFile."scripts/chpaper.sh" = { text = '' diff --git a/home/sway/waybar/default.nix b/home/sway/waybar/default.nix index 3c90f60..dfd3ee2 100644 --- a/home/sway/waybar/default.nix +++ b/home/sway/waybar/default.nix @@ -1,7 +1,6 @@ -{ - config, - pkgs, - ... +{ config +, pkgs +, ... }: { programs.waybar.enable = true; programs.waybar.systemd.enable = true; @@ -12,9 +11,9 @@ layer = "top"; position = "top"; height = 28; - modules-left = ["sway/workspaces" "sway/window" "sway/mode"]; - modules-center = []; - modules-right = ["tray" "custom/power_profile" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock"]; + modules-left = [ "sway/workspaces" "sway/window" "sway/mode" ]; + modules-center = [ ]; + modules-right = [ "tray" "custom/power_profile" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock" ]; "sway/mode" = { "format" = "{}"; }; @@ -37,7 +36,7 @@ }; "backlight" = { "format" = "{icon}"; - "format-icons" = ["" "" "" ""]; + "format-icons" = [ "" "" "" "" ]; }; "battery" = { "states" = { @@ -49,7 +48,7 @@ "format-alt" = "{icon} {capacity}% ({time})"; "format-charging" = " {capacity}%"; "format-plugged" = "‭ﮣ {capacity}%"; - "format-icons" = ["" "" "" "" "" "" "" "" "" "" ""]; + "format-icons" = [ "" "" "" "" "" "" "" "" "" "" "" ]; "tooltip" = false; }; "network" = { @@ -75,7 +74,7 @@ "phone" = ""; "portable" = ""; "car" = ""; - "default" = ["奄" "奔" "墳"]; + "default" = [ "奄" "奔" "墳" ]; }; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; }; @@ -90,15 +89,17 @@ "tray" = { "spacing" = 4; }; - "custom/power_profile" = let - script = "${config.xdg.configHome}/scripts/power_profile.sh"; - in { - exec = "${script} icon"; - on-click = "${script} toggle"; - format = "{}"; - tooltip = false; - interval = "10"; - }; + "custom/power_profile" = + let + script = "${config.xdg.configHome}/scripts/power_profile.sh"; + in + { + exec = "${script} icon"; + on-click = "${script} toggle"; + format = "{}"; + tooltip = false; + interval = "10"; + }; }; }; } diff --git a/home/terminal.nix b/home/terminal.nix index 7f27a74..643a466 100644 --- a/home/terminal.nix +++ b/home/terminal.nix @@ -1,7 +1,6 @@ -{ - config, - pkgs, - ... +{ config +, pkgs +, ... }: { imports = [ ./kitty.nix @@ -34,7 +33,7 @@ exa = { enable = true; enableAliases = true; - extraOptions = ["--group-directories-first" "--group"]; + extraOptions = [ "--group-directories-first" "--group" ]; git = true; icons = true; }; diff --git a/home/tmux.nix b/home/tmux.nix index 2b6630b..ec89712 100644 --- a/home/tmux.nix +++ b/home/tmux.nix @@ -1,7 +1,6 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.tmux = { enable = true; - shell = "${pkgs.zsh}/bin/zsh"; escapeTime = 0; plugins = with pkgs; [ { diff --git a/home/virt-manager.nix b/home/virt-manager.nix index 0721b6e..796023a 100644 --- a/home/virt-manager.nix +++ b/home/virt-manager.nix @@ -1,18 +1,18 @@ -{pkgs, ...}: { - home.packages = [pkgs.virt-manager]; +{ pkgs, ... }: { + home.packages = [ pkgs.virt-manager ]; dconf.settings = { "org/virt-manager/virt-manager/confirm" = { "forcepoweroff" = false; }; "org/virt-manager/virt-manager/connections" = { - "autoconnect" = ["qemu:///system"]; - "uris" = ["qemu:///system"]; + "autoconnect" = [ "qemu:///system" ]; + "uris" = [ "qemu:///system" ]; }; - "org/virt-manager/virt-manager/new-vm" = {"firmware" = "uefi";}; + "org/virt-manager/virt-manager/new-vm" = { "firmware" = "uefi"; }; "org/virt-manager/virt-manager/stats" = { "enable-disk-poll" = true; "enable-net-poll" = true; }; - "org/virt-manager/virt-manager/vmlist-fields" = {"network-traffic" = true;}; + "org/virt-manager/virt-manager/vmlist-fields" = { "network-traffic" = true; }; }; } diff --git a/packages/adi1090x-plymouth/default.nix b/packages/adi1090x-plymouth/default.nix index 1b6fe33..a0fad50 100644 --- a/packages/adi1090x-plymouth/default.nix +++ b/packages/adi1090x-plymouth/default.nix @@ -1,9 +1,9 @@ -{ - lib, - stdenvNoCC, - fetchFromGitHub, - pack ? "pack_1", - theme ? "cuts", +{ lib +, stdenvNoCC +, fetchFromGitHub +, pack ? "pack_1" +, theme ? "cuts" +, }: stdenvNoCC.mkDerivation { pname = "adi1090x-plymouth"; diff --git a/packages/catppuccin-wallpapers/default.nix b/packages/catppuccin-wallpapers/default.nix index ff925a5..66f9a04 100644 --- a/packages/catppuccin-wallpapers/default.nix +++ b/packages/catppuccin-wallpapers/default.nix @@ -1,7 +1,7 @@ -{ - lib, - stdenvNoCC, - fetchFromGitHub, +{ lib +, stdenvNoCC +, fetchFromGitHub +, }: stdenvNoCC.mkDerivation { pname = "catppuccin-wallpapers"; diff --git a/packages/default.nix b/packages/default.nix index 4226843..788f9f6 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,6 +1,6 @@ self: super: { - adi1090x-plymouth = super.callPackage ./adi1090x-plymouth {}; - catppuccin-wallpapers = super.callPackage ./catppuccin-wallpapers {}; - dracula-gtk = super.callPackage ./dracula-gtk {}; - newaita-icon-theme = super.callPackage ./newaita-icon-theme {}; + adi1090x-plymouth = super.callPackage ./adi1090x-plymouth { }; + catppuccin-wallpapers = super.callPackage ./catppuccin-wallpapers { }; + dracula-gtk = super.callPackage ./dracula-gtk { }; + newaita-icon-theme = super.callPackage ./newaita-icon-theme { }; } diff --git a/packages/dracula-gtk/default.nix b/packages/dracula-gtk/default.nix index b021612..cbd6e78 100644 --- a/packages/dracula-gtk/default.nix +++ b/packages/dracula-gtk/default.nix @@ -1,10 +1,10 @@ -{ - lib, - stdenvNoCC, - fetchFromGitHub, - gtk3, - gnome-themes-extra, - gtk-engine-murrine, +{ lib +, stdenvNoCC +, fetchFromGitHub +, gtk3 +, gnome-themes-extra +, gtk-engine-murrine +, }: stdenvNoCC.mkDerivation { pname = "dracula-gtk"; @@ -17,13 +17,13 @@ stdenvNoCC.mkDerivation { hash = "sha256-2lmpEPYxdbRnKgcJ792cuzyOBmOIWhja18q+F3Pxgjs="; }; - nativeBuildInputs = [gtk3]; + nativeBuildInputs = [ gtk3 ]; buildInputs = [ gnome-themes-extra ]; - propagatedUserEnvPkgs = [gtk-engine-murrine]; + propagatedUserEnvPkgs = [ gtk-engine-murrine ]; installPhase = '' runHook preInstall diff --git a/packages/newaita-icon-theme/default.nix b/packages/newaita-icon-theme/default.nix index 8f6bc47..f3166ec 100644 --- a/packages/newaita-icon-theme/default.nix +++ b/packages/newaita-icon-theme/default.nix @@ -1,13 +1,13 @@ -{ - lib, - stdenvNoCC, - fetchFromGitHub, - gtk3, - gnome, - gnome-icon-theme, - hicolor-icon-theme, - panel ? "dark", - folder ? "default", +{ lib +, stdenvNoCC +, fetchFromGitHub +, gtk3 +, gnome +, gnome-icon-theme +, hicolor-icon-theme +, panel ? "dark" +, folder ? "default" +, }: stdenvNoCC.mkDerivation { pname = "newaita-icon-theme"; @@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation { hash = "sha256-tqtjUy8RjvOu0NaK+iE0R1g7/eqCpmhbdxuNGd/YfSI="; }; - nativeBuildInputs = [gtk3]; + nativeBuildInputs = [ gtk3 ]; propagatedBuildInputs = [ gnome.adwaita-icon-theme diff --git a/system/default.nix b/system/default.nix index 8d260a8..9e05127 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,8 +1,7 @@ -{ - config, - lib, - pkgs, - ... +{ config +, lib +, pkgs +, ... }: { imports = [ ./filesystem.nix @@ -45,7 +44,7 @@ LC_TIME = "en_US.UTF-8"; LC_ALL = "en_US.UTF-8"; }; - supportedLocales = ["en_US.UTF-8/UTF-8"]; + supportedLocales = [ "en_US.UTF-8/UTF-8" ]; }; networking = { @@ -87,7 +86,7 @@ tctiEnvironment.enable = true; }; sudo = { - package = pkgs.sudo.override {withInsults = true;}; + package = pkgs.sudo.override { withInsults = true; }; extraConfig = '' Defaults lecture="never" @@ -105,7 +104,7 @@ portal = { enable = true; wlr.enable = true; - extraPortals = [pkgs.xdg-desktop-portal-gtk]; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; }; }; diff --git a/system/disk.nix b/system/disk.nix index ad931ec..f46ce43 100644 --- a/system/disk.nix +++ b/system/disk.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { boot = { resumeDevice = "/dev/vg0/swap"; initrd.luks.devices = { @@ -11,5 +11,5 @@ }; }; - swapDevices = [{device = "/dev/vg0/swap";}]; + swapDevices = [{ device = "/dev/vg0/swap"; }]; } diff --git a/system/filesystem.nix b/system/filesystem.nix index 95e2ed9..f6919a9 100644 --- a/system/filesystem.nix +++ b/system/filesystem.nix @@ -1,28 +1,28 @@ -{...}: { +{ ... }: { boot.tmpOnTmpfs = true; fileSystems = { "/" = { device = "tmpfs"; fsType = "tmpfs"; - options = ["defaults" "uid=0" "gid=0" "mode=0755"]; + options = [ "defaults" "uid=0" "gid=0" "mode=0755" ]; neededForBoot = true; }; "/nix" = { device = "/dev/vg0/system"; fsType = "btrfs"; - options = ["subvol=/@nix" "compress-force=zstd"]; + options = [ "subvol=/@nix" "compress-force=zstd" ]; neededForBoot = true; }; "/persist" = { device = "/dev/vg0/system"; fsType = "btrfs"; - options = ["subvol=/@persist" "compress-force=zstd"]; + options = [ "subvol=/@persist" "compress-force=zstd" ]; neededForBoot = true; }; "/mnt/system" = { device = "/dev/vg0/system"; fsType = "btrfs"; - options = ["subvol=/" "compress-force=zstd"]; + options = [ "subvol=/" "compress-force=zstd" ]; }; "/boot" = { device = "/dev/disk/by-partlabel/ESP"; diff --git a/system/gnome-keyring.nix b/system/gnome-keyring.nix index 9153989..ecec694 100644 --- a/system/gnome-keyring.nix +++ b/system/gnome-keyring.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { programs.seahorse.enable = true; services.gnome.gnome-keyring.enable = true; security.pam.services.passwd.enableGnomeKeyring = true; diff --git a/system/gtk.nix b/system/gtk.nix index e3002fb..4cb5e57 100644 --- a/system/gtk.nix +++ b/system/gtk.nix @@ -1,3 +1,3 @@ -{...}: { +{ ... }: { programs.dconf.enable = true; } diff --git a/system/hardware.nix b/system/hardware.nix index f988146..d79b31d 100644 --- a/system/hardware.nix +++ b/system/hardware.nix @@ -1,16 +1,15 @@ -{ - lib, - pkgs, - config, - ... +{ lib +, pkgs +, config +, ... }: { - imports = [./disk.nix ./kernel.nix]; + imports = [ ./disk.nix ./kernel.nix ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.opengl = { enable = true; - extraPackages = [pkgs.intel-media-driver]; + extraPackages = [ pkgs.intel-media-driver ]; driSupport = true; }; @@ -23,7 +22,7 @@ hardware.sensor.hddtemp = { enable = true; - drives = ["/dev/disk/by-path/pci-0000:01:00.0-nvme-1"]; + drives = [ "/dev/disk/by-path/pci-0000:01:00.0-nvme-1" ]; }; boot.loader = { diff --git a/system/kernel.nix b/system/kernel.nix index 3a3b93c..f67c06a 100644 --- a/system/kernel.nix +++ b/system/kernel.nix @@ -1,7 +1,6 @@ -{ - lib, - pkgs, - ... +{ lib +, pkgs +, ... }: { boot = { initrd = { @@ -14,9 +13,9 @@ "sd_mod" "rtsx_pci_sdmmc" ]; - kernelModules = ["i915"]; + kernelModules = [ "i915" ]; }; - kernelModules = ["kvm-intel"]; + kernelModules = [ "kvm-intel" ]; kernelPackages = pkgs.linuxKernel.packages.linux_zen; }; diff --git a/system/nix.nix b/system/nix.nix index e5daca9..dbc3829 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { nix.settings = { substituters = [ "https://nix-community.cachix.org/" @@ -7,7 +7,7 @@ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; + experimental-features = [ "nix-command" "flakes" ]; }; nixpkgs.config.allowUnfree = true; } diff --git a/system/packages.nix b/system/packages.nix index 44132ad..1c8f66f 100644 --- a/system/packages.nix +++ b/system/packages.nix @@ -1,11 +1,11 @@ -{pkgs, ...}: { +{ pkgs, ... }: { fonts = { enableDefaultFonts = true; fontDir.enable = true; fonts = with pkgs; [ cantarell-fonts liberation_ttf - (nerdfonts.override {fonts = ["FiraCode"];}) + (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-cjk noto-fonts-emoji @@ -30,5 +30,5 @@ xwayland.enable = true; zsh.enable = true; }; - environment.pathsToLink = ["/share/zsh"]; + environment.pathsToLink = [ "/share/zsh" ]; } diff --git a/system/persistence.nix b/system/persistence.nix index e9384f4..2c275d8 100644 --- a/system/persistence.nix +++ b/system/persistence.nix @@ -1,4 +1,4 @@ -{...}: { +{ ... }: { environment.persistence."/persist/system" = { hideMounts = true; directories = [ diff --git a/system/plymouth.nix b/system/plymouth.nix index 7e2c3bf..b002d28 100644 --- a/system/plymouth.nix +++ b/system/plymouth.nix @@ -1,6 +1,6 @@ -{pkgs, ...}: { +{ pkgs, ... }: { boot.consoleLogLevel = 3; - boot.kernelParams = ["quiet"]; + boot.kernelParams = [ "quiet" ]; boot.plymouth = { enable = true; themePackages = [ diff --git a/system/secureboot.nix b/system/secureboot.nix index f2cc70e..decd5d7 100644 --- a/system/secureboot.nix +++ b/system/secureboot.nix @@ -1,7 +1,6 @@ -{ - lib, - pkgs, - ... +{ lib +, pkgs +, ... }: { boot.bootspec.enable = true; boot.loader.systemd-boot.enable = lib.mkForce false; diff --git a/system/services.nix b/system/services.nix index 41f5188..8c3a835 100644 --- a/system/services.nix +++ b/system/services.nix @@ -1,10 +1,10 @@ -{pkgs, ...}: { +{ pkgs, ... }: { services = { blueman.enable = true; dbus = { enable = true; apparmor = "enabled"; - packages = [pkgs.gcr pkgs.gcr_4]; + packages = [ pkgs.gcr pkgs.gcr_4 ]; }; fstrim.enable = true; fwupd.enable = true; @@ -20,7 +20,7 @@ power-profiles-daemon.enable = true; resolved.enable = true; thermald.enable = true; - udev.packages = [pkgs.yubikey-personalization]; + udev.packages = [ pkgs.yubikey-personalization ]; udisks2.enable = true; }; } diff --git a/system/swaylock.nix b/system/swaylock.nix index eef9213..8cc31b2 100644 --- a/system/swaylock.nix +++ b/system/swaylock.nix @@ -1,3 +1,3 @@ -{...}: { - security.pam.services.swaylock = {}; +{ ... }: { + security.pam.services.swaylock = { }; } diff --git a/system/virtualisation.nix b/system/virtualisation.nix index 9db5bd5..706c334 100644 --- a/system/virtualisation.nix +++ b/system/virtualisation.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { virtualisation = { docker = { enable = true; @@ -9,7 +9,7 @@ enable = true; qemu.ovmf = { enable = true; - packages = [pkgs.OVMFFull.fd]; + packages = [ pkgs.OVMFFull.fd ]; }; }; }; diff --git a/users/default.nix b/users/default.nix index dccddbe..97b6710 100644 --- a/users/default.nix +++ b/users/default.nix @@ -1,6 +1,8 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let user = import ./user.nix; -in { +in +{ services.getty.autologinUser = user.primary.userName; users.mutableUsers = false; users.users = { @@ -10,7 +12,7 @@ in { hashedPassword = user.primary.hashedPassword; description = user.primary.realName; isNormalUser = true; - extraGroups = ["docker" "libvirtd" "networkmanager" "tss" "wheel"]; + extraGroups = [ "docker" "libvirtd" "networkmanager" "tss" "wheel" ]; shell = pkgs.zsh; }; };