chore: format everything

This commit is contained in:
oddlama 2024-11-26 13:34:55 +01:00
parent deca311c68
commit 7ccd7856ee
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
162 changed files with 4750 additions and 3718 deletions

View file

@ -3,7 +3,8 @@
nixosConfig,
pkgs,
...
}: {
}:
{
imports =
[
./discord.nix

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = with pkgs; [
discord
webcord

View file

@ -2,7 +2,8 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) concatStringsSep escapeShellArg mapAttrsToList;
env = {
MOZ_WEBRENDER = 1;
@ -23,7 +24,8 @@
rev = "116.1";
hash = "sha256-Ai8Szbrk/4FhGhS4r5gA2DqjALFRfQKo2a/TwWCIA6g=";
};
in {
in
{
programs.firefox = {
enable = true;
package = pkgs.firefox.overrideAttrs (old: {
@ -153,7 +155,15 @@ in {
search = {
force = true;
default = "Kagi";
order = ["Kagi" "DuckDuckGo" "Youtube" "NixOS Options" "Nix Packages" "GitHub" "HackerNews"];
order = [
"Kagi"
"DuckDuckGo"
"Youtube"
"NixOS Options"
"Nix Packages"
"GitHub"
"HackerNews"
];
engines = {
"Bing".metaData.hidden = true;
@ -163,7 +173,7 @@ in {
"Kagi" = {
iconUpdateURL = "https://kagi.com/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@k"];
definedAliases = [ "@k" ];
urls = [
{
template = "https://kagi.com/search";
@ -180,7 +190,7 @@ in {
"YouTube" = {
iconUpdateURL = "https://youtube.com/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@yt"];
definedAliases = [ "@yt" ];
urls = [
{
template = "https://www.youtube.com/results";
@ -196,7 +206,7 @@ in {
"Nix Packages" = {
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
definedAliases = [ "@np" ];
urls = [
{
template = "https://search.nixos.org/packages";
@ -216,7 +226,7 @@ in {
"NixOS Options" = {
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@no"];
definedAliases = [ "@no" ];
urls = [
{
template = "https://search.nixos.org/options";
@ -237,7 +247,7 @@ in {
"GitHub" = {
iconUpdateURL = "https://github.com/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@gh"];
definedAliases = [ "@gh" ];
urls = [
{
@ -254,7 +264,7 @@ in {
"Home Manager" = {
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@hm"];
definedAliases = [ "@hm" ];
url = [
{
@ -272,7 +282,7 @@ in {
"HackerNews" = {
iconUpdateURL = "https://hn.algolia.com/favicon.ico";
updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@hn"];
definedAliases = [ "@hn" ];
url = [
{
@ -512,9 +522,9 @@ in {
];
xdg.mimeApps.defaultApplications = {
"text/html" = ["firefox.desktop"];
"text/xml" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
"text/html" = [ "firefox.desktop" ];
"text/xml" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
};
}

View file

@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
colors = config.lib.stylix.colors.withHashtag;
in {
xdg.configFile."flameshot/flameshot.ini".source = (pkgs.formats.ini {}).generate "flameshot.ini" {
in
{
xdg.configFile."flameshot/flameshot.ini".source = (pkgs.formats.ini { }).generate "flameshot.ini" {
General = {
antialiasingPinZoom = false;
buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\0\0\0\0\x3\0\0\0\x4\0\0\0\x5\0\0\0\x6\0\0\0\x12\0\0\0\xf\0\0\0\x13\0\0\0\a\0\0\0\t\0\0\0\x10\0\0\0\n\0\0\0\v\0\0\0\x17\0\0\0\f\0\0\0\x11)'';

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# XXX: to enable dark mode, no idea why it isn't detected by default.
# dconf write /com/usebottles/bottles/dark-theme true

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# XXX: Do NOT enable "Use discrete GPU" when running on nvidia by default.
# Otherwise the xorg server will crash big time (no logs). After some gdb
# debugging the culprit seems to be the x11 nvidia driver (nvidia_drv.so),

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.persistence."/state".directories = [
".config/awakened-poe-trade"
];

View file

@ -3,7 +3,8 @@
pkgs,
nixosConfig,
...
}: let
}:
let
save-replay = pkgs.writeShellApplication {
name = "gpu-screen-recorder-save-replay";
runtimeInputs = [
@ -34,7 +35,7 @@
on-stop-service = pkgs.writeShellApplication {
name = "gpu-screen-recorder-stop-service";
runtimeInputs = [pkgs.libnotify];
runtimeInputs = [ pkgs.libnotify ];
text = ''
if [[ "$SERVICE_RESULT" == "success" ]]; then
notify-send '🎥 GPU Screen Recorder' '🔴 Replay service stopped!' \
@ -85,7 +86,8 @@
-o "$GSR_OUTPUTDIR"
'';
};
in {
in
{
lib.gpu-screen-recorder = {
inherit save-replay;
};

View file

@ -7,9 +7,9 @@
nixosConfig,
pkgs,
...
}: let
inherit
(lib)
}:
let
inherit (lib)
concatMap
elem
flip
@ -20,7 +20,8 @@
;
rofi-drun = "rofi -show drun -theme ~/.config/rofi/launchers/type-1/style-10.rasi";
in {
in
{
home.packages = with pkgs; [
wl-clipboard
];
@ -94,12 +95,10 @@ in {
"SUPER + SHIFT,comma,movetoworkspacesilent,-1"
"SUPER + SHIFT,period,movetoworkspacesilent,+1"
]
++ flip concatMap (map toString (lib.lists.range 1 9)) (
x: [
"SUPER,${x},workspace,${x}"
"SUPER + SHIFT,${x},movetoworkspacesilent,${x}"
]
);
++ flip concatMap (map toString (lib.lists.range 1 9)) (x: [
"SUPER,${x},workspace,${x}"
"SUPER + SHIFT,${x},movetoworkspacesilent,${x}"
]);
bindm = [
# mouse movements
@ -200,10 +199,12 @@ in {
];
})
(mkIf (nixosConfig.node.name == "nom") {
monitor = [
];
workspace = [
];
monitor =
[
];
workspace =
[
];
})
];

View file

@ -139,7 +139,7 @@ fn cmd_toggle_layout(config: &Config, workspace: &Node) -> Option<String> {
// Don't do anything if the layout is already correct
if &con.layout == desired_layout {
return None
return None;
}
con = &con.nodes[0];

View file

@ -4,9 +4,9 @@
nixosConfig,
pkgs,
...
}: let
inherit
(lib)
}:
let
inherit (lib)
escapeShellArg
getExe
mapAttrs'
@ -26,7 +26,7 @@
meta = with lib; {
description = "A helper utility to allow assigning a layout to each workspace in i3";
license = licenses.mit;
maintainers = with maintainers; [oddlama];
maintainers = with maintainers; [ oddlama ];
mainProgram = "i3-per-workspace-layout";
};
};
@ -46,11 +46,12 @@
meta = with lib; {
description = "Better focus navigation for sway and i3";
license = licenses.mit;
maintainers = with maintainers; [oddlama];
maintainers = with maintainers; [ oddlama ];
mainProgram = "sway-overfocus";
};
};
in {
in
{
xsession.numlock.enable = true;
xsession.windowManager.i3 = {
enable = true;
@ -148,107 +149,126 @@ in {
window.titlebar = false;
floating.criteria = [
{class = "^Pavucontrol$";}
{ class = "^Pavucontrol$"; }
#{class = "^awakened-poe-trade$";}
];
assigns = {
"1" = [
{class = "^firefox$";}
{ class = "^firefox$"; }
];
"5" = [
{class = "^bottles$";}
{class = "^steam$";}
{class = "^prismlauncher$";}
{ class = "^bottles$"; }
{ class = "^steam$"; }
{ class = "^prismlauncher$"; }
];
"7" = [
{class = "^obsidian$";}
{class = "^discord$";}
{class = "^Signal$";}
{class = "^TelegramDesktop$";}
{ class = "^obsidian$"; }
{ class = "^discord$"; }
{ class = "^Signal$"; }
{ class = "^TelegramDesktop$"; }
];
"8" = [
{class = "^Spotify$";}
{ class = "^Spotify$"; }
];
};
# TODO eww -> bars = [ ];
workspaceOutputAssign =
{
kroma = let
monitorMain = "DP-2";
monitorLeft = "DP-4";
in
map (x: {
workspace = x;
output = monitorMain;
}) ["1" "2" "3" "4" "5" "6"]
++ map (x: {
workspace = x;
output = monitorLeft;
}) ["7" "8" "9"];
kroma =
let
monitorMain = "DP-2";
monitorLeft = "DP-4";
in
map
(x: {
workspace = x;
output = monitorMain;
})
[
"1"
"2"
"3"
"4"
"5"
"6"
]
++
map
(x: {
workspace = x;
output = monitorLeft;
})
[
"7"
"8"
"9"
];
}
.${nixosConfig.node.name}
or [];
.${nixosConfig.node.name} or [ ];
startup = let
configLayouts = (pkgs.formats.toml {}).generate "per-workspace-layouts.toml" {
force = true;
layouts = {
"1" = "tabbed";
"5" = "tabbed";
"7" = "tabbed";
"8" = "tabbed";
"9" = "tabbed";
startup =
let
configLayouts = (pkgs.formats.toml { }).generate "per-workspace-layouts.toml" {
force = true;
layouts = {
"1" = "tabbed";
"5" = "tabbed";
"7" = "tabbed";
"8" = "tabbed";
"9" = "tabbed";
};
};
};
in [
{
command = "${getExe i3-per-workspace-layout} --config ${configLayouts}";
always = false;
notification = false;
}
];
in
[
{
command = "${getExe i3-per-workspace-layout} --config ${configLayouts}";
always = false;
notification = false;
}
];
};
};
systemd.user.services = {
wired.Install.WantedBy = lib.mkForce ["i3-session.target"];
flameshot.Install.WantedBy = lib.mkForce ["i3-session.target"];
wired.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
flameshot.Install.WantedBy = lib.mkForce [ "i3-session.target" ];
};
programs.autorandr.enable = true;
programs.autorandr.profiles =
{
kroma = let
monitorMain = "DP-2";
monitorLeft = "DP-4";
in {
main = {
config = {
${monitorLeft} = {
enable = true;
mode = "3840x2160";
rate = "60.00";
position = "0x0";
kroma =
let
monitorMain = "DP-2";
monitorLeft = "DP-4";
in
{
main = {
config = {
${monitorLeft} = {
enable = true;
mode = "3840x2160";
rate = "60.00";
position = "0x0";
};
${monitorMain} = {
enable = true;
primary = true;
mode = "3840x2160";
rate = "144.00";
position = "3840x0";
};
};
${monitorMain} = {
enable = true;
primary = true;
mode = "3840x2160";
rate = "144.00";
position = "3840x0";
fingerprint = {
${monitorMain} = "00ffffffffffff001e6d9a5b078e0a000b1f0104b53c2278f919c1ae5044af260e5054210800d1c061404540314001010101010101014dd000a0f0703e803020350058542100001a000000fd0c3090505086010a202020202020000000fc003237474e3935300a2020202020000000ff003131314e5447594c423731390a02e602032d7123090707830100004410040301e2006ae305c000e60605017360216d1a0000020b309000047321602900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f47012790300030128d8060284ff0e9f002f801f006f08910002000400404f0104ff0e9f002f801f006f086200020004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d90";
${monitorLeft} = "00ffffffffffff001e6d095b39790700081a0104b53c22789f3035a7554ea3260f50542108007140818081c0a9c0d1c08100010101014dd000a0f0703e803020650c58542100001a286800a0f0703e800890650c58542100001a000000fd00283d878738010a202020202020000000fc004c4720556c7472612048440a2001850203117144900403012309070783010000023a801871382d40582c450058542100001e565e00a0a0a029503020350058542100001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c8";
};
};
fingerprint = {
${monitorMain} = "00ffffffffffff001e6d9a5b078e0a000b1f0104b53c2278f919c1ae5044af260e5054210800d1c061404540314001010101010101014dd000a0f0703e803020350058542100001a000000fd0c3090505086010a202020202020000000fc003237474e3935300a2020202020000000ff003131314e5447594c423731390a02e602032d7123090707830100004410040301e2006ae305c000e60605017360216d1a0000020b309000047321602900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f47012790300030128d8060284ff0e9f002f801f006f08910002000400404f0104ff0e9f002f801f006f086200020004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d90";
${monitorLeft} = "00ffffffffffff001e6d095b39790700081a0104b53c22789f3035a7554ea3260f50542108007140818081c0a9c0d1c08100010101014dd000a0f0703e803020650c58542100001a286800a0f0703e800890650c58542100001a000000fd00283d878738010a202020202020000000fc004c4720556c7472612048440a2001850203117144900403012309070783010000023a801871382d40582c450058542100001e565e00a0a0a029503020350058542100001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c8";
};
};
};
}
.${nixosConfig.node.name}
or {};
.${nixosConfig.node.name} or { };
home.sessionVariables = {
# Make gtk apps bigger

View file

@ -3,7 +3,8 @@
lib,
pkgs,
...
}: {
}:
{
home.sessionVariables = {
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
};

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
@ -7,26 +8,26 @@
};
};
home.file = let
rofi-themes = pkgs.fetchFromGitHub {
owner = "adi1090x";
repo = "rofi";
rev = "3a28753b0a8fb666f4bd0394ac4b0e785577afa2";
hash = "sha256-G3sAyIZbq1sOJxf+NBlXMOtTMiBCn6Sat8PHryxRS0w=";
home.file =
let
rofi-themes = pkgs.fetchFromGitHub {
owner = "adi1090x";
repo = "rofi";
rev = "3a28753b0a8fb666f4bd0394ac4b0e785577afa2";
hash = "sha256-G3sAyIZbq1sOJxf+NBlXMOtTMiBCn6Sat8PHryxRS0w=";
};
in
{
".config/rofi/colors" = {
source = "${rofi-themes}/files/colors";
recursive = true;
};
".config/rofi/launchers/type-1/style-10.rasi".source = "${rofi-themes}/files/launchers/type-1/style-10.rasi";
".config/rofi/launchers/type-1/shared/colors.rasi".text =
# css
''
@import "~/.config/rofi/colors/onedark.rasi"
'';
".config/rofi/launchers/type-1/shared/fonts.rasi".text = "";
};
in {
".config/rofi/colors" = {
source = "${rofi-themes}/files/colors";
recursive = true;
};
".config/rofi/launchers/type-1/style-10.rasi".source = "${rofi-themes}/files/launchers/type-1/style-10.rasi";
".config/rofi/launchers/type-1/shared/colors.rasi".text =
/*
css
*/
''
@import "~/.config/rofi/colors/onedark.rasi"
'';
".config/rofi/launchers/type-1/shared/fonts.rasi".text = "";
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = with pkgs; [
signal-desktop
];

View file

@ -2,7 +2,8 @@
config,
lib,
...
}: {
}:
{
services.swaync = {
enable = true;
settings = {

View file

@ -2,7 +2,8 @@
lib,
pkgs,
...
}: let
}:
let
swww-update-wallpaper = pkgs.writeShellApplication {
name = "swww-update-wallpaper";
runtimeInputs = [
@ -20,15 +21,16 @@
--transition-duration 1.5
'';
};
in {
in
{
systemd.user = {
services = {
swww = {
Install.WantedBy = ["graphical-session.target"];
Install.WantedBy = [ "graphical-session.target" ];
Unit = {
Description = "Wayland wallpaper daemon";
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.swww}/bin/swww-daemon";
@ -36,7 +38,7 @@ in {
};
};
swww-update-wallpaper = {
Install.WantedBy = ["default.target"];
Install.WantedBy = [ "default.target" ];
Unit.Description = "Update the wallpaper";
Service = {
Type = "oneshot";
@ -47,7 +49,7 @@ in {
};
};
timers.swww-update-wallpaper = {
Install.WantedBy = ["timers.target"];
Install.WantedBy = [ "timers.target" ];
Unit.Description = "Periodically switch to a new wallpaper";
Timer.OnCalendar = "*:0/5"; # Every 5 minutes
};

View file

@ -3,7 +3,8 @@
nixosConfig,
pkgs,
...
}: {
}:
{
xresources.properties = {
"Xft.hinting" = true;
"Xft.antialias" = true;
@ -13,29 +14,31 @@
"Xft.rgba" = "rgb";
};
gtk = let
gtk34extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-size = 32;
gtk-enable-animations = true;
gtk-xft-antialias = 1;
gtk-xft-dpi = 160; # XXX: delete for wayland?
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintfull";
gtk-xft-rgba = "rgb";
};
in {
enable = true;
gtk =
let
gtk34extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-cursor-theme-size = 32;
gtk-enable-animations = true;
gtk-xft-antialias = 1;
gtk-xft-dpi = 160; # XXX: delete for wayland?
gtk-xft-hinting = 1;
gtk-xft-hintstyle = "hintfull";
gtk-xft-rgba = "rgb";
};
in
{
enable = true;
iconTheme = {
name = "WhiteSur-dark";
package = pkgs.whitesur-icon-theme;
};
iconTheme = {
name = "WhiteSur-dark";
package = pkgs.whitesur-icon-theme;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme = true";
gtk3.extraConfig = gtk34extraConfig;
gtk4.extraConfig = gtk34extraConfig;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme = true";
gtk3.extraConfig = gtk34extraConfig;
gtk4.extraConfig = gtk34extraConfig;
};
home.sessionVariables.GTK_THEME = config.gtk.theme.name;

View file

@ -2,16 +2,19 @@
config,
lib,
...
}: {
accounts.email.accounts = lib.flip lib.mapAttrs' config.userSecrets.accounts.email (_n: v:
}:
{
accounts.email.accounts = lib.flip lib.mapAttrs' config.userSecrets.accounts.email (
_n: v:
lib.nameValuePair v.address (
lib.recursiveUpdate v {
thunderbird = {
enable = true;
profiles = ["personal"];
profiles = [ "personal" ];
};
}
));
)
);
programs.thunderbird = {
enable = true;
@ -81,8 +84,8 @@
];
xdg.mimeApps.defaultApplications = {
"x-scheme-handler/mailto" = ["thunderbird.desktop"];
"x-scheme-handler/mid" = ["thunderbird.desktop"];
"message/rfc822" = ["thunderbird.desktop"];
"x-scheme-handler/mailto" = [ "thunderbird.desktop" ];
"x-scheme-handler/mid" = [ "thunderbird.desktop" ];
"message/rfc822" = [ "thunderbird.desktop" ];
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: let
{ pkgs, ... }:
let
ts3 = pkgs.writeShellApplication {
name = "teamspeak3";
runtimeInputs = [
@ -9,8 +10,9 @@
exec ts3client
'';
};
in {
home.packages = [ts3];
in
{
home.packages = [ ts3 ];
home.persistence."/persist".directories = [
".config/teamspeak3"
];

View file

@ -2,7 +2,8 @@
lib,
pkgs,
...
}: {
}:
{
programs.waybar = {
enable = true;
systemd.enable = true;
@ -121,7 +122,17 @@
battery = {
interval = 2;
format = "{icon} {capacity}%";
format-icons = ["" "" "" "" "" "" "" "" ""];
format-icons = [
""
""
""
""
""
""
""
""
""
];
states = {
warning = 25;
critical = 15;
@ -154,7 +165,10 @@
wireplumber = {
format = "<tt>{icon} {volume}%</tt>";
format-muted = "<tt> {volume}%</tt>";
format-icons = ["" ""];
format-icons = [
""
""
];
on-click = "${pkgs.hyprland}/bin/hyprctl dispatch exec \"[float;pin;move 80% 50%;size 20% 50%;noborder]\" ${lib.getExe pkgs.pwvucontrol}";
on-click-middle = "${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
on-click-right = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
@ -247,7 +261,7 @@
};
systemd.user.services.waybar = {
Unit.After = ["graphical-session.target"];
Service.Slice = ["app-graphical.slice"];
Unit.After = [ "graphical-session.target" ];
Service.Slice = [ "app-graphical.slice" ];
};
}

File diff suppressed because it is too large Load diff