Compare commits

..

3 Commits

Author SHA1 Message Date
8ea328d20d Revert to Gnome 2026-06-08 01:57:04 +01:00
b918a86ecf merge 2026-06-03 20:40:10 +01:00
6a9bdab235 WIP: nixos on laptop 2026-06-03 20:34:44 +01:00
12 changed files with 841 additions and 265 deletions

View File

@ -52,6 +52,8 @@
optimise.automatic = true; optimise.automatic = true;
}; };
security.apparmor.enable = true;
# unfree # unfree
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -75,6 +77,7 @@
usbutils # lsusb usbutils # lsusb
wget wget
zsh zsh
bc
android-tools android-tools
# media # media
@ -115,6 +118,7 @@
".." = "cd .."; ".." = "cd ..";
"lsa" = "ls -al"; "lsa" = "ls -al";
"yt-dlp" = "yt-dlp --paths ~/Downloads";
}; };
environment.pathsToLink = [ environment.pathsToLink = [

View File

@ -11,12 +11,10 @@
qt.style = "adwaita-dark"; qt.style = "adwaita-dark";
qt.platformTheme = "gnome"; qt.platformTheme = "gnome";
#hyprland
services.displayManager.sddm.enable = true; # use sddm until gnome 50 due to https://github.com/systemd/systemd/issues/39259
services.displayManager.sddm.wayland.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true; hardware.bluetooth.powerOnBoot = true;
services.libinput.enable = true; # hyprland and trackpad
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
@ -26,17 +24,10 @@
openFirewall = true; openFirewall = true;
}; };
services.tailscale.enable = true; services.tailscale.enable = true;
services.printing.drivers = [
pkgs.brlaser
pkgs.brgenml1lpr
pkgs.brgenml1cupswrapper
];
# Enable automatic login for the user. # Enable automatic login for the user.
# services.displayManager.autoLogin.enable = true; # services.displayManager.autoLogin.enable = true;
# services.displayManager.autoLogin.user = "admin"; # services.displayManager.autoLogin.user = "admin";
# services.gnome.gnome-keyring.enable = true;
# security.pam.services.gdm.enableGnomeKeyring = true; #unlock PAM
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false; systemd.services."getty@tty1".enable = false;
@ -46,15 +37,15 @@
# "--config=/mnt/services/emulators/retroarch/retroarch.cfg" # "--config=/mnt/services/emulators/retroarch/retroarch.cfg"
#]; #];
services.ollama = { #services.ollama = {
enable = true; # enable = true;
openFirewall = true; # openFirewall = true;
host = "0.0.0.0"; # host = "0.0.0.0";
# Optional: preload models, see https://ollama.com/library # # Optional: preload models, see https://ollama.com/library
loadModels = [ "gemma4" ]; # loadModels = [ "gemma4" ];
package = pkgs.ollama-cuda; # package = pkgs.ollama-cuda;
}; #};
programs.chromium = { programs.chromium = {
enable = true; enable = true;
@ -67,6 +58,8 @@
hardware.keyboard.qmk.enable = true; hardware.keyboard.qmk.enable = true;
services.logind.settings."Login"."HandlePowerKey" = "suspend";
boot = { boot = {
# Graphical boot # Graphical boot
plymouth.enable = true; plymouth.enable = true;
@ -95,8 +88,6 @@
}) })
]; ];
services.mullvad-vpn.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
brave brave
firefox firefox
@ -105,21 +96,21 @@
orca-slicer orca-slicer
gimp gimp
inkscape inkscape
unstable.protonmail-desktop #unstable.protonmail-desktop
#bitwarden-desktop #bitwarden-desktop
libreoffice libreoffice
freecad freecad
kiwix kiwix
obs-studio obs-studio
obsidian obsidian
unstable.proton-authenticator #unstable.proton-authenticator #x86 only
prismlauncher prismlauncher
unstable.signal-desktop unstable.signal-desktop
tor-browser #tor-browser #x86 only
wireshark wireshark
monero-gui monero-gui
moonlight-qt moonlight-qt
nvtopPackages.nvidia #nvtopPackages.nvidia
dconf-editor dconf-editor
kdePackages.kdenlive kdePackages.kdenlive
element-desktop element-desktop
@ -128,33 +119,37 @@
veracrypt veracrypt
lmms lmms
restic-browser restic-browser
texliveFull
# games # games
#gnome-2048
#gnome-chess
#cataclysm-dda #cataclysm-dda
#endless-sky #endless-sky
#mindustry ##mindustry #x86 only
#openrct2 #openrct2
#openttd #openttd
#osu-lazer-bin ##osu-lazer-bin #x86 only
#runelite ##runelite #x86 only
#unciv #unciv
#webcord #webcord
#wesnoth #wesnoth
#xonotic #xonotic
#zeroad #0ad #zeroad # 0ad
# game utils # game utils
#mangohud mangohud
#umu-launcher #umu-launcher #x86 only
# emu # emu
#ryubing #ryubing
#xemu #xemu
#xenia-canary #xenia-canary #86 only
#retroarch-full #retroarch-full
#rpcs3 #rpcs3
#dolphin-emu #dolphin-emu
#cemu #cemu #x86 only
# backup # backup
keepassxc keepassxc
@ -167,45 +162,43 @@
hinting.autohint = true; hinting.autohint = true;
}; };
services.sunshine = { #services.sunshine = {
enable = true; # enable = true;
autoStart = true; # autoStart = true;
capSysAdmin = true; # capSysAdmin = true;
openFirewall = true; # openFirewall = true;
package = pkgs.sunshine.override { # package = pkgs.sunshine.override {
cudaSupport = true; # cudaSupport = true;
}; # };
}; #};
services.hardware.openrgb.enable = true; #services.hardware.openrgb.enable = true;
services.hardware.openrgb.package = pkgs.openrgb-with-all-plugins; #services.hardware.openrgb.package = pkgs.openrgb-with-all-plugins;
programs = { programs = {
localsend = { localsend = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
}; };
coolercontrol = { #coolercontrol = {
enable = true; # enable = true;
}; #};
gamescope = { gamescope = {
enable = true; enable = true;
#capSysNice = true; #capSysNice = true;
}; };
#steam = { #x86 only
# enable = true;
# gamescopeSession.enable = true;
# remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
# localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
#};
steam = { #gamemode.enable = true;
enable = true;
gamescopeSession.enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
gamemode.enable = true;
}; };
fileSystems."/mnt/media" = { fileSystems."/mnt/media" = {
@ -252,59 +245,58 @@
imports = [ inputs.nix-flatpak.nixosModules.nix-flatpak ]; imports = [ inputs.nix-flatpak.nixosModules.nix-flatpak ];
#services.flatpak = { services.flatpak = {
# enable = true; enable = true;
# update.auto = { update.auto = {
# enable = true; enable = true;
# onCalendar = "weekly"; # Default value onCalendar = "weekly"; # Default value
# }; };
# packages = [ # packages = [
# "com.bitwarden.desktop" # "com.bitwarden.desktop"
# "com.orcaslicer.OrcaSlicer" # "com.orcaslicer.OrcaSlicer"
# "me.proton.Mail" # "me.proton.Mail"
# "org.audacityteam.Audacity" # "org.audacityteam.Audacity"
# "org.blender.Blender" # "org.blender.Blender"
# "org.freecad.FreeCAD" # "org.freecad.FreeCAD"
# "org.gimp.GIMP" # "org.gimp.GIMP"
# "org.inkscape.Inkscape" # "org.inkscape.Inkscape"
# "org.kiwix.desktop" # "org.kiwix.desktop"
# "org.libreoffice.LibreOffice" # "org.libreoffice.LibreOffice"
# "md.obsidian.Obsidian" # "md.obsidian.Obsidian"
# "com.obsproject.Studio" # "com.obsproject.Studio"
# "org.prismlauncher.PrismLauncher" # "org.prismlauncher.PrismLauncher"
# "org.signal.Signal" # "org.wireshark.Wireshark"
# "org.wireshark.Wireshark" # "org.getmonero.Monero"
# "org.getmonero.Monero" # "com.moonlight_stream.Moonlight"
# "com.moonlight_stream.Moonlight" # "org.kde.kdenlive"
# "org.kde.kdenlive" # "im.riot.Riot"
# "im.riot.Riot" # "com.chirpmyradio.chirp"
# "com.chirpmyradio.chirp" # "io.lmms.LMMS"
# "io.lmms.LMMS"
# # games # # games
# "com.github.Anuken.Mindustry" # "com.github.Anuken.Mindustry"
# "com.play0ad.zeroad" # "com.play0ad.zeroad"
# "io.github.endless_sky.endless_sky" # "io.github.endless_sky.endless_sky"
# "io.github.spacingbat3.webcord" # "io.github.spacingbat3.webcord"
# "io.github.yairm210.unciv" # "io.github.yairm210.unciv"
# "io.openrct2.OpenRCT2" # "io.openrct2.OpenRCT2"
# "net.runelite.RuneLite" # "net.runelite.RuneLite"
# "org.cataclysmdda.CataclysmDDA" # "org.cataclysmdda.CataclysmDDA"
# "org.openttd.OpenTTD" # "org.openttd.OpenTTD"
# "org.wesnoth.Wesnoth" # "org.wesnoth.Wesnoth"
# "org.xonotic.Xonotic" # "org.xonotic.Xonotic"
# "sh.ppy.osu" # "sh.ppy.osu"
# #
# # emu # # emu
# "io.github.ryubing.Ryujinx" # "io.github.ryubing.Ryujinx"
# "app.xemu.xemu" # "app.xemu.xemu"
# "net.rpcs3.RPCS3" # "net.rpcs3.RPCS3"
# "org.DolphinEmu.dolphin-emu" # "org.DolphinEmu.dolphin-emu"
# "info.cemu.Cemu" # "info.cemu.Cemu"
# # backup # # backup
# "org.keepassxc.KeePassXC" # "org.keepassxc.KeePassXC"
# #
# ]; # ];
#}; };
} }

View File

@ -1,9 +1,14 @@
{ pkgs, ... }:
{ {
# Enable the GNOME Desktop Environment. # Enable the GNOME Desktop Environment.
services.desktopManager.gnome.enable = false; services.desktopManager.gnome.enable = true;
services.gnome.games.enable = true;
services.displayManager.gdm.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome-console
gnomeExtensions.appindicator gnomeExtensions.appindicator
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell
gnomeExtensions.caffeine gnomeExtensions.caffeine
@ -12,14 +17,13 @@
environment.gnome.excludePackages = with pkgs; [ environment.gnome.excludePackages = with pkgs; [
epiphany # web browser epiphany # web browser
geary # email
decibels # audio player decibels # audio player
gnome-calendar
gnome-music gnome-music
gnome-software gnome-software
gnome-tour gnome-tour
totem # video player gnome-music
xterm gnome-text-editor
showtime
yelp # help yelp # help
]; ];
@ -48,6 +52,7 @@
pkgs.gnomeExtensions.caffeine.extensionUuid pkgs.gnomeExtensions.caffeine.extensionUuid
pkgs.gnomeExtensions.dash-to-dock.extensionUuid pkgs.gnomeExtensions.dash-to-dock.extensionUuid
]; ];
always-show-log-out = true;
}; };
"org/gnome/desktop/calendar" = { "org/gnome/desktop/calendar" = {
show-weekdate = true; show-weekdate = true;
@ -59,13 +64,13 @@
enable-hot-corners = false; enable-hot-corners = false;
font-name = "Noto Sans 11"; font-name = "Noto Sans 11";
gtk-theme = "Adwaita-dark"; gtk-theme = "Adwaita-dark";
monospace-font-name = "Fira Mono 12"; monospace-font-name = "JetBrains Nerd Font Mono 12";
}; };
"org/gnome/desktop/peripherals/mouse" = { "org/gnome/desktop/peripherals/mouse" = {
accel-profile = "flat"; accel-profile = "flat";
}; };
"org/gnome/desktop/wm/preferences" = { "org/gnome/desktop/wm/preferences" = {
button-layout = ":minimize,maximize,close"; button-layout = "close,maximize,minimize:";
}; };
"org/gnome/nautilus/list-view" = { "org/gnome/nautilus/list-view" = {
default-zoom-level = "small"; default-zoom-level = "small";
@ -75,12 +80,16 @@
}; };
"org/gnome/shell/extensions/dash-to-dock" = { "org/gnome/shell/extensions/dash-to-dock" = {
click-action = "minimize-or-previews"; click-action = "minimize-or-previews";
dock-fixed = true; dock-fixed = false;
multi-monitor = true; multi-monitor = true;
show-mounts = false; show-mounts = false;
show-show-apps-button = true; show-show-apps-button = true;
apply-custom-theme = true; apply-custom-theme = true;
}; };
"org/gnome/peripherals.keyboard" = {
delay = "200";
repeat-interval = "30";
};
"org/gnome/shell/keybindings" = { "org/gnome/shell/keybindings" = {
show-screenshot-ui = [ "<Shift><Super>s" ]; show-screenshot-ui = [ "<Shift><Super>s" ];
}; };

View File

@ -5,6 +5,10 @@
programs.hyprland.enable = true; programs.hyprland.enable = true;
security.pam.services.hyprlock = { }; security.pam.services.hyprlock = { };
#display manager
services.displayManager.sddm.enable = true; # use sddm until gnome 50 due to https://github.com/systemd/systemd/issues/39259
services.displayManager.sddm.wayland.enable = true;
#wifi #wifi
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;
@ -25,14 +29,32 @@
tesseract # ocr tesseract # ocr
hyprpicker hyprpicker
satty # image annotation satty # image annotation
brightnessctl
rofimoji
# dev
jq # for scripts
# gnome stuff # gnome stuff
gnome-calculator gnome-calculator
nautilus
gnome-font-viewer
gnome-calendar gnome-calendar
gnome-characters
gnome-clocks
gnome-contacts
gnome-font-viewer
gnome-maps
gnome-weather
loupe # image viewer
nautilus # file managr
papers # doc viewer
simple-scan # document scanner
snapshot # camera
]; ];
programs.seahorse.enable = true; # keyring viewer
services.upower.enable = true; # battery stuff
services.udisks2.enable = true; # udiskie automount USB services.udisks2.enable = true; # udiskie automount USB
} }

BIN
firmware/all_firmware.tar.gz Executable file

Binary file not shown.

Binary file not shown.

37
flake.lock generated
View File

@ -1,5 +1,41 @@
{ {
"nodes": { "nodes": {
"apple-silicon-support": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1779284798,
"narHash": "sha256-D0I5TMDo8n1EvVc0d1dshsA+hzFRNxgx9YyMmkWMy+w=",
"owner": "nix-community",
"repo": "nixos-apple-silicon",
"rev": "f2506ef24a154e2bcc8fb10f2c73579324f9ead0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1761640442,
"narHash": "sha256-AtrEP6Jmdvrqiv4x2xa5mrtaIp3OEe8uBYCDZDS+hu8=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "4a56054d8ffc173222d09dad23adf4ba946c8884",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -181,6 +217,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"apple-silicon-support": "apple-silicon-support",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable", "home-manager-unstable": "home-manager-unstable",
"lazyvim": "lazyvim", "lazyvim": "lazyvim",

View File

@ -13,6 +13,10 @@
nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
lazyvim.url = "github:pfassina/lazyvim-nix"; lazyvim.url = "github:pfassina/lazyvim-nix";
nix-flatpak.url = "github:gmodena/nix-flatpak"; nix-flatpak.url = "github:gmodena/nix-flatpak";
apple-silicon-support = {
url = "github:nix-community/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs"; # avoids a second nixpkgs copy
};
}; };
outputs = outputs =
@ -24,6 +28,7 @@
nix-darwin, nix-darwin,
lazyvim, lazyvim,
nix-flatpak, nix-flatpak,
apple-silicon-support,
... ...
}@inputs: }@inputs:
{ {
@ -38,7 +43,8 @@
./config/common.nix ./config/common.nix
./config/linux.nix ./config/linux.nix
./config/desktop.nix ./config/desktop.nix
./config/hyprland.nix #./config/hyprland.nix
./config/gnome.nix
./hosts/desktop/hardware.nix ./hosts/desktop/hardware.nix
./hosts/desktop/settings.nix ./hosts/desktop/settings.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
@ -54,7 +60,7 @@
imports = [ imports = [
./home/common.nix ./home/common.nix
./home/desktop.nix ./home/desktop.nix
./home/hyprland.nix #./home/hyprland.nix
]; ];
}; };
} }
@ -108,6 +114,42 @@
} }
]; ];
}; };
nixosConfigurations.macbook-air = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit self inputs;
inherit nix-flatpak;
hostname = "macbook-air";
};
#inherit system;
modules = [
./config/common.nix
./config/linux.nix
./config/desktop.nix
./config/gnome.nix
./hosts/macbook-air/hardware.nix
./hosts/macbook-air/settings.nix
apple-silicon-support.nixosModules.apple-silicon-support
{ hardware.asahi.peripheralFirmwareDirectory = "${self}/firmware"; }
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit lazyvim;
inherit inputs;
hostname = "macbook-air";
};
home-manager.users.admin = {
imports = [
./home/common.nix
./home/desktop.nix
#./home/hyprland.nix
];
};
}
];
};
}; };
} }

View File

@ -26,7 +26,6 @@
config = { config = {
profile = "high-quality"; profile = "high-quality";
ytdl-format = "bestvideo+bestaudio"; ytdl-format = "bestvideo+bestaudio";
cache-default = 4000000;
loop-file = "inf"; loop-file = "inf";
}; };
@ -38,12 +37,12 @@
lazyvim = { lazyvim = {
enable = true; enable = true;
plugins = { plugins = {
colorscheme = '' colorscheme = ''
return { return {
"kepano/flexoki-neovim" "kepano/flexoki-neovim"
} }
''; '';
}; };
}; };
# neovim = { # neovim = {
# enable = true; # enable = true;
@ -131,7 +130,7 @@
bindkey -M menuselect 'l' vi-forward-char bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -v '^?' backward-delete-char bindkey -v '^?' backward-delete-char
# Change cursor shape for different vi modes. # Change cursor shape for different vi modes.
function zle-keymap-select () { function zle-keymap-select () {
case $KEYMAP in case $KEYMAP in

View File

@ -1,4 +1,9 @@
{ pkgs, hostname, ... }: {
config,
pkgs,
hostname,
...
}:
let let
nix_background = "rgb(16, 15, 15)"; nix_background = "rgb(16, 15, 15)";
nix_text = "rgb(206, 205, 195)"; nix_text = "rgb(206, 205, 195)";
@ -9,7 +14,7 @@ let
nix_font = "JetBrainsMono Nerd Font"; nix_font = "JetBrainsMono Nerd Font";
nix_border_size = 3; nix_border_size = 3;
nix_corner = 10; nix_corner = 10;
nix_bar_height = 30; nix_bar_height = if (hostname == "macbook-air") then 38 else 26;
in in
{ {
home.pointerCursor = { home.pointerCursor = {
@ -23,6 +28,16 @@ in
# gtk = { # gtk = {
# enable = true; # enable = true;
# }; # };
#
#
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland
];
};
services.udiskie.enable = true; # automount USB services.udiskie.enable = true; # automount USB
@ -89,6 +104,25 @@ in
}; };
}; };
services.hyprsunset = {
enable = true;
settings = {
max-gamma = 150;
profile = [
{
time = "7:30";
identity = true;
}
{
time = "21:00";
temperature = 2500;
gamma = 0.8;
}
];
};
};
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = { settings = {
@ -97,8 +131,7 @@ in
"~/Downloads/wall.jpg" "~/Downloads/wall.jpg"
]; ];
wallpaper = [ wallpaper = [
"DP-2,~/Downloads/wall.jpg" ",~/Downloads/wall.jpg"
"HDMI-A-1,~/Downloads/wall.jpg"
]; ];
}; };
}; };
@ -118,11 +151,13 @@ in
gaps = true; gaps = true;
gap_size = 15; gap_size = 15;
corner_radius = nix_corner; corner_radius = nix_corner;
layer = "top";
}; };
urgency_critical = { urgency_critical = {
frame_color = nix_alert; frame_color = nix_alert;
timeout = 0; timeout = 0;
layer = "overlay"; # show above fullscreen apps
}; };
}; };
@ -181,7 +216,7 @@ in
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
font-family: '${nix_font}'; font-family: '${nix_font}';
font-size: 14px; /* up from 12px */ font-size: 12px; /* up from 12px */
} }
.modules-left { .modules-left {
@ -211,7 +246,6 @@ in
#cpu, #cpu,
#battery, #battery,
#pulseaudio, #pulseaudio,
#custom-power,
#idle_inhibitor, #idle_inhibitor,
#bluetooth, #bluetooth,
#privacy, #privacy,
@ -265,11 +299,11 @@ in
opacity: 0; opacity: 0;
} }
#privacy privacy-item *{ #privacy privacy-item * {
min-width: 12px; min-width: 12px;
margin-left: 5px; margin-left: 5px;
margin-right: 0; margin-right: 0;
font-size: 10px; font-size: 9px;
padding-bottom: 1px; padding-bottom: 1px;
color: #ffffff; color: #ffffff;
} }
@ -291,23 +325,78 @@ in
"hyprland/workspaces" "hyprland/workspaces"
"hyprland/submap" "hyprland/submap"
]; ];
modules-center = [ modules-center =
"clock" if hostname == "macbook-air" then
"idle_inhibitor" [ ]
]; else
[
"clock"
"idle_inhibitor"
];
modules-right = [ modules-right = [
"group/minimized" "group/minimized"
"hyprland/language" "hyprland/language"
"bluetooth" "bluetooth"
"network" "network"
"pulseaudio" "pulseaudio"
"custom/power" "battery"
"privacy" "privacy"
]; ]
++ (
if hostname == "macbook-air" then
[
"clock"
"idle_inhibitor"
]
else
[ ]
);
privacy = { privacy = {
icon-size = 14; icon-size = 14;
}; };
battery = {
format = "{capacity}% {icon}";
format-discharging = "{icon}";
format-charging = "{icon}";
format-plugged = "";
format-icons = {
charging = [
"󰢜"
"󰂆"
"󰂇"
"󰂈"
"󰢝"
"󰂉"
"󰢞"
"󰂊"
"󰂋"
"󰂅"
];
default = [
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
};
format-full = "󰂅";
tooltip-format-discharging = "{power:>1.0f}W {capacity}%";
tooltip-format-charging = "{power:>1.0f}W {capacity}%";
interval = 5;
#on-click = "omarchy-menu power";
#on-click-right = ''notify-send -u low "$(omarchy-battery-status)"'';
states = {
warning = 20;
critical = 10;
};
};
"hyprland/workspaces" = { "hyprland/workspaces" = {
on-click = "activate"; on-click = "activate";
@ -352,11 +441,6 @@ in
on-click = "hyprctl switchxkblayout monsgeek-monsgeek-keyboard next"; on-click = "hyprctl switchxkblayout monsgeek-monsgeek-keyboard next";
}; };
"custom/power" = {
format = "";
on-click = "hyprlock & systemctl suspend";
};
"custom/menu" = { "custom/menu" = {
format = ""; format = "";
on-click = "rofi -show drun"; on-click = "rofi -show drun";
@ -408,6 +492,7 @@ in
clock = { clock = {
format = "{:%a %b %d %H:%M}"; format = "{:%a %b %d %H:%M}";
tooltip-format = "{calendar}"; tooltip-format = "{calendar}";
on-click = "for i in {1..10}; do dunstctl history-pop; done; sleep 5 && dunstctl close-all"; # show last 10 notifications for 5 seconds
}; };
idle_inhibitor = { idle_inhibitor = {
@ -422,8 +507,8 @@ in
format = "{icon}"; format = "{icon}";
format-muted = ""; format-muted = "";
format-icons = { format-icons = {
headphone = ""; #headphone = "";
headset = ""; #headset = "";
default = [ default = [
"" ""
"" ""
@ -443,8 +528,79 @@ in
enable = true; enable = true;
font = "${nix_font} 14"; font = "${nix_font} 14";
plugins = [ plugins = [
pkgs.rofimoji pkgs.rofi-calc
]; ];
#theme = let
# inherit (config.lib.formats.rasi) mkLiteral;
#in {
# "*" = {
# background-color = mkLiteral "#1e1e2e";
# foreground-color = mkLiteral "#cdd6f4";
# border-color = mkLiteral "#89b4fa";
# font = "JetBrains Mono Nerd Font 12";
# padding = mkLiteral "0px";
# spacing = 0;
# };
# "#window" = {
# background-color = mkLiteral "@background-color";
# border = mkLiteral "2px";
# border-color = mkLiteral "@border-color";
# border-radius = mkLiteral "8px";
# width = mkLiteral "40%";
# location = mkLiteral "center";
# };
# "#mainbox" = {
# background-color = mkLiteral "transparent";
# padding = mkLiteral "12px";
# spacing = mkLiteral "8px";
# };
# "#inputbar" = {
# background-color = mkLiteral "#313244";
# border-radius = mkLiteral "6px";
# padding = mkLiteral "8px 12px";
# spacing = mkLiteral "8px";
# children = map mkLiteral [ "prompt" "entry" ];
# };
# "#prompt" = {
# background-color = mkLiteral "transparent";
# foreground-color = mkLiteral "@border-color";
# };
# "#entry" = {
# background-color = mkLiteral "transparent";
# foreground-color = mkLiteral "@foreground-color";
# placeholder = "Search...";
# placeholder-color = mkLiteral "#6c7086";
# };
# "#listview" = {
# background-color = mkLiteral "transparent";
# lines = 8;
# columns = 1;
# spacing = mkLiteral "4px";
# scrollbar = false;
# };
# "#element" = {
# background-color = mkLiteral "transparent";
# foreground-color = mkLiteral "@foreground-color";
# border-radius = mkLiteral "6px";
# padding = mkLiteral "8px 12px";
# };
# "#element.selected" = {
# background-color = mkLiteral "#89b4fa";
# foreground-color = mkLiteral "#1e1e2e";
# };
# "#element.alternate" = {
# background-color = mkLiteral "transparent";
# };
#};
}; };
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
@ -496,12 +652,12 @@ in
listener = [ listener = [
{ {
timeout = 300; timeout = if (hostname == "macbook-air") then 120 else 300;
on-timeout = "loginctl lock-session & hyprctl dispatch dpms off"; on-timeout = "loginctl lock-session & hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on"; on-resume = "hyprctl dispatch dpms on";
} }
{ {
timeout = 900; timeout = if (hostname == "macbook-air") then 130 else 900;
on-timeout = "systemctl suspend"; on-timeout = "systemctl suspend";
on-resume = "hyprctl dispatch dpms on"; on-resume = "hyprctl dispatch dpms on";
} }
@ -509,27 +665,242 @@ in
}; };
}; };
xdg.configFile."hypr/scripts/media.sh" = { xdg.configFile."hypr/scripts/battery-monitor.sh" = {
executable = true;
text = ''
BATTERY_THRESHOLD=35
NOTIFICATION_FLAG="/run/user/$UID/battery_notified"
BATTERY_LEVEL=$(upower -i $(upower -e | grep -i 'BAT') | awk '/percentage/ { print int($2); exit }')
BATTERY_STATE=$(upower -i $(upower -e | grep -i 'BAT') | grep -E "state" | awk '{print $2}')
send_notification() {
notify-send -u critical "󱐋 Time to recharge!" "Battery is down to $\{1}%" -i battery-caution -t 30000
}
if [[ -n $BATTERY_LEVEL && $BATTERY_LEVEL =~ ^[0-9]+$ ]]; then
if [[ $BATTERY_STATE == "discharging" ]] && (( BATTERY_LEVEL <= BATTERY_THRESHOLD )); then
if [[ ! -f $NOTIFICATION_FLAG ]]; then
send_notification $BATTERY_LEVEL
touch $NOTIFICATION_FLAG
fi
else
rm -f $NOTIFICATION_FLAG
fi
fi
'';
};
systemd.user.services.battery-monitor = {
Unit = {
Description = "Battery level monitor";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${config.home.homeDirectory}/.config/hypr/scripts/battery-monitor.sh";
};
};
systemd.user.timers.battery-monitor = {
Unit.Description = "Run battery monitor periodically";
Timer = {
OnBootSec = "1min";
OnUnitActiveSec = "1min";
Unit = "battery-monitor.service";
};
Install.WantedBy = [ "timers.target" ];
};
xdg.configFile."hypr/scripts/osd.sh" = {
executable = true;
text = ''
# See README.md for usage instructions
volume_step=5
brightness_step="5%"
max_volume=100
notification_timeout=1000
download_album_art=true
show_album_art=true
show_music_in_volume_indicator=true
show_percentages=false
# wpctl outputs "Volume: 0.75", so we multiply by 100 to get an integer percentage
function get_volume {
wpctl get-volume @DEFAULT_SINK@ | awk '{printf "%d", $2 * 100}'
}
# wpctl appends "[MUTED]" to the output when muted
function get_mute {
wpctl get-volume @DEFAULT_SINK@ | grep -q '\[MUTED\]' && echo "yes" || echo "no"
}
# Uses regex to get brightness from brightnessctl
function get_brightness {
brightnessctl | grep -oP '\d+(?=%)' | head -n 1
}
# Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume
function get_volume_icon {
volume=$(get_volume)
mute=$(get_mute)
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ]; then
volume_icon=" "
elif [ "$volume" -lt 50 ]; then
volume_icon=" "
else
volume_icon=" "
fi
}
# Always returns the same icon
function get_brightness_icon {
brightness_icon=" "
}
function get_album_art {
url=$(playerctl -f "{{mpris:artUrl}}" metadata)
if [[ $url == "file://"* ]]; then
album_art="$\{url/file:\/\//}"
elif [[ $url == "http://"* || $url == "https://"* ]] && [[ $download_album_art == "true" ]]; then
filename="$(echo $url | sed "s/.*\///")"
if [ ! -f "/tmp/$filename" ]; then
wget -O "/tmp/$filename" "$url"
fi
album_art="/tmp/$filename"
else
album_art=""
fi
}
# Displays a volume notification
function show_volume_notif {
volume=$(get_volume)
get_volume_icon
if [[ $show_percentages == "true" ]]; then
volume_label="$volume_icon $volume%"
else
volume_label="$volume_icon"
fi
if [[ $show_music_in_volume_indicator == "true" ]]; then
current_song=$(playerctl -f "{{title}} - {{artist}}" metadata)
if [[ $show_album_art == "true" ]]; then
get_album_art
fi
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:volume_notif -h int:value:$volume -i "$album_art" "$volume_label" "$current_song"
else
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:volume_notif -h int:value:$volume "$volume_label"
fi
}
# Displays a music notification
function show_music_notif {
song_title=$(playerctl -f "{{title}}" metadata)
song_artist=$(playerctl -f "{{artist}}" metadata)
#song_album=$(playerctl -f "{{album}}" metadata)
if [[ $show_album_art == "true" ]]; then
get_album_art
fi
#notify-send -t $notification_timeout -h string:x-dunst-stack-tag:music_notif -i "$album_art" "$song_title" "$song_artist - $song_album"
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:music_notif -i "$album_art" "$song_title" "$song_artist"
}
# Displays a brightness notification
function show_brightness_notif {
brightness=$(get_brightness)
get_brightness_icon
if [[ $show_percentages == "true" ]]; then
brightness_label="$brightness_icon $brightness%"
else
brightness_label="$brightness_icon"
fi
notify-send -t $notification_timeout -h string:x-dunst-stack-tag:brightness_notif -h int:value:$brightness "$brightness_label"
}
# Main function - Takes user input, "volume_up", "volume_down", "brightness_up", or "brightness_down"
case $1 in
volume_up)
wpctl set-mute @DEFAULT_SINK@ 0
volume=$(get_volume)
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
wpctl set-volume @DEFAULT_SINK@ $(echo "$max_volume / 100" | bc -l)
else
wpctl set-volume @DEFAULT_SINK@ $(echo "$volume_step / 100" | bc -l)+
fi
show_volume_notif
;;
volume_down)
wpctl set-volume @DEFAULT_SINK@ $(echo "$volume_step / 100" | bc -l)-
show_volume_notif
;;
volume_mute)
wpctl set-mute @DEFAULT_SINK@ toggle
show_volume_notif
;;
brightness_up)
brightnessctl set +$brightness_step
show_brightness_notif
;;
brightness_down)
brightnessctl set $brightness_step-
show_brightness_notif
;;
next_track)
playerctl next
sleep 0.5 && show_music_notif
;;
prev_track)
playerctl previous
sleep 0.5 && show_music_notif
;;
play_pause)
playerctl play-pause
show_music_notif
;;
esac
'';
};
xdg.configFile."hypr/scripts/media.sh" = {
executable = true; executable = true;
text = '' text = ''
# Define a unique ID to reuse for replacing notifications # Define a unique ID to reuse for replacing notifications
NOTIF_ID=9999 NOTIF_ID=9999
PLAYER=$(playerctl -l 2>/dev/null | grep -i 'brave\|chromium\|chrome' | head -n 1) PLAYER=$(playerctl -l 2>/dev/null | grep -i 'brave\|chromium\|chrome' | head -n 1)
if [ -z "$PLAYER" ]; then if [ -z "$PLAYER" ]; then
exit 1 exit 1
fi fi
sleep 0.4s sleep 0.4s
# Get play/pause status # Get play/pause status
STATUS=$(playerctl -p "$PLAYER" status 2>/dev/null) STATUS=$(playerctl -p "$PLAYER" status 2>/dev/null)
# Fetch metadata # Fetch metadata
TITLE=$(playerctl -p "$PLAYER" metadata title 2>/dev/null) TITLE=$(playerctl -p "$PLAYER" metadata title 2>/dev/null)
ARTIST=$(playerctl -p "$PLAYER" metadata artist 2>/dev/null) ARTIST=$(playerctl -p "$PLAYER" metadata artist 2>/dev/null)
# Format the message based on artist presence # Format the message based on artist presence
if [ -z "$ARTIST" ]; then if [ -z "$ARTIST" ]; then
MSG="$TITLE" MSG="$TITLE"
@ -543,25 +914,13 @@ in
else else
notify-send -r $NOTIF_ID "Now Playing" "$MSG" -i media-playback-start -t 5000 notify-send -r $NOTIF_ID "Now Playing" "$MSG" -i media-playback-start -t 5000
fi fi
''; '';
}; };
xdg.configFile."hypr/scripts/screenshot.sh" = { xdg.configFile."hypr/scripts/screenshot.sh" = {
executable = true; executable = true;
text = '' text = ''
MODE=$1 MODE=$1
FILE=$(mktemp /tmp/screenshot-XXXXXX.png)
grim -g "$(slurp)" "$FILE" || exit 1
wl-copy < "$FILE"
ACTION=$(dunstify "Screenshot taken" "Copied to clipboard" \
--icon="$FILE" \
--action="open,Open in Satty" \
--timeout=5000)
[ "$ACTION" = "2" ] && satty --filename "$FILE"
FILE=$(mktemp /tmp/screenshot-XXXXXX.png) FILE=$(mktemp /tmp/screenshot-XXXXXX.png)
case "$MODE" in case "$MODE" in
@ -595,8 +954,10 @@ in
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
#configType = "hyprlang";
plugins = [ plugins = [
pkgs.hyprlandPlugins.hyprbars pkgs.hyprlandPlugins.hyprbars
#pkgs.hyprlandPlugins.hyprspace
]; ];
settings = { settings = {
# This is an example Hyprland config file for Nix. # This is an example Hyprland config file for Nix.
@ -621,17 +982,19 @@ in
plugin = { plugin = {
hyprbars = { hyprbars = {
bar_height = nix_bar_height; bar_height = if (hostname == "macbook-air") then 30 else nix_bar_height;
hyprbars-button = [ hyprbars-button = [
"rgb(ff605C), 16, 󰖭, hyprctl dispatch killactive" "rgb(ff605C), 15, 󰖭, hyprctl dispatch killactive"
"rgb(00CA4E), 16, 󰊔, hyprctl dispatch fullscreen 1" "rgb(00CA4E), 15, 󰊔, hyprctl dispatch fullscreen 1"
"rgb(FFBD44), 16, , hyprctl dispatch togglefloating" "rgb(FFBD44), 15, , hyprctl dispatch togglefloating"
]; ];
on_double_click = "hyprctl dispatch fullscreen 1"; on_double_click = "hyprctl dispatch fullscreen 1";
icon_on_hover = true; icon_on_hover = true;
bar_color = nix_background; bar_color = nix_background;
"col.text" = nix_text; "col.text" = nix_text;
bar_buttons_alignment = "right"; bar_text_font = nix_font;
bar_text_size = 9;
bar_buttons_alignment = "left";
}; };
}; };
@ -647,13 +1010,17 @@ in
"DP-2, 2560x1440@180,0x0,1,vrr,1,bitdepth,10" "DP-2, 2560x1440@180,0x0,1,vrr,1,bitdepth,10"
"HDMI-A-1, 1920x1080@75,2560x0,1,vrr,1" "HDMI-A-1, 1920x1080@75,2560x0,1,vrr,1"
] ]
else if (hostname == "macbook-air") then
[
"eDP-1, 2560x1660@60, 0x0, 1.6"
]
else else
[ [
",preferred,auto,auto" ",preferred,auto,auto"
]; ];
################### ###################
### MY PROGRAMS ### ### MY PROGRAMS ###0
################### ###################
# See https://wiki.hypr.land/Configuring/Keywords/ # See https://wiki.hypr.land/Configuring/Keywords/
@ -661,9 +1028,9 @@ in
# Set programs that you use # Set programs that you use
"$terminal" = "alacritty"; "$terminal" = "alacritty";
"$fileManager" = "dolphin"; "$fileManager" = "nautilus";
"$menu" = "rofi -show drun"; "$menu" = "rofi -show drun";
"$browser" = "brave"; "$browser" = "brave --ozone-platform=wayland --enable-features=TouchpadOverscrollHistoryNavigation";
################# #################
### AUTOSTART ### ### AUTOSTART ###
@ -676,6 +1043,7 @@ in
"waybar" "waybar"
"steam -silent" "steam -silent"
"webcord --start-minimized" "webcord --start-minimized"
"signal-desktop --start-in-tray"
#"[workspace 1 silent]$browser" #"[workspace 1 silent]$browser"
#"[workspace 3 silent]proton-mail" #"[workspace 3 silent]proton-mail"
@ -720,8 +1088,8 @@ in
# https://wiki.hypr.land/Configuring/Variables/#general # https://wiki.hypr.land/Configuring/Variables/#general
general = { general = {
gaps_in = 10; gaps_in = if (hostname == "macbook-air") then 5 else 10;
gaps_out = 20; gaps_out = if (hostname == "macbook-air") then 10 else 20;
border_size = nix_border_size; border_size = nix_border_size;
@ -789,14 +1157,13 @@ in
}; };
}; };
layerrule = [ layer_rule = [
#"blur, notifications" "blur, notifications"
#"ignorezero, notifications" "ignorezero, notifications"
# turn off anim for walker # turn off anim for walker
#"noanim, walker" "noanim, rofi"
];
]; # add blur to notifications
# https://wiki.hypr.land/Configuring/Variables/#animations # https://wiki.hypr.land/Configuring/Variables/#animations
animations = { animations = {
@ -876,21 +1243,27 @@ in
accel_profile = "flat"; accel_profile = "flat";
touchpad = { touchpad = {
scroll_factor = 1.0;
disable_while_typing = false; disable_while_typing = false;
natural_scroll = false; natural_scroll = true;
tap-to-click = false;
clickfinger_behavior = true;
}; };
}; };
gestures = {
workspace_swipe_distance = 150;
workspace_swipe_touch = true;
};
# https://wiki.hypr.land/Configuring/Variables/#gestures # https://wiki.hypr.land/Configuring/Variables/#gestures
#gestures = { gesture = [ "3, horizontal, workspace" ];
# workspace_swipe = false;
#};
# Example per-device config # Example per-device config
# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more # See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
device = { device = {
name = "epic-mouse-v1"; name = "apple-mtp-multi-touch";
sensitivity = -0.5; accel_profile = "";
sensitivity = -0.1;
}; };
################### ###################
@ -903,20 +1276,23 @@ in
bind = [ bind = [
# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more # Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
"$mainMod, Return, exec, $terminal" "$mainMod, Return, exec, $terminal"
"$mainMod, Q, killactive," "$mainMod, C, killactive,"
"alt, F4, killactive," "alt, F4, killactive,"
"$mainMod SHIFT, Q, exit," "$mainMod SHIFT, Q, exit,"
"$mainMod, E, exec, $fileManager" "$mainMod, E, exec, $fileManager"
"$mainMod, S, exec, hyprctl clients -j | jq -e '.[] | select(.class == \"signal\")' > /dev/null && hyprctl dispatch focuswindow class:signal || signal-desktop"
"$mainMod, D, exec, hyprctl clients -j | jq -e '.[] | select(.class == \"webcord\")' > /dev/null && hyprctl dispatch focuswindow class:webcord || webcord"
"$mainMod, V, togglefloating," "$mainMod, V, togglefloating,"
"$mainMod, F, fullscreen, 3" "$mainMod, F, fullscreen, 3"
"$mainMod, M, fullscreen, 1" "$mainMod, M, fullscreen, 1"
"$mainMod, W, exec, $browser" "$mainMod, W, exec, $browser"
"$mainMod, space, exec, $menu" "$mainMod, space, exec, $menu"
#"$mainMod, P, pseudo," # dwindle #"$mainMod, P, pseudo," # dwindle
#"$mainMod SHIFT, L, exec, hyprlock& systemctl suspend" #idk
#"$mainMod, T, togglesplit," # dwindle #"$mainMod, T, togglesplit," # dwindle
"$mainMod SHIFT, L, exec, hyprlock"
"$mainMod SHIFT, F, workspaceopt, allfloat" "$mainMod SHIFT, F, workspaceopt, allfloat"
"$mainMod SHIFT, H, exec, for i in {1..10}; do dunstctl history-pop; done; sleep 5 && dunstctl close-all" # show last 10 notifications for 5 seconds #"$mainMod SHIFT, H, exec, for i in {1..10}; do dunstctl history-pop; done; sleep 5 && dunstctl close-all" # show last 10 notifications for 5 seconds
"$mainMod, G, togglegroup," "$mainMod, G, togglegroup,"
"$mainMod SHIFT, S, exec, ~/.config/hypr/scripts/screenshot.sh region" "$mainMod SHIFT, S, exec, ~/.config/hypr/scripts/screenshot.sh region"
", PRINT, exec, ~/.config/hypr/scripts/screenshot.sh fullscreen" ", PRINT, exec, ~/.config/hypr/scripts/screenshot.sh fullscreen"
@ -931,6 +1307,11 @@ in
"$mainMod, l, movefocus, r" "$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u" "$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d" "$mainMod, j, movefocus, d"
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, L, movewindow, r"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod, Tab, cyclenext" "$mainMod, Tab, cyclenext"
"$mainMod, Tab, bringactivetotop" "$mainMod, Tab, bringactivetotop"
@ -968,6 +1349,7 @@ in
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1" "$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1" "$mainMod, mouse_up, workspace, e-1"
]; ];
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
@ -978,20 +1360,22 @@ in
# Laptop multimedia keys for volume and LCD brightness # Laptop multimedia keys for volume and LCD brightness
bindel = [ bindel = [
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" ",XF86AudioRaiseVolume, exec, ~/.config/hypr/scripts/osd.sh volume_up"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" ",XF86AudioLowerVolume, exec, ~/.config/hypr/scripts/osd.sh volume_down"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ",XF86AudioMute, exec, ~/.config/hypr/scripts/osd.sh volume_mute"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" ",XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/osd.sh brightness_up"
",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" ",XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/osd.sh brightness_down"
#",Caps_Lock, exec, "
]; ];
# Requires playerctl # Requires playerctl
bindl = [ bindl = [
", XF86AudioNext, exec, playerctl next& ~/.config/hypr/scripts/media.sh" ", XF86AudioNext, exec, playerctl next& ~/.config/hypr/scripts/osd.sh next_track"
", XF86AudioPause, exec, playerctl play-pause& ~/.config/hypr/scripts/media.sh" ", XF86AudioPause, exec, playerctl play-pause& ~/.config/hypr/scripts/osd.sh play_pause"
", XF86AudioPlay, exec, playerctl play-pause& ~/.config/hypr/scripts/media.sh" ", XF86AudioPlay, exec, playerctl play-pause& ~/.config/hypr/scripts/osd.sh play_pause"
", XF86AudioPrev, exec, playerctl previous& ~/.config/hypr/scripts/media.sh" ", XF86AudioPrev, exec, playerctl previous& ~/.config/hypr/scripts/osd.sh prev_track"
",switch:on:Lid Switch, exec, hyprlock & systemctl suspend"
]; ];
############################## ##############################
@ -1001,74 +1385,80 @@ in
# See https://wiki.hypr.land/Configuring/Window-Rules/ for more # See https://wiki.hypr.land/Configuring/Window-Rules/ for more
# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules # See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
#windowrule = [ window_rule = [
# # Example windowrule # Example windowrule
# # "float,class:^(kitty)$,title:^(kitty)$" # "float,class:^(kitty)$,title:^(kitty)$"
# # Ignore maximize requests from apps. You'll probably like this. # Ignore maximize requests from apps. You'll probably like this.
# "suppressevent maximize, class:.*" "suppressevent maximize, class:.*"
# # Fix some dragging issues with XWayland # Fix some dragging issues with XWayland
# "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
# # make tuis accessed from waybar float in center # make tuis accessed from waybar float in center
# "tag +floating-window, title:(bluetui|impala|wiremix)" "tag +floating-window, title:(bluetui|impala|wiremix|Signal.*|.*WebCord.*|Weather|Calendar)"
# "tag +floating-window, title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)" "tag +floating-window, title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)"
# "float, class:(org.gnome.Calculator)" "tag +floating-window, class:(org.gnome.NautilusPreviewer)"
"float, class:(org.gnome.Calculator)"
# # send games to specific workspace # fix scrolling speed in chromium based apps
# "workspace name:games silent, class:$games" "tag +chromium-based, class:(chrom.*|brave-browser|signal|WebCord|obsidian|electron)"
# "noanim, class:$games" "scrolltouchpad 0.15, tag:chromium-based"
# "noblur, class:$games"
# "noshadow, class:$games"
# "noborder, class:$games"
# "rounding 0, class:$games"
# "fullscreen, class:$games"
# "immediate, class:$games"
# # pip # send games to specific workspace
# "tag +pip, title:(Picture.?in.?[Pp]icture)" "workspace name:games silent, class:$games"
# "tag -default-opacity, tag:pip" "noanim, class:$games"
# "float, tag:pip" "noblur, class:$games"
# "pin, tag:pip" "noshadow, class:$games"
# "size 600 338, tag:pip" "noborder, class:$games"
# "keepaspectratio, tag:pip" "rounding 0, class:$games"
# "bordersize 0, tag:pip" "fullscreen, class:$games"
# "opacity 1 1, tag:pip" "immediate, class:$games"
# "move (monitor_w-window_w-40) (monitor_h*0.04), tag:pip"
# # steam # pip
# "float, class:^(steam)$" "tag +pip, title:(Picture.?in.?[Pp]icture)"
# "center, class:^(steam)$, title:^(Steam)$" "tag -default-opacity, tag:pip"
# "tag -default-opacity, class:^(steam.*)$" "float, tag:pip"
# "opacity 1 1, class:^(steam.*)$" "pin, tag:pip"
# "size 1100 700, class:^(steam)$, title:^(Steam)$" "size 600 338, tag:pip"
# "size 460 800, class:^(steam)$, title:^(Friends List)$" "keepaspectratio, tag:pip"
# "idleinhibit fullscreen, class:^(steam)$" "bordersize 0, tag:pip"
"opacity 1 1, tag:pip"
"move (monitor_w-window_w-40) (monitor_h*0.04), tag:pip"
# # bitwarden # steam
# "noscreenshare, class:^(Bitwarden)$" "float, class:^(steam)$"
# "tag +floating-window, class:^(Bitwarden)$" "center, class:^(steam)$, title:^(Steam)$"
"tag -default-opacity, class:^(steam.*)$"
"opacity 1 1, class:^(steam.*)$"
"size 1100 700, class:^(steam)$, title:^(Steam)$"
"size 460 800, class:^(steam)$, title:^(Friends List)$"
"idleinhibit fullscreen, class:^(steam)$"
# # Bitwarden Chrome Extension # bitwarden
# "noscreenshare, class:^(brave-nngceckbapebfimnlniiiahkandclblb-Default)$" "noscreenshare, class:^(Bitwarden)$"
# "tag +floating-window, class:^(brave-nngceckbapebfimnlniiiahkandclblb-Default)$" "tag +floating-window, class:^(Bitwarden)$"
# # floating tag # Bitwarden Chrome Extension
# "float, tag:floating-window" "noscreenshare, class:^(brave-nngceckbapebfimnlniiiahkandclblb-Default)$"
# "center, tag:floating-window" "tag +floating-window, class:^(brave-nngceckbapebfimnlniiiahkandclblb-Default)$"
# "size 875 600, tag:floating-window"
# floating tag
"float, tag:floating-window"
"center, tag:floating-window"
"size 875 600, tag:floating-window"
# # hyprbar # hyprbar
# "plugin:hyprbars:nobar, tag:^(?!floating-window$).*$" "plugin:hyprbars:nobar, tag:^(?!floating-window$).*$"
#]; ];
#"$games" = "$games" =
# "^(steam_app_.*|lutris_game_class|minigalaxy|playnite_game_class|gamescope|chiaki|moonlight|com\.moonlight_stream\.Moonlight|.*[Ww]ine.*)$"; "^(steam_app_.*|lutris_game_class|minigalaxy|playnite_game_class|gamescope|chiaki|moonlight|com\.moonlight_stream\.Moonlight|.*[Ww]ine.*)$";
#workspace = [ workspace = [
# "name:1,monitor:DP-2" "name:1,monitor:DP-2"
# "name:games,monitor:DP-2" "name:games,monitor:DP-2"
# "name:4,monitor:HDMI-A-1" "name:4,monitor:HDMI-A-1"
#]; ];
}; };
}; };

View File

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usb_storage" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/mapper/vg-nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2ED7-130C";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@ -0,0 +1,42 @@
# Edit this configuration file to define what should be installed 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`).
{
config,
lib,
pkgs,
...
}:
{
boot.kernelParams = [
"hid_apple.swap_fn_leftctrl=1"
"hid_apple.swap_opt_cmd=1"
"appledrm.show_notch=1"
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
boot.initrd.luks.devices."encrypted".device =
"/dev/disk/by-uuid/ebf580bd-9d71-4a2a-b6ae-a0c7e9a11395";
networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.enable = true;
# Specify path to peripheral firmware files.
#hardware.asahi.peripheralFirmwareDirectory = "./firmware";
# Or disable extraction and management of them completely.
hardware.asahi.extractPeripheralFirmware = true;
nix.settings = {
extra-substituters = [
"https://nixos-apple-silicon.cachix.org"
];
extra-trusted-public-keys = [
"nixos-apple-silicon.cachix.org-1:8psDu5SA5dAD7qA0zMy5UT292TxeEPzIz8VVEr2Js20="
];
};
system.stateVersion = "26.05"; # Did you read the comment?
}