try hyprland instead

This commit is contained in:
2025-01-16 21:26:48 +01:00
parent 03784c606c
commit b22e6ccc91
10 changed files with 1147 additions and 53 deletions

View File

@@ -1,17 +1,25 @@
{pkgs, ...}:
{
# Add a udev rule that launches a backup using restic when a specific USB device (the backup drive) is plugged in
# Add a udev rule that launches a backup using restic when a specific USB device (the backup drive) is plugged in
environment.systemPackages = with pkgs; [
restic
];
services.udev.packages = [
(pkgs.writeTextFile {
name = "bakc";
text = ''
SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", ATTRS{idProduct}=="1969", MODE="0666", TAG+="uaccess", SYMLINK+="stm32_dfu", GROUP="plugdev"
'';
destination = "/etc/udev/rules.d/50-zsa.rules";
})
];
environment.systemPackages = with pkgs; [
restic
];
# the udev rule:
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="backup-restic", TAG+="systemd", ENV{SYSTEMD_WANTS}="backup-restic.service"
'';
# the systemd service:
systemd.services.backup-restic = {
description = "Backup using restic (triggered when USB drive is plugged in)";
after = [ "local-fs.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
# TODO: adapt command
ExecStart = "${pkgs.restic}/bin/restic backup /home/username";
};
};
}

View File

@@ -0,0 +1,57 @@
{inputs, pkgs, ...}:
{
programs.kitty.enable = true;
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "SUPER";
bind =
[
"$mod, F, exec, firefox"
"$mod, return, exec, walker"
"$mod_SHIFT, return, exec, kitty"
"$mod_SHIFT, q, kill"
"$mod, s, exec, code"
];
# plugin.virtual-desktops = {
# }
};
plugins = [
# Touch gestures: https://github.com/horriblename/hyprgrass
inputs.hyprgrass.packages.${pkgs.system}.default
# Virtual desktops: https://github.com/levnikmyskin/hyprland-virtual-desktops
# inputs.hyprland-virtual-desktops.packages.${pkgs.system}.virtual-desktops
];
};
programs.walker = {
enable = true;
runAsService = true;
# All options from the config.json can be used here.
config = {
search.placeholder = "Example";
ui.fullscreen = true;
list = {
height = 200;
};
websearch.prefix = "?";
switcher.prefix = "/";
};
# If this is not set the default styling is used.
# style = ''
# * {
# color: #dcd7ba;
# }
# '';
};
# # Set waybar config
# ".config/waybar/config".text = ''
# ''
}