add yubikey , hypridle and docker service isn't active on boot except on server
This commit is contained in:
@ -4,7 +4,10 @@
|
|||||||
{ config, lib, inputs, pkgs, flakeName, ... }:
|
{ config, lib, inputs, pkgs, flakeName, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [./hardware-configuration.nix];
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./modules/yubikey.nix
|
||||||
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@ -34,7 +37,8 @@
|
|||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.enableOnBoot = lib.mkDefault false;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
home-manager
|
home-manager
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
tlp
|
tlp
|
||||||
looking-glass-client
|
looking-glass-client
|
||||||
fprintd
|
fprintd
|
||||||
|
yubikey-manager
|
||||||
|
yubico-pam
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.nvidia.prime.offload = {
|
hardware.nvidia.prime.offload = {
|
||||||
@ -51,6 +53,8 @@
|
|||||||
};
|
};
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
|
|
||||||
|
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# boot.plymouth = {
|
# boot.plymouth = {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"];
|
nameservers = ["8.8.8.8" "8.8.4.4" "1.1.1.1"];
|
||||||
};
|
};
|
||||||
virtualisation.docker.liveRestore = false;
|
virtualisation.docker.liveRestore = false;
|
||||||
|
virtualisation.docker.enableOnBoot = true;
|
||||||
|
|
||||||
services.fail2ban.enable = true;
|
services.fail2ban.enable = true;
|
||||||
services.fail2ban.bantime = "2h";
|
services.fail2ban.bantime = "2h";
|
||||||
|
@ -2,6 +2,28 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
# services.hypridle.enable = true;
|
# services.hypridle.enable = true;
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general.lock_cmd = "hyprlock";
|
||||||
|
general.before_sleep_cmd = "loginctl lock-session";
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 150;
|
||||||
|
on-timeout = "brightnessctl -s set 0";
|
||||||
|
on-resume = "brightnessctl -r";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 150;
|
||||||
|
on-timeout = "loginctl lock-session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 600;
|
||||||
|
on-timeout = "systemctl suspend";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
wayland.windowManager.hyprland.enable = true;
|
wayland.windowManager.hyprland.enable = true;
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
"$mainMod" = "SUPER";
|
"$mainMod" = "SUPER";
|
||||||
|
14
modules/yubikey.nix
Normal file
14
modules/yubikey.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ config, lib, inputs, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.pam.yubico = {
|
||||||
|
enable = true;
|
||||||
|
id = "30536547";
|
||||||
|
mode = "challenge-response";
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user