mirror of
https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git
synced 2025-09-15 09:45:58 +03:00
yubikey.nix
update
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
ignore-empty-password
|
|
||||||
daemonize
|
daemonize
|
||||||
indicator
|
indicator
|
||||||
clock
|
clock
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
operation = "switch"; # If you don't want to apply updates immediately, only after rebooting, use `boot` option in this case
|
operation = "switch"; # If you don't want to apply updates immediately, only after rebooting, use `boot` option in this case
|
||||||
flake = "/etc/nixos";
|
flake = "/etc/nixos";
|
||||||
flags = [ "--update-input" "nixpkgs" "--update-input" "rust-overlay" "--commit-lock-file" ];
|
flags = [ "--update-input" "nixpkgs" "--update-input" "rust-overlay" "--commit-lock-file" ];
|
||||||
dates = "daily";
|
dates = "weekly";
|
||||||
# channel = "https://nixos.org/channels/nixos-unstable";
|
# channel = "https://nixos.org/channels/nixos-unstable";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
|
||||||
boot.loader.timeout = 2;
|
boot.loader.timeout = 2;
|
||||||
boot.initrd.enable = true;
|
boot.initrd.enable = true;
|
||||||
boot.initrd.systemd.enable = true;
|
boot.initrd.systemd.enable = true;
|
||||||
|
@@ -11,6 +11,6 @@
|
|||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 7d";
|
options = "--delete-older-than 14d";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -8,20 +8,17 @@
|
|||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pam.services = {
|
security.pam.u2f = {
|
||||||
login.u2fAuth = true;
|
enable = true;
|
||||||
sudo.u2fAuth = true;
|
cue = true;
|
||||||
|
control = "sufficient";
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME Replace [your_yubikey_model_id] with the actual model ID of your YubiKey. You can find the model ID using the `lsusb` command, typically available as a part of the `usbutils` package
|
security.pam.services = {
|
||||||
services.udev.extraRules = ''
|
greetd.u2fAuth = true;
|
||||||
ACTION=="remove",\
|
sudo.u2fAuth = true;
|
||||||
ENV{ID_BUS}=="usb",\
|
swaylock.u2fAuth = true;
|
||||||
ENV{ID_MODEL_ID}=="your_yubikey_model_id",\
|
};
|
||||||
ENV{ID_VENDOR_ID}=="1050",\
|
|
||||||
ENV{ID_VENDOR}=="Yubico",\
|
|
||||||
RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# FIXME Don't forget to create an authorization mapping file for your user (https://nixos.wiki/wiki/Yubikey#pam_u2f)
|
# FIXME Don't forget to create an authorization mapping file for your user (https://nixos.wiki/wiki/Yubikey#pam_u2f)
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
Reference in New Issue
Block a user