aboutsummaryrefslogtreecommitdiff
path: root/share/hm-modules
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-07-04 22:58:28 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-07-04 22:58:28 +0200
commit333f134ec64739abf0c3e46e59a4a8ad88b883b5 (patch)
tree5c41313437176f100116883b353c7efd4b9b7ab3 /share/hm-modules
parent430d063f50824b0b268e73c8577705dc2c4fc318 (diff)
formatting
Diffstat (limited to 'share/hm-modules')
-rw-r--r--share/hm-modules/default.nix7
-rw-r--r--share/hm-modules/hyprdesktop.nix77
-rw-r--r--share/hm-modules/wpaperd.nix13
3 files changed, 31 insertions, 66 deletions
diff --git a/share/hm-modules/default.nix b/share/hm-modules/default.nix
index 695f3fe..e20d424 100644
--- a/share/hm-modules/default.nix
+++ b/share/hm-modules/default.nix
@@ -1,6 +1 @@
-{ ... }: {
- 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 eef388f..a9f2ed4 100644
--- a/share/hm-modules/hyprdesktop.nix
+++ b/share/hm-modules/hyprdesktop.nix
@@ -1,20 +1,8 @@
-{ 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 = {
@@ -61,8 +49,7 @@ 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
@@ -120,28 +107,20 @@ 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;
@@ -173,28 +152,22 @@ 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 68a98a9..022f54d 100644
--- a/share/hm-modules/wpaperd.nix
+++ b/share/hm-modules/wpaperd.nix
@@ -1,14 +1,9 @@
-{ 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";
@@ -49,7 +44,9 @@ 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 ];