From c97a1d66084aaf50ca816d9c482f296d31346f9f Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Sat, 6 Jul 2024 06:48:40 +0200 Subject: formatting --- share/hm-modules/default.nix | 8 ++++- share/hm-modules/hyprdesktop.nix | 78 +++++++++++++++++++++++++++------------- share/hm-modules/wpaperd.nix | 14 +++++--- 3 files changed, 69 insertions(+), 31 deletions(-) (limited to 'share/hm-modules') diff --git a/share/hm-modules/default.nix b/share/hm-modules/default.nix index e20d424..c4ddc87 100644 --- a/share/hm-modules/default.nix +++ b/share/hm-modules/default.nix @@ -1 +1,7 @@ -{ ... }: { imports = [ ./hyprdesktop.nix ./wpaperd.nix ]; } +{ ... }: +{ + imports = [ + ./hyprdesktop.nix + ./wpaperd.nix + ]; +} diff --git a/share/hm-modules/hyprdesktop.nix b/share/hm-modules/hyprdesktop.nix index a9f2ed4..20e52ab 100644 --- a/share/hm-modules/hyprdesktop.nix +++ b/share/hm-modules/hyprdesktop.nix @@ -1,8 +1,21 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: let - inherit (lib) mkIf mkOption mkEnableOption types mdDoc lists; + inherit (lib) + mkIf + mkOption + mkEnableOption + types + mdDoc + lists + ; cfg = config.custom.hyprdesktop; -in { +in +{ imports = [ ../home/minimal.nix ]; options.custom.hyprdesktop = { @@ -49,7 +62,8 @@ in { config = mkIf cfg.enable { wayland.windowManager.hyprland.enable = true; - home.packages = with pkgs; + home.packages = + with pkgs; [ xh # Nice to use HTTP client bc # CLI calculator @@ -107,20 +121,28 @@ in { # Flat-Remix icon themes don't contain all the icons that Foliate uses, # so I'm bringing in the adwaita icons as a fallback. gnome3.adwaita-icon-theme - ] ++ lists.optionals cfg.hasBluetooth [ overskride ] + ] + ++ lists.optionals cfg.hasBluetooth [ overskride ] ++ lists.optionals cfg.enableGaming [ jdk17_headless superTuxKart wineWowPackages.full winetricks - ] ++ lists.optionals (cfg.enableWindowsCompat || cfg.enableGaming) [ + ] + ++ lists.optionals (cfg.enableWindowsCompat || cfg.enableGaming) [ wineWowPackages.full winetricks qemu_kvm - ] ++ lists.optionals cfg.hasBrightnessCtl [ brightnessctl ] - ++ lists.optionals cfg.enableGitAnnex [ git-annex git-remote-gcrypt ]; + ] + ++ lists.optionals cfg.hasBrightnessCtl [ brightnessctl ] + ++ lists.optionals cfg.enableGitAnnex [ + git-annex + git-remote-gcrypt + ]; - home.shellAliases = { sl = "sl -awFc5"; }; + home.shellAliases = { + sl = "sl -awFc5"; + }; services.dunst.enable = true; services.wpaperd.enable = true; @@ -152,22 +174,28 @@ in { }; xdg = { - systemDirs.data = let - gds = pkgs.gsettings-desktop-schemas; - gtk3 = pkgs.gtk3; - in [ - "${gds}/share/gsettings-schemas/${gds.name}" - "${gtk3}/share/gsettings-schemas/${gtk3.name}" - ]; - userDirs = let annex = "${config.home.homeDirectory}/Annex"; - in { - enable = true; - createDirectories = true; - } // mkIf cfg.enableGitAnnex { - pictures = "${annex}/Pictures"; - music = "${annex}/Music"; - documents = "${annex}/Documents"; - }; + systemDirs.data = + let + gds = pkgs.gsettings-desktop-schemas; + gtk3 = pkgs.gtk3; + in + [ + "${gds}/share/gsettings-schemas/${gds.name}" + "${gtk3}/share/gsettings-schemas/${gtk3.name}" + ]; + userDirs = + let + annex = "${config.home.homeDirectory}/Annex"; + in + { + enable = true; + createDirectories = true; + } + // mkIf cfg.enableGitAnnex { + pictures = "${annex}/Pictures"; + music = "${annex}/Music"; + documents = "${annex}/Documents"; + }; portal.xdgOpenUsePortal = true; }; diff --git a/share/hm-modules/wpaperd.nix b/share/hm-modules/wpaperd.nix index 022f54d..82aacb5 100644 --- a/share/hm-modules/wpaperd.nix +++ b/share/hm-modules/wpaperd.nix @@ -1,9 +1,15 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: with lib; let cfg = config.services.wpaperd; tomlFormat = pkgs.formats.toml { }; -in { +in +{ options.services.wpaperd = { enable = mkEnableOption "enable wpaperd"; @@ -44,9 +50,7 @@ in { }; config = mkIf cfg.enable { - assertions = [ - (hm.assertions.assertPlatform "services.wpaperd" pkgs platforms.linux) - ]; + assertions = [ (hm.assertions.assertPlatform "services.wpaperd" pkgs platforms.linux) ]; home.packages = [ cfg.package ]; -- cgit v1.3.1