Big update

This commit is contained in:
ant 2024-08-24 17:49:02 +02:00
parent 739f3d97f2
commit 62d4de0360
10 changed files with 328 additions and 103 deletions

View file

@ -1,14 +1,19 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, variant, ... }: {
options = {
config.downloadSoftwares = lib.mkEnableOption "Enable qbittorrent, aria2 and yt-dlp";
};
config = { config = {
home.packages = with pkgs; [ home.packages =
if variant == "default" then
with pkgs; [
yt-dlp yt-dlp
qbittorrent qbittorrent
aria2 aria2
pipewire pipewire
]; discord
feather # monero wallet
litecoin
# librewolf
spotify
ungoogled-chromium
]
else [];
}; };
} }

42
bar.nix
View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, variant, username, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
material-design-icons material-design-icons
@ -7,6 +7,20 @@
playerctl playerctl
]; ];
systemd.user.services.loopback = {
Unit = {
Description = "Simple audio loopback";
};
Install = {
WantedBy = [ ];
};
Service = {
ExecStart = "${pkgs.writeShellScript "start loopback" ''
${pkgs.pipewire}/bin/pw-loopback
''}";
};
};
programs.waybar = { programs.waybar = {
enable = true; enable = true;
# systemd.enable = true; # systemd.enable = true;
@ -26,6 +40,8 @@
"modules-center" = [ "hyprland/window" ]; "modules-center" = [ "hyprland/window" ];
"modules-right" = [ "modules-right" = [
"network" "network"
"custom/nvidia-load"
"custom/nvidia-mem"
"group/disks" "group/disks"
"group/hardware" "group/hardware"
"tray" "tray"
@ -38,6 +54,7 @@
"hyprland/workspaces" "hyprland/workspaces"
"pulseaudio#speaker" "pulseaudio#speaker"
"pulseaudio#microphone" "pulseaudio#microphone"
"custom/loopback"
"idle_inhibitor" "idle_inhibitor"
"bluetooth" "bluetooth"
"backlight" "backlight"
@ -100,18 +117,19 @@
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /"; "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /";
}; };
"disk#2" = {
"disk#2" = lib.attrsets.optionalAttrs (variant == "default") {
interval = 1; interval = 1;
format = "󰋊 {free}"; format = "󰋊 {free}";
path = "/home/ant/disk1"; path = "/home/ant/disk1";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk1"; "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk1";
}; };
"disk#3" = { "disk#3" = lib.attrsets.optionalAttrs (variant == "default") {
interval = 1; interval = 1;
format = "󰋊 {free}"; format = "󰋊 {free}";
path = "/home/ant/disk2"; path = "/home/ant/disk2";
"on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/ant/disk2"; "on-click" = "$TERMINAL --class floating -e ${pkgs.ncdu}/bin/ncdu -x /home/${username}/disk2";
}; };
memory = { memory = {
@ -168,6 +186,10 @@
"on-click" = "$TERMINAL --class floating -e htop"; "on-click" = "$TERMINAL --class floating -e htop";
}; };
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon1/temp1_input";
};
battery = { battery = {
interval = 30; interval = 30;
states = { states = {
@ -233,12 +255,16 @@
"format-source-muted" = "󰍭"; "format-source-muted" = "󰍭";
"on-click" = "pamixer --default-source -t"; "on-click" = "pamixer --default-source -t";
"on-scroll-up" = "pamixer --default-source -i 5"; "on-scroll-up" = "pamixer --default-source -i 5";
"on-scroll-down" = "on-scroll-down" = "pamixer --default-source -d 5";
"pamixer --default-source -d 5";
"scroll-step" = 5; "scroll-step" = 5;
}; };
"custom/loopback" = lib.attrsets.optionalAttrs (variant == "default") {
exec = "if systemctl --user is-active --quiet loopback; then echo oui; else echo non; fi";
on-click = "if systemctl --user is-active --quiet loopback; then systemctl --user stop loopback; else systemctl --user start loopback; fi";
format = "TEST {}";
};
"hyprland/submap" = { "hyprland/submap" = {
format = "(l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown"; format = "(l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (S)hutdown";
}; };

65
flake.lock generated Normal file
View file

@ -0,0 +1,65 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1724412708,
"narHash": "sha256-tLr1k+UZLVumyqXRU8E5lBtLjsvHSy8e2NiamfkjpYg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b18f3ebc4029c22d437e3424014c8597a8b459a0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"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-24_05": {
"locked": {
"lastModified": 1724316499,
"narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-24_05": "nixpkgs-24_05"
}
}
},
"root": "root",
"version": 7
}

View file

@ -2,24 +2,34 @@
description = "Home Manager configuration"; description = "Home Manager configuration";
inputs = { inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-24_05.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { nixpkgs, home-manager, ... }: outputs = { ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = inputs.nixpkgs.legacyPackages.${system};
pkgs-24_05 = inputs.nixpkgs-24_05.legacyPackages.${system};
username = "ant";
variant = "default";
in { in {
homeConfigurations."ant" = home-manager.lib.homeManagerConfiguration { homeConfigurations.${username} = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
# Specify your home configuration modules here, for example, extraSpecialArgs = {
# the path to your home.nix. # configure here
variant = variant;
username = username;
pkgs-24_05 = pkgs-24_05;
};
modules = [ modules = [
./home.nix ./home.nix
]; ];

View file

@ -1,11 +1,12 @@
{ lib, cnfig, pkgs, ... }: { { lib, cnfig, pkgs, pkgs-24_05, ... }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
betterbird # betterbird
nsxiv nsxiv
libreoffice libreoffice
warpinator warpinator
keepassxc keepassxc
]; ] ++ [ pkgs-24_05.betterbird ];
programs.mpv = { programs.mpv = {
enable = true; enable = true;
config = { config = {
@ -35,4 +36,12 @@
programs.firefox.enable = true; programs.firefox.enable = true;
programs.zathura.enable = true; programs.zathura.enable = true;
xdg.mimeApps.defaultApplications = {
"WebBrowser" = "firefox.desktop";
};
home.sessionVariables = {
BROWSER = "firefox";
};
} }

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, flakes-pkgs, ... }: { inputs, config, lib, pkgs, username, ... }:
{ {
imports = [ imports = [
@ -8,11 +8,12 @@
./terminal-software.nix ./terminal-software.nix
./gui-software.nix ./gui-software.nix
./gaming.nix ./gaming.nix
./additional-software.nix
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "ant"; home.username = username;
home.homeDirectory = "/home/${config.home.username}"; home.homeDirectory = "/home/${config.home.username}";
home.stateVersion = "23.05"; # Please read the comment before changing. home.stateVersion = "23.05"; # Please read the comment before changing.
@ -105,7 +106,7 @@
fi fi
''; '';
".bin/dark".source = (import ./bin/dark.nix) pkgs; ".bin/dark".source = (import ./bin/dark.nix) pkgs; # deprecated, prefer darkman
}; };
@ -115,9 +116,6 @@
]; ];
home.sessionVariables = { home.sessionVariables = {
# EDITOR = "nvim";
# TERMINAL = "kitty";
# TERM = "kitty";
GOPATH = "${config.home.homeDirectory}/.local/share/go"; GOPATH = "${config.home.homeDirectory}/.local/share/go";
GOMODCACHE = "${config.home.homeDirectory}/.cache/go/pkg/mod"; GOMODCACHE = "${config.home.homeDirectory}/.cache/go/pkg/mod";
@ -151,12 +149,21 @@
mimeApps = { mimeApps = {
enable = true; enable = true;
defaultApplications = {
"text/plain" = "nvim.desktop";
}; };
}; };
services.darkman = {
enable = true;
lightModeScripts = {
rm-file-indicator = "rm $XDG_STATE_HOME/darkmode";
}; };
darkModeScripts = {
set-file-indicator = "touch $XDG_STATE_HOME/darkmode";
};
};
services.gnome-keyring.enable = true; services.gnome-keyring.enable = true;
services.syncthing.enable = true; services.syncthing.enable = true;
services.kdeconnect.enable = true; services.kdeconnect.enable = true;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, pkgs-24_05, variant, ... }: {
home.packages = with pkgs; [ xdg-desktop-portal-hyprland ]; home.packages = with pkgs; [ xdg-desktop-portal-hyprland ];
home.sessionVariables = { home.sessionVariables = {
@ -10,30 +10,17 @@
XDG_SESSION_TYPE = "wayland"; XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "Hyprland"; XDG_SESSION_DESKTOP = "Hyprland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1"; QT_AUTO_SCREEN_SCALE_FACTOR = "1";
WLR_NO_HARDWARE_CURSORS = "1";
XCURSOR_SIZE = "24"; XCURSOR_SIZE = "24";
DXVK_FILTER_DEVICE_NAME="NVIDIA";
}; };
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = if variant == "allegro" then pkgs-24_05.hyprland else pkgs.hyprland;
xwayland.enable = true; xwayland.enable = true;
# plugins = [
# "${flakes-pkgs.hyprfocus}/lib/libhyprfocus.so"
# ];
systemd.enable = true; systemd.enable = true;
systemd.variables = [ systemd.variables = [ "--all" ];
"GDK_BACKEND=wayland,x11"
"QT_QPA_PLATFORM=\"wayland;xcb\""
"SDL_VIDEODRIVER=wayland"
"CLUTTER_BACKEND=wayland"
"XDG_CURRENT_DESKTOP=Hyprland"
"XDG_SESSION_TYPE=wayland"
"XDG_SESSION_DESKTOP=Hyprland"
"QT_AUTO_SCREEN_SCALE_FACTOR=1"
"WLR_NO_HARDWARE_CURSORS=1"
"XCURSOR_SIZE=24"
];
settings = { settings = {
@ -102,8 +89,8 @@
enable_swallow = true; enable_swallow = true;
mouse_move_enables_dpms = true; mouse_move_enables_dpms = true;
key_press_enables_dpms = true; key_press_enables_dpms = true;
# swallow_regex = "^(Alacritty)(.*)$"; swallow_regex = "^(Alacritty)(.*)$";
swallow_regex = "^(kitty)(.*)$"; # swallow_regex = "^(kitty)(.*)$";
}; };
@ -120,24 +107,23 @@
"$mod, Tab, togglesplit" "$mod, Tab, togglesplit"
"$mod, P, pseudo" "$mod, P, pseudo"
"$mod, f, fullscreen" "$mod, f, fullscreen"
"$mod SHIFT, f, fakefullscreen"
"$mod, Return, exec, kitty" "$mod, Return, exec, $TERMINAL"
"$mod SHIFT, e, exec, rofimoji" "$mod SHIFT, e, exec, rofimoji"
"$mod, c, exec, rofi -show calc -modi calc -no-show-match -no-sort" "$mod, c, exec, rofi -show calc -modi calc -no-show-match -no-sort"
"$mod, e, exec, $TERMINAL -e lf" "$mod, e, exec, $TERMINAL -e lf"
"$mod SHIFT, Return, exec, kitty --working-directory \"$(window_dir)\"" "$mod SHIFT, Return, exec, $TERMINAL --working-directory \"$(window_dir)\""
"$mod, w, exec, firefox" "$mod, w, exec, $BROWSER"
"$mod SHIFT, w, exec, firefox --private-window" "$mod SHIFT, w, exec, firefox --private-window"
"$mod SHIFT, s, exec, TMP=$(rofi -dmenu -p \"nix search\" -l 0) && firefox \"https://search.nixos.org/packages?channel=unstable&query=$TMP\"" "$mod SHIFT, s, exec, TMP=$(rofi -dmenu -p \"nix search\" -l 0) && $BROWSER \"https://search.nixos.org/packages?channel=unstable&query=$TMP\""
"$mod SHIFT, e, exec, $(rofi -dmenu -p \"command\" -l 0)" "$mod SHIFT, e, exec, $(rofi -dmenu -p \"command\" -l 0)"
"$mod, m, exec, kitty --class floating -e pulsemixer" "$mod, m, exec, $TERMINAL --class floating -e pulsemixer"
"$mod, d, exec, ~/.bin/runmenu" "$mod, d, exec, ~/.bin/runmenu"
"$mod, x, exec, keepmenu" "$mod, x, exec, keepmenu"
"$mod, z, exec, tmux new -spopup_terminal -d; kitty --class floating -e tmux a -t popup_terminal" "$mod, z, exec, tmux new -spopup_terminal -d; $TERMINAL --class floating -e tmux a -t popup_terminal"
"$mod, f11, exec, ocrzone" "$mod, f11, exec, ocrzone"
"$mod, f12, exec, kitty --class floating -e nmtui" "$mod, f12, exec, $TERMINAL --class floating -e nmtui"
"$mod, f2, exec, dark" "$mod, f2, exec, darkman toggle"
"$mod, f3, exec, hyprctl reload" "$mod, f3, exec, hyprctl reload"
"$mod, f4, exec, rofi-udisk" "$mod, f4, exec, rofi-udisk"
"$mod, f5, exec, mount-android" "$mod, f5, exec, mount-android"
@ -164,10 +150,10 @@
"$mod, Up, movefocus, u" "$mod, Up, movefocus, u"
"$mod, Down, movefocus, d" "$mod, Down, movefocus, d"
# "$mod SHIFT, h, movewindow, l" "$mod SHIFT, h, movewindow, l"
# "$mod SHIFT, l, movewindow, r" "$mod SHIFT, l, movewindow, r"
# "$mod SHIFT, k, movewindow, u" "$mod SHIFT, k, movewindow, u"
# "$mod SHIFT, j, movewindow, d" "$mod SHIFT, j, movewindow, d"
# "$mod SHIFT, Left, movewindow, l" # "$mod SHIFT, Left, movewindow, l"
# "$mod SHIFT, Right, movewindow, r" # "$mod SHIFT, Right, movewindow, r"
@ -197,6 +183,18 @@
"$mod SHIFT, underscore, movetoworkspacesilent, 9" "$mod SHIFT, underscore, movetoworkspacesilent, 9"
"$mod SHIFT, ccedilla, movetoworkspacesilent, 10" "$mod SHIFT, ccedilla, movetoworkspacesilent, 10"
"$mod SHIFT, rarenright, movetoworkspacesilent, 11" "$mod SHIFT, rarenright, movetoworkspacesilent, 11"
"$mod ALT, twosuperior, focusworkspaceoncurrentmonitor, 1"
"$mod ALT, ampersand, focusworkspaceoncurrentmonitor, 2"
"$mod ALT, eacute, focusworkspaceoncurrentmonitor, 3"
"$mod ALT, quotedbl, focusworkspaceoncurrentmonitor, 4"
"$mod ALT, apostrophe, focusworkspaceoncurrentmonitor, 5"
"$mod ALT, parenleft, focusworkspaceoncurrentmonitor, 6"
"$mod ALT, minus, focusworkspaceoncurrentmonitor, 7"
"$mod ALT, egrave, focusworkspaceoncurrentmonitor, 8"
"$mod ALT, underscore, focusworkspaceoncurrentmonitor, 9"
"$mod ALT, ccedilla, focusworkspaceoncurrentmonitor, 10"
"$mod ALT, rarenright, focusworkspaceoncurrentmonitor, 11"
]; ];
bindm = [ bindm = [
@ -205,10 +203,10 @@
]; ];
binde = [ binde = [
"$mod SHIFT, h, moveactive, -60 0" "$mod CTRL SHIFT, h, moveactive, -60 0"
"$mod SHIFT, l, moveactive, 60 0" "$mod CTRL SHIFT, l, moveactive, 60 0"
"$mod SHIFT, k, moveactive, 0 -60" "$mod CTRL SHIFT, k, moveactive, 0 -60"
"$mod SHIFT, j, moveactive, 0 60" "$mod CTRL SHIFT, j, moveactive, 0 60"
"$mod CTRL, h, resizeactive, -60 0" "$mod CTRL, h, resizeactive, -60 0"
"$mod CTRL, l, resizeactive, 60 0" "$mod CTRL, l, resizeactive, 60 0"
"$mod CTRL, k, resizeactive, 0 -60" "$mod CTRL, k, resizeactive, 0 -60"
@ -299,21 +297,49 @@
# -p pkgs.rubyPackages.gdk_pixbuf2 \ # -p pkgs.rubyPackages.gdk_pixbuf2 \
# --run "${pkgs.swaybg}/bin/swaybg -m fill -i $bg" # --run "${pkgs.swaybg}/bin/swaybg -m fill -i $bg"
''); '');
monitors = if (variant == "default") then ''
monitor=,highrr,auto,1,vrr,1
''
else if variant == "moon" then ''
monitor=,preferred,auto,1
''
else if variant == "allegro" then ''
monitor=eDP-1, 1920x1080, 0x0, 1
monitor= DP-3, 1920x1200, 1920x0, 1
monitor= DP-4, 1920x1200, 3840x0, 1
monitor=HDMI-1, 1920x1080, auto, 1, mirror, eDP-1
monitor=HDMI-A-1, 1920x1080, auto, 1, mirror, eDP-1
''
else ''
'';
in in
'' ''
# env = GDK_BACKEND,wayland,x11 ${monitors}
# env = QT_QPA_PLATFORM,wayland;xcb
# env = SDL_VIDEODRIVER,wayland
# env = CLUTTER_BACKEND,wayland
#
# env = XDG_CURRENT_DESKTOP,Hyprland
# env = XDG_SESSION_TYPE,wayland
# env = XDG_SESSION_DESKTOP,Hyprland
# env = QT_AUTO_SCREEN_SCALE_FACTOR,1
monitor=,highrr,auto,1, ${ # system specific configs
monitor=Unknown-1,disable if variant == "default" then ''
# monitor=HDMI-A-1,preferred,auto,1,mirror,eDP-1 env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
''
else if variant == "allegro" then ''
env = WLR_DRM_DEVICES,/dev/dri/card0
env = AQ_WLR_DEVICES,/dev/ri/card0
env = AQ_DRM_DEVICES,/dev/dri/card0
env = TERMINAL,alacritty
env = NIXOS_OZONE_WL,1
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = WLR_NO_HARDWARE_CURSORS,1
env = XCURSOR_SIZE,24
'' else ''
''
}
exec = pkill swaybg; ${swaybgScript} exec = pkill swaybg; ${swaybgScript}
exec = pkill waybar; ${pkgs.waybar}/bin/waybar exec = pkill waybar; ${pkgs.waybar}/bin/waybar

2
lf.nix
View file

@ -51,7 +51,7 @@
# read -p # read -p
send-warpinator = ''%{{ send-warpinator = ''%{{
set -f set -f
${pkgs.cinnamon.warpinator}/bin/warpinator-send $f ${pkgs.warpinator}/bin/warpinator-send $f
}}''; }}'';
toggle_preview = ''%{{ toggle_preview = ''%{{
if [ "$lf_preview" = "true" ]; then if [ "$lf_preview" = "true" ]; then

View file

@ -13,7 +13,6 @@
glances glances
]; ];
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;
@ -25,7 +24,7 @@
ocamlPackages.ocamlformat ocamlPackages.ocamlformat
cargo cargo
nixd nixd
nixpkgs-fmt nixfmt
lua-language-server lua-language-server
ocaml ocaml
ocamlPackages.ocaml-lsp ocamlPackages.ocaml-lsp
@ -34,16 +33,20 @@
]; ];
}; };
xdg.mimeApps.defaultApplications = { "text/plain" = "nvim.desktop"; };
programs.tmux = { programs.tmux = {
enable = true; enable = true;
historyLimit = 600000; historyLimit = 600000;
escapeTime = 10; escapeTime = 10;
keyMode = "vi"; keyMode = "vi";
mouse = true; mouse = true;
terminal = "tmux-256color";
extraConfig = '' extraConfig = ''
unbind-key 'Space' unbind-key 'Space'
bind-key 'Space' copy-mode bind-key 'Space' copy-mode
set -g status-right "#{net_speed} #{cpu_percentage}" set -g status-right "#{net_speed} #{cpu_percentage}"
set -g default-terminal "tmux-256color"
run-shell ${pkgs.tmuxPlugins.net-speed}/share/tmux-plugins/net-speed/net_speed.tmux run-shell ${pkgs.tmuxPlugins.net-speed}/share/tmux-plugins/net-speed/net_speed.tmux
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
''; '';

104
ui.nix
View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
let
defaultTerminal = "alacritty";
alacrittyLightTheme = "${pkgs.alacritty-theme}/night_owlish_light.toml";
alacrittyDarkTheme = "${pkgs.alacritty-theme}/monokai_charcoal.toml";
in
{ {
imports = [ imports = [
./bar.nix ./bar.nix
@ -6,6 +11,11 @@
./gui-software.nix ./gui-software.nix
]; ];
home.sessionVariables = {
TERMINAL = defaultTerminal;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
gentium gentium
(nerdfonts.override { fonts = [ "CascadiaCode" "Noto" "Hack" ]; }) (nerdfonts.override { fonts = [ "CascadiaCode" "Noto" "Hack" ]; })
@ -38,13 +48,14 @@
serif = [ "Gentium Plus" ]; serif = [ "Gentium Plus" ];
sansSerif = [ "Inter" ]; sansSerif = [ "Inter" ];
monospace = [ "CaskaydiaCove Nerd Font Mono" ]; monospace = [ "CaskaydiaCove Nerd Font Mono" ];
# monospace = [ "CascadiaCode" ];
# monospace = [ "Hack Nerd Font Mono" ]; # monospace = [ "Hack Nerd Font Mono" ];
emoji = [ "Noto Color Emoji" "OpenMoji Color" ]; emoji = [ "Noto Color Emoji" "OpenMoji Color" ];
}; };
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font.name = "monospace"; font.name = "CaskaydiaCove NFM Regular";
font.size = 12; font.size = 12;
settings = { settings = {
cursor_shape = "block"; cursor_shape = "block";
@ -69,9 +80,34 @@
shellIntegration.mode = "no-cursor"; shellIntegration.mode = "no-cursor";
extraConfig = '' extraConfig = ''
include colors.conf include colors.conf
bold_font CaskaydiaCove NFM Bold
italic_font CaskaydiaCove NFM Italic
bold_italic_font CaskaydiaCove NFM Bold Italic
text_composition_strategy 1.4 4
font_features CaskaydiaCoveNF-Italic +calt +ss01
''; '';
}; };
programs.alacritty = {
enable = true;
settings = {
font = {
size = 12.0;
};
import = [
alacrittyLightTheme # default to white
"~/.config/alacritty/colors.toml"
];
};
};
xdg = {
mimeApps.defaultApplications."TerminalEmulator" = "Alacritty.desktop";
};
services.swayidle = { services.swayidle = {
enable = true; enable = true;
events = [ events = [
@ -104,20 +140,6 @@
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
package = pkgs.swaylock-effects; package = pkgs.swaylock-effects;
# --screenshots \
# --clock \
# --indicator \
# --indicator-radius 100 \
# --indicator-thickness 7 \
# --effect-blur 7x5 \
# --effect-vignette 0.5:0.5 \
# --ring-color bb00cc \
# --key-hl-color 880033 \
# --line-color 00000000 \
# --inside-color 00000088 \
# --separator-color 00000000 \
# --grace 2 \
# --fade-in 0.2
settings = { settings = {
screenshots = true; screenshots = true;
# clock = true; # clock = true;
@ -202,6 +224,58 @@
}; };
}; };
services.darkman = {
lightModeScripts = {
gtk-theme = ''
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
'';
set-background = ''
rm -f ~/.local/share/bg/*
ln -rs ~/.local/share/bg-light.* ~/.local/share/bg/
${pkgs.hyprland}/bin/hyprctl reload
'';
set-rofi-colors = ''
rm -f ~/.config/rofi/colors-current.rasi
ln -rs ~/.config/rofi/colors-light.rasi ~/.config/rofi/colors-current.rasi
'';
set-kitty-colors = ''
rm -f ~/.config/kitty/colors.conf
ln -rs ~/.config/kitty/light.conf ~/.config/kitty/colors.conf
kill -SIGUSR1 $(pgrep kitty)
'';
set-alacritty-colors = ''
rm -f ~/.config/alacritty/colors.toml
ln -s ${alacrittyLightTheme} ~/.config/alacritty/colors.toml
'';
notify = "${pkgs.libnotify}/bin/notify-send \"Light mode\"";
};
darkModeScripts = {
gtk-theme = ''
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
'';
set-background = ''
rm -f ~/.local/share/bg/*
ln -rs ~/.local/share/bg-dark.* ~/.local/share/bg/
${pkgs.hyprland}/bin/hyprctl reload
'';
set-rofi-colors = ''
rm -f ~/.config/rofi/colors-current.rasi
ln -rs ~/.config/rofi/colors-dark.rasi ~/.config/rofi/colors-current.rasi
'';
set-kitty-colors = ''
rm -f ~/.config/kitty/colors.conf
ln -rs ~/.config/kitty/dark.conf ~/.config/kitty/colors.conf
kill -SIGUSR1 $(pgrep kitty)
'';
set-alacritty-colors = ''
rm -f ~/.config/alacritty/colors.toml
ln -s ${alacrittyDarkTheme} ~/.config/alacritty/colors.toml
'';
notify = "${pkgs.libnotify}/bin/notify-send \"Dark mode\"";
};
};
systemd.user.services = { systemd.user.services = {
battery-notify = { battery-notify = {
Unit = { Unit = {