mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
abstract locking
This commit is contained in:
parent
06ecfb4310
commit
663db0249d
5 changed files with 54 additions and 39 deletions
|
@ -7,11 +7,23 @@
|
||||||
}: {
|
}: {
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; [
|
||||||
desktop
|
desktop
|
||||||
nvim
|
|
||||||
|
|
||||||
gui
|
|
||||||
nix-ld
|
nix-ld
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.startx.enable = true;
|
||||||
|
windowManager.qtile.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
cli.enable = true;
|
||||||
users.users.daylin.extraGroups = ["docker"];
|
users.users.daylin.extraGroups = ["docker"];
|
||||||
}
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,37 @@
|
||||||
{
|
{
|
||||||
input,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
cfg = config.services.xserver.windowManager.qtile;
|
||||||
lock = pkgs.writeShellApplication {
|
lock = pkgs.writeShellApplication {
|
||||||
name = "lock";
|
name = "lock";
|
||||||
runtimeInputs = with pkgs; [i3lock-color figlet procps];
|
runtimeInputs = with pkgs; [i3lock-color figlet procps];
|
||||||
text = builtins.readFile ./lock.sh;
|
text = builtins.readFile ./lock.sh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = with pkgs; [
|
config = mkIf cfg.enable {
|
||||||
xss-lock
|
environment.systemPackages = with pkgs; [
|
||||||
|
xss-lock
|
||||||
|
lock
|
||||||
|
];
|
||||||
|
|
||||||
lock
|
systemd.services.i3lock = {
|
||||||
];
|
wantedBy = ["sleep.target"];
|
||||||
|
description = "Lock the screen using a custom lock script";
|
||||||
|
before = ["suspend.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
User = "daylin";
|
||||||
|
Type = "forking";
|
||||||
|
Environment = "DISPLAY=:0";
|
||||||
|
ExecStart = "${lock}/bin/lock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.i3lock = {
|
|
||||||
wantedBy = ["sleep.target"];
|
|
||||||
description = "Lock the screen using a custom lock script";
|
|
||||||
before = ["suspend.target"];
|
|
||||||
serviceConfig = {
|
|
||||||
User = "daylin";
|
|
||||||
Type = "forking";
|
|
||||||
Environment = "DISPLAY=:0";
|
|
||||||
ExecStart = "${lock}/bin/lock";
|
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
# services.logind.extraConfig = ''
|
|
||||||
# IdleAction=suspend
|
|
||||||
# IdleActionSec=1800
|
|
||||||
# '';
|
|
||||||
}
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
imports = with inputs.self.nixosModules; [
|
imports = with inputs.self.nixosModules; [
|
||||||
fonts
|
fonts
|
||||||
gui
|
gui
|
||||||
|
lock
|
||||||
vscode
|
vscode
|
||||||
hyprland
|
hyprland
|
||||||
];
|
];
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
cfg = config.programs.hyprland;
|
cfg = config.programs.hyprland;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
|
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||||
# Optional, hint electron apps to use wayland:
|
# Optional, hint electron apps to use wayland:
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
imports = with inputs.self.nixosModules; [
|
inherit (lib) mkIf;
|
||||||
lock
|
cfg = config.services.xserver.windowManager.qtile;
|
||||||
];
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
# Enable the X11 windowing system.
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.startx.enable = true;
|
|
||||||
windowManager.qtile.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
brightnessctl
|
brightnessctl
|
||||||
|
@ -39,5 +35,7 @@
|
||||||
flameshot
|
flameshot
|
||||||
catppuccin-cursors.mochaDark
|
catppuccin-cursors.mochaDark
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue