chore: stuff
This commit is contained in:
parent
6a53741183
commit
2defd19b2d
8 changed files with 267 additions and 264 deletions
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = osConfig.modules.services.cliphist;
|
||||
exec = pkgs.writers.writeBash "rofi-cliphist" {
|
||||
makeWrapperArgs = [
|
||||
"--prefix"
|
||||
"PATH"
|
||||
":"
|
||||
"${lib.makeBinPath [ pkgs.cliphist ]}"
|
||||
];
|
||||
} "cliphist-rofi-img";
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
extraConfig.modes = [ "clipboard:${exec}" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,7 +7,6 @@
|
|||
./gammastep.nix # default because I need to protect my peepers
|
||||
./swww.nix
|
||||
./keepassxc.nix
|
||||
./cliphist.nix
|
||||
./swayidle.nix
|
||||
./swaylock.nix
|
||||
];
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
} -t wipe --transition-fps 144";
|
||||
|
||||
Restart = "on-failure";
|
||||
ProtectHome = "readonly";
|
||||
BindPaths = "/run/user /home/${config.home.username}/.cache/swww";
|
||||
TemporaryFileSystem = "/home /run/user /root";
|
||||
ProtectProc = "noaccess";
|
||||
RestrictNamespaces = true;
|
||||
CapabilityBoundingSet = "";
|
||||
|
|
|
@ -5,14 +5,12 @@
|
|||
osConfig,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.programs.rofi.enable {
|
||||
programs.rofi =
|
||||
let
|
||||
conf = "${config.home.homeDirectory}/.config/rofi";
|
||||
in
|
||||
rec {
|
||||
package = pkgs.rofi-wayland.override { inherit plugins; };
|
||||
plugins = [ pkgs.rofi-calc ];
|
||||
lib.mkIf config.programs.rofi.enable {
|
||||
programs.rofi = {
|
||||
package = pkgs.rofi-wayland;
|
||||
theme = "${conf}/themes/rounded-gray-dark.rasi";
|
||||
terminal = lib.my.getExe osConfig.modules.system.roles.desktop.terminal;
|
||||
extraConfig = {
|
||||
|
@ -22,8 +20,6 @@ lib.mkIf config.programs.rofi.enable {
|
|||
"ssh"
|
||||
"drun"
|
||||
"run"
|
||||
# WARNING: ABI version mismatch
|
||||
# "calc"
|
||||
"clipboard:${lib.my.getExe' pkgs.cliphist "cliphist-rofi-img"}"
|
||||
];
|
||||
matching = "fuzzy";
|
||||
|
|
|
@ -7,22 +7,19 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mapAttrs;
|
||||
inherit (lib) mapAttrs mkIf;
|
||||
inherit (lib.my) getExe getExe';
|
||||
|
||||
desktop = osConfig.modules.system.roles.desktop;
|
||||
term = lib.my.getExe desktop.terminal;
|
||||
filemanager = lib.my.getExe desktop.filemanager;
|
||||
in
|
||||
lib.mkIf osConfig.programs.sway.enable {
|
||||
cliphistEnabled = osConfig.modules.services.cliphist.enable;
|
||||
|
||||
services.swayidle.enable = true;
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
colors = {
|
||||
lavender = "#babbf1";
|
||||
black = "#000000";
|
||||
};
|
||||
|
||||
inputs = {
|
||||
kb = {
|
||||
builtin = "1:1:AT_Translated_Set_2_keyboard";
|
||||
|
@ -30,9 +27,14 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
keychron_bt = "1452:591:Keychron_K4";
|
||||
};
|
||||
};
|
||||
|
||||
mkRegexList = list: "^(${(lib.strings.concatStringsSep "|" list)})$";
|
||||
in
|
||||
{
|
||||
lib.mkIf osConfig.programs.sway.enable {
|
||||
services.swayidle.enable = true;
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
xwayland = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
|
@ -71,7 +73,13 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
"${mod}+f" = "fullscreen";
|
||||
# Start launcher
|
||||
"${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel";
|
||||
"${mod}+s" = "exec rofi -show clipboard -show-icons";
|
||||
"${mod}+s" =
|
||||
let
|
||||
cliphist = getExe pkgs.cliphist;
|
||||
fuzzel = getExe pkgs.fuzzel;
|
||||
copy = getExe' pkgs.wl-clipboard "wl-copy";
|
||||
in
|
||||
mkIf cliphistEnabled "exec ${cliphist} list | ${fuzzel} --dmenu | ${cliphist} decode | ${copy}";
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
"${mod}+Shift+space" = "floating toggle";
|
||||
"${mod}+Return" = "exec ${term}";
|
||||
|
@ -80,23 +88,20 @@ lib.mkIf osConfig.programs.sway.enable {
|
|||
"${mod}+Control+Left" = "workspace prev";
|
||||
"${mod}+Control+Right" = "workspace next";
|
||||
"${mod}+n" = "exec nysh msg dash toggle";
|
||||
"--locked XF86MonBrightnessUp" =
|
||||
"exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s +10%";
|
||||
"--locked XF86MonBrightnessDown" =
|
||||
"exec --no-startup-id ${pkgs.brightnessctl}/bin/brightnessctl s 10%-";
|
||||
"--locked XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
|
||||
"--locked XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
|
||||
"--locked XF86AudioMicMute" =
|
||||
"exec --no-startup-id ${pkgs.pamixer}/bin/pamixer --default-source -m";
|
||||
"--locked XF86MonBrightnessUp" = "exec --no-startup-id ${getExe pkgs.brightnessctl} s +10%";
|
||||
"--locked XF86MonBrightnessDown" = "exec --no-startup-id ${getExe pkgs.brightnessctl} s 10%-";
|
||||
"--locked XF86AudioRaiseVolume" = "exec --no-startup-id ${getExe pkgs.pamixer} -i 5";
|
||||
"--locked XF86AudioLowerVolume" = "exec --no-startup-id ${getExe pkgs.pamixer} -d 5";
|
||||
"--locked XF86AudioMicMute" = "exec --no-startup-id ${getExe pkgs.pamixer} --default-source -m";
|
||||
"--locked XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
|
||||
"--locked XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"--locked XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"--locked XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"--locked XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"${mod}+u" =
|
||||
"exec ${pkgs.hyprshot}/bin/hyprshot -o ${config.xdg.userDirs.pictures}/screenshots -m region";
|
||||
"exec ${getExe pkgs.hyprshot} -o ${config.xdg.userDirs.pictures}/screenshots -m region";
|
||||
"${mod}+Shift+u" =
|
||||
"exec ${pkgs.hyprshot}/bin/hyprshot --raw -m region | ${pkgs.satty}/bin/satty -f - --fullscreen";
|
||||
"exec ${getExe pkgs.hyprshot} --raw -m region | ${getExe pkgs.satty} -f - --fullscreen";
|
||||
|
||||
#: Workspace movement {{{
|
||||
"--input-device=${inputs.kb.builtin} ${mod}+ampersand" = "workspace number 1";
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
modules = {
|
||||
media.enableAll = true;
|
||||
fs.nfsEnable = true;
|
||||
|
||||
system = {
|
||||
roles.desktop.enable = true;
|
||||
|
@ -179,6 +180,10 @@
|
|||
xdg-utils
|
||||
brightnessctl
|
||||
pop-icon-theme
|
||||
|
||||
bottles
|
||||
wine64
|
||||
ghidra
|
||||
];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./media.nix
|
||||
./fs.nix
|
||||
|
||||
./services
|
||||
./system
|
||||
|
|
22
options/fs.nix
Normal file
22
options/fs.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption optional;
|
||||
|
||||
cfg = config.modules.fs;
|
||||
in
|
||||
{
|
||||
options.modules.fs = {
|
||||
nfsEnable = mkEnableOption "nfs";
|
||||
};
|
||||
|
||||
config = {
|
||||
services.rpcbind.enable = mkIf cfg.nfsEnable true;
|
||||
|
||||
environment.systemPackages = optional cfg.nfsEnable pkgs.nfs-utils;
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue