change hyprland to niri
All checks were successful
/ update-readme (push) Successful in 26s

This commit is contained in:
dim
2025-11-30 13:14:41 +07:00
parent 28f82915cf
commit fe6455b4f2
18 changed files with 741 additions and 271 deletions

View File

@@ -1,4 +1,8 @@
{ pkgs, inputs, ... }: {
{
pkgs,
inputs,
...
}: {
programs.firefox = {
enable = true;
profiles.dark = {
@@ -49,56 +53,59 @@
search = {
force = true;
default = "Searx";
order = [ "Searx" "google" ];
order = ["Searx" "google"];
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"NixOS Wiki" = {
urls = [{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}];
urls = [
{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}
];
icon = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
definedAliases = ["@nw"];
};
"Searx" = {
urls = [{
template = "https://searx.aicampground.com/?q={searchTerms}";
}];
urls = [
{
template = "https://searx.aicampground.com/?q={searchTerms}";
}
];
icon = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@searx" ];
definedAliases = ["@searx"];
};
bing.metaData.hidden = true;
google.metaData.alias =
"@g"; # builtin engines only support specifying one additional alias
google.metaData.alias = "@g"; # builtin engines only support specifying one additional alias
};
};
extensions.packages =
with inputs.firefox-addons.packages.${pkgs.system}; [
bitwarden
multi-account-containers
zotero-connector
unpaywall
];
extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
bitwarden
multi-account-containers
zotero-connector
unpaywall
];
};
};
stylix.targets.firefox.profileNames = [ "dark" ];
stylix.targets.firefox.profileNames = ["dark"];
}

View File

@@ -0,0 +1,18 @@
{
inputs,
pkgs,
...
}: {
programs.helix = {
enable = true;
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
}
];
};
};
}

View File

@@ -1,6 +1,10 @@
{ inputs, pkgs, ... }: {
inputs = [
inputs.nfv.homeManagerModules.default
{
inputs,
pkgs,
...
}: {
imports = [
inputs.nvf.homeManagerModules.default
./options.nix
./languages.nix
./picker.nix
@@ -9,5 +13,12 @@
./utils.nix
./mini.nix
];
programs.nvf = { enable = true; };
programs.nvf = {
enable = true;
settings.vim = {
startPlugins = [
pkgs.vimPlugins.vim-kitty-navigator
];
};
};
}

View File

@@ -74,7 +74,7 @@
php = {
enable = true;
server = "intelephense";
lsp.server = "intelephense";
};
go.enable = true;
markdown = {

View File

@@ -1,13 +1,16 @@
# Spicetify is a spotify client customizer
{ pkgs, config, lib, inputs, ... }:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
{
pkgs,
config,
lib,
inputs,
...
}: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
accent = "${config.lib.stylix.colors.base0D}";
background = "${config.lib.stylix.colors.base00}";
in {
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "spotify" ];
imports = [inputs.spicetify-nix.homeManagerModules.default];
stylix.targets.spicetify.enable = false;
@@ -21,6 +24,9 @@ in {
button = accent;
button-active = accent;
tab-active = accent;
player = background;
main = background;
sidebar = background;
};
enabledExtensions = with spicePkgs.extensions; [
@@ -31,6 +37,7 @@ in {
adblock
fullAppDisplay
shuffle
keyboardShortcut
];
};
}

View File

@@ -1,7 +1,8 @@
{ inputs, pkgs, ... }: {
home.packages =
[ inputs.hyprpolkitagent.packages."${pkgs.system}".hyprpolkitagent ];
wayland.windowManager.hyprland.settings.exec-once =
[ "systemctl --user start hyprpolkitagent" ];
{
inputs,
pkgs,
...
}: {
home.packages = [inputs.hyprpolkitagent.packages."${pkgs.stdenv.hostyPlatform.system}".hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}

View File

@@ -0,0 +1,244 @@
{
pkgs,
config,
inputs,
...
}: let
noctalia = cmd:
["noctalia-shell" "ipc" "call"]
++ (pkgs.lib.splitString " " cmd);
in {
imports = [inputs.niri.homeModules.niri inputs.noctalia.homeModules.default];
home.packages = with pkgs; [
wayland-utils
libsecret
cage
xwayland-satellite
libnotify
cliphist
cava
kdePackages.polkit-kde-agent-1
nautilus
direnv
imv
];
programs.niri = {
enable = true;
settings = {
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
environment = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
ELECTRON_OZON_PLATFORM_HINT = "wayland";
DISPLAY = ":0"; # Or null
_JAVA_AWT_WM_NONREPARENTING = "1";
};
cursor = {
hide-when-typing = true;
hide-after-inactive-ms = 1000;
};
binds = with config.lib.niri.actions; {
"Mod+Space".action.spawn = noctalia "launcher toggle";
"Mod+P".action.spawn = noctalia "sessionMenu toggle";
"Mod+V".action.spawn = noctalia "launcher clipboard";
"Mod+Shift+C".action.spawn = noctalia "launcher calculator";
"Mod+C".action.spawn = noctalia "calendar toggle";
"Mod+S".action.spawn = noctalia "controlCenter toggle";
"Mod+F12".action.spawn = noctalia "powerProfile cycle";
"XF86AudioLowerVolume".action.spawn = noctalia "volume decrease";
"XF86AudioRaiseVolume".action.spawn = noctalia "volume increase";
"XF86AudioMute".action.spawn = noctalia "volume muteOutput";
"XF86MonBrightnessUp".action.spawn = noctalia "brightness increase";
"XF86MonBrightnessDown".action.spawn = noctalia "brightness decrease";
"XF86AudioPlay".action.spawn = noctalia "media playPause";
"XF86AudioNext".action.spawn = noctalia "media next";
"XF86AudioPrev".action.spawn = noctalia "media previous";
"Mod+Shift+Q".action.spawn = noctalia "lockScreen lock";
"Mod+Return".action.spawn = ["alacritty"];
"Mod+E".action.spawn = ["nautilus"];
"Mod+B".action.spawn = ["firefox"];
"Mod+U".action = move-workspace-up;
"Mod+I".action = move-workspace-down;
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+Q".action = close-window;
"Mod+H".action = focus-column-or-monitor-left;
"Mod+L".action = focus-column-or-monitor-right;
"Mod+J".action = focus-window-or-monitor-down;
"Mod+K".action = focus-window-or-monitor-up;
"Mod+Shift+H".action = move-column-left-or-to-monitor-left;
"Mod+Shift+L".action = move-column-right-or-to-monitor-right;
"Mod+Shift+J".action = move-window-down-or-to-workspace-down;
"Mod+Shift+K".action = move-window-up-or-to-workspace-up;
"Mod+Ctrl+K".action = move-window-to-workspace-up;
"Mod+Ctrl+J".action = move-window-to-workspace-down;
"Mod+0".action = focus-workspace 0;
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+Shift+Period".action = move-workspace-to-monitor-next;
"Mod+Shift+Comma".action = move-workspace-to-monitor-previous;
"Mod+Comma".action = consume-or-expel-window-left;
"Mod+Period".action = consume-or-expel-window-right;
"Mod+Grave".action = toggle-overview;
"Mod+Tab".action = focus-workspace-previous;
"Mod+Equal".action = set-column-width "+5%";
"Mod+Minus".action = set-column-width "-5%";
"Mod+Shift+Equal".action = set-window-height "+5%";
"Mod+Shift+Minus".action = set-window-height "-5%";
"Mod+F".action = maximize-column;
"Mod+Shift+F".action = fullscreen-window;
"Mod+Ctrl+Shift+F".action = toggle-windowed-fullscreen;
"Mod+Y".action = toggle-window-floating;
"Mod+Shift+Y".action = switch-focus-between-floating-and-tiling;
"Mod+W".action = toggle-column-tabbed-display;
"Mod+Parenright".action = switch-layout "next";
"Mod+Parenleft".action = switch-layout "prev";
"Mod+Shift+E".action = quit;
};
input = {
warp-mouse-to-focus.enable = true;
focus-follows-mouse.enable = false;
trackpoint = {
accel-profile = "adaptive";
accel-speed = 0.6;
};
};
layout = {
focus-ring = {
width = 2;
};
};
window-rules = [
{
geometry-corner-radius = let
r = 4.0;
in {
top-left = r;
top-right = r;
bottom-left = r;
bottom-right = r;
};
clip-to-geometry = true;
}
{
matches = [{app-id = "firefox";}];
open-maximized = true;
}
{
matches = [{app-id = "chromium-browser";}];
open-maximized = true;
}
];
# debug = {
# honor-xdg-activation-with-invalid-serial = 1;
# };
};
};
programs.noctalia-shell = {
enable = true;
systemd.enable = true;
settings = {
general = {
animationSpeed = 2;
compactLockScreen = true;
};
wallpaper = {
enabled = false;
directory = "~/Pictures/wallpapers";
};
dock.enabled = false;
bar = {
density = "compact";
position = "right";
showCapsule = false;
widgets = {
left = [
{
id = "SidePanelToggle";
useDistroLogo = true;
}
{
id = "WiFi";
}
{
id = "Bluetooth";
}
];
center = [
{
hideUnoccupied = false;
id = "Workspace";
labelMode = "none";
}
];
right = [
{
colorizeIcons = true;
drawerEnabled = true;
id = "Tray";
}
{
alwaysShowPercentage = false;
id = "Battery";
warningThreshold = 30;
}
{
formatHorizontal = "HH:mm";
formatVertical = "HH mm";
id = "Clock";
useMonospacedFont = true;
usePrimaryColor = true;
}
];
};
};
colorSchemes.predefinedScheme = "Monochrome";
general = {
avatarImage = "/home/dim/.face";
radiusRatio = 0.2;
};
location = {
monthBeforeDay = false;
name = "Tangerang";
};
};
# this may also be a string or a path to a JSON file,
# but in this case must include *all* settings.
};
programs.alacritty = {
enable = true;
settings = {
window.decorations = "None";
};
};
services.kanshi = {
enable = true;
profiles = {
rumah = {
outputs = [
{
criteria = "LG Electronics 16EN33 305INKH5P181";
position = "0,0";
}
{
criteria = "eDP-1";
position = "0,768";
}
];
};
};
};
}

View File

@@ -1,191 +1,195 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
inherit (config.var.theme.bar) position;
inherit (config.var.theme) rounding border-size gaps-in gaps-out;
in {
home.packages = with pkgs; [ playerctl ];
home.packages = with pkgs; [playerctl];
programs.waybar = {
enable = true;
systemd = {
enable = true;
target = "hyprland-session";
};
settings = [{
layer = "top";
position = position;
modules-left = [ "hyprland/workspaces" "hyprland/window" ];
modules-center = [ "mpris" ];
modules-right = [
"idle_inhibitor"
"backlight"
"battery#1"
"battery#2"
"cpu"
"memory"
"temperature"
"clock"
"privacy"
"custom/cuaca"
"wireplumber"
"tray"
];
clock = {
"format" = "{:%d %b %H:%M} ";
"format-alt" = "{:%A, %d %B %Y (%R)} ";
"tooltip-format" = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
settings = [
{
layer = "top";
position = position;
modules-left = ["hyprland/workspaces" "mpris"];
modules-center = [];
modules-right = [
"idle_inhibitor"
"backlight"
"battery#1"
"battery#2"
"cpu"
"memory"
"temperature"
"clock"
"privacy"
"wireplumber"
"tray"
];
clock = {
"format" = "{:%d %b %H:%M} ";
"format-alt" = "{:%A, %d %B %Y (%R)} ";
"tooltip-format" = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
actions = {
"on-click-right" = "mode";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
};
actions = {
"on-click-right" = "mode";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
tray = {spacing = gaps-in;};
cpu = {format = " {usage}";};
memory = {format = " {}";};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
};
tray = { spacing = gaps-in; };
cpu = { format = " {usage}"; };
memory = { format = " {}"; };
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
network = {
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰈀";
format-disconnected = "";
tooltip-format = "{ifname} via {gwaddr} 󰈀";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
};
network = {
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰈀";
format-disconnected = "";
tooltip-format = "{ifname} via {gwaddr} 󰈀";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
temperature = { format = "{temperatureC}󰔄 "; };
backlight = {
device = "intel_backlight";
format = "{icon}";
format-icons = [ "󱃓" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ];
};
"battery#1" = {
bat = "BAT0";
interval = 90;
states = {
warning = 30;
critical = 15;
temperature = {format = "{temperatureC}󰔄 ";};
backlight = {
device = "intel_backlight";
format = "{icon}";
format-icons = ["󱃓" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥"];
};
format = "{capacity}";
max-length = 2;
};
"battery#2" = {
bat = "BAT1";
interval = 90;
states = {
warning = 30;
critical = 15;
"battery#1" = {
bat = "BAT0";
interval = 90;
states = {
warning = 30;
critical = 15;
};
format = "{capacity}";
max-length = 2;
};
format = "{capacity} {icon}";
format-icons = [ "" "" "" "" "" ];
max-length = 25;
};
"hyprland/window" = {
format = "{}";
max-length = 32;
rewrite = {
"(.*) Mozilla Firefox" = "󰈹 $1";
"(.*) - kitty" = " [$1]";
"battery#2" = {
bat = "BAT1";
interval = 90;
states = {
warning = 30;
critical = 15;
};
format = "{capacity} {icon}";
format-icons = ["" "" "" "" ""];
max-length = 25;
};
separate-outputs = true;
};
"hyprland/workspaces" = { format = "<small>{name}</small>"; };
mpris = {
"format" = "{player_icon} {dynamic}";
"format-paused" = "{status_icon} <i>{dynamic}</i>";
"player-icons" = {
"default" = "󰐊";
"mpv" = "󰎇";
"hyprland/window" = {
format = "{}";
max-length = 32;
rewrite = {
"(.*) Mozilla Firefox" = "󰈹 $1";
"(.*) - kitty" = " [$1]";
};
separate-outputs = true;
};
"dynamic-len" = 30;
"status-icons" = { "paused" = "󰏤"; };
"ignored-players" = [ "firefox" ];
};
privacy = {
"icon-spacing" = 4;
"icon-size" = 18;
"transition-duration" = 250;
"modules" = [
{
"type" = "screenshare";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
{
"type" = "audio-out";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
{
"type" = "audio-in";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
];
};
pulseaudio = {
"format" = "{volume}%{icon}";
"format-bluetooth" = "{volume}%{icon}";
"format-muted" = "";
"format-icons" = {
"headphone" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" "" ];
"hyprland/workspaces" = {format = "<small>{name}</small>";};
mpris = {
"format" = "{player_icon} {dynamic}";
"format-paused" = "{status_icon} <i>{dynamic}</i>";
"player-icons" = {
"default" = "󰐊";
"mpv" = "󰎇";
};
"dynamic-len" = 30;
"status-icons" = {"paused" = "󰏤";};
"ignored-players" = ["firefox"];
};
"scroll-step" = 1;
"on-click" = "pavucontrol";
"ignored-sinks" = [ "Easy Effects Sink" ];
};
"wireplumber" = {
"on-click" = "pavucontrol";
"on-click-right" = "amixer sset Master toggle 1>/dev/null";
"format" = "<span foreground='#fab387'>{icon}</span>{volume}%";
"format-muted" = " ";
"format-source" = "";
"format-source-muted" = "";
"format-icons" = {
"headphone" = " ";
"hands-free" = " ";
"headset" = " ";
"phone" = " ";
"portable" = " ";
"car" = " ";
"default" = [ " " " " " " ];
privacy = {
"icon-spacing" = 4;
"icon-size" = 18;
"transition-duration" = 250;
"modules" = [
{
"type" = "screenshare";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
{
"type" = "audio-out";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
{
"type" = "audio-in";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
];
};
};
"custom/cuaca" = {
"format" = "{}";
"format-alt" = "{alt}: {}";
"format-alt-click" = "click-right";
"interval" = 3600;
"exec" = "curl -s 'https://wttr.in/Tangerang?format=1'";
"exec-if" = "ping wttr.in -c1";
};
}];
pulseaudio = {
"format" = "{volume}%{icon}";
"format-bluetooth" = "{volume}%{icon}";
"format-muted" = "";
"format-icons" = {
"headphone" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = ["" ""];
};
"scroll-step" = 1;
"on-click" = "pavucontrol";
"ignored-sinks" = ["Easy Effects Sink"];
};
"wireplumber" = {
"on-click" = "pavucontrol";
"on-click-right" = "amixer sset Master toggle 1>/dev/null";
"format" = "<span foreground='#fab387'>{icon}</span>{volume}%";
"format-muted" = " ";
"format-source" = "";
"format-source-muted" = "";
"format-icons" = {
"headphone" = " ";
"hands-free" = " ";
"headset" = " ";
"phone" = " ";
"portable" = " ";
"car" = " ";
"default" = [" " " " " "];
};
};
"custom/cuaca" = {
"format" = "{}";
"format-alt" = "{alt}: {}";
"format-alt-click" = "click-right";
"interval" = 3600;
"exec" = "curl -s 'https://wttr.in/Tangerang?format=1'";
"exec-if" = "ping wttr.in -c1";
};
}
];
style = ''
* { border: none; border-radius: 0; }