Format project with official nixfmt formatter (#21)

* Set nix official formatter for the flake

* format the entire project
This commit is contained in:
Gaétan Lepage
2025-10-15 22:09:51 +02:00
committed by GitHub
parent 98b3c63572
commit fba993c589
34 changed files with 375 additions and 281 deletions
+4 -4
View File
@@ -33,7 +33,7 @@ lib: {
}; };
}; };
}; };
default = {}; default = { };
description = "Theme overrides including wallpaper path for generated themes"; description = "Theme overrides including wallpaper path for generated themes";
}; };
primary_font = lib.mkOption { primary_font = lib.mkOption {
@@ -42,11 +42,11 @@ lib: {
}; };
vscode_settings = lib.mkOption { vscode_settings = lib.mkOption {
type = lib.types.attrs; type = lib.types.attrs;
default = {}; default = { };
}; };
monitors = lib.mkOption { monitors = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.str;
default = []; default = [ ];
}; };
scale = lib.mkOption { scale = lib.mkOption {
type = lib.types.int; type = lib.types.int;
@@ -80,7 +80,7 @@ lib: {
}; };
exclude_packages = lib.mkOption { exclude_packages = lib.mkOption {
type = lib.types.listOf lib.types.package; type = lib.types.listOf lib.types.package;
default = []; default = [ ];
description = "Packages to exclude from the default system packages"; description = "Packages to exclude from the default system packages";
}; };
}; };
+49 -41
View File
@@ -9,48 +9,56 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = inputs @ { outputs =
self, inputs@{
nixpkgs, self,
hyprland, nixpkgs,
nix-colors, hyprland,
home-manager, nix-colors,
}: { home-manager,
nixosModules = { }:
default = { {
config, formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
lib,
pkgs,
...
}: {
imports = [
(import ./modules/nixos/default.nix inputs)
];
options.omarchy = (import ./config.nix lib).omarchyOptions; nixosModules = {
config = { default =
nixpkgs.config.allowUnfree = true; {
}; config,
lib,
pkgs,
...
}:
{
imports = [
(import ./modules/nixos/default.nix inputs)
];
options.omarchy = (import ./config.nix lib).omarchyOptions;
config = {
nixpkgs.config.allowUnfree = true;
};
};
};
homeManagerModules = {
default =
{
config,
lib,
pkgs,
osConfig ? { },
...
}:
{
imports = [
nix-colors.homeManagerModules.default
(import ./modules/home-manager/default.nix inputs)
];
options.omarchy = (import ./config.nix lib).omarchyOptions;
config = lib.mkIf (osConfig ? omarchy) {
omarchy = osConfig.omarchy;
};
};
}; };
}; };
homeManagerModules = {
default = {
config,
lib,
pkgs,
osConfig ? {},
...
}: {
imports = [
nix-colors.homeManagerModules.default
(import ./modules/home-manager/default.nix inputs)
];
options.omarchy = (import ./config.nix lib).omarchyOptions;
config = lib.mkIf (osConfig ? omarchy) {
omarchy = osConfig.omarchy;
};
};
};
};
} }
+15 -7
View File
@@ -1,4 +1,5 @@
config: let config:
let
cfg = config.omarchy; cfg = config.omarchy;
wallpapers = { wallpapers = {
"tokyo-night" = [ "tokyo-night" = [
@@ -22,11 +23,18 @@ config: let
}; };
# Handle wallpaper path for generated themes and overrides # Handle wallpaper path for generated themes and overrides
wallpaper_path = if (cfg.theme == "generated_light" || cfg.theme == "generated_dark") || (cfg.theme_overrides.wallpaper_path != null) wallpaper_path =
then toString cfg.theme_overrides.wallpaper_path if
else let (cfg.theme == "generated_light" || cfg.theme == "generated_dark")
selected_wallpaper = builtins.elemAt (wallpapers.${cfg.theme}) 0; || (cfg.theme_overrides.wallpaper_path != null)
in "~/Pictures/Wallpapers/${selected_wallpaper}"; then
in { toString cfg.theme_overrides.wallpaper_path
else
let
selected_wallpaper = builtins.elemAt (wallpapers.${cfg.theme}) 0;
in
"~/Pictures/Wallpapers/${selected_wallpaper}";
in
{
inherit wallpaper_path; inherit wallpaper_path;
} }
+4 -2
View File
@@ -2,10 +2,12 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
palette = config.colorScheme.palette; palette = config.colorScheme.palette;
in { in
{
home.file = { home.file = {
".config/btop/themes/${cfg.theme}.theme" = { ".config/btop/themes/${cfg.theme}.theme" = {
text = '' text = ''
+30 -18
View File
@@ -1,26 +1,36 @@
inputs: { inputs:
{
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: let }:
packages = import ../packages.nix {inherit pkgs lib; exclude_packages = config.omarchy.exclude_packages;}; let
packages = import ../packages.nix {
inherit pkgs lib;
exclude_packages = config.omarchy.exclude_packages;
};
themes = import ../themes.nix; themes = import ../themes.nix;
# Handle theme selection - either predefined or generated # Handle theme selection - either predefined or generated
selectedTheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") selectedTheme =
then null if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") then
else themes.${config.omarchy.theme}; null
else
themes.${config.omarchy.theme};
# Generate color scheme from wallpaper for generated themes # Generate color scheme from wallpaper for generated themes
generatedColorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") generatedColorScheme =
then (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture { if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") then
path = config.omarchy.theme_overrides.wallpaper_path; (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
variant = if config.omarchy.theme == "generated_light" then "light" else "dark"; path = config.omarchy.theme_overrides.wallpaper_path;
} variant = if config.omarchy.theme == "generated_light" then "light" else "dark";
else null; }
in { else
null;
in
{
imports = [ imports = [
(import ./hyprland.nix inputs) (import ./hyprland.nix inputs)
(import ./hyprlock.nix inputs) (import ./hyprlock.nix inputs)
@@ -47,9 +57,11 @@ in {
}; };
home.packages = packages.homePackages; home.packages = packages.homePackages;
colorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") colorScheme =
then generatedColorScheme if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") then
else inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme}; generatedColorScheme
else
inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
gtk = { gtk = {
enable = true; enable = true;
+2 -1
View File
@@ -1,4 +1,5 @@
{...}: { { ... }:
{
programs.direnv = { programs.direnv = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
+5 -4
View File
@@ -1,10 +1,11 @@
{...}: { { ... }:
{
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
serif = ["Noto Serif"]; serif = [ "Noto Serif" ];
sansSerif = ["Noto Sans"]; sansSerif = [ "Noto Sans" ];
monospace = ["Caskaydia Mono Nerd Font"]; monospace = [ "Caskaydia Mono Nerd Font" ];
}; };
}; };
} }
+4 -2
View File
@@ -2,10 +2,12 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
palette = config.colorScheme.palette; palette = config.colorScheme.palette;
in { in
{
programs.ghostty = { programs.ghostty = {
enable = true; enable = true;
settings = { settings = {
+4 -2
View File
@@ -1,6 +1,8 @@
{config, ...}: let { config, ... }:
let
cfg = config.omarchy; cfg = config.omarchy;
in { in
{
programs.git = { programs.git = {
enable = true; enable = true;
userName = cfg.full_name; userName = cfg.full_name;
+2 -1
View File
@@ -1,4 +1,5 @@
{...}: { { ... }:
{
services.hypridle = { services.hypridle = {
enable = true; enable = true;
settings = { settings = {
+5 -3
View File
@@ -1,9 +1,11 @@
inputs: { inputs:
{
config, config,
pkgs, pkgs,
... ...
}: { }:
imports = [./hyprland/configuration.nix]; {
imports = [ ./hyprland/configuration.nix ];
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;
+2 -1
View File
@@ -2,7 +2,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
exec-once = [ exec-once = [
# "hypridle & mako & waybar & fcitx5" # "hypridle & mako & waybar & fcitx5"
+81 -81
View File
@@ -2,103 +2,103 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
in { in
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
bind = bind = cfg.quick_app_bindings ++ [
cfg.quick_app_bindings "SUPER, space, exec, wofi --show drun --sort-order=alphabetical"
++ [ "SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar"
"SUPER, space, exec, wofi --show drun --sort-order=alphabetical" # "SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next"
"SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar" # "SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next"
# "SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next"
# "SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next"
"SUPER, W, killactive," "SUPER, W, killactive,"
"SUPER, Backspace, killactive," "SUPER, Backspace, killactive,"
# End active session # End active session
"SUPER, ESCAPE, exec, hyprlock" "SUPER, ESCAPE, exec, hyprlock"
"SUPER SHIFT, ESCAPE, exit," "SUPER SHIFT, ESCAPE, exit,"
"SUPER CTRL, ESCAPE, exec, reboot" "SUPER CTRL, ESCAPE, exec, reboot"
"SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff" "SUPER SHIFT CTRL, ESCAPE, exec, systemctl poweroff"
"SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings" "SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings"
# Control tiling # Control tiling
"SUPER, J, togglesplit, # dwindle" "SUPER, J, togglesplit, # dwindle"
"SUPER, P, pseudo, # dwindle" "SUPER, P, pseudo, # dwindle"
"SUPER, V, togglefloating," "SUPER, V, togglefloating,"
"SUPER SHIFT, Plus, fullscreen," "SUPER SHIFT, Plus, fullscreen,"
# Move focus with mainMod + arrow keys # Move focus with mainMod + arrow keys
"SUPER, left, movefocus, l" "SUPER, left, movefocus, l"
"SUPER, right, movefocus, r" "SUPER, right, movefocus, r"
"SUPER, up, movefocus, u" "SUPER, up, movefocus, u"
"SUPER, down, movefocus, d" "SUPER, down, movefocus, d"
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
"SUPER, 1, workspace, 1" "SUPER, 1, workspace, 1"
"SUPER, 2, workspace, 2" "SUPER, 2, workspace, 2"
"SUPER, 3, workspace, 3" "SUPER, 3, workspace, 3"
"SUPER, 4, workspace, 4" "SUPER, 4, workspace, 4"
"SUPER, 5, workspace, 5" "SUPER, 5, workspace, 5"
"SUPER, 6, workspace, 6" "SUPER, 6, workspace, 6"
"SUPER, 7, workspace, 7" "SUPER, 7, workspace, 7"
"SUPER, 8, workspace, 8" "SUPER, 8, workspace, 8"
"SUPER, 9, workspace, 9" "SUPER, 9, workspace, 9"
"SUPER, 0, workspace, 10" "SUPER, 0, workspace, 10"
"SUPER, comma, workspace, -1"
"SUPER, period, workspace, +1"
# Move active window to a workspace with mainMod + SHIFT + [0-9] "SUPER, comma, workspace, -1"
"SUPER SHIFT, 1, movetoworkspace, 1" "SUPER, period, workspace, +1"
"SUPER SHIFT, 2, movetoworkspace, 2"
"SUPER SHIFT, 3, movetoworkspace, 3"
"SUPER SHIFT, 4, movetoworkspace, 4"
"SUPER SHIFT, 5, movetoworkspace, 5"
"SUPER SHIFT, 6, movetoworkspace, 6"
"SUPER SHIFT, 7, movetoworkspace, 7"
"SUPER SHIFT, 8, movetoworkspace, 8"
"SUPER SHIFT, 9, movetoworkspace, 9"
"SUPER SHIFT, 0, movetoworkspace, 10"
# Swap active window with the one next to it with mainMod + SHIFT + arrow keys # Move active window to a workspace with mainMod + SHIFT + [0-9]
"SUPER SHIFT, left, swapwindow, l" "SUPER SHIFT, 1, movetoworkspace, 1"
"SUPER SHIFT, right, swapwindow, r" "SUPER SHIFT, 2, movetoworkspace, 2"
"SUPER SHIFT, up, swapwindow, u" "SUPER SHIFT, 3, movetoworkspace, 3"
"SUPER SHIFT, down, swapwindow, d" "SUPER SHIFT, 4, movetoworkspace, 4"
"SUPER SHIFT, 5, movetoworkspace, 5"
"SUPER SHIFT, 6, movetoworkspace, 6"
"SUPER SHIFT, 7, movetoworkspace, 7"
"SUPER SHIFT, 8, movetoworkspace, 8"
"SUPER SHIFT, 9, movetoworkspace, 9"
"SUPER SHIFT, 0, movetoworkspace, 10"
# Resize active window # Swap active window with the one next to it with mainMod + SHIFT + arrow keys
"SUPER, minus, resizeactive, -100 0" "SUPER SHIFT, left, swapwindow, l"
"SUPER, equal, resizeactive, 100 0" "SUPER SHIFT, right, swapwindow, r"
"SUPER SHIFT, minus, resizeactive, 0 -100" "SUPER SHIFT, up, swapwindow, u"
"SUPER SHIFT, equal, resizeactive, 0 100" "SUPER SHIFT, down, swapwindow, d"
# Scroll through existing workspaces with mainMod + scroll # Resize active window
"SUPER, mouse_down, workspace, e+1" "SUPER, minus, resizeactive, -100 0"
"SUPER, mouse_up, workspace, e-1" "SUPER, equal, resizeactive, 100 0"
"SUPER SHIFT, minus, resizeactive, 0 -100"
"SUPER SHIFT, equal, resizeactive, 0 100"
# Control Apple Display brightness # Scroll through existing workspaces with mainMod + scroll
"CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000" "SUPER, mouse_down, workspace, e+1"
"CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000" "SUPER, mouse_up, workspace, e-1"
"SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000"
# Super workspace floating layer # Control Apple Display brightness
"SUPER, S, togglespecialworkspace, magic" "CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000"
"SUPER SHIFT, S, movetoworkspace, special:magic" "CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000"
"SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000"
# Screenshots # Super workspace floating layer
", PRINT, exec, hyprshot -m region" "SUPER, S, togglespecialworkspace, magic"
"SHIFT, PRINT, exec, hyprshot -m window" "SUPER SHIFT, S, movetoworkspace, special:magic"
"CTRL, PRINT, exec, hyprshot -m output"
# Color picker # Screenshots
"SUPER, PRINT, exec, hyprpicker -a" ", PRINT, exec, hyprshot -m region"
"SHIFT, PRINT, exec, hyprshot -m window"
"CTRL, PRINT, exec, hyprshot -m output"
# Clipse # Color picker
"CTRL SUPER, V, exec, ghostty --class clipse -e clipse" "SUPER, PRINT, exec, hyprpicker -a"
];
# Clipse
"CTRL SUPER, V, exec, ghostty --class clipse -e clipse"
];
bindm = [ bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
@@ -3,9 +3,11 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
in { in
{
imports = [ imports = [
./autostart.nix ./autostart.nix
./bindings.nix ./bindings.nix
+34 -34
View File
@@ -2,9 +2,10 @@
config, config,
lib, lib,
pkgs, pkgs,
osConfig ? {}, osConfig ? { },
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
hasNvidiaDrivers = builtins.elem "nvidia" osConfig.services.xserver.videoDrivers; hasNvidiaDrivers = builtins.elem "nvidia" osConfig.services.xserver.videoDrivers;
nvidiaEnv = [ nvidiaEnv = [
@@ -12,47 +13,46 @@
"LIBVA_DRIVER_NAME,nvidia" "LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia"
]; ];
in { in
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
# Environment variables # Environment variables
env = env = (lib.optionals hasNvidiaDrivers nvidiaEnv) ++ [
(lib.optionals hasNvidiaDrivers nvidiaEnv) "GDK_SCALE,${toString cfg.scale}"
++ [
"GDK_SCALE,${toString cfg.scale}"
# Cursor size # Cursor size
"XCURSOR_SIZE,24" "XCURSOR_SIZE,24"
"HYPRCURSOR_SIZE,24" "HYPRCURSOR_SIZE,24"
# Cursor theme # Cursor theme
"XCURSOR_THEME,Adwaita" "XCURSOR_THEME,Adwaita"
"HYPRCURSOR_THEME,Adwaita" "HYPRCURSOR_THEME,Adwaita"
# Force all apps to use Wayland # Force all apps to use Wayland
"GDK_BACKEND,wayland" "GDK_BACKEND,wayland"
"QT_QPA_PLATFORM,wayland" "QT_QPA_PLATFORM,wayland"
"QT_STYLE_OVERRIDE,kvantum" "QT_STYLE_OVERRIDE,kvantum"
"SDL_VIDEODRIVER,wayland" "SDL_VIDEODRIVER,wayland"
"MOZ_ENABLE_WAYLAND,1" "MOZ_ENABLE_WAYLAND,1"
"ELECTRON_OZONE_PLATFORM_HINT,wayland" "ELECTRON_OZONE_PLATFORM_HINT,wayland"
"OZONE_PLATFORM,wayland" "OZONE_PLATFORM,wayland"
# Make Chromium use XCompose and all Wayland # Make Chromium use XCompose and all Wayland
"CHROMIUM_FLAGS,\"--enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4\"" "CHROMIUM_FLAGS,\"--enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4\""
# Make .desktop files available for wofi # Make .desktop files available for wofi
"XDG_DATA_DIRS,$XDG_DATA_DIRS:$HOME/.nix-profile/share:/nix/var/nix/profiles/default/share" "XDG_DATA_DIRS,$XDG_DATA_DIRS:$HOME/.nix-profile/share:/nix/var/nix/profiles/default/share"
# Use XCompose file # Use XCompose file
"XCOMPOSEFILE,~/.XCompose" "XCOMPOSEFILE,~/.XCompose"
"EDITOR,nvim" "EDITOR,nvim"
# GTK theme
"GTK_THEME,${if cfg.theme == "generated_light" then "Adwaita" else "Adwaita:dark"}"
# Podman compatibility. Probably need to add cfg.env? # GTK theme
# "DOCKER_HOST,unix://$XDG_RUNTIME_DIR/podman/podman.sock" "GTK_THEME,${if cfg.theme == "generated_light" then "Adwaita" else "Adwaita:dark"}"
];
# Podman compatibility. Probably need to add cfg.env?
# "DOCKER_HOST,unix://$XDG_RUNTIME_DIR/podman/podman.sock"
];
xwayland = { xwayland = {
force_zero_scaling = true; force_zero_scaling = true;
+2 -1
View File
@@ -3,7 +3,8 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
# Environment variables # Environment variables
# https://wiki.hyprland.org/Configuring/Variables/#input # https://wiki.hyprland.org/Configuring/Variables/#input
+9 -4
View File
@@ -2,13 +2,18 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
hexToRgba = hex: alpha: let let
in "rgba(${hex}${alpha})"; hexToRgba =
hex: alpha:
let
in
"rgba(${hex}${alpha})";
inactiveBorder = hexToRgba config.colorScheme.palette.base09 "aa"; inactiveBorder = hexToRgba config.colorScheme.palette.base09 "aa";
activeBorder = hexToRgba config.colorScheme.palette.base0D "aa"; activeBorder = hexToRgba config.colorScheme.palette.base0D "aa";
in { in
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
general = { general = {
gaps_in = 5; gaps_in = 5;
+2 -1
View File
@@ -2,7 +2,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
windowrule = [ windowrule = [
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
+6 -3
View File
@@ -1,9 +1,11 @@
inputs: { inputs:
{
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
palette = config.colorScheme.palette; palette = config.colorScheme.palette;
convert = inputs.nix-colors.lib.conversions.hexToRGBString; convert = inputs.nix-colors.lib.conversions.hexToRGBString;
selected_wallpaper_path = (import ../../lib/selected-wallpaper.nix config).wallpaper_path; selected_wallpaper_path = (import ../../lib/selected-wallpaper.nix config).wallpaper_path;
@@ -12,7 +14,8 @@ inputs: {
surfaceRgb = "rgb(${convert ", " palette.base02})"; surfaceRgb = "rgb(${convert ", " palette.base02})";
foregroundRgb = "rgb(${convert ", " palette.base05})"; foregroundRgb = "rgb(${convert ", " palette.base05})";
foregroundMutedRgb = "rgb(${convert ", " palette.base04})"; foregroundMutedRgb = "rgb(${convert ", " palette.base04})";
in { in
{
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
settings = { settings = {
+4 -2
View File
@@ -2,9 +2,11 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
let
selected_wallpaper_path = (import ../../lib/selected-wallpaper.nix config).wallpaper_path; selected_wallpaper_path = (import ../../lib/selected-wallpaper.nix config).wallpaper_path;
in { in
{
home.file = { home.file = {
"Pictures/Wallpapers" = { "Pictures/Wallpapers" = {
source = ../../config/themes/wallpapers; source = ../../config/themes/wallpapers;
+4 -2
View File
@@ -2,9 +2,11 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
in { in
{
services.mako = { services.mako = {
enable = true; enable = true;
+2 -1
View File
@@ -1,3 +1,4 @@
{...}: { { ... }:
{
programs.starship.enable = true; programs.starship.enable = true;
} }
+14 -11
View File
@@ -2,28 +2,31 @@
config, config,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
themes = import ../themes.nix; themes = import ../themes.nix;
theme = themes.${cfg.theme}; theme = themes.${cfg.theme};
in { in
{
programs.vscode = { programs.vscode = {
enable = true; enable = true;
profiles.default = { profiles.default = {
# This is actually turning out to be super annoying whenever I need # This is actually turning out to be super annoying whenever I need
# to change settings on the fly. Disabling until I have time to research. # to change settings on the fly. Disabling until I have time to research.
# In the meantime themes are broken # In the meantime themes are broken
# userSettings = # userSettings =
# { # {
# "workbench.colorTheme" = theme.vscode-theme; # "workbench.colorTheme" = theme.vscode-theme;
# "vim.useCtrlKeys" = false; # "vim.useCtrlKeys" = false;
# "editor.minimap.enabled" = false; # "editor.minimap.enabled" = false;
# } # }
# // cfg.vscode_settings;
extensions = with pkgs.vscode-extensions; # // cfg.vscode_settings;
extensions =
with pkgs.vscode-extensions;
[ [
bbenoist.nix bbenoist.nix
vscodevim.vim vscodevim.vim
+21 -10
View File
@@ -1,13 +1,16 @@
inputs: { inputs:
{
config, config,
pkgs, pkgs,
... ...
}: let }:
let
palette = config.colorScheme.palette; palette = config.colorScheme.palette;
convert = inputs.nix-colors.lib.conversions.hexToRGBString; convert = inputs.nix-colors.lib.conversions.hexToRGBString;
backgroundRgb = "rgb(${convert ", " palette.base00})"; backgroundRgb = "rgb(${convert ", " palette.base00})";
foregroundRgb = "rgb(${convert ", " palette.base05})"; foregroundRgb = "rgb(${convert ", " palette.base05})";
in { in
{
home.file = { home.file = {
".config/waybar/" = { ".config/waybar/" = {
source = ../../config/waybar; source = ../../config/waybar;
@@ -68,11 +71,11 @@ in {
active = "󱓻"; active = "󱓻";
}; };
persistent-workspaces = { persistent-workspaces = {
"1" = []; "1" = [ ];
"2" = []; "2" = [ ];
"3" = []; "3" = [ ];
"4" = []; "4" = [ ];
"5" = []; "5" = [ ];
}; };
}; };
cpu = { cpu = {
@@ -86,7 +89,13 @@ in {
tooltip = false; tooltip = false;
}; };
network = { network = {
format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"]; format-icons = [
"󰤯"
"󰤟"
"󰤢"
"󰤥"
"󰤨"
];
format = "{icon}"; format = "{icon}";
format-wifi = "{icon}"; format-wifi = "{icon}";
format-ethernet = "󰀂"; format-ethernet = "󰀂";
@@ -155,7 +164,9 @@ in {
on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; # Updated command on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; # Updated command
max-volume = 150; # Optional: allow volume over 100% max-volume = 150; # Optional: allow volume over 100%
}; };
tray = {spacing = 13;}; tray = {
spacing = 13;
};
power-profiles-daemon = { power-profiles-daemon = {
format = "{icon}"; format = "{icon}";
tooltip-format = "Power profile: {profile}"; tooltip-format = "Power profile: {profile}";
+2 -1
View File
@@ -2,7 +2,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
home.file = { home.file = {
".config/wofi/style.css" = { ".config/wofi/style.css" = {
text = '' text = ''
+2 -1
View File
@@ -1,4 +1,5 @@
{...}: { { ... }:
{
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
+4 -3
View File
@@ -1,4 +1,5 @@
{...}: { { ... }:
{
programs.zsh = { programs.zsh = {
enable = true; enable = true;
autosuggestion.enable = true; autosuggestion.enable = true;
@@ -7,11 +8,11 @@
plugins = [ plugins = [
{ {
name = "plugins/git"; name = "plugins/git";
tags = [from:oh-my-zsh]; tags = [ "from:oh-my-zsh" ];
} }
{ {
name = "fdellwing/zsh-bat"; name = "fdellwing/zsh-bat";
tags = [as:command]; tags = [ "as:command" ];
} }
]; ];
}; };
+3 -2
View File
@@ -1,9 +1,10 @@
{...}: { { ... }:
{
programs = { programs = {
_1password.enable = true; _1password.enable = true;
_1password-gui.enable = true; _1password-gui.enable = true;
# TODO: Dynamically get user names # TODO: Dynamically get user names
_1password-gui.polkitPolicyOwners = ["henry"]; _1password-gui.polkitPolicyOwners = [ "henry" ];
}; };
} }
+2 -1
View File
@@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
virtualisation.containers.enable = true; virtualisation.containers.enable = true;
virtualisation = { virtualisation = {
docker.enable = true; docker.enable = true;
+7 -4
View File
@@ -1,11 +1,14 @@
inputs: { inputs:
{
config, config,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
packages = import ../packages.nix {inherit pkgs;}; packages = import ../packages.nix { inherit pkgs; };
in { in
{
imports = [ imports = [
(import ./hyprland.nix inputs) (import ./hyprland.nix inputs)
(import ./system.nix) (import ./system.nix)
+4 -2
View File
@@ -1,8 +1,10 @@
inputs: { inputs:
{
config, config,
pkgs, pkgs,
... ...
}: { }:
{
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
# package = inputs.hyprland.packages.${pkgs.system}.hyprland; # package = inputs.hyprland.packages.${pkgs.system}.hyprland;
+8 -3
View File
@@ -3,10 +3,15 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
cfg = config.omarchy; cfg = config.omarchy;
packages = import ../packages.nix {inherit pkgs lib; exclude_packages = cfg.exclude_packages;}; packages = import ../packages.nix {
in { inherit pkgs lib;
exclude_packages = cfg.exclude_packages;
};
in
{
security.rtkit.enable = true; security.rtkit.enable = true;
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
+33 -25
View File
@@ -1,4 +1,8 @@
{pkgs, lib, exclude_packages ? []}: {
pkgs,
lib,
exclude_packages ? [ ],
}:
let let
# Essential Hyprland packages - cannot be excluded # Essential Hyprland packages - cannot be excluded
hyprlandPackages = with pkgs; [ hyprlandPackages = with pkgs; [
@@ -33,37 +37,41 @@ let
]; ];
# Discretionary packages - can be excluded by user # Discretionary packages - can be excluded by user
discretionaryPackages = with pkgs; [ discretionaryPackages =
# TUIs with pkgs;
lazygit [
lazydocker # TUIs
btop lazygit
powertop lazydocker
fastfetch btop
powertop
fastfetch
# GUIs # GUIs
chromium chromium
obsidian obsidian
vlc vlc
signal-desktop signal-desktop
# Development tools # Development tools
github-desktop github-desktop
gh gh
# Containers # Containers
docker-compose docker-compose
ffmpeg ffmpeg
] ++ lib.optionals (pkgs.system == "x86_64-linux") [ ]
typora ++ lib.optionals (pkgs.system == "x86_64-linux") [
dropbox typora
spotify dropbox
]; spotify
];
# Only allow excluding discretionary packages to prevent breaking the system # Only allow excluding discretionary packages to prevent breaking the system
filteredDiscretionaryPackages = lib.lists.subtractLists exclude_packages discretionaryPackages; filteredDiscretionaryPackages = lib.lists.subtractLists exclude_packages discretionaryPackages;
allSystemPackages = hyprlandPackages ++ systemPackages ++ filteredDiscretionaryPackages; allSystemPackages = hyprlandPackages ++ systemPackages ++ filteredDiscretionaryPackages;
in { in
{
# Regular packages # Regular packages
systemPackages = allSystemPackages; systemPackages = allSystemPackages;
+1 -1
View File
@@ -29,7 +29,7 @@
base16-theme = "gruvbox-light-medium"; base16-theme = "gruvbox-light-medium";
vscode-theme = "Gruvbox Light Medium"; vscode-theme = "Gruvbox Light Medium";
}; };
"custom" = { "custom" = {
# Custom themes don't have predefined base16 schemes (generated dynamically) # Custom themes don't have predefined base16 schemes (generated dynamically)
# VSCode theme fallback for custom color schemes # VSCode theme fallback for custom color schemes