aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-04-06 20:08:58 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-04-06 20:39:25 +0200
commit661d4964d99a0a5cbab358643c6a271422e0d001 (patch)
tree9ebc3d6316a1333a39b9817acb3753d8cdbfff7f
parent1c716c86fd1f038e2e0a566593ba04676628b5e8 (diff)
Programming Feng Shui praxis
-rw-r--r--flake.lock78
-rw-r--r--flake.nix2
-rw-r--r--hosts/underworld/home.nix15
-rw-r--r--hosts/wonderland/home.nix25
-rw-r--r--share/cfg/default.nix17
-rw-r--r--share/cfg/firefox/default.nix (renamed from share/home/firefox/default.nix)1
-rw-r--r--share/cfg/firefox/usercss/compact-about-config.css (renamed from share/home/firefox/usercss/compact-about-config.css)0
-rw-r--r--share/cfg/firefox/usercss/context-menu.css (renamed from share/home/firefox/usercss/context-menu.css)0
-rw-r--r--share/cfg/firefox/usercss/tab-separator-lines.css (renamed from share/home/firefox/usercss/tab-separator-lines.css)0
-rw-r--r--share/cfg/firefox/usercss/unified-extensions-view.css (renamed from share/home/firefox/usercss/unified-extensions-view.css)0
-rw-r--r--share/cfg/fish.nix (renamed from share/home/fish.nix)4
-rw-r--r--share/cfg/gallery-dl.nix (renamed from share/home/gallery-dl.nix)1
-rw-r--r--share/cfg/git.nix (renamed from share/home/git.nix)1
-rw-r--r--share/cfg/helix.nix (renamed from share/home/helix.nix)5
-rw-r--r--share/cfg/kitty.nix (renamed from share/home/kitty.nix)1
-rw-r--r--share/cfg/mpv.nix (renamed from share/home/mpv.nix)11
-rw-r--r--share/cfg/shellenv.nix (renamed from share/home/shellenv.nix)5
-rw-r--r--share/cfg/tofi.nix (renamed from share/home/tofi.nix)1
-rw-r--r--share/cfg/waybar.css (renamed from share/home/waybar.css)0
-rw-r--r--share/cfg/waybar.nix50
-rw-r--r--share/cfg/wpaperd.nix (renamed from share/home/wpaperd.nix)1
-rw-r--r--share/hm-modules/default.nix7
-rw-r--r--share/hm-modules/hyprdesktop.nix189
-rw-r--r--share/home/hyprdesktop.nix224
-rw-r--r--share/home/offpunk.nix24
-rw-r--r--share/home/waybar.nix51
-rw-r--r--share/home/zsh.nix16
27 files changed, 325 insertions, 404 deletions
diff --git a/flake.lock b/flake.lock
index 2dba952..7c9026b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -8,11 +8,11 @@
]
},
"locked": {
- "lastModified": 1710156081,
- "narHash": "sha256-4PMY6aumJi5dLFjBzF5O4flKXmadMNq3AGUHKYfchh0=",
+ "lastModified": 1711099426,
+ "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
"owner": "numtide",
"repo": "devshell",
- "rev": "bc68b058dc7e6d4d6befc4ec6c60082b6e844b7d",
+ "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
"type": "github"
},
"original": {
@@ -28,11 +28,11 @@
]
},
"locked": {
- "lastModified": 1710427903,
- "narHash": "sha256-sV0Q5ndvfjK9JfCg/QM/HX/fcittohvtq8dD62isxdM=",
+ "lastModified": 1712325259,
+ "narHash": "sha256-9PipXYv1Ek1oi0WrGZYtlvnjoYS20QdSLLpJ+nHEbjE=",
"owner": "nix-community",
"repo": "disko",
- "rev": "21d89b333ca300bef82c928c856d48b94a9f997c",
+ "rev": "fbbac1aee6eae60c32b47e95447c4a3ec59d9773",
"type": "github"
},
"original": {
@@ -78,11 +78,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1709336216,
- "narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
+ "lastModified": 1712014858,
+ "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
+ "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github"
},
"original": {
@@ -114,11 +114,11 @@
"systems": "systems_2"
},
"locked": {
- "lastModified": 1701680307,
- "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@@ -153,11 +153,11 @@
]
},
"locked": {
- "lastModified": 1703887061,
- "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
- "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
@@ -195,11 +195,11 @@
]
},
"locked": {
- "lastModified": 1710506163,
- "narHash": "sha256-Xpl2LzbAIUHcTkAZ08UZM0USxVaQn194I8ma9c8wnAA=",
+ "lastModified": 1712317700,
+ "narHash": "sha256-rnkQ6qMhlxfjpCECkTMlFXHU/88QvC5KpdJWq5H6F1E=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "dc2f3812b41f825ed466c24c4211160d75cb890c",
+ "rev": "782eed8bb64b27acaeb7c17be4a095c85e65717f",
"type": "github"
},
"original": {
@@ -210,11 +210,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1710451336,
- "narHash": "sha256-pP86Pcfu3BrAvRO7R64x7hs+GaQrjFes+mEPowCfkxY=",
+ "lastModified": 1712163089,
+ "narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "d691274a972b3165335d261cc4671335f5c67de9",
+ "rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
"type": "github"
},
"original": {
@@ -227,11 +227,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
- "lastModified": 1709237383,
- "narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
+ "lastModified": 1711703276,
+ "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
+ "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"type": "github"
},
"original": {
@@ -244,11 +244,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1704874635,
- "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
+ "lastModified": 1710695816,
+ "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
+ "rev": "614b4613980a522ba49f0d194531beddbb7220d3",
"type": "github"
},
"original": {
@@ -260,11 +260,11 @@
},
"nixpkgs-stable_2": {
"locked": {
- "lastModified": 1710033658,
- "narHash": "sha256-yiZiVKP5Ya813iYLho2+CcFuuHpaqKc/CoxOlANKcqM=",
+ "lastModified": 1711819797,
+ "narHash": "sha256-tNeB6emxj74Y6ctwmsjtMlzUMn458sBmwnD35U5KIM4=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "b17375d3bb7c79ffc52f3538028b2ec06eb79ef8",
+ "rev": "2b4e3ca0091049c6fbb4908c66b05b77eaef9f0c",
"type": "github"
},
"original": {
@@ -301,11 +301,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1708018599,
- "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
+ "lastModified": 1712055707,
+ "narHash": "sha256-4XLvuSIDZJGS17xEwSrNuJLL7UjDYKGJSbK1WWX2AK8=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
- "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
+ "rev": "e35aed5fda3cc79f88ed7f1795021e559582093a",
"type": "github"
},
"original": {
@@ -360,11 +360,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
- "lastModified": 1710433464,
- "narHash": "sha256-IXlPoWgIRovZ32mYvqqdBgOQln71LouE/HBhbKc1wcw=",
+ "lastModified": 1711855048,
+ "narHash": "sha256-HxegAPnQJSC4cbEbF4Iq3YTlFHZKLiNTk8147EbLdGg=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "6c32d3b9c7593f4b466ec5404e59fc09a803a090",
+ "rev": "99b1e37f9fc0960d064a7862eb7adfb92e64fa10",
"type": "github"
},
"original": {
@@ -455,11 +455,11 @@
]
},
"locked": {
- "lastModified": 1710278050,
- "narHash": "sha256-Oc6BP7soXqb8itlHI8UKkdf3V9GeJpa1S39SR5+HJys=",
+ "lastModified": 1711963903,
+ "narHash": "sha256-N3QDhoaX+paWXHbEXZapqd1r95mdshxToGowtjtYkGI=",
"owner": "numtide",
"repo": "treefmt-nix",
- "rev": "35791f76524086ab4b785a33e4abbedfda64bd22",
+ "rev": "49dc4a92b02b8e68798abd99184f228243b6e3ac",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 60b7769..9f85f1b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -101,9 +101,9 @@
pre-commit = {
check.enable = false;
settings = {
- settings = { treefmt.package = config.treefmt.build.wrapper; };
hooks = {
treefmt.enable = true;
+ treefmt.package = config.treefmt.build.wrapper;
deadnix.enable = true;
};
};
diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix
index 4e3b519..bd41e89 100644
--- a/hosts/underworld/home.nix
+++ b/hosts/underworld/home.nix
@@ -2,17 +2,22 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
- sharedModules = [{ imports = [ (flakeRoot + /share/home/fish.nix) ]; }];
+ sharedModules = [{ programs.fish.enable = true; }];
extraSpecialArgs = { inherit inputs; };
};
home-manager.users.osiris = {
- imports = [
- (flakeRoot + /share/home/hyprdesktop.nix)
- (flakeRoot + /share/home/gallery-dl.nix)
- ];
+ imports = [ (flakeRoot + /share/cfg) ];
+ custom.hyprdesktop = {
+ enable = true;
+ enableGaming = true;
+ enableWindowsCompat = true;
+ enableGitAnnex = true;
+ };
+
home.stateVersion = "23.11";
};
+
home-manager.users.root.home.stateVersion = "23.11";
}
diff --git a/hosts/wonderland/home.nix b/hosts/wonderland/home.nix
index 753ad85..556391c 100644
--- a/hosts/wonderland/home.nix
+++ b/hosts/wonderland/home.nix
@@ -1,27 +1,22 @@
-{ pkgs
-, flakeRoot
-, inputs
-, ...
-}: {
+{ flakeRoot, inputs, ... }: {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [{
- imports = [
- (flakeRoot + /share/home/fish.nix)
- ];
+ imports = [ (flakeRoot + /share/cfg) ];
}];
extraSpecialArgs = { inherit inputs; };
};
home-manager.users.alice = {
- imports = [
- (flakeRoot + /share/home/hyprdesktop.nix)
- (flakeRoot + /share/home/gallery-dl.nix)
- ];
-
- services.poweralertd.enable = true;
- home.packages = with pkgs; [ mullvad ];
+ custom.hyprdesktop = {
+ enable = true;
+ hasBluetooth = true;
+ hasBrightnessCtl = true;
+ hasBattery = true;
+ enableWindowsCompat = true;
+ enableGitAnnex = true;
+ };
home.stateVersion = "22.05";
}; # End of users.alice
diff --git a/share/cfg/default.nix b/share/cfg/default.nix
new file mode 100644
index 0000000..1415377
--- /dev/null
+++ b/share/cfg/default.nix
@@ -0,0 +1,17 @@
+{ ... }: {
+ imports = [
+ ../hm-modules
+
+ ./wpaperd.nix
+ ./tofi.nix
+ ./waybar.nix
+ ./git.nix
+ ./mpv.nix
+ ./kitty.nix
+ ./firefox
+ ./helix.nix
+ ./gallery-dl.nix
+ ./fish.nix
+ ./shellenv.nix
+ ];
+}
diff --git a/share/home/firefox/default.nix b/share/cfg/firefox/default.nix
index f47f955..07281ec 100644
--- a/share/home/firefox/default.nix
+++ b/share/cfg/firefox/default.nix
@@ -9,7 +9,6 @@ in
home.sessionVariables.BROWSER = "firefox";
programs.firefox = {
- enable = true;
profiles = {
alice = {
name = "alice";
diff --git a/share/home/firefox/usercss/compact-about-config.css b/share/cfg/firefox/usercss/compact-about-config.css
index 55e30f7..55e30f7 100644
--- a/share/home/firefox/usercss/compact-about-config.css
+++ b/share/cfg/firefox/usercss/compact-about-config.css
diff --git a/share/home/firefox/usercss/context-menu.css b/share/cfg/firefox/usercss/context-menu.css
index 0bf5749..0bf5749 100644
--- a/share/home/firefox/usercss/context-menu.css
+++ b/share/cfg/firefox/usercss/context-menu.css
diff --git a/share/home/firefox/usercss/tab-separator-lines.css b/share/cfg/firefox/usercss/tab-separator-lines.css
index 2f77db4..2f77db4 100644
--- a/share/home/firefox/usercss/tab-separator-lines.css
+++ b/share/cfg/firefox/usercss/tab-separator-lines.css
diff --git a/share/home/firefox/usercss/unified-extensions-view.css b/share/cfg/firefox/usercss/unified-extensions-view.css
index 876a7d0..876a7d0 100644
--- a/share/home/firefox/usercss/unified-extensions-view.css
+++ b/share/cfg/firefox/usercss/unified-extensions-view.css
diff --git a/share/home/fish.nix b/share/cfg/fish.nix
index 8d499a3..d697942 100644
--- a/share/home/fish.nix
+++ b/share/cfg/fish.nix
@@ -1,10 +1,6 @@
{ ... }: {
imports = [ ./shellenv.nix ];
- programs.fish = {
- enable = true;
- };
-
programs.starship.enableFishIntegration = true;
programs.atuin.enableFishIntegration = true;
programs.nix-index.enableFishIntegration = true;
diff --git a/share/home/gallery-dl.nix b/share/cfg/gallery-dl.nix
index 9231208..320061b 100644
--- a/share/home/gallery-dl.nix
+++ b/share/cfg/gallery-dl.nix
@@ -1,6 +1,5 @@
{ config, ... }: {
programs.gallery-dl = {
- enable = true;
settings.extractor = {
base-directory = "${config.xdg.userDirs.download}/gallery-dl";
diff --git a/share/home/git.nix b/share/cfg/git.nix
index 98cafa2..67170a0 100644
--- a/share/home/git.nix
+++ b/share/cfg/git.nix
@@ -1,6 +1,5 @@
{ ... }: {
programs.git = {
- enable = true;
userEmail = "miran.bastaja04@gmail.com";
userName = "Miran Bastaja";
signing = {
diff --git a/share/home/helix.nix b/share/cfg/helix.nix
index d557d7d..55b6f76 100644
--- a/share/home/helix.nix
+++ b/share/cfg/helix.nix
@@ -1,13 +1,10 @@
{ pkgs, ... }: {
programs.helix = {
- enable = true;
- defaultEditor = true;
-
extraPackages = with pkgs; [
rust-analyzer
rustfmt
nil
- nixfmt
+ nixfmt-rfc-style
python311Packages.python-lsp-server
clang-tools
black
diff --git a/share/home/kitty.nix b/share/cfg/kitty.nix
index 3cdc18b..efe01e0 100644
--- a/share/home/kitty.nix
+++ b/share/cfg/kitty.nix
@@ -1,6 +1,5 @@
{ pkgs, ... }: {
programs.kitty = {
- enable = true;
theme = "Mayukai";
font = {
diff --git a/share/home/mpv.nix b/share/cfg/mpv.nix
index 077f7e6..427ed33 100644
--- a/share/home/mpv.nix
+++ b/share/cfg/mpv.nix
@@ -1,14 +1,7 @@
-{ config, pkgs, ... }: {
+{ config, ... }: {
programs.mpv = {
- enable = true;
- package = pkgs.wrapMpv
- (pkgs.mpv-unwrapped.override {
- ffmpeg = pkgs.ffmpeg_5-full;
- })
- { youtubeSupport = true; };
config = {
- screenshot-format = "avif";
- # The format is '<Filename without extension> [<screenshot number>].avif'
+ # The format is '<Filename without extension> [<screenshot number>].<ext>'
# Read more about it at: https://mpv.io/manual/master/#screenshot
screenshot-template = "%F [%n]";
screenshot-directory = "${config.xdg.userDirs.pictures}/Screenshots/mpv";
diff --git a/share/home/shellenv.nix b/share/cfg/shellenv.nix
index a7853f8..16b28ac 100644
--- a/share/home/shellenv.nix
+++ b/share/cfg/shellenv.nix
@@ -4,13 +4,11 @@
ltgi = "ltg --git-ignore";
};
programs.eza = {
- enable = true;
icons = true;
extraOptions = [ "--header" "--group-directories-first" "--long" ];
};
programs.starship = {
- enable = true;
# settings = let
# lightblue-bg = "bg:#769ff0";
# lightblue-fg = "fg:#e3e5e5";
@@ -47,7 +45,4 @@
# };
# }; # end of settings
}; # end of programs.starship
-
- programs.atuin.enable = true;
- programs.nix-index.enable = true;
}
diff --git a/share/home/tofi.nix b/share/cfg/tofi.nix
index b0a7a89..e4f2ff9 100644
--- a/share/home/tofi.nix
+++ b/share/cfg/tofi.nix
@@ -14,7 +14,6 @@
};
programs.tofi = {
- enable = true;
settings = {
anchor = "top";
width = "100%";
diff --git a/share/home/waybar.css b/share/cfg/waybar.css
index c2213cb..c2213cb 100644
--- a/share/home/waybar.css
+++ b/share/cfg/waybar.css
diff --git a/share/cfg/waybar.nix b/share/cfg/waybar.nix
new file mode 100644
index 0000000..9df08b2
--- /dev/null
+++ b/share/cfg/waybar.nix
@@ -0,0 +1,50 @@
+{ ... }: {
+ programs.waybar = {
+ systemd = {
+ enable = true;
+ target = "hyprland-session.target";
+ };
+ # settings.mainBar = {
+ # layer = "top";
+ # position = "right";
+ # width = 40;
+ # reload_style_on_change = true;
+ #
+ # modules-left = [ "hyprland/workspaces" ];
+ # modules-right = [
+ # "battery"
+ # "network"
+ # "cpu"
+ # "memory"
+ # "temperature"
+ # "backlight"
+ # "clock"
+ # "tray"
+ # ];
+ #
+ # clock = {
+ # format = "{:%H:%m\n%b}";
+ # };
+ #
+ # battery = {
+ # format = lib.concatStringsSep "\n" [
+ # "{icon} {capacity}%"
+ # "󱐋 {power:4.1f} W"
+ # ];
+ # interval = 2;
+ # format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
+ # };
+ #
+ # keyboard-state = {
+ # numlock = true;
+ # capslock = true;
+ # format = "{name} {icon}";
+ # format-icons = {
+ # locked = "";
+ # unlocked = "";
+ # };
+ # };
+ # }; # end of settings.mainBar
+ # style = builtins.readFile ./waybar.css;
+ };
+}
diff --git a/share/home/wpaperd.nix b/share/cfg/wpaperd.nix
index 447a9d2..f5e58b4 100644
--- a/share/home/wpaperd.nix
+++ b/share/cfg/wpaperd.nix
@@ -5,7 +5,6 @@
let wallpapers-dir = "${config.xdg.userDirs.pictures}/Wallpapers";
in {
services.wpaperd = {
- enable = true;
settings.default = {
path = wallpapers-dir;
duration = "10m";
diff --git a/share/hm-modules/default.nix b/share/hm-modules/default.nix
new file mode 100644
index 0000000..834d9ea
--- /dev/null
+++ b/share/hm-modules/default.nix
@@ -0,0 +1,7 @@
+{ ... }: {
+ imports = [
+ ./hyprdesktop.nix
+ ./tofi.nix
+ ./wpaperd.nix
+ ];
+}
diff --git a/share/hm-modules/hyprdesktop.nix b/share/hm-modules/hyprdesktop.nix
index ffcd441..1b6fe96 100644
--- a/share/hm-modules/hyprdesktop.nix
+++ b/share/hm-modules/hyprdesktop.nix
@@ -1 +1,188 @@
-{ }
+{ config, pkgs, lib, ... }:
+let
+ inherit (lib) mkIf mkOption mkEnableOption types mdDoc lists;
+ cfg = config.custom.hyprdesktop;
+in
+{
+ imports = [ ../home/minimal.nix ];
+
+ options.custom.hyprdesktop = {
+ enable = mkEnableOption "Enable hyprdesktop";
+
+ mainUser = mkOption {
+ type = types.str;
+ example = "alice";
+ description = mdDoc "Main superuser's username.";
+ };
+
+ hasBluetooth = mkOption {
+ type = types.bool;
+ default = false;
+ example = "true";
+ };
+ hasBrightnessCtl = mkOption {
+ type = types.bool;
+ default = false;
+ example = "true";
+ };
+ hasBattery = mkOption {
+ type = types.bool;
+ default = false;
+ example = "true";
+ };
+
+ enableGaming = mkOption {
+ type = types.bool;
+ default = false;
+ example = "true";
+ };
+ enableWindowsCompat = mkOption {
+ type = types.bool;
+ default = false;
+ example = "true";
+ };
+ enableGitAnnex = mkOption {
+ type = types.bool;
+ default = true;
+ example = "false";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = with pkgs; [
+ xh # Nice to use HTTP client
+ bc # CLI calculator
+ amfora # Gemini CLI browser
+ trashy # Trash CLI
+ tokei # counts lines of code
+ btop # modern top
+ wireplumber # session & policy manager for pipewire
+ grim # screenshot utility for wayland
+ slurp # region selection UI for wayland
+ wl-clipboard # clipboard utility
+ nushell # next-generation shell
+ ffmpeg
+ imagemagick
+ exiftool
+ sl
+ jaq # json query tool
+ mullvad
+ # tools for dealing with all sorts archives
+ atool
+ unzip
+ gnutar
+ unrar-wrapper
+ # Useful nix tooling
+ nix-tree
+ fzf
+
+ # TUI/GUI programs
+ cmus # music player
+ calibre # Document organisation/reading program
+ libreoffice-qt
+ beekeeper-studio # SQL database client
+ thunderbird # email client
+ nsxiv # image viewer
+ discord
+ signal-desktop
+ tdesktop # Telegram desktop
+ fluffychat # matrix client
+ qbittorrent # bittorrent client
+ zathura # document reader
+ bitwarden # password manager
+ heroic # FOSS game launcher for GOG & Epic
+ foliate
+
+ # Other
+ # It seems that not all gtk icon themes contain all icons? At least the
+ # 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.enableGaming [
+ jdk17_headless
+ superTuxKart
+ wineWowPackages.full
+ winetricks
+ ]
+ ++ 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
+ ];
+
+ home.shellAliases = {
+ sl = "sl -awFc5";
+ };
+
+ services.dunst.enable = true;
+ services.wpaperd.enable = true;
+ services.poweralertd.enable = cfg.hasBattery;
+
+ programs.mpv.enable = true;
+ programs.git.enable = true;
+ programs.kitty.enable = true;
+ programs.waybar.enable = true;
+ programs.firefox.enable = true;
+ programs.tofi.enable = true;
+
+ programs.gallery-dl.enable = true;
+
+ programs.fish.enable = true;
+ programs.eza.enable = true;
+ programs.starship.enable = true;
+ programs.atuin.enable = true;
+ programs.nix-index.enable = true;
+
+ programs.direnv = {
+ enable = true;
+ nix-direnv.enable = true;
+ };
+ programs.helix = {
+ enable = true;
+ defaultEditor = true;
+ };
+
+ 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";
+ };
+ };
+
+ gtk = {
+ theme = {
+ package = pkgs.flat-remix-gtk;
+ name = "Flat-Remix-GTK-Blue-Darkest";
+ };
+ iconTheme = {
+ package = pkgs.flat-remix-icon-theme;
+ name = "Flat-Remix-Blue-Dark";
+ };
+ };
+ };
+}
diff --git a/share/home/hyprdesktop.nix b/share/home/hyprdesktop.nix
deleted file mode 100644
index 0adaf43..0000000
--- a/share/home/hyprdesktop.nix
+++ /dev/null
@@ -1,224 +0,0 @@
-# Module containing a bunch of things that make up a `desktop environment` built
-# off of hyprland. I install this on all my desktop/laptop machines.
-# IMPORTANT: this module requires the system to already have `programs.hyprland`
-# enabled.
-{ pkgs, config, ... }: {
- imports = [
- # Custom home manager modules
- ../hm-modules/wpaperd.nix
- ../hm-modules/tofi.nix
-
- # Config
- ./minimal.nix
- ./wpaperd.nix
- ./tofi.nix
- ./waybar.nix
- ./git.nix
- ./mpv.nix
- ./kitty.nix
- ./offpunk.nix
- ./firefox
- ./helix.nix
- ];
-
- wayland.windowManager.hyprland =
- let
- programs = {
- audio = {
- increase = "wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%+";
- decrease = "wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%-";
- toggle-mute = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
- };
- screenshot = ''grim -g "$(slurp)" -t png - | wl-copy --type image/png'';
- cmd = {
- run = "tofi-run";
- drun = "tofi-drun";
- };
- brightness = {
- increase = "brightnessctl set +5%";
- decrease = "brightnessctl set 5%-";
- };
- terminal = "kitty";
- };
- in
- {
- enable = true;
- extraConfig = ''
- $mod = SUPER
-
- bind = $mod SHIFT, Return, exec, ${programs.terminal}
-
- general {
- layout = master
- }
-
- master {
- mfact = 0.5
- new_is_master = false
- }
-
- # workspaces
- # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
- ${builtins.concatStringsSep "\n" (builtins.genList (x:
- let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
- in ''
- bind = $mod, ${ws}, workspace, ${toString (x + 1)}
- bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}
- '') 10)}
-
- bind = $mod SHIFT, C, killactive
- bind = $mod SHIFT, F, togglefloating
- bind = $mod SHIFT, Q, exit
- bind = $mod, P, exec, ${programs.cmd.drun}
- bind = $mod SHIFT, P, exec, ${programs.cmd.run}
-
- bind = $mod, H, cyclenext, prev
- bind = $mod, L, cyclenext
- bind = $mod SHIFT, H, swapnext, prev
- bind = $mod SHIFT, L, swapnext
-
- # audio control
- binde =, XF86AudioRaiseVolume, exec, ${programs.audio.increase}
- binde =, XF86AudioLowerVolume, exec, ${programs.audio.decrease}
- bind =, XF86AudioMute, exec, ${programs.audio.toggle-mute}
-
- # monitor brightness control
- binde =, XF86MonBrightnessUp, exec, ${programs.brightness.increase}
- binde =, XF86MonBrightnessDown, exec, ${programs.brightness.decrease}
-
- # Screenshotting
- # My stupid laptop outputs these three key codes when the PrtSc key is
- # pressed instead of using just one code like any sane device would
- bind = SUPER SHIFT, S, exec, ${programs.screenshot}
-
- input {
- # focus change on cursor move
- follow_mouse = 1
- accel_profile = flat
- }
- monitor=,preferred,auto,1
-
- # set opacity to 0.9 active and 0.5 inactive for kitty
- windowrule = opacity 0.9 override 0.5 override,^(kitty)$
-
- # Move windows to their designated workspaces
- windowrulev2 = workspace 3,class:(firefox)
- windowrulev2 = workspace 4,class:(fluffychat)
- windowrulev2 = workspace 4,class:(org.telegram.desktop)
- windowrulev2 = workspace 4,class:(Signal)
- windowrulev2 = workspace 5,class:(Bitwarden)
-
- # workaround for https://github.com/hyprwm/Hyprland/issues/2661
- windowrulev2 = stayfocused, title:^()$,class:^(steam)$
- windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
-
- # No fade-in animation for the lanucher
- layerrule = noanim, launcher
- '';
- };
-
- home.packages = with pkgs; [
- xh # Nice to use HTTP client
- bc # CLI calculator
- amfora # Gemini CLI browser
- trashy # Trash CLI
- tokei # counts lines of code
- btop # modern top
- brightnessctl
- wineWowPackages.full
- winetricks
- qemu_kvm
- wireplumber # session & policy manager for pipewire
- grim # screenshot utility for wayland
- slurp # region selection UI for wayland
- wl-clipboard # clipboard utility
- nushell # next-generation shell
- ffmpeg
- imagemagick
- exiftool
- sl
- jaq # json query tool
- git-annex
- git-remote-gcrypt
- # tools for dealing with all sorts archives
- atool
- unzip
- gnutar
- unrar-wrapper
- # Useful nix tooling
- nix-tree
- fzf
-
- # TUI/GUI programs
- cmus # music player
- calibre # Document organisation/reading program
- libreoffice-qt
- beekeeper-studio # SQL database client
- thunderbird # email client
- nsxiv # image viewer
- discord
- signal-desktop
- tdesktop # Telegram desktop
- fluffychat # matrix client
- qbittorrent # bittorrent client
- zathura # document reader
- bitwarden # password manager
- heroic # FOSS game launcher for GOG & Epic
- foliate
-
- # Gaming
- jdk17_headless
- superTuxKart
-
- # Other
- # It seems that not all gtk icon themes contain all icons? At least the
- # 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
- ];
-
- home.shellAliases = {
- sl = "sl -awFc5";
- };
-
- services.dunst.enable = true;
-
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true;
- };
-
- 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;
- pictures = "${annex}/Pictures";
- music = "${annex}/Music";
- documents = "${annex}/Documents";
- };
- };
-
- gtk = {
- theme = {
- package = pkgs.flat-remix-gtk;
- name = "Flat-Remix-GTK-Blue-Darkest";
- };
- iconTheme = {
- package = pkgs.flat-remix-icon-theme;
- name = "Flat-Remix-Blue-Dark";
- };
- };
-}
diff --git a/share/home/offpunk.nix b/share/home/offpunk.nix
deleted file mode 100644
index 7dbd03c..0000000
--- a/share/home/offpunk.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ pkgs, ... }: {
- home.packages = [ pkgs.offpunk ];
- systemd.user = {
- timers.offpunk-sync = {
- Unit = {
- Description = "Offpunk sync command timer";
- };
- Timer = {
- Persistent = true;
- OnCalendar = "weekly";
- };
- };
- services.offpunk-sync = {
- Unit = {
- Description = "Offpunk sync command timer";
- };
- Service = {
- Type = "oneshot";
- KillMode = "process";
- ExecStart = "${pkgs.offpunk}/bin/offpunk --sync";
- };
- };
- };
-}
diff --git a/share/home/waybar.nix b/share/home/waybar.nix
deleted file mode 100644
index 8830e78..0000000
--- a/share/home/waybar.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ lib, ... }: {
- programs.waybar = {
- enable = true;
- systemd = {
- enable = true;
- target = "hyprland-session.target";
- };
- settings.mainBar = {
- layer = "top";
- position = "right";
- width = 40;
- reload_style_on_change = true;
-
- modules-left = [ "hyprland/workspaces" ];
- modules-right = [
- "battery"
- "network"
- "cpu"
- "memory"
- "temperature"
- "backlight"
- "clock"
- "tray"
- ];
-
- clock = {
- format = "{:%H:%m\n%b}";
- };
-
- battery = {
- format = lib.concatStringsSep "\n" [
- "{icon} {capacity}%"
- "󱐋 {power:4.1f} W"
- ];
- interval = 2;
- format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
- };
-
- keyboard-state = {
- numlock = true;
- capslock = true;
- format = "{name} {icon}";
- format-icons = {
- locked = "";
- unlocked = "";
- };
- };
- }; # end of settings.mainBar
- style = builtins.readFile ./waybar.css;
- };
-}
diff --git a/share/home/zsh.nix b/share/home/zsh.nix
deleted file mode 100644
index d7950eb..0000000
--- a/share/home/zsh.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ ... }: {
- imports = [ ./shellenv.nix ];
-
- programs.zsh = {
- enable = true;
- enableAutosuggestions = true;
- enableCompletion = true;
- syntaxHighlighting.enable = true;
- enableVteIntegration = true;
- autocd = true;
- dotDir = ".config/zsh";
- };
-
- programs.starship.enableZshIntegration = true;
- programs.atuin.enableZshIntegration = true;
-}