diff --git a/flake.nix b/flake.nix
index 1323bd9..4fe4489 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,6 +5,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
+ hyprland.url = "git+https://github.com/hyprvm/Hyperland?submodules=1";
};
outputs = inputs: let
diff --git a/hosts/Parzival-Mobile/default.nix b/hosts/Parzival-Mobile/default.nix
index 62a27d8..496e492 100644
--- a/hosts/Parzival-Mobile/default.nix
+++ b/hosts/Parzival-Mobile/default.nix
@@ -1,6 +1,4 @@
-{ pkgs,
- ...
-}:{
+{config, pkgs, ...}:{
imports = [
./hardware-configuration.nix
../../modules
@@ -11,4 +9,8 @@
pkgs.vim
pkgs.wget
];
+
+ config = {
+ hypr.enable = true;
+ };
}
diff --git a/modules/core.nix b/modules/core.nix
index 20e39ed..8681d62 100644
--- a/modules/core.nix
+++ b/modules/core.nix
@@ -27,7 +27,7 @@
config = {
system.stateVersion = "24.05";
time.timeZone = "America/New_York";
-
+
users = {
enable = lib.mkDefault true;
crow.enable = lib.mkDefault true;
@@ -42,6 +42,8 @@
mudding.enable = lib.mkDefault false;
gaming.enable = lib.mkDefault false;
};
+
+ hypr.enable = lib.mkDefault false;
};
}
diff --git a/modules/home/crow.nix b/modules/home/crow.nix
deleted file mode 100644
index 574b878..0000000
--- a/modules/home/crow.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{pkgs, ...}: let
- username = "crow";
- homeDirectory = "/home/${username}";
- configHome = "${homeDirectory}/.config";
-in {
- home = {
- inherit username homeDirectory;
- stateVersion = system.stateVersion;
- };
-
- xdg = {
- inherit configHome;
- enable = true;
- }
-
- programs = {};
-}
diff --git a/modules/home/crow/home.nix b/modules/home/crow/home.nix
new file mode 100644
index 0000000..b984d4b
--- /dev/null
+++ b/modules/home/crow/home.nix
@@ -0,0 +1,234 @@
+{inputs, pkgs, ...}: let
+ username = "crow";
+ homeDirectory = "/home/${username}";
+ configHome = "${homeDirectory}/.config";
+in {
+ home = {
+ inherit username homeDirectory;
+ stateVersion = system.stateVersion;
+ };
+
+ xdg = {
+ inherit configHome;
+ enable = true;
+ };
+
+ programs = {
+ waybar = {
+ enable = true;
+ settings = {
+ layer = "top";
+ position = "top";
+ height = 30;
+ spacing = 4;
+ mode = "dock";
+ margin = 10;
+ modules-left = [ "hyprland/workspaces" ];
+ modules-center = [ "clock" ];
+ modules-right = [ "network", "battery", "backlight", "pulseaudio", "tray" ];
+ tray = {
+ spacing = 10;
+ };
+ "hyprland/workspaces" = {
+ format = "{icon}";
+ format-icons = {
+ active = "";
+ default = "";
+ };
+ };
+ clock = {
+ tooltip-format = "{:%Y %B}\n{calendar}";
+ format-alt = "{:%m-%d-%Y}";
+ };
+ cpu = {
+ format = "{usage}% ";
+ tooltip = false
+ };
+ temperature = {
+ critical-threshold = 80;
+ format = "{temperatureC}°C {icon}";
+ format-icons = ["", "", ""];
+ };
+ backlight = {
+ format = "{percent}% {icon}";
+ format-icons = ["", "", ""];
+ };
+ battery = {
+ states = {
+ warning = 30;
+ critical = 15;
+ };
+ format = "{capacity}% {icon}";
+ format-full = "{capacity}% {icon}";
+ format-charging = "{capacity}% ";
+ format-plugged = "{capacity}% ";
+ format-alt = "{time} {icon}";
+ format-icons = ["", "", "", "", ""];
+ };
+ network = {
+ format-wifi = "{essid} ({signalStrength}%) ";
+ format-ethernet = "{ipaddr}/{cidr} ";
+ tooltip-format = "{ifname} via {gwaddr} ";
+ format-linked = "{ifname} (No IP) ";
+ format-disconnected = "Disconnected ⚠";
+ format-alt = "{ifname}: {ipaddr}/{cidr}";
+ };
+ pulseaudio = {
+ "format" = "{volume}% {icon} {format_source}";
+ "format-bluetooth" = "{volume}% {icon} {format_source}";
+ "format-bluetooth-muted" = " {icon} {format_source}";
+ "format-muted" = " {format_source}";
+ "format-source" = "{volume}% ";
+ "format-source-muted" = "";
+ "format-icons" = {
+ "headphone" = "";
+ "hands-free" = "";
+ "headset" = "";
+ "phone" = "";
+ "portable" = "";
+ "car" = "";
+ "default" = ["", "", ""];
+ };
+ "on-click" = "pavucontrol";
+ };
+ };
+ style = ''
+ @define-color fg #AAB775;
+ @define-color bg #060617;
+ @define-color disabled #a5a5a5;
+ @define-color alert #f53c3c;
+ @define-color activegreen #8fb666;
+
+ * {
+ min-height: 0;
+ font-family: "JetBrainsMono Nerd Font", "Hack Nerd Font", FontAwesome, Roboto,
+ Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ }
+
+ window#waybar {
+ color: @fg;
+ background: @bg;
+ transition-property: background-color;
+ border-radius: 25px;
+ transition-duration: 0.5s;
+
+ }
+
+ window#waybar.empty {
+ opacity: 0.3;
+ }
+
+ button {
+ /* Use box-shadow instead of border so the text isn't offset */
+ box-shadow: inset 0 -3px transparent;
+ /* Avoid rounded borders under each button name */
+ border: none;
+ border-radius: 0;
+ }
+
+ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
+ button:hover {
+ background: inherit;
+ box-shadow: inset 0 -3px transparent;
+ }
+
+ #workspaces button {
+ color: @fg;
+ /* padding : 0px 5px; */
+ }
+
+ #workspaces button.urgent {
+ color: @alert;
+ }
+ #workspaces button.empty {
+ color: @disabled;
+ }
+
+ #workspaces button.active {
+ color: #DCAA9B;
+ }
+
+ /* If workspaces is the leftmost module, omit left margin */
+ .modules-left > widget:first-child > #workspaces {
+ margin-left: 0;
+ }
+
+ /* If workspaces is the rightmost module, omit right margin */
+ .modules-right > widget:last-child > #workspaces {
+ margin-right: 0;
+ }
+
+ #clock,
+ #battery,
+ #cpu,
+ #memory,
+ #disk,
+ #temperature,
+ #language,
+ #backlight,
+ #backlight-slider,
+ #network,
+ #pulseaudio,
+ #wireplumber,
+ #custom-media,
+ #taskbar,
+ #tray,
+ #tray menu,
+ #tray > .needs-attention,
+ #tray > .passive,
+ #tray > .active,
+ #mode,
+ #idle_inhibitor,
+ #scratchpad,
+ #custom-power,
+ #window,
+ #mpd {
+ padding: 0px 5px;
+ padding-right: 10px;
+ margin: 3px 3px;
+ color: @fg;
+ }
+
+ #custom-power {
+ color: @fg;
+ padding-left: 10px;
+ }
+
+ #custom-separator {
+ color: @disabled;
+ }
+
+ #network.disconnected,
+ #pulseaudio.muted,
+ #wireplumber.muted {
+ color: @alert;
+ }
+
+ #battery.charging,
+ #battery.plugged {
+ color: #26a65b;
+ }
+
+ label:focus {
+ background-color: #333333;
+ }
+
+ #battery.critical:not(.charging) {
+ background-color: @alert;
+ color: @fg;
+ animation-name: blink;
+ animation-duration: 0.5s;
+ animation-timing-function: linear;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+ }
+ '';
+ };
+ git = {
+ enable = true;
+ userEmail = "contact@wanderingcrow.net";
+ userName = "TheWanderingCrow";
+ };
+ };
+}
diff --git a/modules/home/default.nix b/modules/home/default.nix
index 549d5c8..b657a71 100644
--- a/modules/home/default.nix
+++ b/modules/home/default.nix
@@ -2,7 +2,7 @@
imports = [
(
if config.users.crow.home.enable then
- ./crow.nix
+ ./crow/home.nix
);
# ++ ( to add more, just move the ;
];
diff --git a/modules/hypr/default.nix b/modules/hypr/default.nix
new file mode 100644
index 0000000..e5ec65e
--- /dev/null
+++ b/modules/hypr/default.nix
@@ -0,0 +1,18 @@
+{ inputs, pkgs, lib, config, ...}: {
+ imports = [./waybar.nix];
+
+ options.hypr.enable = lib.mkEnableOption "enables hyprland";
+
+ config = lib.mkIf config.hypr.enable {
+ programs.hyprland = {
+ enable = true;
+ package = inputs.hyprland.packages.${pkgs.system}.hyprland;
+ portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
+ };
+
+ environment.sessionVariables = {
+ WLR_NO_HARDWARE_CURSORS = "1";
+ NIXOS_OZONE_WL = "1";
+ };
+ };
+}