This commit is contained in:
mjallen18
2024-08-27 16:28:10 -05:00
parent f536406ab0
commit 6e0a996187
33 changed files with 1825 additions and 65 deletions

86
flake.lock generated
View File

@@ -198,21 +198,6 @@
}, },
"flake-compat_4": { "flake-compat_4": {
"flake": false, "flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"locked": { "locked": {
"lastModified": 1717312683, "lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
@@ -625,17 +610,16 @@
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_3"
}, },
"locked": { "locked": {
"lastModified": 1724346840, "dirtyRev": "8a665fee82901878edaeb8ee120296a979db2dd2-dirty",
"dirtyShortRev": "8a665fe-dirty",
"lastModified": 1722469787,
"narHash": "sha256-nLaw2AFhDdBmbuWICe983Pbiq+GyNMPJMpSLWV6vVZA=", "narHash": "sha256-nLaw2AFhDdBmbuWICe983Pbiq+GyNMPJMpSLWV6vVZA=",
"owner": "mjallen18", "type": "git",
"repo": "nixos-apple-silicon", "url": "file:///home/matt/nixos-apple-silicon"
"rev": "77b99b63b125d85693934c83b04e1797cbf7afe7",
"type": "github"
}, },
"original": { "original": {
"owner": "mjallen18", "type": "git",
"repo": "nixos-apple-silicon", "url": "file:///home/matt/nixos-apple-silicon"
"type": "github"
} }
}, },
"nixos-hardware": { "nixos-hardware": {
@@ -825,6 +809,22 @@
} }
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": {
"lastModified": 1724224976,
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1721466660, "lastModified": 1721466660,
"narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=",
@@ -990,6 +990,46 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_4": {
"flake": false,
"locked": {
"lastModified": 1724293269,
"narHash": "sha256-x/XhOAszT/ejditCHUtGOjQcVg2AQhrC/QVew3i7kTI=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "6dc6d34a3a217457d7044dcce32b6d537480a6a1",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"slimlock": {
"inputs": {
"nixpkgs": [
"nix-inspect",
"nci",
"dream2nix",
"purescript-overlay",
"nixpkgs"
]
},
"locked": {
"lastModified": 1688610262,
"narHash": "sha256-Wg0ViDotFWGWqKIQzyYCgayeH8s4U1OZcTiWTQYdAp4=",
"owner": "thomashoneyman",
"repo": "slimlock",
"rev": "b5c6cdcaf636ebbebd0a1f32520929394493f1a6",
"type": "github"
},
"original": {
"owner": "thomashoneyman",
"repo": "slimlock",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",

View File

@@ -33,7 +33,8 @@
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
#Apple #Apple
nixos-apple-silicon.url = "github:mjallen18/nixos-apple-silicon"; # nixos-apple-silicon.url = "github:mjallen18/nixos-apple-silicon";
nixos-apple-silicon.url = "git+file:///home/matt/nixos-apple-silicon";
nix-darwin.url = "github:LnL7/nix-darwin"; nix-darwin.url = "github:LnL7/nix-darwin";
cosmic = { cosmic = {

View File

@@ -8,6 +8,8 @@
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../default.nix ../default.nix
./gnome
# ./cosmic
]; ];
hardware.asahi.enable = true; hardware.asahi.enable = true;
@@ -15,14 +17,12 @@
hardware.asahi.peripheralFirmwareDirectory = ./firmware; hardware.asahi.peripheralFirmwareDirectory = ./firmware;
hardware.asahi.setupAsahiSound = true; hardware.asahi.setupAsahiSound = true;
sound.enable = true;
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3; boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
apps.discover-wrapped.enable = true; apps.discover-wrapped.enable = lib.mkDefault true;
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options hid_apple iso_layout=0 options hid_apple iso_layout=0
@@ -32,17 +32,9 @@
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
services = { services = {
# Enable the X11 windowing system. displayManager.sddm.wayland.enable = lib.mkDefault true;
xserver = { displayManager.sddm.enable = lib.mkDefault true;
enable = true; desktopManager.plasma6.enable = lib.mkDefault true;
desktopManager.gnome.enable = false;
# Enable the Plasma 6 Desktop Environment.
displayManager.gdm.enable = false;
};
displayManager.sddm.enable = true;
desktopManager.plasma6.enable = true;
# enable auto discovery of printers # enable auto discovery of printers
avahi = { avahi = {
@@ -52,7 +44,7 @@
}; };
# Enable Flatpak # Enable Flatpak
flatpak.enable = true; flatpak.enable = lib.mkDefault 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.

View File

@@ -0,0 +1,14 @@
{ pkgs, ... }:
{
specialisation.cosmic.configuration = {
services = {
desktopManager.cosmic.enable = true;
displayManager.cosmic-greeter.enable = true;
# disable plasma
displayManager.sddm.enable = false;
displayManager.sddm.wayland.enable = false;
desktopManager.plasma6.enable = false;
};
};
}

View File

@@ -0,0 +1,32 @@
{ pkgs, ... }:
{
specialisation.gnome.configuration = {
home-manager.users.matt = import ./home.nix;
apps.discover-wrapped.enable = false;
services = {
xserver = {
desktopManager.gnome.enable = true;
# Enable Desktop Environment.
displayManager = {
gdm.enable = true;
gdm.wayland = true;
};
};
displayManager.defaultSession = "gnome";
# Enable Flatpak
flatpak.enable = true;
# disable plasma
displayManager.sddm.enable = false;
displayManager.sddm.wayland.enable = false;
desktopManager.plasma6.enable = false;
};
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}

View File

@@ -0,0 +1,41 @@
{ lib, pkgs, ... }:
{
home.packages = with pkgs; [
nixfmt-rfc-style
deadnix
gnomeExtensions.dash-to-dock
gnomeExtensions.arcmenu
gnomeExtensions.appindicator
gnomeExtensions.tiling-assistant
gnome-tweaks
papirus-icon-theme
];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".clock-format = "12h";
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".enable-hot-corners = false;
"org/gnome/desktop/interface".font-antialiasing = "grayscale";
"org/gnome/desktop/interface".font-hinting = "slight";
"org/gnome/desktop/interface".icon-theme = lib.mkDefault "Papirus-Dark";
"org/gnome/desktop/peripherals/mouse".accel-profile = "flat";
"org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true;
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
"org/gnome/mutter".experimental-features = [
"scale-monitor-framebuffer"
"variable-refresh-rate"
];
"org/gnome/tweaks".show-extensions-notice = false;
"org/gnome/shell".enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
"arcmenu@arcmenu.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
"dash-to-dock@micxgx.gmail.com"
"tiling-assistant@leleat-on-github"
];
"org/gtk/settings/file-chooser".clock-format = "12h";
};
};
}

View File

@@ -52,33 +52,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
nixfmt-rfc-style nixfmt-rfc-style
deadnix deadnix
gnomeExtensions.dash-to-dock
gnomeExtensions.arcmenu
gnomeExtensions.appindicator
gnome.gnome-tweaks
papirus-icon-theme papirus-icon-theme
]; ];
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface".clock-format = "12h";
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
"org/gnome/desktop/interface".enable-hot-corners = false;
"org/gnome/desktop/interface".font-antialiasing = "grayscale";
"org/gnome/desktop/interface".font-hinting = "slight";
"org/gnome/desktop/interface".icon-theme = "Papirus-Dark";
"org/gnome/desktop/peripherals/touchpad".two-finger-scrolling-enabled = true;
"org/gnome/desktop/peripherals/touchpad".tap-to-click = true;
"org/gnome/mutter".experimental-features = [ "scale-monitor-framebuffer" ];
"org/gnome/tweaks".show-extensions-notice = false;
"org/gnome/shell".enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
"dash-to-dock@micxgx.gmail.com"
"arcmenu@arcmenu.com"
"user-theme@gnome-shell-extensions.gcampax.github.com"
];
"org/gtk/settings/file-chooser".clock-format = "12h";
};
};
} }

View File

@@ -0,0 +1,13 @@
let configDir = ./config;
in
{
home.file = {
".config/wallpapers".source = "${configDir}/wallpapers";
".config/kitty/macchiato.conf".source = "${configDir}/kitty/macchiato.conf";
".config/wlogout".source = "${configDir}/wlogout"; #
".config/waybar/scripts".source = "${configDir}/waybar/scripts";
".config/btop/themes/catppuccin_macchiato.theme".source = "${configDir}/btop/themes/catppuccin_macchiato.theme";
".config/nwg-drawer".source = "${configDir}/nwg-drawer";
".config/nwg-panel".source = "${configDir}/nwg-panel";
};
}

View File

@@ -0,0 +1,71 @@
{
programs.btop = {
enable = true;
settings = {
color_theme = "/home/matt/.config/btop/themes/catppuccin_macchiato.theme";
theme_background = true;
truecolor = true;
force_tty = false;
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty";
vim_keys = true;
rounded_corners = true;
graph_symbol = "braille";
graph_symbol_cpu = "default";
graph_symbol_mem = "default";
graph_symbol_net = "default";
graph_symbol_proc = "default";
shown_boxes = "cpu mem net proc";
update_ms = 2000;
proc_sorting = "cpu lazy";
proc_reversed = false;
proc_tree = false;
proc_colors = true;
proc_gradient = true;
proc_per_core = false;
proc_mem_bytes = true;
proc_cpu_graphs = true;
proc_info_smaps = false;
proc_left = false;
proc_filter_kernel = false;
cpu_graph_upper = "total";
cpu_graph_lower = "total";
cpu_invert_lower = true;
cpu_single_graph = false;
cpu_bottom = false;
show_uptime = true;
check_temp = true;
cpu_sensor = "Auto";
show_coretemp = true;
cpu_core_map = "";
temp_scale = "celsius";
base_10_sizes = false;
show_cpu_freq = true;
clock_format = "%X";
background_update = true;
custom_cpu_name = "";
disks_filter = "";
mem_graphs = true;
mem_below_net = false;
zfs_arc_cached = true;
show_swap = true;
swap_disk = true;
show_disks = true;
only_physical = true;
use_fstab = true;
zfs_hide_datasets = false;
disk_free_priv = false;
show_io_stat = true;
io_mode = false;
io_graph_combined = false;
io_graph_speeds = "";
net_download = 100;
net_upload = 100;
net_auto = true;
net_sync = true;
net_iface = "";
show_battery = true;
selected_battery = "Auto";
log_level = "WARNING";
};
};
}

View File

@@ -0,0 +1,42 @@
theme[main_bg]="#24273A"
theme[main_fg]="#CAD3F5"
theme[title]="#CAD3F5"
theme[hi_fg]="#8AADF4"
theme[selected_bg]="#494D64"
theme[selected_fg]="#8AADF4"
theme[inactive_fg]="#8087A2"
theme[graph_text]="#F4DBD6"
theme[meter_bg]="#494D64"
theme[proc_misc]="#F4DBD6"
theme[cpu_box]="#7DC4E4"
theme[mem_box]="#A6DA95"
theme[net_box]="#C6A0F6"
theme[proc_box]="#F0C6C6"
theme[div_line]="#6E738D"
theme[temp_start]="#EED49F"
theme[temp_mid]="#F5A97F"
theme[temp_end]="#ED8796"
theme[cpu_start]="#7DC4E4"
theme[cpu_mid]="#91D7E3"
theme[cpu_end]="#8BD5CA"
theme[free_start]="#8BD5CA"
theme[free_mid]="#8BD5CA"
theme[free_end]="#A6DA95"
theme[cached_start]="#F5BDE6"
theme[cached_mid]="#F5BDE6"
theme[cached_end]="#C6A0F6"
theme[available_start]="#F4DBD6"
theme[available_mid]="#F0C6C6"
theme[available_end]="#F0C6C6"
theme[used_start]="#F5A97F"
theme[used_mid]="#F5A97F"
theme[used_end]="#ED8796"
theme[download_start]="#B7BDF8"
theme[download_mid]="#B7BDF8"
theme[download_end]="#C6A0F6"
theme[upload_start]="#B7BDF8"
theme[upload_mid]="#B7BDF8"
theme[upload_end]="#C6A0F6"
theme[process_start]="#7DC4E4"
theme[process_mid]="#91D7E3"
theme[process_end]="#8BD5CA"

View File

@@ -0,0 +1,271 @@
{
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
settings = {
"$mod" = "SUPER";
# Mouse
# mouse_[up|down] - scroll wheel
# middle_mouse - 274
# thumb_up - 276
# thumb_down - 275
# l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
# r -> release, will trigger on release of a key.
# e -> repeat, will repeat when held.
# n -> non-consuming, key/mouse events will be passed to the active window in addition to triggering the dispatcher.
# m -> mouse, see below.
# t -> transparent, cannot be shadowed by other binds.
# i -> ignore mods, will ignore modifiers.
# s -> separate, will arbitrarily combine keys between each mod/key, see [Keysym combos](#keysym-combos) above.
# d -> has description, will allow you to write a description for your bind.
# p -> bypasses the app's requests to inhibit keybinds.
# https://wiki.hyprland.org/Configuring/Binds/
# https://wiki.hyprland.org/Configuring/Binds/#mouse-buttons
bind = [
"$mod, Return, exec, kitty"
"$mod, Q, killactive, "
"$mod, mouse:274, killactive, "
"$mod, M, exec, wlogout --protocol layer-shell"
"$mod, E, exec, nautilus"
"$mod, V, togglefloating, "
"$mod, D, exec, nwg-drawer -fm nautilus -term kitty"
"$mod, P, pseudo, "# dwindle
"$mod, S, togglesplit, "# dwindle
"$mod SHIFT, Q, exec, hyprlock"
", PRINT, exec, hyprshot -m region --clipboard-only"
"$mod,F,exec,hyprctl dispatch fullscreen active"
# alt-tab between workspaces on active monitor
"ALT, Tab, workspace, m+1"
"ALT SHIFT, Tab, workspace, m-1"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, discord"
"$mod CTRL, l, resizeactive, 10 0"
"$mod CTRL, h, resizeactive, -10 0"
"$mod CTRL, k, resizeactive, 0 -10"
"$mod CTRL, j, resizeactive, 0 10"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod, b, exec, firefox"
];
bindm = [
# Move/resize windows with mod + LMB/RMB and dragging
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
# middle mouse will grab a window, mod + middle mouse will close it
", mouse:274, movewindow"
];
bindel =[
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
];
bindl = [
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
", XF86AudioNext, exec, playerctl next"
];
monitor = [
"DP-1,3840x2160@240.00000,0x0,1"
"DP-2,3840x2160@59.99700,3840x0,1"
];
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
"col.active_border" = "rgb(8aadf4) rgb(24273A) rgb(24273A) rgb(8aadf4) 45deg";
"col.inactive_border" = "rgb(24273A) rgb(24273A) rgb(24273A) rgb(24273A) 45deg";
layout = "dwindle";
allow_tearing = true;
};
decoration = {
rounding = 10;
blur = {
enabled = true;
size = 2;
passes = 2;
new_optimizations = true;
xray = false;
};
drop_shadow = "yes";
shadow_range = 4;
shadow_render_power = "3";
"col.shadow" = "rgba(1a1a1aee)";
};
animations = {
enabled = "yes";
bezier = [
"overshot, 0.05, 0.9, 0.1, 1.05"
"smoothOut, 0.36, 0, 0.66, -0.56"
"smoothIn, 0.25, 1, 0.5, 1"
];
animation = [
"windows, 1, 5, overshot, slide"
"windowsOut, 1, 4, smoothOut, slide"
"windowsMove, 1, 4, default"
"border, 1, 10, default"
"fade, 1, 10, smoothIn"
"fadeDim, 1, 10, smoothIn"
"workspaces, 1, 6, default"
];
};
dwindle = {
pseudotile = "yes";
preserve_split = "yes";
};
gestures = {
workspace_swipe = "off";
};
misc = {
force_default_wallpaper = 0;
};
workspace = [
"name:firefox, monitor:DP-2, default:false, special, firefox"
"name:discord, monitor:DP-2, default:true, special, vesktop, spotify"
"name:steam, monitor:DP-2, default:false, special, steam"
];
windowrule = [
"float, file_progress"
"float, confirm"
"float, dialog"
"float, download"
"float, notification"
"float, error"
"float, splash"
"float, confirmreset"
"float, title:Open File"
"float, title:branchdialog"
"float, pavucontrol"
"move onscreen cursor 0% 0%, pavucontrol"
"float, file-roller"
"fullscreen, wlogout"
"float, title:wlogout"
"fullscreen, title:wlogout"
"idleinhibit stayfocused, mpv"
"fullscreen, title:BBar"
"fullscreen, title:Remote Desktop Connection"
"norounding, class:Remote Desktop Connection"
"noshadow, class:Remote Desktop Connection"
"immediate, class:Remote Desktop Connection"
"syncfullscreen, class:Remote Desktop Connection"
"allowsinput, class:Remote Desktop Connection"
"noanim, class:Remote Desktop Connection"
"noblur, class:Remote Desktop Connection"
"noborder, class:Remote Desktop Connection"
"nodim, class:Remote Desktop Connection"
"nomaxsize, class:Remote Desktop Connection"
"minsize 3840 2160, class:Remote Desktop Connection"
];
windowrulev2 = [
"float, class:Vmware-view,title:VMware Horizon Client"
"size 3840 2160, class:Remote Desktop Connection"
# "float, class:Remote Desktop Connection,title:BBar"
# "float, class:Remote Desktop Connection,title:Remote Desktop Connection"
"float, class:Credential Manager UI Host,title:Windows Security"
"float, title:^(Media viewer)$"
# Picture in picture windows
# "float, class:pavucontrol,title:pavucontrol" # ?????
"float, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
"float, class:^(vesktop)$,title:^(Discord Popout)$"
"pin, class:^(vesktop)$,title:^(Discord Popout)$"
"float, class:^(steam)$,title:^(Friends List)$"
# Workspace assign
# "workspace: 1, class:^(kitty)$"
# "workspace: name:discord, class:^(firefox)$"
"workspace: name:discord, class:^(vesktop)$"
# Steam
"float, class:^([Ss]team)$, title:^((?![Ss]team).*)$"
"workspace name:steam silent, class:^([Ss]team)$, title:^([Ss]team)$"
"tile, class:^([Ss]team)$, title:^([Ss]team)$"
# Code
# "pin, class:^(code)$,title:^(Save As)$"
"float, class:^(code)$,title:^(Save As)$"
"float, class:^(xdg-desktop-portal-gtk)$,title:^(Open Workspace from File)$"
# Game Tearing??? https://wiki.hyprland.org/Configuring/Tearing/
"immediate, class:gamescope"
];
input = {
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_options = "";
kb_rules = "";
numlock_by_default = true;
follow_mouse = 1;
touchpad = {
natural_scroll = "no";
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
};
extraConfig = ''
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = nwg-look -a
exec-once = [silent] firefox
exec-once = [silent] vesktop
exec-once = [silent] spotify
exec-once = [silent] steam
'';
};
}

View File

@@ -0,0 +1,26 @@
{ pkgs, ... }:
{
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = "jetbrains mono nerd font";
package = pkgs.nerdfonts;
size = 12;
};
settings = {
include = "~/.config/kitty/macchiato.conf";
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
mouse_hide_wait = "2.0";
cursor_shape = "block";
url_color = "#0087bd";
url_style = "dotted";
confirm_os_window_close = "0";
background_opacity = "0.8";
};
};
}

View File

@@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin Kitty Macchiato
## author: Catppuccin Org
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/themes/macchiato.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #CAD3F5
background #24273A
selection_foreground #24273A
selection_background #F4DBD6
# Cursor colors
cursor #F4DBD6
cursor_text_color #24273A
# URL underline color when hovering with mouse
url_color #F4DBD6
# Kitty window border colors
active_border_color #B7BDF8
inactive_border_color #6E738D
bell_border_color #EED49F
# OS Window titlebar colors
wayland_titlebar_color #24273A
macos_titlebar_color #24273A
# Tab bar colors
active_tab_foreground #181926
active_tab_background #C6A0F6
inactive_tab_foreground #CAD3F5
inactive_tab_background #1E2030
tab_bar_background #181926
# Colors for marks (marked text in the terminal)
mark1_foreground #24273A
mark1_background #B7BDF8
mark2_foreground #24273A
mark2_background #C6A0F6
mark3_foreground #24273A
mark3_background #7DC4E4
# The 16 terminal colors
# black
color0 #494D64
color8 #5B6078
# red
color1 #ED8796
color9 #ED8796
# green
color2 #A6DA95
color10 #A6DA95
# yellow
color3 #EED49F
color11 #EED49F
# blue
color4 #8AADF4
color12 #8AADF4
# magenta
color5 #F5BDE6
color13 #F5BDE6
# cyan
color6 #8BD5CA
color14 #8BD5CA
# white
color7 #B8C0E0
color15 #A5ADCB

View File

@@ -0,0 +1,21 @@
{
services.mako = {
enable = true;
font = "monospace 12";
icons = false;
width = 500;
height = 110;
layer = "overlay";
borderRadius = 15;
borderSize = 2;
maxIconSize = 64;
defaultTimeout = 5000;
sort = "-time";
ignoreTimeout = true;
backgroundColor = "#24273a";
textColor = "#cad3f5";
borderColor = "#8aadf4";
progressColor = "over #363a4f";
};
}

View File

@@ -0,0 +1,34 @@
window {
background-color: rgba (36, 47, 79, 0.95);
color: #eeeeee
}
/* search entry */
entry {
background-color: rgba (0, 0, 0, 0.2)
}
button, image {
background: none;
border: none
}
button:hover {
background-color: rgba (255, 255, 255, 0.1)
}
/* in case you wanted to give category buttons a different look */
#category-button {
margin: 0 10px 0 10px
}
#pinned-box {
padding-bottom: 5px;
border-bottom: 1px dotted gray
}
#files-box {
padding: 5px;
border: 1px dotted gray;
border-radius: 15px
}

View File

@@ -0,0 +1,8 @@
{
"\\.pdf$": "firefox",
"\\.svg$": "inkscape",
"\\.(jpg|png|tiff|gif)$": "swayimg",
"\\.(mp3|ogg|flac|wav|wma)$": "audacious",
"\\.(avi|mp4|mkv|mov|wav)$": "mpv",
"\\.(doc|docx|xls|xlsx)$": "libreoffice"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

View File

@@ -0,0 +1,302 @@
{
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "bottom";
position = "top";
mod = "dock";
exclusive = true;
passthrough = false;
gtk-layer-shell = true;
height = 0;
modules-left = [
"hyprland/workspaces"
];
modules-center = [
"hyprland/window"
];
modules-right = [
"tray"
"custom/updates"
"keyboard-state#capslock"
"keyboard-state#numlock"
"pulseaudio"
"pulseaudio#microphone"
"network"
"clock"
"custom/weather"
];
"hyprland/window" = {
format = {};
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
on-click = "activate";
persistent_workspaces = {
"1" = [];
};
};
"custom/weather" = {
tooltip = true;
format = {};
interval = 30;
exec = "sudo waybar-weather";
return-type = "json";
};
"custom/updates" = {
tooltip = true;
format = {};
interval = 60;
exec = "sudo waybar-updates";
return-type = "json";
};
tray = {
icon-size = 16;
spacing = 10;
};
clock = {
format = "{:%I:%M %p}";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
};
pulseaudio = {
format = "{icon} {volume}%";
tooltip = false;
format-muted = " Muted";
on-click = "pamixer -t";
on-click-right = "pavucontrol -t 1";
on-scroll-up = "pamixer -i 5";
on-scroll-down = "pamixer -d 5";
scroll-step = 5;
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = ["" "" ""];
};
};
"pulseaudio#microphone" = {
format = "{format_source}";
format-source = "🎙{volume}%";
format-source-muted = "🎙Muted";
on-click = "pamixer --default-source -t";
on-click-right = "pavucontrol -t 2";
on-scroll-up = "pamixer --default-source -i 5";
on-scroll-down = "pamixer --default-source -d 5";
scroll-step = 5;
};
network = {
interface = "wlp9s0";
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ifname} ";
format-disconnected = ""; # An empty format will hide the module.
tooltip-format = "{ifname}";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
"keyboard-state#capslock" = {
capslock = true;
format = "{name} {icon}";
format-icons = {
locked = "";
unlocked = "";
};
};
"keyboard-state#numlock" = {
numlock = true;
format = "{name} {icon}";
format-icons = {
locked = "";
unlocked = "";
};
};
};
};
# https://catppuccin.com/palette
style = ''
* {
border: none;
border-radius: 0;
font-family:
Jetbrains Mono Nerd Font,
monospace;
font-weight: bold;
font-size: 14px;
min-height: 0;
}
window#waybar {
background: rgba(21, 18, 27, 0);
color: #cdd6f4;
}
tooltip {
background: #1e1e2e;
border-radius: 10px;
border-width: 2px;
border-style: solid;
border-color: #11111b;
}
#workspaces button {
padding: 5px;
color: #313244;
margin-right: 5px;
}
#workspaces button.active {
color: #a6adc8;
}
#workspaces button.focused {
color: #a6adc8;
background: #eba0ac;
border-radius: 10px;
}
#workspaces button.urgent {
color: #11111b;
background: #a6e3a1;
border-radius: 10px;
}
#workspaces button:hover {
background: #11111b;
color: #cdd6f4;
border-radius: 10px;
}
#custom-updates,
#custom-caffeine,
#custom-weather,
#window,
#clock,
#battery,
#pulseaudio,
#network,
#workspaces,
#keyboard-state.numlock,
#keyboard-state.capslock,
#tray,
#backlight {
background: #1e1e2e;
padding: 0px 10px;
margin: 3px 0px;
margin-top: 10px;
border: 1px solid #181825;
}
#tray {
border-radius: 10px;
margin-right: 10px;
}
#workspaces {
background: #1e1e2e;
border-radius: 10px;
margin-left: 10px;
padding-right: 0px;
padding-left: 5px;
}
#custom-caffeine {
color: #89dceb;
border-radius: 10px 0px 0px 10px;
border-right: 0px;
margin-left: 10px;
}
#custom-updates {
color: #f5c2e7;
border-radius: 10px 0px 0px 10px;
border-left: 0px;
border-right: 0px;
}
#window {
border-radius: 10px;
margin-left: 60px;
margin-right: 60px;
}
#clock {
color: #f5a97f;
border-radius: 10px 0px 0px 10px;
margin-left: 5px;
border-right: 0px;
}
#keyboard-state.capslock {
color: #91d7e3;
border-left: 0px;
border-right: 0px;
}
#keyboard-state.numlock {
color: #7dc4e4;
border-left: 0px;
border-right: 0px;
}
#network {
color: #eed49f;
border-left: 0px;
border-right: 0px;
border-radius: 10px 10px 10px 10px;
margin-left: 5px;
padding-right: 15px;
}
#pulseaudio {
color: #8aadf4;
border-left: 0px;
border-right: 0px;
}
#pulseaudio.microphone {
color: #c6a0f6;
border-radius: 0px 10px 10px 0px;
border-left: 0px;
border-right: 0px;
padding-top: 5px;
}
#battery {
color: #a6e3a1;
border-radius: 0 10px 10px 0;
margin-right: 10px;
border-left: 0px;
}
#custom-weather {
border-radius: 0px 10px 10px 0px;
border-right: 0px;
margin-left: 0px;
}
'';
};
}

View File

@@ -0,0 +1,85 @@
#!/usr/bin/env python
import os
import json
import subprocess
import re
from datetime import datetime
import time
tmp_path = '/tmp/waybar-scripts/updates'
json_cache = tmp_path + "/data.json"
git_repo = 'git@github.com:mjallen18/nix-config.git'
def cache_json(data):
with open(json_cache, mode="w") as cache:
json.dump(data, cache)
def create_folders():
if not os.path.exists(tmp_path):
os.makedirs(tmp_path)
os.chdir(tmp_path)
def clone_repo():
reset_repo()
if os.path.exists(tmp_path) and len(os.listdir(tmp_path)) == 0:
subprocess.run(["git", "clone", git_repo, tmp_path])
def check_for_flake_updates():
return subprocess.run(["sudo", "nix", "flake", "update", "-I", tmp_path, tmp_path], capture_output=True, text=True)
def reset_repo():
if os.path.exists(tmp_path) and not len(os.listdir(tmp_path)) == 0:
subprocess.run(["git", "reset", "--hard"])
subprocess.run(["git", "pull"])
def parse_output(output):
updates_dict = {}
updates = re.findall(r"(• Updated input '(.+)':((\n|\r|\n)(.+\((\d\d\d\d-\d\d-\d\d\)))){2})", output)
for update in updates:
input = re.findall(r"'(.+)':", update[0])[0].strip()
dates = re.findall(r"(\d{4}-\d{2}-\d{2})", update[0])
updates_dict[input] = dates
return updates_dict
def check():
data = {}
# print("create folders")
create_folders()
# print("clone repo")
clone_repo()
# print("checking for updates")
updates = check_for_flake_updates()
updates_dict = parse_output(updates.stderr)
data["text"] = (str(len(updates_dict.keys())))
if len(updates_dict.keys()) <= 0:
data["tooltip"] = ("flake inputs up to date")
else:
data["tooltip"] = ("flake input updates:\n\n")
for input in updates_dict.keys():
data["tooltip"] += "<b>{}</b>\n".format(input)
data["tooltip"] += "Old Ref: {0}{1}\n\n".format(updates_dict[input][0].strip(), updates_dict[input][1].strip())
cache_json(data)
print(json.dumps(data))
def read_cache():
with open(json_cache, mode="r") as cache:
print(json.dumps(json.load(cache)))
def main():
now = int(datetime.now().strftime("%H"))
if os.path.exists(json_cache):
mtime = int(time.localtime(os.stat(json_cache).st_ctime).tm_hour)
else:
mtime = now + 1
if (now % 2 == 0 and mtime < now) or not os.path.exists(json_cache):
check()
else:
read_cache()
main()

View File

@@ -0,0 +1,137 @@
#!/usr/bin/env python
import json
from datetime import datetime
import requests
WEATHER_CODES = {
"113": "☀️ ",
"116": "",
"119": "☁️ ",
"122": "☁️ ",
"143": "☁️ ",
"176": "🌧️",
"179": "🌧️",
"182": "🌧️",
"185": "🌧️",
"200": "⛈️ ",
"227": "🌨️",
"230": "🌨️",
"248": "☁️ ",
"260": "☁️ ",
"263": "🌧️",
"266": "🌧️",
"281": "🌧️",
"284": "🌧️",
"293": "🌧️",
"296": "🌧️",
"299": "🌧️",
"302": "🌧️",
"305": "🌧️",
"308": "🌧️",
"311": "🌧️",
"314": "🌧️",
"317": "🌧️",
"320": "🌨️",
"323": "🌨️",
"326": "🌨️",
"329": "❄️ ",
"332": "❄️ ",
"335": "❄️ ",
"338": "❄️ ",
"350": "🌧️",
"353": "🌧️",
"356": "🌧️",
"359": "🌧️",
"362": "🌧️",
"365": "🌧️",
"368": "🌧️",
"371": "❄️",
"374": "🌨️",
"377": "🌨️",
"386": "🌨️",
"389": "🌨️",
"392": "🌧️",
"395": "❄️ ",
}
data = {}
weather = requests.get("https://wttr.in/?format=j1").json()
def format_time(time):
return datetime.strptime(format_24_time(time), "%H").strftime("%I %p")
def format_24_time(time):
return time.replace("00", "").zfill(2)
def format_temp(temp):
return (hour["FeelsLikeF"] + "°").ljust(3)
def format_chances(hour):
chances = {
"chanceoffog": "Fog",
"chanceoffrost": "Frost",
"chanceofovercast": "Overcast",
"chanceofrain": "Rain",
"chanceofsnow": "Snow",
"chanceofsunshine": "Sunshine",
"chanceofthunder": "Thunder",
"chanceofwindy": "Wind",
}
conditions = []
for event in chances.keys():
if int(hour[event]) > 0:
conditions.append(chances[event] + " " + hour[event] + "%")
return ", ".join(conditions)
tempint = int(weather["current_condition"][0]["FeelsLikeF"])
extrachar = ""
if tempint > 0 and tempint < 10:
extrachar = "+"
data["text"] = (
""
+ WEATHER_CODES[weather["current_condition"][0]["weatherCode"]]
+ " "
+ extrachar
+ weather["current_condition"][0]["FeelsLikeF"]
+ "°"
)
data["tooltip"] = (
f"<b>{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_F']}°</b>\n"
)
data["tooltip"] += f"Feels like: {weather['current_condition'][0]['FeelsLikeF']}°\n"
data["tooltip"] += f"Wind: {weather['current_condition'][0]['windspeedMiles']}mph\n"
data["tooltip"] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n"
for i, day in enumerate(weather["weather"]):
data["tooltip"] += f"\n<b>"
if i == 0:
data["tooltip"] += "Today, "
if i == 1:
data["tooltip"] += "Tomorrow, "
date = datetime.strptime(day['date'], "%Y-%m-%d").strftime("%a %b %d %Y")
data["tooltip"] += f"{date}</b>\n"
data["tooltip"] += f"⬆️ {day['maxtempF']}° ⬇️ {day['mintempF']}° "
data[
"tooltip"
] += f"☀️ {day['astronomy'][0]['sunrise']} 🌕 {day['astronomy'][0]['sunset']}\n"
for hour in day["hourly"]:
if i == 0:
if int(format_24_time(hour["time"])) < datetime.now().hour - 2:
continue
data[
"tooltip"
] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeF'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n"
print(json.dumps(data))

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,36 @@
{
"label" : "lock",
"action" : "swaylock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "hibernate",
"action" : "systemctl hibernate",
"text" : "Hibernate",
"keybind" : "h"
}
{
"label" : "logout",
"action" : "sleep 1; hyprctl dispatch exit",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}

View File

@@ -0,0 +1,50 @@
* {
background-image: none;
}
window {
background-color: rgba(36, 39, 58, 0.9);
}
button {
margin: 8px;
color: #cad3f5;
background-color: #363a4f;
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:active,
button:focus,
button:hover {
color: #8bd5ca;
background-color: #24273a;
outline-style: none;
}
#lock {
background-image: image(url("icons/lock.png"));
}
#logout {
background-image: image(url("icons/logout.png"));
}
#suspend {
background-image: image(url("icons/suspend.png"));
}
#hibernate {
background-image: image(url("icons/hibernate.png"));
}
#shutdown {
background-image: image(url("icons/shutdown.png"));
}
#reboot {
background-image: image(url("icons/reboot.png"));
}

View File

@@ -0,0 +1,145 @@
{
programs.wofi = {
enable = false;
style = ''
@define-color rosewater #f4dbd6;
@define-color rosewater-rgb rgb(244, 219, 214);
@define-color flamingo #f0c6c6;
@define-color flamingo-rgb rgb(240, 198, 198);
@define-color pink #f5bde6;
@define-color pink-rgb rgb(245, 189, 230);
@define-color mauve #c6a0f6;
@define-color mauve-rgb rgb(198, 160, 246);
@define-color red #ed8796;
@define-color red-rgb rgb(237, 135, 150);
@define-color maroon #ee99a0;
@define-color maroon-rgb rgb(238, 153, 160);
@define-color peach #f5a97f;
@define-color peach-rgb rgb(245, 169, 127);
@define-color yellow #eed49f;
@define-color yellow-rgb rgb(238, 212, 159);
@define-color green #a6da95;
@define-color green-rgb rgb(166, 218, 149);
@define-color teal #8bd5ca;
@define-color teal-rgb rgb(139, 213, 202);
@define-color sky #91d7e3;
@define-color sky-rgb rgb(145, 215, 227);
@define-color sapphire #7dc4e4;
@define-color sapphire-rgb rgb(125, 196, 228);
@define-color blue #8aadf4;
@define-color blue-rgb rgb(138, 173, 244);
@define-color lavender #b7bdf8;
@define-color lavender-rgb rgb(183, 189, 248);
@define-color text #cad3f5;
@define-color text-rgb rgb(202, 211, 245);
@define-color subtext1 #b8c0e0;
@define-color subtext1-rgb rgb(184, 192, 224);
@define-color subtext0 #a5adcb;
@define-color subtext0-rgb rgb(165, 173, 203);
@define-color overlay2 #939ab7;
@define-color overlay2-rgb rgb(147, 154, 183);
@define-color overlay1 #8087a2;
@define-color overlay1-rgb rgb(128, 135, 162);
@define-color overlay0 #6e738d;
@define-color overlay0-rgb rgb(110, 115, 141);
@define-color surface2 #5b6078;
@define-color surface2-rgb rgb(91, 96, 120);
@define-color surface1 #494d64;
@define-color surface1-rgb rgb(73, 77, 100);
@define-color surface0 #363a4f;
@define-color surface0-rgb rgb(54, 58, 79);
@define-color base #24273a;
@define-color base-rgb rgb(36, 39, 58);
@define-color mantle #1e2030;
@define-color mantle-rgb rgb(30, 32, 48);
@define-color crust #181926;
@define-color crust-rgb rgb(24, 25, 38);
* {
font-family: "Inconsolata Nerd Font", monospace;
font-size: 14px;
}
/* Window */
window {
margin: 0px;
padding: 10px;
border: 0.16em solid @lavender;
border-radius: 0.1em;
background-color: @base;
}
/* Inner Box */
#inner-box {
margin: 5px;
padding: 10px;
border: none;
background-color: @base;
}
/* Outer Box */
#outer-box {
margin: 5px;
padding: 10px;
border: none;
background-color: @base;
}
/* Scroll */
#scroll {
margin: 0px;
padding: 10px;
border: none;
background-color: @base;
}
/* Input */
#input {
margin: 5px 20px;
padding: 10px;
border: none;
border-radius: 0.1em;
color: @text;
background-color: @base;
}
#input image {
border: none;
color: @red;
}
#input * {
outline: 4px solid @red!important;
}
/* Text */
#text {
margin: 5px;
border: none;
color: @text;
}
#entry {
background-color: @base;
}
#entry arrow {
border: none;
color: @lavender;
}
/* Selected Entry */
#entry:selected {
border: 0.11em solid @lavender;
}
#entry:selected #text {
color: @mauve;
}
#entry:drop(active) {
background-color: @lavender!important;
}
'';
};
}

View File

@@ -0,0 +1,103 @@
{ pkgs, ... }:
let
sddmTheme = "catppuccin-mocha";
in
{
specialisation.hyprland.configuration = {
imports = [
./environment.nix
];
home-manager.users.matt = import ./home.nix;
services = {
displayManager.sddm.enable = true;
displayManager.sddm.package = pkgs.kdePackages.sddm;
displayManager.sddm.theme = sddmTheme;
displayManager.defaultSession = "hyprland";
# disable plasma
desktopManager.plasma6.enable = false;
dbus.enable = true;
ddccontrol.enable = true;
};
programs.hyprland = {
enable = true;
xwayland.enable = true;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
};
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
extraConfig = ''
DefaultTimeoutStopSec=10s
'';
};
security = {
polkit.enable = true;
# configure sudo
sudo.extraRules = [
{
commands = [
{
command = "/run/current-system/sw/bin/waybar-weather";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/waybar-updates";
options = [ "NOPASSWD" ];
}
];
groups = [ "wheel" ];
}
];
};
xdg.portal = {
enable = true;
wlr.enable = false;
xdgOpenUsePortal = false;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-color-emoji
nerdfonts
meslo-lgs-nf
];
fonts.fontconfig.defaultFonts = {
emoji = [
"Noto Color Emoji"
];
};
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
})
];
};
}

View File

@@ -0,0 +1,61 @@
{ pkgs, ... }:
let
waybarWeatherScript = pkgs.writeScriptBin "waybar-weather" ''
#!/usr/bin/env nix-shell
#! nix-shell -i bash --packages python3 python3Packages.requests
python /home/matt/.config/waybar/scripts/waybar-wttr.py
'';
waybarUpdatesScript = pkgs.writeScriptBin "waybar-updates" ''
/home/matt/.config/waybar/scripts/waybar-updates.py
'';
in
{
environment.systemPackages = with pkgs; [
adwaita-icon-theme
apple-cursor
catppuccin
catppuccin-gtk
catppuccin-qt5ct
catppuccin-sddm
colloid-gtk-theme
colloid-icon-theme
ddcutil
dunst
glib
gnome-disk-utility
gsettings-desktop-schemas
hyprland
hyprshot
libnotify
mako
meson
nautilus
networkmanagerapplet
nwg-drawer
nwg-look
pamixer
papirus-folders
pavucontrol
playerctl
polkit
polkit_gnome
qt5.qtwayland
qt6.qtwayland
rofi-wayland
waybar
waybarUpdatesScript
waybarWeatherScript
wayland-protocols
wayland-utils
wev
wl-clipboard
wlogout
wlroots
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
xwayland
];
}

View File

@@ -0,0 +1,181 @@
{ pkgs, ... }:
let
wallpaper = "/home/matt/.config/wallpapers/wall.png";
cursorTheme = "macOS-Monterey";
cursorThemePkg = pkgs.apple-cursor;
cursorSize = 24;
gtkThemeSize = "compact";
gtkThemeAccent = "blue";
gtkThemeVariant = "macchiato";
gtkTheme = "catppuccin-${gtkThemeVariant}-${gtkThemeAccent}-${gtkThemeSize}";
gtkThemePkg = pkgs.catppuccin-gtk.override {
size = gtkThemeSize;
accents = [ gtkThemeAccent ];
variant = gtkThemeVariant;
};
iconTheme = "Colloid-dark"; # Colloid, Colloid-light, Colloid-dark
iconThemePkg = pkgs.colloid-icon-theme;
in
{
imports = [
./config.nix
./config/btop
./config/hypr
./config/kitty
./config/mako
./config/waybar
./config/wofi
];
services = {
hyprpaper = {
enable = true;
settings = {
preload = [ wallpaper ];
wallpaper = [
"DP-1, ${wallpaper}"
"DP-2, ${wallpaper}"
];
splash = false;
};
};
hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
};
listener = [
# {
# timeout = 300; # 5min
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
{
timeout = 900; # 15 min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = 930; # 15.5 min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = 3600; # 1hr
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
};
programs.hyprlock = {
enable = true;
settings = {
background = [
{
monitor = "";
path = wallpaper; # supports png, jpg, webp (no animations, though)
color = "rgba(25, 20, 20, 1.0)";
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_passes = "3"; # 0 disables blurring
blur_size = "7";
noise = "0.0117";
contrast = "0.8916";
brightness = "0.8172";
vibrancy = "0.1696";
vibrancy_darkness = "0.0";
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "DP-1";
dots_center = true;
fade_on_empty = true;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
bothlock_color = -1;
outline_thickness = 5;
placeholder_text = ''<span foreground="##cad3f5">Password...</span>'';
shadow_passes = 2;
}
];
};
};
home.sessionVariables = {
BROWSER = "firefox";
EDITOR = "nano";
TERMINAL = "kitty";
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORMTHEME = "gtk3";
QT_SCALE_FACTOR = "1";
MOZ_ENABLE_WAYLAND = "1";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland-egl";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
GTK_CSD = "0";
# WLR_DRM_DEVICES = "/dev/dri/card0";
# WLR_NO_HARDWARE_CURSORS = "1";
CLUTTER_BACKEND = "wayland";
# WLR_RENDERER = "vulkan";
XCURSOR_THEME = cursorTheme;
XCURSOR_SIZE = cursorSize;
GTK_THEME = gtkTheme;
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
GTK_USE_PORTAL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1";
XDG_CACHE_HOME = "\${HOME}/.cache";
XDG_CONFIG_HOME = "\${HOME}/.config";
#XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_DATA_HOME = "\${HOME}/.local/share";
};
home.pointerCursor = {
gtk.enable = true;
package = cursorThemePkg;
name = cursorTheme;
size = cursorSize;
};
gtk = {
enable = true;
cursorTheme = {
name = cursorTheme; # macOS-[BigSur, Monterey]-[ , White, White-Windows, Windows]
package = cursorThemePkg;
};
theme = {
name = gtkTheme;
package = gtkThemePkg;
};
iconTheme = {
name = iconTheme;
package = iconThemePkg;
};
gtk3.extraConfig = {
# gtk-application-prefer-dark-theme = true;
"AdwStyleManager:color-scheme" = "ADW_COLOR_SCHEME_PREFER_DARK";
};
gtk4.extraConfig = {
# gtk-application-prefer-dark-theme = true;
"AdwStyleManager:color-scheme" = "ADW_COLOR_SCHEME_PREFER_DARK";
};
};
}