fix some hyprland stuff

This commit is contained in:
mjallen18
2025-07-23 11:57:44 -05:00
parent 1bc7856d93
commit fa2d95e12f
48 changed files with 307 additions and 134 deletions

View File

@@ -202,6 +202,15 @@
nixos-raspberrypi.lib.inject-overlays nixos-raspberrypi.lib.inject-overlays
]; ];
}; };
# ######################################################
# Mac #
# ######################################################
macbook-pro-nixos = {
modules = with inputs; [
nixos-apple-silicon.nixosModules.default
];
};
}; };
overlays = with inputs; [ nix-vscode-extensions.overlays.default ]; overlays = with inputs; [ nix-vscode-extensions.overlays.default ];

View File

@@ -1,28 +0,0 @@
{ pkgs, ... }:
let
shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3";
update-flake = "nix flake update mac-nixpkgs mac-nixos-apple-silicon mac-home-manager mac-impermanence mac-sops-nix --flake /etc/nixos";
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas";
};
in
{
home.username = "matt";
home.homeDirectory = "/home/matt";
home.stateVersion = "23.11";
home.packages = with pkgs; [
iw
iwd
orca-slicer
vscodium
];
programs = {
password-store.enable = true;
zsh.shellAliases = shellAliases;
};
}

View File

@@ -0,0 +1,134 @@
{ pkgs, lib, ... }:
let
theme = import (lib.snowfall.fs.get-file "modules/home/desktop/theme/nord.nix");
shellAliases = {
update-boot = "sudo nixos-rebuild boot --max-jobs 10 --build-host admin@10.0.1.3";
update-switch = "sudo nixos-rebuild switch --max-jobs 10 --build-host admin@10.0.1.3";
update-flake = "nix flake update mac-nixpkgs mac-nixos-apple-silicon mac-home-manager mac-impermanence mac-sops-nix --flake /etc/nixos";
update-nas = "nixos-rebuild switch --use-remote-sudo --target-host admin@10.0.1.3 --build-host admin@10.0.1.3 --flake ~/nix-config#jallen-nas";
};
fontName = "JetBrainsMono NFM";
fontPackage = pkgs.nerd-fonts.jetbrains-mono;
# Displays
display = {
input = "eDP-1";
resolution = "3456x2234";
refreshRate = "60.00000";
};
in
{
home.username = "matt";
home.homeDirectory = "/home/matt";
home.stateVersion = "23.11";
mjallen = {
desktop.hyprland = {
enable = true;
primaryDisplay = "eDP-1";
wallpaper = [
"${display.input}, /run/wallpaper.jpg"
];
monitor = [
"${display.input},${display.resolution}@${display.refreshRate},0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
];
workspace = [
"name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)"
];
windowRule = [
"size 2160 3356, tag:horizonrdp"
];
defaultApps = {
browser = pkgs.firefox;
};
};
programs = {
btop.enable = true;
kitty = {
enable = true;
font = {
name = fontName;
package = fontPackage;
};
};
mako = {
enable = true;
fontName = fontName;
};
nwg-dock.enable = true;
nwg-drawer.enable = true;
nwg-panel = {
enable = true;
defaultApps = {
browser = pkgs.firefox;
};
};
waybar = {
enable = true;
layer = "bottom";
modules-right = [
"tray"
"temperature"
"temperature#gpu"
"keyboard-state#capslock"
"keyboard-state#numlock"
"wireplumber#sink"
"bluetooth"
"network"
"idle_inhibitor"
"clock"
"battery"
"custom/weather"
];
extraModules = {
"custom/lights" = {
tooltip = false;
exec = "waybar-hass --get_light light.living_room_lights";
interval = "once";
format = "{text}";#"󱉓";
on-click = "waybar-hass --toggle_light light.living_room_lights";
return-type = "json";
};
};
extraModulesStyle = ''
#custom-lights {
color: ${theme.frost.nord8};
background-color: ${theme.polarNight.nord0};
${theme.defaultOpacity}
${theme.borderLeft}
}
#custom-lights:hover {
background: ${theme.polarNight.nord3};
}
'';
};
wlogout.enable = true;
wofi.enable = true;
};
};
home.packages = with pkgs; [
iw
iwd
orca-slicer
vscodium
];
programs = {
password-store.enable = true;
zsh.shellAliases = shellAliases;
};
}

View File

@@ -145,7 +145,7 @@ in
"$mod, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight set 10%-" "$mod, XF86MonBrightnessDown, exec, brightnessctl -d kbd_backlight set 10%-"
]; ];
monitor = cfg.monitor or [ ]; monitor = cfg.monitor;
monitorv2 = cfg.monitorv2 or { }; monitorv2 = cfg.monitorv2 or { };
render = { render = {

View File

@@ -20,7 +20,7 @@ with lib;
default = "3840x2160"; default = "3840x2160";
}; };
refreshRate = mkOptions { refreshRate = mkOption {
type = types.str; type = types.str;
default = "240.00000"; default = "240.00000";
}; };
@@ -37,7 +37,7 @@ with lib;
default = "3840x2160"; default = "3840x2160";
}; };
refreshRate = mkOptions { refreshRate = mkOption {
type = types.str; type = types.str;
default = "240.00000"; default = "240.00000";
}; };
@@ -99,7 +99,7 @@ with lib;
terminal = mkOption { type = types.package; default = pkgs.kitty; }; terminal = mkOption { type = types.package; default = pkgs.kitty; };
office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; }; office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; };
video = mkOption { type = types.package; default = pkgs.vlc; }; video = mkOption { type = types.package; default = pkgs.vlc; };
imageViewer = mkOption { type = types.package; default = pkgs.gnome-photos; }; imageViewer = mkOption { type = types.package; default = pkgs.nomacs; };
}; };
}; };
description = "Default applications used across the system."; description = "Default applications used across the system.";

View File

@@ -37,6 +37,7 @@ in
nautilus nautilus
networkmanagerapplet networkmanagerapplet
nm-tray nm-tray
nomacs
nwg-look nwg-look
overskride overskride
pamixer pamixer

View File

@@ -7,7 +7,7 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.hypridle = { services.hypridle = {
enable = true; enable = false;
settings = { settings = {
general = { general = {
before_sleep_cmd = "loginctl lock-session"; # lock before suspend. before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
@@ -38,4 +38,4 @@ in
}; };
}; };
}; };
} }

View File

@@ -10,7 +10,7 @@ in
enable = true; enable = true;
settings = { settings = {
preload = [ "/run/wallpaper.jpg" ]; preload = [ "/run/wallpaper.jpg" ];
wallpaper = "/run/wallpaper.jpg"; wallpaper = ",/run/wallpaper.jpg";
splash = false; splash = false;
}; };
}; };

View File

@@ -103,5 +103,9 @@
services = { services = {
nextcloud-client.enable = lib.mkDefault true; nextcloud-client.enable = lib.mkDefault true;
pass-secret-service.enable = lib.mkDefault true; pass-secret-service.enable = lib.mkDefault true;
kdeconnect = {
enable = true;
indicator = true;
};
}; };
} }

View File

@@ -371,8 +371,8 @@ in
${defaultOpacity} ${defaultOpacity}
${defaultBorderRadius} ${defaultBorderRadius}
${defaultCenterOptions} ${defaultCenterOptions}
margin-left: 4rem margin-left: 4rem;
margin-right: 4rem margin-right: 4rem;
} }
/* make window module transparent when no windows present */ /* make window module transparent when no windows present */

View File

@@ -109,7 +109,7 @@ in
]; ];
script = '' script = ''
bing-wallpaper bing-wallpaper
${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,/run/wallpaper ${pkgs.hyprland}/bin/hyprctl hyprpaper reload ,/run/wallpaper.jpg
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";

View File

@@ -101,7 +101,7 @@ in
terminal = pkgs.kitty; terminal = pkgs.kitty;
office = pkgs.onlyoffice-bin_latest; office = pkgs.onlyoffice-bin_latest;
video = pkgs.vlc; video = pkgs.vlc;
imageViewer = pkgs.gnome-photos; imageViewer = pkgs.nomacs;
}; };
theme = nord; theme = nord;

View File

@@ -40,81 +40,90 @@ in
networking = { networking = {
hostName = lib.mkForce cfg.hostName; hostName = lib.mkForce cfg.hostName;
# Enable Network Manager # Enable Network Manager
networkmanager = { networkmanager = {
enable = true; enable = true;
wifi.powersave = lib.mkDefault false; wifi.powersave = lib.mkDefault false;
settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt"; settings.connectivity.uri = lib.mkDefault "http://nmcheck.gnome.org/check_network_status.txt";
ensureProfiles = { ensureProfiles = {
environmentFiles = [ environmentFiles = [
config.sops.secrets.wifi.path config.sops.secrets.wifi.path
]; ];
profiles = { profiles = {
"Joey's Jungle 6G" = { "Joey's Jungle 6G" = {
connection = { connection = {
id = "Joey's Jungle 6G"; id = "Joey's Jungle 6G";
type = "wifi"; type = "wifi";
};
ipv4 = if (cfg.ipv4.method == "auto")
then
{
method = "auto";
}
else
{
address1 = cfg.ipv4.address;
dns = cfg.ipv4.dns;
gateway = cfg.ipv4.gateway;
method = "manual";
};
ipv6 = {
addr-gen-mode = "stable-privacy";
method = "auto";
};
wifi = {
mode = "infrastructure";
ssid = "Joey's Jungle 6G";
};
wifi-security = {
key-mgmt = "sae";
psk = "$PSK";
};
}; };
ipv4 = if (cfg.ipv4.method == "auto")
then
{
method = "auto";
}
else
{
address1 = cfg.ipv4.address;
dns = cfg.ipv4.dns;
gateway = cfg.ipv4.gateway;
method = "manual";
};
ipv6 = {
addr-gen-mode = "stable-privacy";
method = "auto";
};
wifi = {
mode = "infrastructure";
ssid = "Joey's Jungle 6G";
};
wifi-security = {
key-mgmt = "sae";
psk = "$PSK";
};
};
"Joey's Jungle 5G" = { "Joey's Jungle 5G" = {
connection = { connection = {
id = "Joey's Jungle 5G"; id = "Joey's Jungle 5G";
type = "wifi"; type = "wifi";
}; };
ipv4 = if (cfg.ipv4.method == "auto") ipv4 = if (cfg.ipv4.method == "auto")
then then
{ {
method = "auto"; method = "auto";
} }
else else
{ {
address1 = cfg.ipv4.address; address1 = cfg.ipv4.address;
dns = cfg.ipv4.dns; dns = cfg.ipv4.dns;
gateway = cfg.ipv4.gateway; gateway = cfg.ipv4.gateway;
method = "manual"; method = "manual";
}; };
ipv6 = { ipv6 = {
addr-gen-mode = "stable-privacy"; addr-gen-mode = "stable-privacy";
method = "auto"; method = "auto";
}; };
wifi = { wifi = {
mode = "infrastructure"; mode = "infrastructure";
ssid = "Joey's Jungle 5G"; ssid = "Joey's Jungle 5G";
}; };
wifi-security = { wifi-security = {
key-mgmt = "sae"; key-mgmt = "sae";
psk = "$PSK"; psk = "$PSK";
};
}; };
}; };
}; };
}; };
}; firewall = {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = config.networking.firewall.allowedTCPPortRanges;
};
}; };
}; };
} }

View File

@@ -4,7 +4,7 @@
boot = { boot = {
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = lib.mkForce true;
configurationLimit = 15; configurationLimit = 15;
consoleMode = lib.mkDefault "max"; consoleMode = lib.mkDefault "max";
}; };

View File

@@ -2,9 +2,15 @@
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ pkgs, lib, ... }: { pkgs, lib, namespace, ... }:
let let
plasma = false; plasma = false;
# Displays
display = {
input = "eDP-1";
resolution = "3456x2234";
refreshRate = "60.00000";
};
in in
{ {
imports = [ imports = [
@@ -21,9 +27,43 @@ in
setupAsahiSound = true; setupAsahiSound = true;
}; };
hardware.graphics.enable32Bit = lib.mkForce false; ${namespace} = {
desktop = {
hyprland = {
enable = true;
primaryDisplay = "eDP-1";
display1 = {
input = "eDP-1";
resolution = "3456x2234";
refreshRate = "60.00000";
};
wallpaper = [
"${display.input}, /run/wallpaper.jpg"
];
monitor = [
"${display.input},${display.resolution}@${display.refreshRate},0x0,1.25,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98"
];
workspace = [
"name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)"
"name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
"name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)"
];
windowRule = [
"size 2160 3356, tag:horizonrdp"
];
};
};
network = {
hostName = "macbook-pro-nixos";
};
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnsupportedSystem = true; nixpkgs.config.allowUnsupportedSystem = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
@@ -59,12 +99,20 @@ in
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
aria
asahi-bless
asahi-btsync
asahi-nvram
asahi-wifisync
cabextract
micro micro
unzip
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget wget
]; ];
environment.sessionVariables = { environment.sessionVariables = {
DBX_CONTAINER_MANAGER = "podman"; DBX_CONTAINER_MANAGER = "podman";
GSK_RENDERER = "opengl";
}; };
} }

View File

@@ -60,12 +60,12 @@
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
swapDevices = [ # swapDevices = [
{ # {
device = "/tmp/swapfile"; # device = "/tmp/swapfile";
randomEncryption.enable = true; # randomEncryption.enable = true;
} # }
]; # ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -8,19 +8,18 @@
charger = { charger = {
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor # preferred governor
governor = "performance"; governor = "schedutil";
# minimum cpu frequency (in kHz) # minimum cpu frequency (in kHz)
# example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000
# Available: 912 MHz, 1284 MHz, 1752 MHz, 2004 MHz, 2256 MHz, 2424 MHz
# 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000
# see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
# to use this feature, uncomment the following line and set the value accordingly # to use this feature, uncomment the following line and set the value accordingly
# scaling_min_freq = 800000 scaling_min_freq = 912000;
scaling_max_freq = 2424000;
# maximum cpu frequency (in kHz) # scaling_min_freq = 702000;
# example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 # scaling_max_freq = 1968000;
# see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
# to use this feature, uncomment the following line and set the value accordingly
# scaling_max_freq = 1000000
# turbo boost setting. possible values: always, auto, never # turbo boost setting. possible values: always, auto, never
turbo = "auto"; turbo = "auto";
@@ -29,19 +28,16 @@
battery = { battery = {
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor # preferred governor
governor = "schedutil"; governor = "powersave";
# minimum cpu frequency (in kHz) # minimum cpu frequency (in kHz)
# example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000
# Available: 912 MHz, 1284 MHz, 1752 MHz, 2004 MHz, 2256 MHz, 2424 MHz
# 702000 948000 1188000 1452000 1704000 1968000 2208000 2400000 2568000 2724000 2868000 3000000 3132000 3264000
# see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
# to use this feature, uncomment the following line and set the value accordingly # to use this feature, uncomment the following line and set the value accordingly
# scaling_min_freq = 800000 scaling_min_freq = 912000;
scaling_max_freq = 2004000;
# maximum cpu frequency (in kHz)
# see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
# example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000
# to use this feature, uncomment the following line and set the value accordingly
# scaling_max_freq = 1000000
# turbo boost setting (always, auto, or never) # turbo boost setting (always, auto, or never)
turbo = "auto"; turbo = "auto";
@@ -81,7 +77,7 @@
gvfs.enable = true; gvfs.enable = true;
keyd = { keyd = {
enable = true; enable = false;
keyboards = { keyboards = {
default = { default = {
ids = [ "*" ]; ids = [ "*" ];