switch back to nixfmt

This commit is contained in:
Sean Kovacs 2026-01-19 22:27:28 -05:00
commit 62032eab6d
Signed by: sckova
GPG key ID: 00F325187C68651A
37 changed files with 797 additions and 689 deletions

View file

@ -78,7 +78,8 @@
};
};
outputs = {
outputs =
{
nixpkgs,
nixpkgs-unstable,
nix-cachyos-kernel,
@ -97,18 +98,23 @@
catppuccin-btop,
catppuccin-mpv,
...
}: let
}:
let
# All systems we want to support for the generic VM
# to run the vm:
# nixos-rebuild build-vm --flake ~/nix#$(nix eval --raw --impure --expr 'builtins.currentSystem')
supportedSystems = ["x86_64-linux" "aarch64-linux"];
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
# Shared config for all package sets
pkgConfig = {
allowUnfree = true;
};
mkNixosSystem = {
mkNixosSystem =
{
hostname,
system,
extraModules ? [ ],
@ -116,8 +122,7 @@
}:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs =
{
specialArgs = {
inherit catppuccin system;
pkgs-unstable = import nixpkgs-unstable {
inherit system;
@ -125,8 +130,7 @@
};
}
// extraSpecialArgs;
modules =
[
modules = [
{
nixpkgs = {
config = pkgConfig;
@ -243,7 +247,8 @@
++ extraModules;
};
mkHomeConfig = {
mkHomeConfig =
{
user,
hostname,
system,
@ -270,7 +275,8 @@
nixvim.homeModules.nixvim
];
};
in {
in
{
nixosConfigurations = {
peach = mkNixosSystem {
hostname = "peach";
@ -298,8 +304,7 @@
);
};
homeConfigurations =
{
homeConfigurations = {
peach = mkHomeConfig {
user = "sckova";
hostname = "peach";

View file

@ -7,7 +7,8 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

View file

@ -5,7 +5,8 @@
lib,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

View file

@ -5,10 +5,16 @@
lib,
system,
...
}: {
}:
{
imports = [ ];
boot.initrd.availableKernelModules = ["ehci_pci" "xhci_pci" "usbhid" "sr_mod"];
boot.initrd.availableKernelModules = [
"ehci_pci"
"xhci_pci"
"usbhid"
"sr_mod"
];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
@ -18,7 +24,10 @@
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
@ -30,7 +39,7 @@
# Enable Parallels tools only on aarch64
hardware.parallels.enable = lib.mkIf (system == "aarch64-linux") true;
nixpkgs.config.allowUnfreePredicate =
lib.mkIf (system == "aarch64-linux")
(pkg: builtins.elem (lib.getName pkg) ["prl-tools"]);
nixpkgs.config.allowUnfreePredicate = lib.mkIf (system == "aarch64-linux") (
pkg: builtins.elem (lib.getName pkg) [ "prl-tools" ]
);
}

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: let
}:
let
catppuccin-discord = "${pkgs.catppuccin-discord}/share/catppuccin-discord/catppuccin-${config.catppuccin.flavor}-${config.catppuccin.accent}.theme.css";
mergedThemes = pkgs.runCommand "mergedConfig" { } ''
@ -32,7 +33,8 @@
height = 1071;
};
};
in {
in
{
home.packages = with pkgs; [ vesktop ];
home.file.".config/vesktop/settings.json" = {

View file

@ -4,17 +4,20 @@
pkgs,
config,
...
}: {
}:
{
home.file.".librewolf/default/chrome/" = {
source = ./librewolf_css;
force = true;
recursive = true;
};
home.file.".librewolf/default/chrome/colors.css" = let
home.file.".librewolf/default/chrome/colors.css" =
let
color = pkgs.catppuccin.rgb.${config.catppuccin.flavor};
accent = color.${config.catppuccin.accent};
in {
in
{
text = ''
* {
--accent: ${accent};
@ -256,10 +259,12 @@
}
];
};
search = let
search =
let
nixIcon = "${pkgs.colloid-icon-theme}/share/icons/Colloid/apps/scalable/nix-snowflake.svg";
googleIcon = "${pkgs.colloid-icon-theme}/share/icons/Colloid/apps/scalable/google.svg";
in {
in
{
force = true;
default = "google";
order = [

View file

@ -2,14 +2,16 @@
config,
pkgs,
...
}: let
}:
let
mergedConfig = pkgs.runCommand "mergedConfig" { } ''
mkdir -p $out
${pkgs.gnused}/bin/sed 's/${pkgs.catppuccin.${config.catppuccin.flavor}.base}/#000000/g' \
${pkgs.catppuccin-mpv-git}/themes/${config.catppuccin.flavor}/${config.catppuccin.accent}.conf \
> $out/mpv.conf
'';
in {
in
{
home.packages = with pkgs; [
(mpv.override {
scripts = with mpvScripts; [

View file

@ -3,10 +3,13 @@
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";
# };

View file

@ -4,7 +4,8 @@
pkgs-unstable,
lib,
...
}: {
}:
{
options = {
catppuccinUpper = {
accent = lib.mkOption {
@ -106,9 +107,11 @@
default = pkgs.noto-fonts-color-emoji;
};
};
cursor = let
cursor =
let
attrName = config.catppuccin.flavor + config.catppuccinUpper.accent;
in {
in
{
name = lib.mkOption {
type = lib.types.str;
readOnly = true;

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
home.packages = with pkgs; [
(prismlauncher.override {
jdks = [

View file

@ -2,6 +2,7 @@
config,
pkgs,
...
}: {
}:
{
home.packages = with pkgs; [ openmw ];
}

View file

@ -4,7 +4,8 @@
pkgs-unstable,
spicetify-nix,
...
}: {
}:
{
catppuccin = {
accent = "blue";
flavor = "mocha";
@ -18,9 +19,11 @@
pkgs.daggerfall-unity
];
programs.spicetify = let
programs.spicetify =
let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in {
in
{
enable = true;
enabledExtensions = with spicePkgs.extensions; [

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
catppuccin = {
accent = "lavender";
flavor = "macchiato";

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
catppuccin = {
accent = "green";
flavor = "mocha";

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
programs.ghostwriter = {
enable = true;
font = {

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
imports = [
./gtk.nix
./qt.nix
@ -35,10 +36,7 @@
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;
@ -49,10 +47,7 @@
# };
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;
};

View file

@ -3,13 +3,18 @@
pkgs,
lib,
...
}: let
}:
let
colors = pkgs.catppuccin.hex.${config.catppuccin.flavor};
mkColorSection = name: value: "@define-color ${name} ${value};";
generateCSS = ''
/* Catppuccin ${lib.toUpper (builtins.substring 0 1 config.catppuccin.flavor)}${builtins.substring 1 (-1) config.catppuccin.flavor} ${lib.toUpper (builtins.substring 0 1 config.catppuccin.accent)}${builtins.substring 1 (-1) config.catppuccin.accent} Palette */
/* Catppuccin ${lib.toUpper (builtins.substring 0 1 config.catppuccin.flavor)}${
builtins.substring 1 (-1) config.catppuccin.flavor
} ${lib.toUpper (builtins.substring 0 1 config.catppuccin.accent)}${
builtins.substring 1 (-1) config.catppuccin.accent
} Palette */
/* Base colors */
${mkColorSection "window_bg_color" colors.base}
@ -116,7 +121,8 @@
${mkColorSection "accent_bg_color" colors.${config.catppuccin.accent}}
@define-color accent_fg_color @window_bg_color;
'';
in {
in
{
home.file = {
".config/gtk-4.0/gtk.css" = {
text = generateCSS;

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
qt = {
enable = true;
@ -32,11 +33,13 @@
general = "\"${config.userOptions.fontSans.name},${toString config.userOptions.fontSans.size}\"";
};
ColorScheme = let
ColorScheme =
let
c = pkgs.catppuccin.bare.${config.catppuccin.flavor};
accent = c.${config.catppuccin.accent};
mkColors = roles: builtins.concatStringsSep ", " (map (r: "#ff${r}") roles);
in {
in
{
active_colors = mkColors [
c.text
c.surface0

View file

@ -3,7 +3,8 @@
pkgs,
lib,
...
}: {
}:
{
systemd.user.sessionVariables = {
XCURSOR_THEME = config.userOptions.cursor.name;
XCURSOR_SIZE = toString config.userOptions.cursor.size;

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: let
}:
let
mergedConfig = pkgs.runCommand "mergedConfig" { } ''
mkdir -p $out/themes
${pkgs.gnused}/bin/sed 's/blankFlavor/${config.catppuccin.flavor}/g' \
@ -10,7 +11,8 @@
cp ${pkgs.catppuccin-btop-git}/themes/catppuccin_latte.theme $out/themes/
cp ${pkgs.catppuccin-btop-git}/themes/catppuccin_${config.catppuccin.flavor}.theme $out/themes/nixos.theme
'';
in {
in
{
home.file.".config/btop" = {
source = mergedConfig;
recursive = true;

View file

@ -3,7 +3,8 @@
pkgs,
lib,
...
}: {
}:
{
home.packages = with pkgs; [
kdePackages.qttools
eza
@ -44,7 +45,8 @@
programs.man.generateCaches = false;
home.file.".config/fish/colors.fish" = {
text = let
text =
let
flavor = config.catppuccin.flavor;
palette = pkgs.catppuccin.bare.${flavor};
accent = config.catppuccin.accent;

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: let
}:
let
colors = pkgs.catppuccin.hex.${config.catppuccin.flavor};
accent = colors.${config.catppuccin.accent};
@ -87,7 +88,8 @@
text = kitty-colors;
destination = "/kitty-colors.conf";
};
in {
in
{
home.file.".config/kitty/themes" = {
source = kitty-colors-file;
recursive = true;
@ -109,7 +111,7 @@ in {
};
shellIntegration.enableFishIntegration = true;
keybindings = {
"ctrl+k" = ''combine : clear_terminal scroll active : clear_terminal scrollback active'';
"ctrl+k" = "combine : clear_terminal scroll active : clear_terminal scrollback active";
};
settings = {
include = "/home/${config.userOptions.username}/.config/kitty/themes/kitty-colors.conf";

View file

@ -2,7 +2,8 @@
pkgs,
config,
...
}: {
}:
{
home.sessionVariables = {
EDITOR = "nvim";
};
@ -11,7 +12,7 @@
kdePackages.qtdeclarative
prettier
prettierd
alejandra
nixfmt
stylua
black
clang-tools
@ -135,7 +136,7 @@
formatters_by_ft = {
lua = [ "stylua" ];
python = [ "black" ];
nix = ["alejandra"];
nix = [ "nixfmt" ];
javascript = [ "prettier" ];
css = [ "prettier" ];
json = [ "prettier" ];
@ -185,9 +186,11 @@
nixd.enable = true;
};
};
lualine = let
lualine =
let
palette = pkgs.catppuccin.${config.catppuccin.flavor};
in {
in
{
enable = true;
settings = {
options = {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
imports = [
./niri.nix
./noctalia.nix

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
# https://github.com/sodiboo/niri-flake/blob/main/docs.md
programs.niri = {
# handle package systemwide
@ -88,14 +89,15 @@
theme = config.userOptions.cursor.name;
};
layout = {
gaps = 2;
gaps = 4;
background-color = pkgs.catppuccin.${config.catppuccin.flavor}.mantle;
default-column-width = {
proportion = 0.5;
};
preset-column-widths = [
{proportion = 1.0 / 3.0;}
{proportion = 2.0 / 3.0;}
{ proportion = 4.0 / 12.0; }
{ proportion = 6.0 / 12.0; }
{ proportion = 8.0 / 12.0; }
];
border = {
enable = true;
@ -137,10 +139,10 @@
}
{
geometry-corner-radius = {
top-left = 0.0;
top-right = 0.0;
bottom-left = 0.0;
bottom-right = 0.0;
top-left = 16.0;
top-right = 16.0;
bottom-left = 16.0;
bottom-right = 16.0;
};
clip-to-geometry = true;
}
@ -217,37 +219,68 @@
};
"XF86MonBrightnessUp" = {
action.spawn = ["noctalia-shell" "ipc" "call" "brightness" "increase"];
action.spawn = [
"noctalia-shell"
"ipc"
"call"
"brightness"
"increase"
];
allow-when-locked = true;
};
"XF86MonBrightnessDown" = {
action.spawn = ["noctalia-shell" "ipc" "call" "brightness" "decrease"];
action.spawn = [
"noctalia-shell"
"ipc"
"call"
"brightness"
"decrease"
];
allow-when-locked = true;
};
"Shift+XF86MonBrightnessUp" = {
action.spawn = ["brightnessctl" "--class=backlight" "set" "+1%"];
action.spawn = [
"brightnessctl"
"--class=backlight"
"set"
"+1%"
];
allow-when-locked = true;
};
"Shift+XF86MonBrightnessDown" = {
action.spawn = ["brightnessctl" "--class=backlight" "set" "1%-"];
action.spawn = [
"brightnessctl"
"--class=backlight"
"set"
"1%-"
];
allow-when-locked = true;
};
"XF86AudioPrev" = {
action.spawn = ["playerctl" "previous"];
action.spawn = [
"playerctl"
"previous"
];
allow-when-locked = true;
};
"XF86AudioPlay" = {
action.spawn = ["playerctl" "play-pause"];
action.spawn = [
"playerctl"
"play-pause"
];
allow-when-locked = true;
};
"XF86AudioNext" = {
action.spawn = ["playerctl" "next"];
action.spawn = [
"playerctl"
"next"
];
allow-when-locked = true;
};
@ -256,12 +289,23 @@
};
"XF86Search" = {
action.spawn = ["noctalia-shell" "ipc" "call" "launcher" "toggle"];
action.spawn = [
"noctalia-shell"
"ipc"
"call"
"launcher"
"toggle"
];
allow-when-locked = true;
};
"XF86LaunchA" = {
action.spawn = ["niri" "msg" "action" "toggle-overview"];
action.spawn = [
"niri"
"msg"
"action"
"toggle-overview"
];
allow-when-locked = true;
};

View file

@ -2,7 +2,8 @@
pkgs,
config,
...
}: {
}:
{
programs.noctalia-shell = {
enable = true;
colors = {

View file

@ -2,7 +2,8 @@
pkgs,
config,
...
}: let
}:
let
script = pkgs.writeShellScript "bing-wallpaper" ''
set -euo pipefail
@ -62,7 +63,8 @@
echo "Wallpaper downloaded and applied successfully."
'';
in {
in
{
home.packages = with pkgs; [
wpaperd
];

View file

@ -5,7 +5,8 @@
copyDesktopItems,
chromium,
writeShellScriptBin,
}: let
}:
let
pname = "spotify-webapp";
version = "1.0.0";

View file

@ -7,7 +7,8 @@
pkgs,
inputs,
...
}: {
}:
{
environment.sessionVariables = {
# this makes electron apps work per the wiki
NIXOS_OZONE_WL = "1";

View file

@ -2,7 +2,8 @@
config,
pkgs,
...
}: {
}:
{
environment.systemPackages = with pkgs; [
ddcutil
mangohud

View file

@ -2,7 +2,8 @@
pkgs,
config,
...
}: {
}:
{
boot.kernelParams = [ "appledrm.show_notch=1" ];
catppuccin = {

View file

@ -1,4 +1,5 @@
{catppuccin, ...}: {
{ catppuccin, ... }:
{
catppuccin = {
accent = "green";
flavor = "mocha";

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# This following block taken from the wiki:
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
programs.bash = {

View file

@ -6,7 +6,8 @@
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,7 +21,8 @@
echo "Warning: tailscale0 did not get IP address within 15 seconds"
exit 0
'';
in {
in
{
systemd.services.tailscaled = {
serviceConfig = {
ExecStartPost = tailscaleWaitScript;

View file

@ -4,13 +4,14 @@
config,
lib,
...
}: {
}:
{
nixpkgs.overlays = lib.mkIf (config.nixpkgs.hostPlatform.isLinux) [
(final: prev: {
wrapLibrewolf = browser: opts: let
extraPrefs =
(opts.extraPrefs or "")
+ ''
wrapLibrewolf =
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);
@ -22,9 +23,7 @@
widevineOutDir = "$out/gmp-widevinecdm/system-installed";
in
(prev.wrapLibrewolf browser (opts // { inherit extraPrefs; })).overrideAttrs (previousAttrs: {
buildCommand =
previousAttrs.buildCommand
+ ''
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"