mirror of
https://github.com/henrysipp/omarchy-nix.git
synced 2026-06-14 21:49:57 -05:00
Format project with official nixfmt formatter (#21)
* Set nix official formatter for the flake * format the entire project
This commit is contained in:
@@ -1,26 +1,36 @@
|
||||
inputs: {
|
||||
inputs:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
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;
|
||||
|
||||
|
||||
# Handle theme selection - either predefined or generated
|
||||
selectedTheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark")
|
||||
then null
|
||||
else themes.${config.omarchy.theme};
|
||||
|
||||
selectedTheme =
|
||||
if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") then
|
||||
null
|
||||
else
|
||||
themes.${config.omarchy.theme};
|
||||
|
||||
# Generate color scheme from wallpaper for generated themes
|
||||
generatedColorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark")
|
||||
then (inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
|
||||
path = config.omarchy.theme_overrides.wallpaper_path;
|
||||
variant = if config.omarchy.theme == "generated_light" then "light" else "dark";
|
||||
}
|
||||
else null;
|
||||
in {
|
||||
generatedColorScheme =
|
||||
if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") then
|
||||
(inputs.nix-colors.lib.contrib { inherit pkgs; }).colorSchemeFromPicture {
|
||||
path = config.omarchy.theme_overrides.wallpaper_path;
|
||||
variant = if config.omarchy.theme == "generated_light" then "light" else "dark";
|
||||
}
|
||||
else
|
||||
null;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ./hyprland.nix inputs)
|
||||
(import ./hyprlock.nix inputs)
|
||||
@@ -47,9 +57,11 @@ in {
|
||||
};
|
||||
home.packages = packages.homePackages;
|
||||
|
||||
colorScheme = if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark")
|
||||
then generatedColorScheme
|
||||
else inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
||||
colorScheme =
|
||||
if (config.omarchy.theme == "generated_light" || config.omarchy.theme == "generated_dark") then
|
||||
generatedColorScheme
|
||||
else
|
||||
inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user