Merge remote-tracking branch 'refs/remotes/origin/nixos' into nixos
This commit is contained in:
commit
99c3cbb12e
20 changed files with 666 additions and 588 deletions
|
|
@ -54,88 +54,94 @@ in
|
|||
services.wallpaper.enable = true;
|
||||
};
|
||||
|
||||
# enable home-manager module
|
||||
home-manager.users.moritz = {
|
||||
|
||||
# import home-manager module
|
||||
imports = [ inputs.hyprland.homeManagerModules.default ];
|
||||
|
||||
# enable home-manager module
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = hyprland;
|
||||
recommendedEnvironment = true;
|
||||
extraConfig = import ./_config.nix args;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# add waybar as a status bar
|
||||
home-manager.users.moritz.programs.waybar = {
|
||||
enable = true;
|
||||
|
||||
# start using systemd service
|
||||
systemd = {
|
||||
# add waybar as a status bar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
start_hidden = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 20;
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ];
|
||||
# start using systemd service
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
start_hidden = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 20;
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# lock screen after timeout
|
||||
home-manager.users.moritz.programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "000000";
|
||||
# lock screen after timeout
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "000000";
|
||||
};
|
||||
};
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
];
|
||||
timeouts =
|
||||
let
|
||||
lockTimeout = 10;
|
||||
in
|
||||
[
|
||||
{
|
||||
timeout = lockTimeout * 60 - 10;
|
||||
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60;
|
||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60 + 10;
|
||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
}
|
||||
] ++ optional
|
||||
(!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728
|
||||
{
|
||||
timeout = 30 * 60;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate";
|
||||
};
|
||||
systemdTarget = "hyprland-session.target";
|
||||
};
|
||||
|
||||
systemd.user.services.nextcloud-client.Service = {
|
||||
RestartSec = "500ms";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
home-manager.users.moritz.services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
];
|
||||
timeouts =
|
||||
let
|
||||
lockTimeout = 10;
|
||||
in
|
||||
[
|
||||
{
|
||||
timeout = lockTimeout * 60 - 10;
|
||||
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60;
|
||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60 + 10;
|
||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
}
|
||||
] ++ optional
|
||||
(!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728
|
||||
{
|
||||
timeout = 30 * 60;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate";
|
||||
};
|
||||
systemdTarget = "hyprland-session.target";
|
||||
};
|
||||
|
||||
|
||||
# adds pam module for swaylock
|
||||
security.pam.services.swaylock = { };
|
||||
|
|
@ -152,11 +158,6 @@ in
|
|||
requiredBy = [ "xdg-desktop-portal.service" ];
|
||||
};
|
||||
|
||||
home-manager.users.moritz.systemd.user.services.nextcloud-client.Service = {
|
||||
RestartSec = "500ms";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
# add user packages for wayland and hyprland in particular
|
||||
users.users.moritz.packages = with pkgs; [
|
||||
brightnessctl # control brightness
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ in
|
|||
deadnix
|
||||
isort
|
||||
jq
|
||||
nil
|
||||
nixd
|
||||
nixpkgs-fmt
|
||||
nodePackages.bash-language-server
|
||||
rustfmt
|
||||
|
|
|
|||
|
|
@ -313,5 +313,9 @@ with builtins;
|
|||
];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = nvim-puppeteer;
|
||||
lazy = false; # NOTE: plugin lazy-loads itself.
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ end
|
|||
|
||||
local servers = {
|
||||
"bashls",
|
||||
"nil_ls",
|
||||
"nixd",
|
||||
"pylsp",
|
||||
"ruff_lsp",
|
||||
"typst_lsp",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue