Compare commits

..

No commits in common. "efe09d00456ffbb3e14c8264ea96a51d1f39bd88" and "07592e29726e082519a9be2a1763a43164db07b7" have entirely different histories.

15 changed files with 34 additions and 133 deletions

View file

@ -24,5 +24,6 @@ each host should have these files:
- tags for pip and popups in hyprland config
- make wl-clip-persist and networkmanager applet systemd services?
- gtk cursors are MESSED UP. top priority rn
- qt icons just... don't apply
- niri.. yum
- international keyboard for Spanish
- do lockscreen better somehow

View file

@ -50,7 +50,7 @@ in {
};
};
system.stateVersion = "23.11";
system.stateVersion = mkDefault "23.11";
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
hm.home.stateVersion = config.system.stateVersion;
@ -62,31 +62,16 @@ in {
# configure keymap in x11
services.xserver.xkb = {
layout = "us";
variant = "qwerty";
# i need to learn this sometime
# variant = "workman";
};
console = {
useXkbConfig = mkDefault true;
};
# set the time zone
services.automatic-timezoned.enable = mkDefault true;
time.timeZone = mkDefault null; # handled by automatic-timezoned
time.timeZone = mkDefault "America/Los_Angeles";
i18n = mkDefault {
defaultLocale = "en_US.UTF-8";
supportedLocales = [ "en_US.UTF-8/UTF-8" ];
};
# set the location
location.provider = mkDefault "geoclue2";
services.geoclue2 = {
enable = mkDefault true;
# the default provider is Geeked
geoProviderUrl = "https://beacondb.net/v1/geolocate";
submissionUrl = "https://beacondb.net/v2/geosubmit";
submissionNick = "geoclue";
};
i18n.defaultLocale = mkDefault "en_US.UTF-8";
hardware.enableRedistributableFirmware = true;

View file

@ -17,18 +17,18 @@
# debug
strace ltrace lsof helvum
# apps
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex kdePackages.kdenlive
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio kdePackages.kdenlive
# compatibility
wineWowPackages.waylandFull winetricks
# misc
bat file which packwiz yt-dlp fastfetch hyfetch trashy wev
bat file which packwiz yt-dlp fastfetch hyfetch
# games
prismlauncher
] ++ (with pkgs.my; [
# none yet
]) ++ (with pkgs.gnome; [
# yay gnomeware!!!!!!!!!!!!!! yum
nautilus gnome-disk-utility pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe pkgs.gnome-weather
nautilus gnome-disk-utility ghex pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe
]);
modules = {
@ -91,7 +91,6 @@
# tools
tools.gpg.enable = true;
tools.rbw.enable = true;
tools.noisetorch.enable = true;
};
};
}

View file

@ -13,7 +13,10 @@ in {
enable = true;
tray = true;
provider = "geoclue2";
# portland, oregon
latitude = 45.3112;
longitude = -122.4055;
provider = "manual";
};
};
}

View file

@ -92,8 +92,6 @@ in {
];
bind = let
screenshotScript = pkgs.writeShellScript "screenshot" ''
set -euo pipefail
temp_file=$(mktemp)
trap 'rm -f "$temp_file"' EXIT
@ -114,15 +112,15 @@ in {
;;
esac
${lib.getExe pkgs.grimblast} --freeze save "$mode" - > "$temp_file"
${lib.getExe pkgs.grimblast} --freeze save "$mode" - > "$temp_file" || exit 0 # exit successful, highly unlikely that grimblast failed, and it is more likely that the user cancelled the screenshot
cat "$temp_file" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t image/png
action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \
--app-name="Screenshot" \
--urgency="normal" \
--urgency=normal \
--action="default=Edit Image" \
--icon="$temp_file" \
--icon "$temp_file" \
"Click to annotate image")
case "$action" in
@ -131,28 +129,8 @@ in {
;;
esac
'';
pickerScript = pkgs.writeShellScript "picker" ''
set -euo pipefail
${lib.getExe pkgs.hyprpicker} --render-inactive --format hex | sed -z 's/\n//g' | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
${pkgs.libnotify}/bin/notify-send "Color Captured" \
--app-name="Picker" \
--urgency="normal" \
"Color copied to clipboard"
'';
ocrScript = pkgs.writeShellScript "ocr" ''
set -euo pipefail
output=$(${lib.getExe pkgs.grimblast} --freeze save area - | ${lib.getExe pkgs.tesseract5} - -)
echo "$output" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
${pkgs.libnotify}/bin/notify-send "OCR Captured" \
--app-name="OCR" \
--urgency="normal" \
--icon="text-x-generic-symbolic" \
"Text copied to clipboard"
pickerScript = pkgs.writeShellScript "color-picker" ''
${lib.getExe pkgs.zenity} --color-selection --color $(${lib.getExe pkgs.hyprpicker})
'';
in [
"$mod, Q, killactive, "
@ -200,8 +178,6 @@ in {
"$mod SHIFT ALT, S, exec, ${screenshotScript} window"
# pick color
"$mod SHIFT, C, exec, ${pickerScript}"
# ocr
"$mod SHIFT, T, exec, ${ocrScript}"
", XF86LaunchA, exec, ${screenshotScript} area"
", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20"
@ -284,6 +260,9 @@ in {
"float, initialTitle:^Save As$"
"size 1100 650, initialTitle:^Save As$"
"center, initialTitle:^Save As$"
"float, initialTitle:^Select a file to open$"
"size 1100 650, initialTitle:^Select a file to open$"
"center, initialTitle:^Select a file to open$"
"float, initialTitle:^File Upload$"
"size 1100 650, initialTitle:^File Upload$"
"center, initialTitle:^File Upload$"

View file

@ -15,7 +15,7 @@ in {
config = mkIf cfg.enable {
security.pam.services.hyprlock.text = "auth include login";
hm.home.packages = with pkgs; [ cfg.package wlinhibit ];
hm.home.packages = [ cfg.package ];
hm.programs.hyprlock = {
enable = true;
package = cfg.package;

View file

@ -27,7 +27,7 @@ in {
Service = {
Type = "simple";
ExecStart = "${lib.getExe cfg.package} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus -wm hyprland";
ExecStart = "${lib.getExe cfg.package} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus";
Restart = "on-failure";
RestartSec = 5;
};

View file

@ -15,7 +15,6 @@ in {
themePackages = [ config.modules.desktop.themes.plymouthTheme.package ];
theme = config.modules.desktop.themes.plymouthTheme.name;
};
boot.kernelParams = [ "plymouth.use-simpledrm" ];
# smooth transition from plymouth to the login manager
# honestly, i have No Clue what this does, but it's in the arch wiki so it must be good

View file

@ -17,8 +17,6 @@ in {
setScript = mkOption {
type = types.package;
default = pkgs.writeShellScript "swww-set" ''
set -euo pipefail
if [ ! -f "${lastWallpaper}" ]; then
echo "$(ls ${wallpapersFolder} | shuf -n 1)" > "${lastWallpaper}"
fi
@ -29,8 +27,6 @@ in {
swapScript = mkOption {
type = types.package;
default = pkgs.writeShellScript "swww-swap" ''
set -euo pipefail
file=$(ls ${wallpapersFolder} | ${lib.getExe config.modules.desktop.rofi.package} -dmenu -sep '\n' -i -p "select a wallpaper")
wallpaper="${wallpapersFolder}/$file"

View file

@ -5,8 +5,6 @@ let
cfg = config.modules.desktop.themes;
accent = "pink";
variant = "mocha";
dark = variant != "latte";
colorScheme = inputs.nix-colors.colorSchemes.${"catppuccin-${variant}"};
pascalCase = s: (toUpper (substring 0 1 s)) + (toLower (substring 1 (stringLength s) s));
in {
@ -14,7 +12,7 @@ in {
colorScheme = colorScheme;
modules.desktop.themes = {
dark = dark;
dark = variant != "latte";
gtkTheme = {
name = "catppuccin-${variant}-${accent}-compact+rimless";
@ -35,12 +33,12 @@ in {
};
iconTheme = {
name = "WhiteSur-${if dark then "dark" else "light"}";
name = "WhiteSur-dark";
package = pkgs.whitesur-icon-theme;
};
cursorTheme = {
name = "graphite-${if dark then "dark" else "light"}";
name = "graphite-dark";
package = pkgs.graphite-cursors;
size = 24;
};

View file

@ -104,15 +104,6 @@ in {
platformTheme.name = "qtct";
style.name = "kvantum";
};
# needed for svg icons in qt to work,
# so we just install them unconditionally
hm.home.packages = with pkgs; [
cfg.iconTheme.package
libsForQt5.breeze-icons
libsForQt5.qt5.qtsvg
# kdePackages.breeze-icons
kdePackages.qtsvg
];
hm.home.pointerCursor = {
gtk.enable = true;
@ -181,11 +172,6 @@ in {
};
};
in {
"kdeglobals".text = ''
[Icons]
Theme=${cfg.iconTheme.name}
'';
"Kvantum/${cfg.kvantumTheme.name}".source = "${cfg.kvantumTheme.package}/share/Kvantum/${cfg.kvantumTheme.name}";
"Kvantum/kvantum.kvconfig".text = ''
[General]

View file

@ -75,9 +75,7 @@ in {
];
};
"custom/power" = let
powerMenuScript = pkgs.writeShellScript "power-menu" ''
set -euo pipefail
powerSelect = pkgs.writeShellScript "power-menu" ''
cmd=$(echo ' shutdown| reboot| lock| exit desktop environment' | ${lib.getExe pkgs.rofi-wayland} -dmenu -sep '|' -i -p 'what to do ?' -theme-str 'window { height: 132px; }')
case "$cmd" in
" shutdown")
@ -98,7 +96,7 @@ in {
format = "";
tooltip = true;
tooltip-format = "Power menu";
on-click = "${powerMenuScript}";
on-click = "${powerSelect}";
};
"custom/wallpaper" = {
format = "";
@ -260,41 +258,12 @@ in {
icon-size = 16;
spacing = 4;
};
"custom/weather" = let
# this *should* be from coordinates, but we have to make it city because...
# https://github.com/chubin/wttr.in/issues/795
# i was NOT going to let ip-based location be a thing. i was suprisingly medicated when i wrote this
locationScript = pkgs.writeShellScript "location" ''
set -euo pipefail
lon=""
lat=""
while IFS= read -r line; do
if [[ "$line" == *"Latitude"* ]]; then
lat=$(echo "$line" | awk '{ gsub(/[" ]/, "", $2); printf("%.2f", $2) }')
elif [[ "$line" == *"Longitude"* ]]; then
lon=$(echo "$line" | awk '{ gsub(/[" ]/, "", $2); printf("%.2f", $2) }')
fi
if [[ -n "$lat" && -n "$lon" ]]; then
break
fi
# -a 4 -- set accuracy to city
done < <(${pkgs.geoclue2}/libexec/geoclue-2.0/demos/where-am-i -a 4)
# i've had issues including country *and* state here, so state has higher priority and falls back to country. works fine for my current place and home town, so good enough <3
# zoom=10 -- set zoom to city
# addressdetails=1 -- get address details, includes neighborhood (if requested) to city
echo $(curl "https://nominatim.openstreetmap.org/reverse?lat=''${lat}&lon=''${lon}&addressdetails=1&zoom=10&format=json" | ${lib.getExe pkgs.jq} -r '.address | "\((to_entries[0].value)), \(.state // "\(.country)")"')
'';
in {
"custom/weather" = {
format = "{}°";
tooltip = true;
on-click = "${lib.getExe pkgs.gnome-weather}";
interval = 3600;
# doxxing live stream
# edit: no longer doxxing, you will be remembered
exec = ''${lib.getExe pkgs.wttrbar} --location "$(${locationScript})" --hide-conditions --fahrenheit --mph'';
exec = "${lib.getExe pkgs.wttrbar} --location 'Corvallis, Oregon, United States' --hide-conditions --fahrenheit --mph";
return-type = "json";
};
};

View file

@ -28,7 +28,7 @@ in {
};
};
hm.xdg.configFile."micro/colorschemes/${schemeName}.micro".text = with config.colorScheme.palette; ''
hm.home.file.".config/micro/colorschemes/${schemeName}.micro".text = with config.colorScheme.palette; ''
color-link default "#${base05},#${base00}"
color-link comment "#${base03},#${base00}"
color-link identifier "#${base0D},#${base00}"

View file

@ -67,7 +67,7 @@ in {
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${lib.getExe pkgs.nil}";
"security.workspace.trust.enabled" = "false";
"security.workspace.trust.untrustedFiles" = "open";
"explorer.compactFolders" = false;
"explorer.confirmDelete" = false;

View file

@ -1,14 +0,0 @@
{ config, lib, ... }:
with lib;
let
cfg = config.modules.software.tools.noisetorch;
in {
options.modules.software.tools.noisetorch = {
enable = mkEnableOption "Enable noisetorch, a microphone noise supression tool";
};
config = mkIf cfg.enable {
programs.noisetorch.enable = true;
};
}