feat: refactor Niri configuration by removing deprecated services and scripts, and updating display management to use niri-native scripts
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
}: {
|
||||
imports = [
|
||||
inputs.niri.nixosModules.niri
|
||||
(import ./niri/waybar.nix)
|
||||
(import ./niri/swayidle.nix)
|
||||
(import ./niri/fuzzel.nix)
|
||||
(import ./niri/swaylock.nix)
|
||||
];
|
||||
|
||||
programs.niri.enable = true;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [fuzzel];
|
||||
|
||||
# Provide a simple system-wide wrapper script in /etc/profile.d or /etc to make fuzzel available
|
||||
environment.etc."profile.d/fuzzel.sh".text = ''
|
||||
export PATH="${pkgs.fuzzel}/bin:$PATH"
|
||||
'';
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
# Install swayidle and configure a systemd user service for idle locking
|
||||
environment.systemPackages = with pkgs; [swayidle swaylock inotify-tools];
|
||||
|
||||
systemd.user.services.swayidle = {
|
||||
description = "swayidle for Niri sessions";
|
||||
wantedBy = ["default.target"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.swayidle}/bin/swayidle -w 'timeout 300 ${pkgs.swaylock}/bin/swaylock -f' resume 'swaymsg resume'";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [swaylock imagemagick];
|
||||
|
||||
# Provide a system-level helper in /etc/profile.d to point to a lock wrapper
|
||||
environment.etc."profile.d/lockwrapper.sh".text = ''
|
||||
#!/bin/sh
|
||||
export LOCK_WRAPPER="${pkgs.swaylock}/bin/swaylock"
|
||||
'';
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
# Install waybar system-wide and provide a systemd user service to start it for graphical users
|
||||
environment.systemPackages = with pkgs; [waybar jq wl-clipboard];
|
||||
|
||||
systemd.user.services.waybar = {
|
||||
description = "Waybar for Niri sessions";
|
||||
wantedBy = ["default.target"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.waybar}/bin/waybar";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 2;
|
||||
};
|
||||
};
|
||||
|
||||
# Optionally provide a default system-level config in /etc/xdg/waybar/config
|
||||
environment.etc."xdg/waybar/config".text = ''
|
||||
{
|
||||
"modules-left": ["workspace"],
|
||||
"modules-center": [],
|
||||
"modules-right": ["clock"]
|
||||
}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user