From 28043aded9891c43f448744963886d42106fdb37 Mon Sep 17 00:00:00 2001 From: Sean Kovacs Date: Wed, 24 Dec 2025 11:29:41 -0500 Subject: [PATCH] format with alejandra --- flake.nix | 173 +++++++++++---------- hardware/alien/default.nix | 12 +- hardware/peach/default.nix | 12 +- hardware/vm-aarch64/default.nix | 24 +-- home/default.nix | 227 ++++++++++++++-------------- home/games/minecraft/default.nix | 6 +- home/games/morrowind/default.nix | 8 +- home/graphical/discord/default.nix | 15 +- home/graphical/discord/vencord.nix | 8 +- home/graphical/firefox/default.nix | 4 +- home/graphical/mpv/default.nix | 13 +- home/hosts/alien/default.nix | 47 +++--- home/hosts/peach/default.nix | 11 +- home/hosts/vm-aarch64/default.nix | 10 +- home/kde/default.nix | 14 +- home/systemd/default.nix | 10 +- home/terminal/btop/default.nix | 13 +- home/terminal/fish/default.nix | 7 +- home/terminal/kitty/default.nix | 9 +- home/terminal/nvim/default.nix | 42 ++--- home/tiling/niri/default.nix | 11 +- home/tiling/niri/niri.nix | 188 +++++++++++------------ home/tiling/niri/noctalia.nix | 101 +++++++------ home/tiling/wallpaper/default.nix | 12 +- home/vscode/default.nix | 10 +- packages/overlay.nix | 11 +- packages/spotify/package.nix | 81 +++++----- packages/spotifyd/package.nix | 9 +- system/default.nix | 11 +- system/hosts/alien/default.nix | 11 +- system/hosts/peach/default.nix | 7 +- system/hosts/vm-aarch64/default.nix | 5 +- system/shell/fish.nix | 4 +- system/tailscale/default.nix | 7 +- system/widevine/default.nix | 34 ++--- 35 files changed, 578 insertions(+), 589 deletions(-) diff --git a/flake.nix b/flake.nix index 390b1e2..ea4451f 100644 --- a/flake.nix +++ b/flake.nix @@ -57,37 +57,36 @@ }; }; - outputs = - { - nixpkgs, - nix-cachyos-kernel, - catppuccin, - catppuccin-palette, - home-manager, - plasma-manager, - niri, - noctalia, - spicetify-nix, - nur, - nixvim, - apple-silicon, - ... + outputs = { + nixpkgs, + nix-cachyos-kernel, + catppuccin, + catppuccin-palette, + home-manager, + plasma-manager, + niri, + noctalia, + spicetify-nix, + nur, + nixvim, + apple-silicon, + ... + }: let + mkNixosSystem = { + hostname, + system, + extraModules ? [], + extraSpecialArgs ? {}, }: - let - mkNixosSystem = - { - hostname, - system, - extraModules ? [ ], - extraSpecialArgs ? { }, - }: - nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = + { inherit catppuccin; } // extraSpecialArgs; - modules = [ + modules = + [ { nixpkgs.overlays = [ catppuccin-palette.overlays.default @@ -120,73 +119,71 @@ } ] ++ extraModules; - }; + }; - mkHomeConfig = - { - user, - hostname, - system, - }: - home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - inherit system; - }; - home.username = user; - home.homeDirectory = "/home/${user}"; - modules = [ - ./home - ./home/hosts/${hostname}.nix - catppuccin.homeModules.catppuccin - home-manager.homeModules.home-manager - plasma-manager.homeModules.plasma-manager - niri.homeModules.default - noctalia.homeModules.noctalia - nixvim.homeModules.nixvim - ]; - }; - in - { - nixosConfigurations = { - peach = mkNixosSystem { - hostname = "peach"; - system = "aarch64-linux"; - extraModules = [ - apple-silicon.nixosModules.default - { nixpkgs.overlays = [ apple-silicon.overlays.apple-silicon-overlay ]; } - ]; + mkHomeConfig = { + user, + hostname, + system, + }: + home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; }; + home.username = user; + home.homeDirectory = "/home/${user}"; + modules = [ + ./home + ./home/hosts/${hostname}.nix + catppuccin.homeModules.catppuccin + home-manager.homeModules.home-manager + plasma-manager.homeModules.plasma-manager + niri.homeModules.default + noctalia.homeModules.noctalia + nixvim.homeModules.nixvim + ]; + }; + in { + nixosConfigurations = { + peach = mkNixosSystem { + hostname = "peach"; + system = "aarch64-linux"; + extraModules = [ + apple-silicon.nixosModules.default + {nixpkgs.overlays = [apple-silicon.overlays.apple-silicon-overlay];} + ]; + }; - alien = mkNixosSystem { - hostname = "alien"; - system = "x86_64-linux"; - extraSpecialArgs = { - inherit nix-cachyos-kernel; - }; - }; - - vm-aarch64 = mkNixosSystem { - hostname = "vm-aarch64"; - system = "aarch64-linux"; + alien = mkNixosSystem { + hostname = "alien"; + system = "x86_64-linux"; + extraSpecialArgs = { + inherit nix-cachyos-kernel; }; }; - homeConfigurations = { - peach = mkHomeConfig { - user = "sckova"; - hostname = "peach"; - system = "aarch64-linux"; - }; - alien = mkHomeConfig { - user = "sckova"; - hostname = "alien"; - system = "x86_64-linux"; - }; - vm-aarch64 = mkHomeConfig { - user = "sckova"; - hostname = "vm-aarch64"; - system = "aarch64-linux"; - }; + vm-aarch64 = mkNixosSystem { + hostname = "vm-aarch64"; + system = "aarch64-linux"; }; }; + + homeConfigurations = { + peach = mkHomeConfig { + user = "sckova"; + hostname = "peach"; + system = "aarch64-linux"; + }; + alien = mkHomeConfig { + user = "sckova"; + hostname = "alien"; + system = "x86_64-linux"; + }; + vm-aarch64 = mkHomeConfig { + user = "sckova"; + hostname = "vm-aarch64"; + system = "aarch64-linux"; + }; + }; + }; } diff --git a/hardware/alien/default.nix b/hardware/alien/default.nix index 38c4775..c1eca81 100755 --- a/hardware/alien/default.nix +++ b/hardware/alien/default.nix @@ -7,9 +7,7 @@ pkgs, modulesPath, ... -}: - -{ +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -21,13 +19,13 @@ "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = []; boot.kernelModules = [ "v4l2loopback" "snd-aloop" "kvm-intel" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ]; + boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out]; boot.extraModprobeConfig = '' # exclusive_caps: Skype, Zoom, Teams etc. will only show device when actually streaming # card_label: Name of virtual camera, how it'll show up in Skype, Zoom, Teams @@ -38,7 +36,7 @@ fileSystems."/" = { device = "/dev/disk/by-uuid/d83ec136-df01-4b9e-a523-6d75726fb904"; fsType = "btrfs"; - options = [ "subvol=@" ]; + options = ["subvol=@"]; }; fileSystems."/nix" = { @@ -61,7 +59,7 @@ }; swapDevices = [ - { device = "/dev/disk/by-uuid/056af100-9382-4cbd-b3d5-90df7da69585"; } + {device = "/dev/disk/by-uuid/056af100-9382-4cbd-b3d5-90df7da69585";} ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/hardware/peach/default.nix b/hardware/peach/default.nix index 1bf0e8d..5aaa82b 100644 --- a/hardware/peach/default.nix +++ b/hardware/peach/default.nix @@ -7,20 +7,18 @@ pkgs, modulesPath, ... -}: - -{ +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.availableKernelModules = ["sdhci_pci"]; + boot.initrd.kernelModules = []; boot.kernelModules = [ "v4l2loopback" "snd-aloop" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ]; + boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out]; boot.extraModprobeConfig = '' # exclusive_caps: Skype, Zoom, Teams etc. will only show device when actually streaming # card_label: Name of virtual camera, how it'll show up in Skype, Zoom, Teams @@ -42,7 +40,7 @@ ]; }; - swapDevices = [ ]; + swapDevices = []; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/hardware/vm-aarch64/default.nix b/hardware/vm-aarch64/default.nix index 524729a..d333395 100644 --- a/hardware/vm-aarch64/default.nix +++ b/hardware/vm-aarch64/default.nix @@ -1,15 +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 = [ ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = []; - boot.initrd.availableKernelModules = [ "ehci_pci" "xhci_pci" "usbhid" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["ehci_pci" "xhci_pci" "usbhid" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = []; + boot.extraModulePackages = []; fileSystems."/" = { device = "/dev/disk/by-label/nixos"; @@ -19,14 +23,14 @@ fileSystems."/boot" = { device = "/dev/disk/by-label/boot"; fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; + options = ["fmask=0077" "dmask=0077"]; }; swapDevices = [ - { device = "/dev/disk/by-label/swap"; } + {device = "/dev/disk/by-label/swap";} ]; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; hardware.parallels.enable = true; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "prl-tools" ]; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) ["prl-tools"]; } diff --git a/home/default.nix b/home/default.nix index 64171a9..0fbd634 100755 --- a/home/default.nix +++ b/home/default.nix @@ -4,9 +4,7 @@ lib, types, ... -}: - -{ +}: { options = { catppuccinUpper = { accent = lib.mkOption { @@ -108,32 +106,30 @@ default = pkgs.noto-fonts-color-emoji; }; }; - cursor = - let - attrName = config.catppuccin.flavor + config.catppuccinUpper.accent; - in - { - name = lib.mkOption { - type = lib.types.str; - readOnly = true; - default = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-cursors"; - }; - package = lib.mkOption { - type = lib.types.package; - readOnly = true; - default = pkgs.catppuccin-cursors.${attrName}; - }; - size = lib.mkOption { - type = lib.types.int; - readOnly = true; - default = 24; - }; - path = lib.mkOption { - type = lib.types.str; - readOnly = true; - default = "${pkgs.catppuccin-cursors.${attrName}}/share/icons"; - }; + cursor = let + attrName = config.catppuccin.flavor + config.catppuccinUpper.accent; + in { + name = lib.mkOption { + type = lib.types.str; + readOnly = true; + default = "catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}-cursors"; }; + package = lib.mkOption { + type = lib.types.package; + readOnly = true; + default = pkgs.catppuccin-cursors.${attrName}; + }; + size = lib.mkOption { + type = lib.types.int; + readOnly = true; + default = 24; + }; + path = lib.mkOption { + type = lib.types.str; + readOnly = true; + default = "${pkgs.catppuccin-cursors.${attrName}}/share/icons"; + }; + }; isDark = lib.mkOption { type = lib.types.bool; readOnly = true; @@ -173,7 +169,7 @@ # gui applications input-leap libreoffice-qt-fresh - nur.repos.forkprince.helium-nightly + # nur.repos.forkprince.helium-nightly bitwarden-desktop qbittorrent @@ -234,15 +230,24 @@ gtk = { enable = true; - colorScheme = if config.userOptions.isDark then "dark" else "light"; + colorScheme = + if config.userOptions.isDark + then "dark" + else "light"; theme = { package = pkgs.kdePackages.breeze-gtk; - name = if config.userOptions.isDark then "Breeze-Dark" else "Breeze"; + name = + if config.userOptions.isDark + then "Breeze-Dark" + else "Breeze"; }; iconTheme = { - name = if config.userOptions.isDark then "Colloid-Dark" else "Colloid-Light"; + name = + if config.userOptions.isDark + then "Colloid-Dark" + else "Colloid-Light"; package = pkgs.colloid-icon-theme; }; @@ -286,86 +291,84 @@ fixed = "\"${config.userOptions.fontMono.name},${toString config.userOptions.fontMono.size}\""; general = "\"${config.userOptions.fontSans.name},${toString config.userOptions.fontSans.size}\""; }; - ColorScheme = - let - c = pkgs.catppuccin.bare.${config.catppuccin.flavor}; - accent = c.${config.catppuccin.accent}; - mkColors = roles: builtins.concatStringsSep ", " (map (r: "#ff${r}") roles); - in - { - active_colors = mkColors [ - c.text - c.surface0 - c.surface1 - c.surface0 - c.base - c.mantle - c.text - c.text - c.text - c.base - c.mantle - c.crust - accent - c.base - accent - c.mauve - c.mantle - "000000" - c.base - c.text - c.overlay0 - accent - ]; - disabled_colors = mkColors [ - c.overlay0 - c.surface0 - c.surface1 - c.surface0 - c.overlay0 - c.mantle - c.overlay0 - c.text - c.overlay0 - c.surface0 - c.surface0 - c.mantle - c.overlay1 - c.text - "0000ff" - "ff00ff" - c.surface0 - "000000" - c.surface0 - c.base - "80000000" - c.overlay1 - ]; - inactive_colors = mkColors [ - c.text - c.surface0 - c.surface1 - c.surface0 - c.base - c.mantle - c.text - c.text - c.text - c.base - c.mantle - c.crust - accent - c.base - accent - c.mauve - c.mantle - "000000" - c.base - c.text - c.overlay0 - accent - ]; - }; + ColorScheme = let + c = pkgs.catppuccin.bare.${config.catppuccin.flavor}; + accent = c.${config.catppuccin.accent}; + mkColors = roles: builtins.concatStringsSep ", " (map (r: "#ff${r}") roles); + in { + active_colors = mkColors [ + c.text + c.surface0 + c.surface1 + c.surface0 + c.base + c.mantle + c.text + c.text + c.text + c.base + c.mantle + c.crust + accent + c.base + accent + c.mauve + c.mantle + "000000" + c.base + c.text + c.overlay0 + accent + ]; + disabled_colors = mkColors [ + c.overlay0 + c.surface0 + c.surface1 + c.surface0 + c.overlay0 + c.mantle + c.overlay0 + c.text + c.overlay0 + c.surface0 + c.surface0 + c.mantle + c.overlay1 + c.text + "0000ff" + "ff00ff" + c.surface0 + "000000" + c.surface0 + c.base + "80000000" + c.overlay1 + ]; + inactive_colors = mkColors [ + c.text + c.surface0 + c.surface1 + c.surface0 + c.base + c.mantle + c.text + c.text + c.text + c.base + c.mantle + c.crust + accent + c.base + accent + c.mauve + c.mantle + "000000" + c.base + c.text + c.overlay0 + accent + ]; + }; }; }; diff --git a/home/games/minecraft/default.nix b/home/games/minecraft/default.nix index 58b9808..4653e75 100644 --- a/home/games/minecraft/default.nix +++ b/home/games/minecraft/default.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { home.packages = with pkgs; [ (prismlauncher.override { jdks = [ diff --git a/home/games/morrowind/default.nix b/home/games/morrowind/default.nix index 052adab..a7df627 100644 --- a/home/games/morrowind/default.nix +++ b/home/games/morrowind/default.nix @@ -1,5 +1,7 @@ -{ config, pkgs, ... }: - { - home.packages = with pkgs; [ openmw ]; + config, + pkgs, + ... +}: { + home.packages = with pkgs; [openmw]; } diff --git a/home/graphical/discord/default.nix b/home/graphical/discord/default.nix index 05ce3a5..7073352 100644 --- a/home/graphical/discord/default.nix +++ b/home/graphical/discord/default.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let catppuccin-discord-src = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "discord"; @@ -52,7 +54,7 @@ let catppuccin-discord = "${catppuccin-discord-pkg}/dist/catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}.theme.css"; - mergedThemes = pkgs.runCommand "mergedConfig" { } '' + mergedThemes = pkgs.runCommand "mergedConfig" {} '' mkdir -p $out cp ${catppuccin-discord} $out/catppuccin.css ''; @@ -79,9 +81,8 @@ let height = 1071; }; }; -in -{ - home.packages = with pkgs; [ vesktop ]; +in { + home.packages = with pkgs; [vesktop]; home.file.".config/vesktop/settings.json" = { text = builtins.toJSON vesktopSettings; diff --git a/home/graphical/discord/vencord.nix b/home/graphical/discord/vencord.nix index 9442180..e456a52 100644 --- a/home/graphical/discord/vencord.nix +++ b/home/graphical/discord/vencord.nix @@ -2,9 +2,9 @@ autoUpdate = true; autoUpdateNotification = true; useQuickCss = true; - themeLinks = [ ]; + themeLinks = []; eagerPatches = false; - enabledThemes = [ "catppuccin.css" ]; + enabledThemes = ["catppuccin.css"]; enableReactDevtools = false; frameless = false; transparent = true; @@ -330,8 +330,8 @@ ImageFilename.enabled = false; }; uiElements = { - chatBarButtons = { }; - messagePopoverButtons = { }; + chatBarButtons = {}; + messagePopoverButtons = {}; }; notifications = { timeout = 5000; diff --git a/home/graphical/firefox/default.nix b/home/graphical/firefox/default.nix index 19b2109..1ded408 100644 --- a/home/graphical/firefox/default.nix +++ b/home/graphical/firefox/default.nix @@ -5,9 +5,7 @@ config, lib, ... -}: - -{ +}: { home.file.".mozilla/firefox/default/chrome/theme" = { source = ./chrome/theme; force = true; diff --git a/home/graphical/mpv/default.nix b/home/graphical/mpv/default.nix index 572a600..ecbc028 100644 --- a/home/graphical/mpv/default.nix +++ b/home/graphical/mpv/default.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let catppuccin-mpv = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "mpv"; @@ -8,14 +10,13 @@ let sha256 = "sha256-oUheJNWk2R6gNEmkK8H6PWX0iofx2KMGDoFWtnr420A="; }; - mergedConfig = pkgs.runCommand "mergedConfig" { } '' + mergedConfig = pkgs.runCommand "mergedConfig" {} '' mkdir -p $out ${pkgs.gnused}/bin/sed 's/#1e1e2e/#000000/g' \ ${catppuccin-mpv}/themes/${config.catppuccin.flavor}/${config.catppuccin.accent}.conf \ > $out/mpv.conf ''; -in -{ +in { home.packages = with pkgs; [ (mpv.override { scripts = with mpvScripts; [ diff --git a/home/hosts/alien/default.nix b/home/hosts/alien/default.nix index 6580a5e..e6983cf 100644 --- a/home/hosts/alien/default.nix +++ b/home/hosts/alien/default.nix @@ -3,16 +3,13 @@ pkgs, spicetify-nix, ... -}: - -{ +}: { catppuccin = { accent = "blue"; flavor = "mocha"; }; home.packages = with pkgs; [ - # steam gtk theming adwsteamgtk @@ -36,30 +33,28 @@ scale = 1.75; }; - programs.spicetify = - let - spicePkgs = spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; - in - { - enable = true; + programs.spicetify = let + spicePkgs = spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}; + in { + enable = true; - enabledExtensions = with spicePkgs.extensions; [ - adblock - hidePodcasts - shuffle # shuffle+ (special characters are sanitized out of extension names) - ]; - enabledCustomApps = with spicePkgs.apps; [ - newReleases - ncsVisualizer - ]; - enabledSnippets = with spicePkgs.snippets; [ - rotatingCoverart - pointer - ]; + enabledExtensions = with spicePkgs.extensions; [ + adblock + hidePodcasts + shuffle # shuffle+ (special characters are sanitized out of extension names) + ]; + enabledCustomApps = with spicePkgs.apps; [ + newReleases + ncsVisualizer + ]; + enabledSnippets = with spicePkgs.snippets; [ + rotatingCoverart + pointer + ]; - theme = spicePkgs.themes.catppuccin; - colorScheme = config.catppuccin.flavor; - }; + theme = spicePkgs.themes.catppuccin; + colorScheme = config.catppuccin.flavor; + }; programs.plasma = { panels = [ diff --git a/home/hosts/peach/default.nix b/home/hosts/peach/default.nix index 1b6a7ab..c411643 100644 --- a/home/hosts/peach/default.nix +++ b/home/hosts/peach/default.nix @@ -1,13 +1,14 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { catppuccin = { accent = "peach"; flavor = "mocha"; }; home.packages = with pkgs; [ - asahi-nvram asahi-bless asahi-btsync @@ -44,7 +45,7 @@ shortcuts = { # this is really annoying on asahi laptops - org_kde_powerdevil.Sleep = [ ]; + org_kde_powerdevil.Sleep = []; }; panels = [ @@ -60,7 +61,7 @@ activeTaskSource = "activeTask"; }; layout = { - elements = [ "windowTitle" ]; + elements = ["windowTitle"]; horizontalAlignment = "right"; showDisabledElements = "deactivated"; verticalAlignment = "center"; diff --git a/home/hosts/vm-aarch64/default.nix b/home/hosts/vm-aarch64/default.nix index 929e11c..d50cbc8 100644 --- a/home/hosts/vm-aarch64/default.nix +++ b/home/hosts/vm-aarch64/default.nix @@ -1,12 +1,14 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { catppuccin = { accent = "green"; flavor = "mocha"; }; - home.packages = with pkgs; [ ]; + home.packages = with pkgs; []; programs.plasma = { panels = [ @@ -22,7 +24,7 @@ activeTaskSource = "activeTask"; }; layout = { - elements = [ "windowTitle" ]; + elements = ["windowTitle"]; horizontalAlignment = "right"; showDisabledElements = "deactivated"; verticalAlignment = "center"; diff --git a/home/kde/default.nix b/home/kde/default.nix index 63328b9..5b4ff4a 100644 --- a/home/kde/default.nix +++ b/home/kde/default.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { programs.ghostwriter = { enable = true; font = { @@ -50,7 +52,7 @@ value = ""; type = "substring"; }; - window-types = [ "normal" ]; + window-types = ["normal"]; }; apply = { opacityactive = { @@ -70,7 +72,7 @@ value = "openmw"; type = "substring"; }; - window-types = [ "normal" ]; + window-types = ["normal"]; }; apply = { noborder = { @@ -98,7 +100,7 @@ value = "Minecraft*"; type = "substring"; }; - window-types = [ "normal" ]; + window-types = ["normal"]; }; apply = { noborder = { @@ -149,7 +151,7 @@ value = "steamwebhelper"; type = "substring"; }; - window-types = [ "normal" ]; + window-types = ["normal"]; }; apply = { desktopfile = { diff --git a/home/systemd/default.nix b/home/systemd/default.nix index 32029bc..9000d7e 100644 --- a/home/systemd/default.nix +++ b/home/systemd/default.nix @@ -3,9 +3,7 @@ pkgs, lib, ... -}: - -{ +}: { systemd.user.sessionVariables = { XCURSOR_THEME = config.userOptions.cursor.name; XCURSOR_SIZE = toString config.userOptions.cursor.size; @@ -27,8 +25,8 @@ systemd.user.services.synology-mount = { Unit = { Description = "Mount Synology NAS with Rclone and Home Manager."; - After = [ "tailscaled.service" ]; - Wants = [ "tailscaled.service" ]; + After = ["tailscaled.service"]; + Wants = ["tailscaled.service"]; }; Service = { @@ -63,7 +61,7 @@ }; Install = { - WantedBy = [ "default.target" ]; + WantedBy = ["default.target"]; }; }; diff --git a/home/terminal/btop/default.nix b/home/terminal/btop/default.nix index 04e58ee..27ada8a 100644 --- a/home/terminal/btop/default.nix +++ b/home/terminal/btop/default.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let catppuccin-btop = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "btop"; @@ -8,15 +10,14 @@ let sha256 = "sha256-mEGZwScVPWGu+Vbtddc/sJ+mNdD2kKienGZVUcTSl+c="; }; - mergedConfig = pkgs.runCommand "mergedConfig" { } '' + mergedConfig = pkgs.runCommand "mergedConfig" {} '' mkdir -p $out/themes ${pkgs.gnused}/bin/sed 's/blankFlavor/${config.catppuccin.flavor}/g' \ ${./btop.conf} > $out/btop.conf cp ${catppuccin-btop}/themes/catppuccin_latte.theme $out/themes/ cp ${catppuccin-btop}/themes/catppuccin_${config.catppuccin.flavor}.theme $out/themes/ ''; -in -{ +in { home.file.".config/btop" = { source = mergedConfig; recursive = true; diff --git a/home/terminal/fish/default.nix b/home/terminal/fish/default.nix index e58af9d..a5b233b 100644 --- a/home/terminal/fish/default.nix +++ b/home/terminal/fish/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, ... }: { - home.packages = with pkgs; [ kdePackages.qttools ]; + config, + pkgs, + ... +}: { + home.packages = with pkgs; [kdePackages.qttools]; programs.fish = { enable = true; diff --git a/home/terminal/kitty/default.nix b/home/terminal/kitty/default.nix index 46f5da8..3fdbd4a 100644 --- a/home/terminal/kitty/default.nix +++ b/home/terminal/kitty/default.nix @@ -3,9 +3,7 @@ lib, pkgs, ... -}: - -let +}: let catppuccin-kitty = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "kitty"; @@ -13,15 +11,14 @@ let sha256 = "sha256-59ON7CzVgfZUo7F81qQZQ1r6kpcjR3OPvTl99gzDP8E="; }; - mergedConfig = pkgs.runCommand "mergedConfig" { } '' + mergedConfig = pkgs.runCommand "mergedConfig" {} '' mkdir -p $out ${pkgs.gnused}/bin/sed 's/#cba6f7/${ pkgs.catppuccin.${config.catppuccin.flavor}.${config.catppuccin.accent} }/g' ${catppuccin-kitty}/themes/${config.catppuccin.flavor}.conf > \ $out/${config.catppuccinUpper.flavor}${config.catppuccinUpper.accent}.conf ''; -in -{ +in { home.file.".config/kitty/themes" = { source = mergedConfig; recursive = true; diff --git a/home/terminal/nvim/default.nix b/home/terminal/nvim/default.nix index 848a002..f62056e 100644 --- a/home/terminal/nvim/default.nix +++ b/home/terminal/nvim/default.nix @@ -1,6 +1,8 @@ -{ pkgs, config, ... }: - { + pkgs, + config, + ... +}: { home.sessionVariables = { EDITOR = "nvim"; }; @@ -9,7 +11,7 @@ kdePackages.qtdeclarative prettier prettierd - nixfmt-rfc-style + alejandra stylua black ]; @@ -94,13 +96,13 @@ autoLoad = true; settings = { formatters_by_ft = { - lua = [ "stylua" ]; - python = [ "black" ]; - nix = [ "nixfmt" ]; - javascript = [ "prettier" ]; - css = [ "prettier" ]; - json = [ "prettier" ]; - jsonc = [ "prettier" ]; + lua = ["stylua"]; + python = ["black"]; + nix = ["alejandra"]; + javascript = ["prettier"]; + css = ["prettier"]; + json = ["prettier"]; + jsonc = ["prettier"]; }; # Default formatting options @@ -216,8 +218,8 @@ "filename" "branch" ]; - lualine_c = [ "%=" ]; - lualine_x = [ ]; + lualine_c = ["%="]; + lualine_x = []; lualine_y = [ "filetype" "progress" @@ -234,15 +236,15 @@ }; inactive_sections = { - lualine_a = [ "filename" ]; - lualine_b = [ ]; - lualine_c = [ ]; - lualine_x = [ ]; - lualine_y = [ ]; - lualine_z = [ "location" ]; + lualine_a = ["filename"]; + lualine_b = []; + lualine_c = []; + lualine_x = []; + lualine_y = []; + lualine_z = ["location"]; }; - tabline = { }; - extensions = [ ]; + tabline = {}; + extensions = []; }; autoLoad = true; }; diff --git a/home/tiling/niri/default.nix b/home/tiling/niri/default.nix index fb92dc3..4d588dd 100644 --- a/home/tiling/niri/default.nix +++ b/home/tiling/niri/default.nix @@ -1,14 +1,15 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let catppuccin-fuzzel = pkgs.fetchFromGitHub { owner = "catppuccin"; repo = "fuzzel"; rev = "0af0e26901b60ada4b20522df739f032797b07c3"; sha256 = "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg="; }; -in -{ +in { imports = [ ./niri.nix ./noctalia.nix diff --git a/home/tiling/niri/niri.nix b/home/tiling/niri/niri.nix index 01faf21..9d65ad7 100644 --- a/home/tiling/niri/niri.nix +++ b/home/tiling/niri/niri.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { programs.niri.package = pkgs.niri-unstable.overrideAttrs (old: { doCheck = false; }); @@ -10,7 +12,7 @@ hotkey-overlay.skip-at-startup = true; prefer-no-csd = true; gestures.hot-corners.enable = false; - spawn-at-startup = [ ]; # systemd is based sorry + spawn-at-startup = []; # systemd is based sorry overview = { backdrop-color = pkgs.catppuccin.${config.catppuccin.flavor}.crust; workspace-shadow.enable = false; @@ -66,9 +68,9 @@ proportion = 0.5; }; preset-column-widths = [ - { proportion = 1.0 / 3.0; } - { proportion = 1.0 / 2.0; } - { proportion = 2.0 / 3.0; } + {proportion = 1.0 / 3.0;} + {proportion = 1.0 / 2.0;} + {proportion = 2.0 / 3.0;} ]; border = { enable = true; @@ -135,10 +137,10 @@ } ]; binds = { - "Mod+Shift+Slash".action.show-hotkey-overlay = { }; + "Mod+Shift+Slash".action.show-hotkey-overlay = {}; "Mod+T" = { - action.spawn = [ "kitty" ]; + action.spawn = ["kitty"]; hotkey-overlay.title = "Open a Terminal: kitty"; }; "Mod+Space" = { @@ -229,96 +231,96 @@ }; "Mod+O" = { - action.toggle-overview = { }; + action.toggle-overview = {}; repeat = false; }; "Mod+Q" = { - action.close-window = { }; + action.close-window = {}; repeat = false; }; - "Mod+Left".action.focus-column-left = { }; - "Mod+Down".action.focus-window-down = { }; - "Mod+Up".action.focus-window-up = { }; - "Mod+Right".action.focus-column-right = { }; - "Mod+H".action.focus-column-left = { }; - "Mod+J".action.focus-window-down = { }; - "Mod+K".action.focus-window-up = { }; - "Mod+L".action.focus-column-right = { }; + "Mod+Left".action.focus-column-left = {}; + "Mod+Down".action.focus-window-down = {}; + "Mod+Up".action.focus-window-up = {}; + "Mod+Right".action.focus-column-right = {}; + "Mod+H".action.focus-column-left = {}; + "Mod+J".action.focus-window-down = {}; + "Mod+K".action.focus-window-up = {}; + "Mod+L".action.focus-column-right = {}; - "Mod+Ctrl+Left".action.move-column-left = { }; - "Mod+Ctrl+Down".action.move-window-down = { }; - "Mod+Ctrl+Up".action.move-window-up = { }; - "Mod+Ctrl+Right".action.move-column-right = { }; - "Mod+Ctrl+H".action.move-column-left = { }; - "Mod+Ctrl+J".action.move-window-down = { }; - "Mod+Ctrl+K".action.move-window-up = { }; - "Mod+Ctrl+L".action.move-column-right = { }; + "Mod+Ctrl+Left".action.move-column-left = {}; + "Mod+Ctrl+Down".action.move-window-down = {}; + "Mod+Ctrl+Up".action.move-window-up = {}; + "Mod+Ctrl+Right".action.move-column-right = {}; + "Mod+Ctrl+H".action.move-column-left = {}; + "Mod+Ctrl+J".action.move-window-down = {}; + "Mod+Ctrl+K".action.move-window-up = {}; + "Mod+Ctrl+L".action.move-column-right = {}; - "Mod+Home".action.focus-column-first = { }; - "Mod+End".action.focus-column-last = { }; - "Mod+Ctrl+Home".action.move-column-to-first = { }; - "Mod+Ctrl+End".action.move-column-to-last = { }; + "Mod+Home".action.focus-column-first = {}; + "Mod+End".action.focus-column-last = {}; + "Mod+Ctrl+Home".action.move-column-to-first = {}; + "Mod+Ctrl+End".action.move-column-to-last = {}; - "Mod+Shift+Left".action.focus-monitor-left = { }; - "Mod+Shift+Down".action.focus-monitor-down = { }; - "Mod+Shift+Up".action.focus-monitor-up = { }; - "Mod+Shift+Right".action.focus-monitor-right = { }; - "Mod+Shift+H".action.focus-monitor-left = { }; - "Mod+Shift+J".action.focus-monitor-down = { }; - "Mod+Shift+K".action.focus-monitor-up = { }; - "Mod+Shift+L".action.focus-monitor-right = { }; + "Mod+Shift+Left".action.focus-monitor-left = {}; + "Mod+Shift+Down".action.focus-monitor-down = {}; + "Mod+Shift+Up".action.focus-monitor-up = {}; + "Mod+Shift+Right".action.focus-monitor-right = {}; + "Mod+Shift+H".action.focus-monitor-left = {}; + "Mod+Shift+J".action.focus-monitor-down = {}; + "Mod+Shift+K".action.focus-monitor-up = {}; + "Mod+Shift+L".action.focus-monitor-right = {}; - "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { }; - "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { }; - "Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { }; - "Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { }; - "Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = { }; - "Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = { }; - "Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = { }; - "Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = { }; + "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = {}; + "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = {}; + "Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = {}; + "Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = {}; + "Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = {}; + "Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = {}; + "Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = {}; + "Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = {}; - "Mod+Page_Down".action.focus-workspace-down = { }; - "Mod+Page_Up".action.focus-workspace-up = { }; - "Mod+U".action.focus-workspace-down = { }; - "Mod+I".action.focus-workspace-up = { }; - "Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = { }; - "Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = { }; - "Mod+Ctrl+U".action.move-column-to-workspace-down = { }; - "Mod+Ctrl+I".action.move-column-to-workspace-up = { }; + "Mod+Page_Down".action.focus-workspace-down = {}; + "Mod+Page_Up".action.focus-workspace-up = {}; + "Mod+U".action.focus-workspace-down = {}; + "Mod+I".action.focus-workspace-up = {}; + "Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = {}; + "Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = {}; + "Mod+Ctrl+U".action.move-column-to-workspace-down = {}; + "Mod+Ctrl+I".action.move-column-to-workspace-up = {}; - "Mod+Shift+Page_Down".action.move-workspace-down = { }; - "Mod+Shift+Page_Up".action.move-workspace-up = { }; - "Mod+Shift+U".action.move-workspace-down = { }; - "Mod+Shift+I".action.move-workspace-up = { }; + "Mod+Shift+Page_Down".action.move-workspace-down = {}; + "Mod+Shift+Page_Up".action.move-workspace-up = {}; + "Mod+Shift+U".action.move-workspace-down = {}; + "Mod+Shift+I".action.move-workspace-up = {}; "Mod+WheelScrollDown" = { - action.focus-workspace-down = { }; + action.focus-workspace-down = {}; cooldown-ms = 150; }; "Mod+WheelScrollUp" = { - action.focus-workspace-up = { }; + action.focus-workspace-up = {}; cooldown-ms = 150; }; "Mod+Ctrl+WheelScrollDown" = { - action.move-column-to-workspace-down = { }; + action.move-column-to-workspace-down = {}; cooldown-ms = 150; }; "Mod+Ctrl+WheelScrollUp" = { - action.move-column-to-workspace-up = { }; + action.move-column-to-workspace-up = {}; cooldown-ms = 150; }; - "Mod+WheelScrollRight".action.focus-column-right = { }; - "Mod+WheelScrollLeft".action.focus-column-left = { }; - "Mod+Ctrl+WheelScrollRight".action.move-column-right = { }; - "Mod+Ctrl+WheelScrollLeft".action.move-column-left = { }; + "Mod+WheelScrollRight".action.focus-column-right = {}; + "Mod+WheelScrollLeft".action.focus-column-left = {}; + "Mod+Ctrl+WheelScrollRight".action.move-column-right = {}; + "Mod+Ctrl+WheelScrollLeft".action.move-column-left = {}; - "Mod+Shift+WheelScrollDown".action.focus-column-right = { }; - "Mod+Shift+WheelScrollUp".action.focus-column-left = { }; - "Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = { }; - "Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = { }; + "Mod+Shift+WheelScrollDown".action.focus-column-right = {}; + "Mod+Shift+WheelScrollUp".action.focus-column-left = {}; + "Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = {}; + "Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = {}; "Mod+1".action.focus-workspace = 1; "Mod+2".action.focus-workspace = 2; @@ -339,23 +341,23 @@ "Mod+Ctrl+8".action.move-column-to-workspace = 8; "Mod+Ctrl+9".action.move-column-to-workspace = 9; - "Mod+BracketLeft".action.consume-or-expel-window-left = { }; - "Mod+BracketRight".action.consume-or-expel-window-right = { }; + "Mod+BracketLeft".action.consume-or-expel-window-left = {}; + "Mod+BracketRight".action.consume-or-expel-window-right = {}; - "Mod+Comma".action.consume-window-into-column = { }; - "Mod+Period".action.expel-window-from-column = { }; + "Mod+Comma".action.consume-window-into-column = {}; + "Mod+Period".action.expel-window-from-column = {}; - "Mod+R".action.switch-preset-column-width = { }; - "Mod+Shift+R".action.switch-preset-window-height = { }; - "Mod+Ctrl+R".action.reset-window-height = { }; - "Mod+F".action.maximize-column = { }; - "Mod+Shift+F".action.fullscreen-window = { }; + "Mod+R".action.switch-preset-column-width = {}; + "Mod+Shift+R".action.switch-preset-window-height = {}; + "Mod+Ctrl+R".action.reset-window-height = {}; + "Mod+F".action.maximize-column = {}; + "Mod+Shift+F".action.fullscreen-window = {}; - "Mod+Ctrl+F".action.expand-column-to-available-width = { }; + "Mod+Ctrl+F".action.expand-column-to-available-width = {}; - "Mod+C".action.center-column = { }; + "Mod+C".action.center-column = {}; - "Mod+Ctrl+C".action.center-visible-columns = { }; + "Mod+Ctrl+C".action.center-visible-columns = {}; "Mod+Minus".action.set-column-width = "-10%"; "Mod+Equal".action.set-column-width = "+10%"; @@ -363,26 +365,26 @@ "Mod+Shift+Minus".action.set-window-height = "-10%"; "Mod+Shift+Equal".action.set-window-height = "+10%"; - "Mod+V".action.toggle-window-floating = { }; - "Mod+Shift+V".action.switch-focus-between-floating-and-tiling = { }; + "Mod+V".action.toggle-window-floating = {}; + "Mod+Shift+V".action.switch-focus-between-floating-and-tiling = {}; - "Mod+W".action.toggle-column-tabbed-display = { }; + "Mod+W".action.toggle-column-tabbed-display = {}; - "Print".action.screenshot = { }; - "Mod+Shift+S".action.screenshot = { }; - "Ctrl+Print".action.screenshot-screen = { }; - "Alt+Print".action.screenshot-window = { }; + "Print".action.screenshot = {}; + "Mod+Shift+S".action.screenshot = {}; + "Ctrl+Print".action.screenshot-screen = {}; + "Alt+Print".action.screenshot-window = {}; "Mod+Escape" = { - action.toggle-keyboard-shortcuts-inhibit = { }; + action.toggle-keyboard-shortcuts-inhibit = {}; allow-inhibiting = false; }; - "Mod+Shift+E".action.quit = { }; - "Ctrl+Alt+Delete".action.quit = { }; + "Mod+Shift+E".action.quit = {}; + "Ctrl+Alt+Delete".action.quit = {}; "Mod+Shift+P" = { - action.power-off-monitors = { }; + action.power-off-monitors = {}; hotkey-overlay.title = "Turn off the display"; }; }; diff --git a/home/tiling/niri/noctalia.nix b/home/tiling/niri/noctalia.nix index ac6f6c2..204e8e5 100644 --- a/home/tiling/niri/noctalia.nix +++ b/home/tiling/niri/noctalia.nix @@ -3,9 +3,7 @@ config, lib, ... -}: - -let +}: let # Get the actual color palettes darkPalette = pkgs.catppuccin.${config.catppuccin.flavor}; lightPalette = pkgs.catppuccin.latte; @@ -44,45 +42,48 @@ let customPackage = pkgs.noctalia-shell.overrideAttrs (oldAttrs: { pname = "noctalia-shell-custom"; - nativeBuildInputs = (oldAttrs.nativeBuildInputs or [ ]) ++ [ pkgs.jq ]; + nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [pkgs.jq]; - postPatch = (oldAttrs.postPatch or "") + '' - echo "Patching noctalia-shell with Cat-Custom theme..." - echo " Dark: ${config.catppuccin.flavor} / Light: latte" - echo " Accent: ${config.catppuccin.accent}" - - if [ -d Assets/ColorScheme/Catppuccin ]; then - mkdir -p Assets/ColorScheme/Cat-Custom - - # Write the JSON directly - cat > Assets/ColorScheme/Cat-Custom/Cat-Custom.json << 'COLORSCHEME_EOF' - ${schemeJson} - COLORSCHEME_EOF - - echo "Created Cat-Custom color scheme:" - ${pkgs.jq}/bin/jq -C '.' Assets/ColorScheme/Cat-Custom/Cat-Custom.json || true - - # Add translation entries - for lang in en fr de es pt zh-CN; do - if [ -f "Assets/Translations/$lang.json" ]; then - ${pkgs.jq}/bin/jq \ - '.["color-scheme"].predefined.schemes["Cat-Custom"] = "Cat-Custom"' \ - "Assets/Translations/$lang.json" > "Assets/Translations/$lang.json.tmp" \ - && mv "Assets/Translations/$lang.json.tmp" "Assets/Translations/$lang.json" - fi - done - else - echo "ERROR: ColorScheme directory not found" - exit 1 - fi - ''; + postPatch = + (oldAttrs.postPatch or "") + + '' + echo "Patching noctalia-shell with Cat-Custom theme..." + echo " Dark: ${config.catppuccin.flavor} / Light: latte" + echo " Accent: ${config.catppuccin.accent}" - meta = oldAttrs.meta // { - description = "${oldAttrs.meta.description} (Cat-Custom: ${config.catppuccin.flavor}/${config.catppuccin.accent})"; - }; + if [ -d Assets/ColorScheme/Catppuccin ]; then + mkdir -p Assets/ColorScheme/Cat-Custom + + # Write the JSON directly + cat > Assets/ColorScheme/Cat-Custom/Cat-Custom.json << 'COLORSCHEME_EOF' + ${schemeJson} + COLORSCHEME_EOF + + echo "Created Cat-Custom color scheme:" + ${pkgs.jq}/bin/jq -C '.' Assets/ColorScheme/Cat-Custom/Cat-Custom.json || true + + # Add translation entries + for lang in en fr de es pt zh-CN; do + if [ -f "Assets/Translations/$lang.json" ]; then + ${pkgs.jq}/bin/jq \ + '.["color-scheme"].predefined.schemes["Cat-Custom"] = "Cat-Custom"' \ + "Assets/Translations/$lang.json" > "Assets/Translations/$lang.json.tmp" \ + && mv "Assets/Translations/$lang.json.tmp" "Assets/Translations/$lang.json" + fi + done + else + echo "ERROR: ColorScheme directory not found" + exit 1 + fi + ''; + + meta = + oldAttrs.meta + // { + description = "${oldAttrs.meta.description} (Cat-Custom: ${config.catppuccin.flavor}/${config.catppuccin.accent})"; + }; }); -in -{ +in { programs.noctalia-shell = { enable = true; package = customPackage; @@ -91,7 +92,7 @@ in bar = { position = "top"; backgroundOpacity = 1; - monitors = [ ]; + monitors = []; density = "comfortable"; showCapsule = true; capsuleOpacity = 1; @@ -256,7 +257,7 @@ in enabled = true; overviewEnabled = false; directory = "/home/sckova/.local/share/wallpaper"; - monitorDirectories = [ ]; + monitorDirectories = []; enableMultiMonitorDirectories = false; recursiveSearch = false; setWallpaperOnAllMonitors = true; @@ -275,7 +276,7 @@ in enableClipboardHistory = true; enableClipPreview = true; position = "top_left"; - pinnedExecs = [ ]; + pinnedExecs = []; useApp2Unit = false; sortByMostUsed = true; terminalCommand = "kitty -e"; @@ -360,8 +361,8 @@ in floatingRatio = 1; size = 1; onlySameOutput = true; - monitors = [ ]; - pinnedApps = [ ]; + monitors = []; + pinnedApps = []; colorizeIcons = false; pinnedStatic = false; inactiveIndicators = false; @@ -404,7 +405,7 @@ in }; notifications = { enabled = true; - monitors = [ ]; + monitors = []; location = "top_right"; overlayLayer = true; backgroundOpacity = 1; @@ -434,7 +435,7 @@ in 1 2 ]; - monitors = [ ]; + monitors = []; }; audio = { volumeStep = 5; @@ -442,7 +443,7 @@ in cavaFrameRate = 30; visualizerType = "linear"; visualizerQuality = "high"; - mprisBlacklist = [ ]; + mprisBlacklist = []; preferredPlayer = ""; externalMixer = "pwvucontrol || pavucontrol"; }; @@ -498,8 +499,8 @@ in systemd.user.services.noctalia-shell = { Unit = { - After = [ "niri.service" ]; - PartOf = [ "niri.service" ]; + After = ["niri.service"]; + PartOf = ["niri.service"]; Description = "Noctalia Shell - Wayland desktop shell"; Documentation = "https://docs.noctalia.dev/docs"; }; @@ -517,7 +518,7 @@ in }; Install = { - WantedBy = [ "niri.service" ]; + WantedBy = ["niri.service"]; }; }; } diff --git a/home/tiling/wallpaper/default.nix b/home/tiling/wallpaper/default.nix index 805c698..830c6ec 100644 --- a/home/tiling/wallpaper/default.nix +++ b/home/tiling/wallpaper/default.nix @@ -1,5 +1,8 @@ -{ pkgs, config, ... }: -let +{ + pkgs, + config, + ... +}: let bingWallpaperScript = pkgs.writeShellScript "bing-wallpaper" '' set -euo pipefail @@ -59,8 +62,7 @@ let echo "Wallpaper downloaded and applied successfully." ''; -in -{ +in { systemd.user.services.bing-wallpaper = { Unit = { Description = "Download and set Bing wallpaper of the day"; @@ -81,7 +83,7 @@ in }; Install = { - WantedBy = [ "niri.service" ]; + WantedBy = ["niri.service"]; }; }; } diff --git a/home/vscode/default.nix b/home/vscode/default.nix index 0191599..c9e777a 100644 --- a/home/vscode/default.nix +++ b/home/vscode/default.nix @@ -3,14 +3,10 @@ pkgs, lib, ... -}: - -let - capitalize = - str: +}: let + capitalize = str: (lib.toUpper (builtins.substring 0 1 str)) + (builtins.substring 1 (builtins.stringLength str) str); -in -{ +in { # home.sessionVariables = { # EDITOR = "code"; # }; diff --git a/packages/overlay.nix b/packages/overlay.nix index ef23042..3dee279 100644 --- a/packages/overlay.nix +++ b/packages/overlay.nix @@ -1,9 +1,8 @@ final: prev: { widevine-helium = - if prev.stdenv.hostPlatform.system == "aarch64-linux" then - prev.callPackage ./helium-browser/widevine-aarch64-linux.nix { } - else - null; + if prev.stdenv.hostPlatform.system == "aarch64-linux" + then prev.callPackage ./helium-browser/widevine-aarch64-linux.nix {} + else null; # helium-browser = # prev.callPackage @@ -16,7 +15,7 @@ final: prev: { # }) { }; # }; - spotify-webapp = prev.callPackage (builtins.path { path = ./spotify/package.nix; }) { }; + spotify-webapp = prev.callPackage (builtins.path {path = ./spotify/package.nix;}) {}; - spotifyd = prev.callPackage (builtins.path { path = ./spotifyd/package.nix; }) { }; + spotifyd = prev.callPackage (builtins.path {path = ./spotifyd/package.nix;}) {}; } diff --git a/packages/spotify/package.nix b/packages/spotify/package.nix index 940bc6e..530869c 100644 --- a/packages/spotify/package.nix +++ b/packages/spotify/package.nix @@ -5,9 +5,7 @@ copyDesktopItems, chromium, writeShellScriptBin, -}: - -let +}: let pname = "spotify-webapp"; version = "1.0.0"; @@ -25,50 +23,49 @@ let --ozone-platform=wayland \ "$@" ''; - in -stdenv.mkDerivation { - inherit pname version; + stdenv.mkDerivation { + inherit pname version; - dontUnpack = true; - dontBuild = true; + dontUnpack = true; + dontBuild = true; - nativeBuildInputs = [ copyDesktopItems ]; + nativeBuildInputs = [copyDesktopItems]; - desktopItems = [ - (makeDesktopItem { - name = "spotify-webapp"; - exec = "spotify-webapp %U"; - icon = "spotify"; - desktopName = "Spotify"; - genericName = "Music Streaming"; - comment = "Listen to music on Spotify"; - categories = [ - "Audio" - "Music" - "AudioVideo" - ]; - mimeTypes = [ "x-scheme-handler/spotify" ]; - startupWMClass = "spotify-webapp"; - startupNotify = true; - }) - ]; + desktopItems = [ + (makeDesktopItem { + name = "spotify-webapp"; + exec = "spotify-webapp %U"; + icon = "spotify"; + desktopName = "Spotify"; + genericName = "Music Streaming"; + comment = "Listen to music on Spotify"; + categories = [ + "Audio" + "Music" + "AudioVideo" + ]; + mimeTypes = ["x-scheme-handler/spotify"]; + startupWMClass = "spotify-webapp"; + startupNotify = true; + }) + ]; - installPhase = '' - runHook preInstall + installPhase = '' + runHook preInstall - mkdir -p $out/bin - ln -s ${launchScript}/bin/spotify-webapp $out/bin/spotify-webapp + mkdir -p $out/bin + ln -s ${launchScript}/bin/spotify-webapp $out/bin/spotify-webapp - runHook postInstall - ''; + runHook postInstall + ''; - meta = with lib; { - description = "Spotify web app running in Chromium"; - homepage = "https://open.spotify.com"; - license = licenses.free; - maintainers = [ ]; - platforms = platforms.linux; - mainProgram = "spotify-webapp"; - }; -} + meta = with lib; { + description = "Spotify web app running in Chromium"; + homepage = "https://open.spotify.com"; + license = licenses.free; + maintainers = []; + platforms = platforms.linux; + mainProgram = "spotify-webapp"; + }; + } diff --git a/packages/spotifyd/package.nix b/packages/spotifyd/package.nix index 1966d28..88adf6a 100644 --- a/packages/spotifyd/package.nix +++ b/packages/spotifyd/package.nix @@ -20,7 +20,6 @@ withPortAudio ? stdenv.hostPlatform.isDarwin, withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux, }: - rustPlatform.buildRustPackage (finalAttrs: { pname = "spotifyd"; version = "0.4.2"; @@ -41,7 +40,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ]; buildInputs = - lib.optionals stdenv.hostPlatform.isLinux [ openssl ] + lib.optionals stdenv.hostPlatform.isLinux [openssl] # The `dbus_mpris` feature works on other platforms, but only requires `dbus` on Linux ++ lib.optional (withMpris && stdenv.hostPlatform.isLinux) dbus ++ lib.optional (withALSA || withJack) alsa-lib @@ -50,7 +49,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ++ lib.optional withPortAudio portaudio; # `aws-lc-sys` fails with this enabled - hardeningDisable = [ "strictoverflow" ]; + hardeningDisable = ["strictoverflow"]; buildNoDefaultFeatures = true; buildFeatures = @@ -68,8 +67,8 @@ rustPlatform.buildRustPackage (finalAttrs: { ]; passthru = { - tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; - updateScript = nix-update-script { }; + tests.version = testers.testVersion {package = finalAttrs.finalPackage;}; + updateScript = nix-update-script {}; }; meta = { diff --git a/system/default.nix b/system/default.nix index ca518f5..75fc54c 100755 --- a/system/default.nix +++ b/system/default.nix @@ -1,16 +1,13 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - { config, lib, pkgs, inputs, ... -}: - -{ +}: { nix.settings.experimental-features = [ "nix-command" "flakes" @@ -24,7 +21,7 @@ nix.settings = { # Increase file descriptor limit for builds sandbox = "relaxed"; - extra-sandbox-paths = [ ]; + extra-sandbox-paths = []; build-users-group = "nixbld"; }; @@ -79,7 +76,6 @@ }; boot = { - plymouth = { enable = true; }; @@ -184,7 +180,7 @@ "networkmanager" "podman" ]; - packages = with pkgs; [ ]; + packages = with pkgs; []; hashedPassword = "$6$bvwRUFaJNMpH8rm3$FGDWFN6tBScJ/2DynAjnlZE8JRfyADN78d6c4GawxpAjyNLNE/AjQzMA09tLRqpKX7WnN5PIUZLAm2bT9/RbG0"; }; @@ -227,5 +223,4 @@ # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "25.05"; # Did you read the comment? - } diff --git a/system/hosts/alien/default.nix b/system/hosts/alien/default.nix index f454a0c..6cf9508 100644 --- a/system/hosts/alien/default.nix +++ b/system/hosts/alien/default.nix @@ -6,8 +6,7 @@ catppuccin, nix-cachyos-kernel, ... -}: -{ +}: { networking.hostName = "alien"; environment.systemPackages = with pkgs; [ @@ -16,8 +15,8 @@ ]; # enable ddcutil - users.users.sckova.extraGroups = [ "i2c" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.ddcci-driver ]; + users.users.sckova.extraGroups = ["i2c"]; + boot.extraModulePackages = [config.boot.kernelPackages.ddcci-driver]; boot.kernelModules = [ "i2c-dev" "ddcci_backlight" @@ -35,14 +34,14 @@ catppuccin.accent = "blue"; home-manager.users.sckova = { - imports = [ catppuccin.homeModules.catppuccin ]; + imports = [catppuccin.homeModules.catppuccin]; }; boot.loader.systemd-boot.consoleMode = "max"; # boot.kernelPackages = pkgs.linuxPackages; # let's use the CachyOS kernel instead! - nixpkgs.overlays = [ nix-cachyos-kernel.overlays.default ]; + nixpkgs.overlays = [nix-cachyos-kernel.overlays.default]; nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" "https://cache.garnix.io" diff --git a/system/hosts/peach/default.nix b/system/hosts/peach/default.nix index 27b86a6..1fd6366 100644 --- a/system/hosts/peach/default.nix +++ b/system/hosts/peach/default.nix @@ -4,8 +4,7 @@ lib, catppuccin, ... -}: -{ +}: { networking.hostName = "peach"; boot.binfmt.emulatedSystems = [ @@ -13,12 +12,12 @@ "riscv64-linux" ]; - boot.kernelParams = [ "apple_dcp.show_notch=1" ]; + boot.kernelParams = ["apple_dcp.show_notch=1"]; catppuccin.accent = "peach"; home-manager.users.sckova = { - imports = [ catppuccin.homeModules.catppuccin ]; + imports = [catppuccin.homeModules.catppuccin]; }; hardware.asahi = { diff --git a/system/hosts/vm-aarch64/default.nix b/system/hosts/vm-aarch64/default.nix index 6bd230b..952afc5 100644 --- a/system/hosts/vm-aarch64/default.nix +++ b/system/hosts/vm-aarch64/default.nix @@ -4,8 +4,7 @@ lib, catppuccin, ... -}: -{ +}: { networking.hostName = "vm-aarch64"; boot.binfmt.emulatedSystems = [ @@ -16,7 +15,7 @@ catppuccin.accent = "green"; home-manager.users.sckova = { - imports = [ catppuccin.homeModules.catppuccin ]; + imports = [catppuccin.homeModules.catppuccin]; }; services.spice-vdagentd.enable = true; diff --git a/system/shell/fish.nix b/system/shell/fish.nix index 53b4d74..a6b0b92 100644 --- a/system/shell/fish.nix +++ b/system/shell/fish.nix @@ -1,6 +1,4 @@ -{ pkgs, ... }: - -{ +{pkgs, ...}: { programs.bash = { interactiveShellInit = '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] diff --git a/system/tailscale/default.nix b/system/tailscale/default.nix index 19011a7..e4bb69b 100644 --- a/system/tailscale/default.nix +++ b/system/tailscale/default.nix @@ -4,9 +4,7 @@ pkgs, lib, ... -}: - -let +}: let tailscaleWaitScript = pkgs.writeShellScript "tailscale-wait-for-ip" '' echo "Waiting for tailscale0 to get an IP address..." for i in {1..15}; do @@ -20,8 +18,7 @@ let echo "Warning: tailscale0 did not get IP address within 15 seconds" exit 0 ''; -in -{ +in { systemd.services.tailscaled = { serviceConfig = { ExecStartPost = tailscaleWaitScript; diff --git a/system/widevine/default.nix b/system/widevine/default.nix index 0d7aec6..6d013fe 100644 --- a/system/widevine/default.nix +++ b/system/widevine/default.nix @@ -3,15 +3,13 @@ lib, pkgs, ... -}: - -{ +}: { nixpkgs.overlays = lib.mkIf (config.nixpkgs.hostPlatform.isLinux) [ (final: prev: { - wrapFirefox = - browser: opts: - let - extraPrefs = (opts.extraPrefs or "") + '' + wrapFirefox = browser: opts: let + extraPrefs = + (opts.extraPrefs or "") + + '' lockPref("media.gmp-widevinecdm.version", "system-installed"); lockPref("media.gmp-widevinecdm.visible", true); lockPref("media.gmp-widevinecdm.enabled", true); @@ -19,16 +17,18 @@ lockPref("media.eme.enabled", true); lockPref("media.eme.encrypted-media-encryption-scheme.enabled", true); ''; - widevineCdmDir = "${final.widevine-cdm}/share/google/chrome/WidevineCdm"; - widevineOutDir = "$out/gmp-widevinecdm/system-installed"; - in - (prev.wrapFirefox browser (opts // { inherit extraPrefs; })).overrideAttrs (previousAttrs: { - buildCommand = previousAttrs.buildCommand + '' - mkdir -p "${widevineOutDir}" - ln -s "${widevineCdmDir}/_platform_specific/linux_arm64/libwidevinecdm.so" "${widevineOutDir}/libwidevinecdm.so" - ln -s "${widevineCdmDir}/manifest.json" "${widevineOutDir}/manifest.json" - wrapProgram "$oldExe" --set MOZ_GMP_PATH "${widevineOutDir}" - ''; + widevineCdmDir = "${final.widevine-cdm}/share/google/chrome/WidevineCdm"; + widevineOutDir = "$out/gmp-widevinecdm/system-installed"; + in + (prev.wrapFirefox browser (opts // {inherit extraPrefs;})).overrideAttrs (previousAttrs: { + buildCommand = + previousAttrs.buildCommand + + '' + mkdir -p "${widevineOutDir}" + ln -s "${widevineCdmDir}/_platform_specific/linux_arm64/libwidevinecdm.so" "${widevineOutDir}/libwidevinecdm.so" + ln -s "${widevineCdmDir}/manifest.json" "${widevineOutDir}/manifest.json" + wrapProgram "$oldExe" --set MOZ_GMP_PATH "${widevineOutDir}" + ''; }); }) ];