nixosConfigurations.common: adapt nurofi

This commit is contained in:
L-Nafaryus 2025-04-24 17:04:43 +05:00
parent 68e77c57bf
commit bf93f6fdf4
Signed by: L-Nafaryus
GPG Key ID: 553C97999B363D38
8 changed files with 27 additions and 8 deletions

View File

@ -0,0 +1 @@
print $env.FILE_PWD

View File

@ -0,0 +1 @@
export use nurofi;

View File

@ -50,7 +50,7 @@ mainbox {
imagebox {
padding: 20px;
background-color: transparent;
background-image: url("assets/knight.gif", width);
background-image: url("~/.config/nushell/modules/nurofi/assets/knight.gif", width);
orientation: vertical;
children: [ "inputbar", "dummy", "mode-switcher" ];
}

View File

@ -1,3 +1,4 @@
const base_directory = "~/.config/nushell/modules/nurofi";
def is-installed [ app: string ] {
((which $app | length) > 0)
@ -19,7 +20,7 @@ export def powermenu []: nothing -> nothing {
let action = [lock suspend logout reboot shutdown];
mut selected = null;
$selected = $action | to text | rofi -dmenu -p (date now | format date "%Y-%m-%d %H:%M:%S") -mesg $"Uptime: ($uptime)" -theme powermenu.rasi;
$selected = $action | to text | rofi -dmenu -p (date now | format date "%Y-%m-%d %H:%M:%S") -mesg $"Uptime: ($uptime)" -theme ($base_directory | path join powermenu.rasi);
match $selected {
"lock" => { hyprlock --immediate; }
@ -32,5 +33,5 @@ export def powermenu []: nothing -> nothing {
}
export def apps []: nothing -> nothing {
rofi -show drun window -theme apps.rasi;
rofi -show drun window -theme ($base_directory | path join apps.rasi);
}

View File

@ -44,7 +44,7 @@ mainbox {
border-radius: 0px;
border-color: @selected;
background-color: transparent;
background-image: url("assets/solair.gif", width);
background-image: url("~/.config/nushell/modules/nurofi/assets/solair.gif", width);
children: [ "inputbar", "message", "listview", dummy ];
}

View File

@ -29,6 +29,10 @@
}
}
}
$env.NU_LIB_DIRS = ["${./nu}"];
# use nurofi;
'';
environmentVariables = {
@ -36,7 +40,6 @@
SSH_AUTH_SOCK = "/run/user/1000/ssh-agent";
EDITOR = "${lib.getExe' hmConfig.programs.helix.package "hx"}";
SHELL = "${lib.getExe' hmConfig.programs.nushell.package "nu"}";
NU_LIB_DIRS = "${lib.hm.nushell.toNushell (lib.concatStringsSep ":" [./nu])}";
};
};

View File

@ -100,8 +100,11 @@
networkmanager-l2tp
];
};
hostName = "nixos";
extraHosts = ''192.168.130.211 gitlab'';
hostName = "vinheim";
hosts = {
"192.168.130.211" = ["gitlab"];
"192.168.130.210" = ["vault.local" "youtrack.local"];
};
};
time.timeZone = "Asia/Yekaterinburg";

View File

@ -106,8 +106,17 @@ in {
rainfrog
networkmanagerapplet
rofi-wayland
];
home.file = {
".config/nushell/modules" = {
source = "${../common/hm/nu}";
recursive = true;
};
};
xdg.portal = {
enable = true;
configPackages = with pkgs; [
@ -311,7 +320,8 @@ in {
bind = [
"SUPER, Q, exec, $terminal"
"SUPER, N, exec, $fileManager"
"SUPER, R, exec, $menu"
"SUPER, R, exec, nu -c 'use ~/.config/nushell/modules/mod.nu *; nurofi apps'"
"SUPER, P, exec, nu -c 'use ~/.config/nushell/modules/mod.nu *; nurofi powermenu'"
# "SUPER, X, exec, ags -t clock"
# "SUPER, X, exec, ags -t control"
# "SUPER, X, exec, ags -t systray"