Initial commit
- Create a basic bootable system with Hyprland, a browser and some
basic utilities
Change-Id: I4178e1185de319c45c6a4f2711fe035f50777e08
diff --git a/modules/home/anyrun/default.nix b/modules/home/anyrun/default.nix
new file mode 100644
index 0000000..2edf952
--- /dev/null
+++ b/modules/home/anyrun/default.nix
@@ -0,0 +1,15 @@
+{ inputs, pkgs, system, ...}: {
+ programs.anyrun = {
+ enable = true;
+ config = {
+ plugins = [
+ inputs.anyrun.packages.${system}.applications
+ inputs.anyrun.packages.${system}.rink
+ inputs.anyrun.packages.${system}.shell
+ inputs.anyrun.packages.${system}.translate
+ inputs.anyrun.packages.${system}.kidex
+ inputs.anyrun.packages.${system}.symbols
+ ];
+ };
+ };
+}
\ No newline at end of file
diff --git a/modules/home/eww/config/eww.scss b/modules/home/eww/config/eww.scss
new file mode 100644
index 0000000..eae0b3c
--- /dev/null
+++ b/modules/home/eww/config/eww.scss
@@ -0,0 +1,61 @@
+* {
+ all: unset; //Unsets everything so you can style everything from scratch
+}
+
+.bar {
+ background-color: #ccd0da;
+ color: #4c4f69;
+ border-radius: 10px;
+ padding: 10px 15px;
+ margin: 0 20px;
+ margin-top: 20px;
+}
+
+// Styles on classes (see eww.yuck for more information)
+
+.sidestuff slider {
+ all: unset;
+ color: #ffd5cd;
+}
+
+.metric scale trough highlight {
+ all: unset;
+ background-color: #D35D6E;
+ color: #000000;
+ border-radius: 10px;
+}
+
+.metric scale trough {
+ all: unset;
+ background-color: #4e4e4e;
+ border-radius: 50px;
+ min-height: 3px;
+ min-width: 50px;
+ margin-left: 10px;
+ margin-right: 20px;
+}
+
+.metric scale trough highlight {
+ all: unset;
+ background-color: #D35D6E;
+ color: #000000;
+ border-radius: 10px;
+}
+
+.metric scale trough {
+ all: unset;
+ background-color: #4e4e4e;
+ border-radius: 50px;
+ min-height: 3px;
+ min-width: 50px;
+ margin-left: 10px;
+ margin-right: 20px;
+}
+
+.label-ram {
+ font-size: large;
+}
+
+.workspaces button:hover {
+ color: #D35D6E;
+}
\ No newline at end of file
diff --git a/modules/home/eww/config/eww.yuck b/modules/home/eww/config/eww.yuck
new file mode 100644
index 0000000..598646e
--- /dev/null
+++ b/modules/home/eww/config/eww.yuck
@@ -0,0 +1,98 @@
+(defwidget bar []
+ (centerbox :orientation "h"
+ :class "bar"
+ (workspaces)
+ (music)
+ (sidestuff)))
+
+(defwidget sidestuff []
+ (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
+ (metric :label "🔊"
+ :value volume
+ :onchange "amixer -D pulse sset Master {}%")
+ (metric :label "ï¡š"
+ :value {EWW_RAM.used_mem_perc}
+ :onchange "")
+ (metric :label "💾"
+ :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
+ :onchange "")
+ time))
+
+(defwidget workspaces []
+ (box :class "workspaces"
+ :orientation "h"
+ :space-evenly true
+ :halign "start"
+ :spacing 10
+ (button :onclick "wmctrl -s 0" 1)
+ (button :onclick "wmctrl -s 1" 2)
+ (button :onclick "wmctrl -s 2" 3)
+ (button :onclick "wmctrl -s 3" 4)
+ (button :onclick "wmctrl -s 4" 5)
+ (button :onclick "wmctrl -s 5" 6)
+ (button :onclick "wmctrl -s 6" 7)
+ (button :onclick "wmctrl -s 7" 8)
+ (button :onclick "wmctrl -s 8" 9)))
+
+(defwidget music []
+ (box :class "music"
+ :orientation "h"
+ :space-evenly false
+ :halign "center"
+ {music != "" ? "🎵${music}" : ""}))
+
+
+(defwidget metric [label value onchange]
+ (box :orientation "h"
+ :class "metric"
+ :space-evenly false
+ (box :class "label" label)
+ (scale :min 0
+ :max 101
+ :active {onchange != ""}
+ :value value
+ :onchange onchange)))
+
+
+
+(deflisten music :initial ""
+"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
+
+(defpoll volume :interval "1s"
+"scripts/getvol")
+
+(defpoll time :interval "10s"
+"date '+%H:%M %b %d, %Y'")
+
+(defwindow bar-eDP1
+ :monitor 0
+ :windowtype "dock"
+ :geometry (geometry :x "0%"
+ :y "0%"
+ :width "100%"
+ :height "10px"
+ :anchor "top center")
+ :exclusive true
+ (bar))
+
+(defwindow bar-HDMI-A-1
+ :monitor 0
+ :windowtype "dock"
+ :geometry (geometry :x "0%"
+ :y "0%"
+ :width "100%"
+ :height "10px"
+ :anchor "top center")
+ :exclusive true
+ (bar))
+
+(defwindow bar-DP7
+ :monitor 0
+ :windowtype "dock"
+ :geometry (geometry :x "0%"
+ :y "0%"
+ :width "100%"
+ :height "10px"
+ :anchor "top center")
+ :exclusive true
+ (bar))
\ No newline at end of file
diff --git a/modules/home/eww/default.nix b/modules/home/eww/default.nix
new file mode 100644
index 0000000..2159bfe
--- /dev/null
+++ b/modules/home/eww/default.nix
@@ -0,0 +1,7 @@
+{ inputs, pkgs, ... }: {
+ programs.eww = {
+ enable = true;
+ package = pkgs.eww-wayland;
+ configDir = ./config;
+ };
+}
\ No newline at end of file
diff --git a/modules/home/gestures/default.nix b/modules/home/gestures/default.nix
new file mode 100644
index 0000000..6abbbe4
--- /dev/null
+++ b/modules/home/gestures/default.nix
@@ -0,0 +1,11 @@
+{ lib, config, ... }: {
+ options.minion.touchpadGestures.enable = lib.mkEnableOption "Enable touchpad gestures";
+
+ config = lib.mkIf config.minion.touchpadGestures.enable {
+ services.fusuma.enable = true;
+
+ systemd.user.startServices = "sd-switch";
+
+ systemd.user.services.fusuma.Unit.X-Restart-Triggers = [ config.xdg.configFile."fusuma/config.yaml".source ];
+ };
+}
\ No newline at end of file
diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix
new file mode 100644
index 0000000..a2f8b88
--- /dev/null
+++ b/modules/home/hyprland/default.nix
@@ -0,0 +1,93 @@
+{ pkgs, config, inputs, system, ... }: let
+ lock = "${pkgs.waylock}/bin/waylock";
+in {
+
+ # TODO: Eww, SwayNC, hyprland-per-window-layout, waylock, hy3, anyrun, hypr-empty
+
+ home.packages = [ pkgs.hyprpicker ];
+
+ minion.touchpadGestures.enable = true;
+
+ services.fusuma.settings.swipe = let
+ hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
+ jq = "${pkgs.jq}/bin/jq";
+ awk = "${pkgs.gawk}/bin/awk";
+ in {
+ "3".up.command = "${hyprctl} dispatch fullscreen 0";
+ "3".down.command = "${hyprctl} dispatch fullscreen 0";
+ "4".down.command = lock;
+ "3".left.command = "${hyprctl} dispatch workspace $(${hyprctl} activeworkspace -j | ${jq} .id | ${awk} '{print $1+1}')";
+ "3".right.command = "${hyprctl} dispatch workspace $(${hyprctl} activeworkspace -j | ${jq} .id | ${awk} '{print $1-1}')";
+ };
+
+ wayland.windowManager.hyprland = {
+ enable = true;
+
+ xwayland.enable = true;
+ systemd.enable = true;
+
+ settings = let
+ mod = "SUPER";
+ terminal = "${pkgs.kitty}/bin/kitty";
+ menu = "${inputs.anyrun.packages.${system}.anyrun}/bin/anyrun";
+ in {
+ misc = {
+ disable_hyprland_logo = true;
+ disable_splash_rendering = true;
+ };
+
+ exec-once = "${pkgs.hyprpaper}/bin/hyprpaper";
+
+ monitor = [
+ "eDP-1,preferred,0x0,1"
+ "desc:Dell Inc. DELL P2715Q V7WP95AV914L,preferred,2256x-1956,1,transform,1"
+ "desc:AOC 2460G5 0x00023C3F,preferred,336x-1080,1"
+ ",preferred,auto,1" # https://wiki.hyprland.org/Configuring/Monitors/
+ ];
+
+ input = {
+ kb_layout = "us";
+ kb_variant = "dvorak";
+ natural_scroll = true;
+
+ touchpad = {
+ natural_scroll = true;
+ };
+ };
+
+ xwayland = {
+ force_zero_scaling = true;
+ };
+
+ bind = [
+ "${mod}, Q, killactive"
+ "${mod}, SPACE, togglefloating"
+ "${mod}, RETURN, exec, ${terminal}"
+ "${mod}, down, movefocus, d"
+ "${mod}, up, movefocus, u"
+ "${mod}, right, movefocus, r"
+ "${mod}, left, movefocus, l"
+ "${mod}, L, exec, ${lock}"
+ "${mod}, D, exec, ${menu}"
+ ] ++ (
+ builtins.concatLists (builtins.genList (
+ x: let
+ ws = let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in [
+ "${mod}, ${ws}, workspace, ${toString (x + 1)}"
+ "${mod} SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
+ ]
+ )
+ 10)
+ );
+
+ bindm = [
+ "${mod}, mouse:272, movewindow"
+ "${mod}, mouse:273, resizewindow"
+ ];
+ };
+ };
+}
\ No newline at end of file
diff --git a/modules/home/hyprpaper/default.nix b/modules/home/hyprpaper/default.nix
new file mode 100644
index 0000000..c378a21
--- /dev/null
+++ b/modules/home/hyprpaper/default.nix
@@ -0,0 +1,9 @@
+{ ... }: {
+ config.xdg.configFile."hypr/hyprpaper.conf".source = builtins.toFile "hyprpaper.conf" ''
+ preload = ${./wallpaper.png}
+
+ wallpaper=,${./wallpaper.png}
+
+ splash = true
+ '';
+}
diff --git a/modules/home/hyprpaper/wallpaper.png b/modules/home/hyprpaper/wallpaper.png
new file mode 100644
index 0000000..409ae38
--- /dev/null
+++ b/modules/home/hyprpaper/wallpaper.png
Binary files differ
diff --git a/modules/home/manual/default.nix b/modules/home/manual/default.nix
new file mode 100644
index 0000000..8709a09
--- /dev/null
+++ b/modules/home/manual/default.nix
@@ -0,0 +1,5 @@
+{ config, lib, pkgs, ... }:
+
+{
+ manual.manpages.enable = true;
+}
diff --git a/modules/home/nix-index/default.nix b/modules/home/nix-index/default.nix
new file mode 100644
index 0000000..1345dc7
--- /dev/null
+++ b/modules/home/nix-index/default.nix
@@ -0,0 +1,7 @@
+{ config, lib, pkgs, ... }:
+
+{
+ xdg.enable = true;
+
+ home.packages = [ pkgs.nix-index ];
+}
diff --git a/modules/home/stateVersion/default.nix b/modules/home/stateVersion/default.nix
new file mode 100644
index 0000000..2e40de6
--- /dev/null
+++ b/modules/home/stateVersion/default.nix
@@ -0,0 +1,5 @@
+{ config, lib, pkgs, ... }:
+
+{
+ home.stateVersion = "24.05";
+}