summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet @ jormungand <asmadeus@codewreck.org>2020-10-01 16:30:00 +0200
committerDominique Martinet @ jormungand <asmadeus@codewreck.org>2020-10-01 16:30:00 +0200
commite839e5940fdf706aced717e612cce56776de85bc (patch)
tree7fb94f255127ffa914622b67862533de01a127ba
parent714f8a4cab460c6b88aac57fe8a981309c0fda2e (diff)
add oath-based otp pam profile & enable on jormungand
-rw-r--r--machines/jormungand/configuration.nix1
-rw-r--r--profiles/otp.nix11
2 files changed, 12 insertions, 0 deletions
diff --git a/machines/jormungand/configuration.nix b/machines/jormungand/configuration.nix
index 6fb1e2f..cc4c1c6 100644
--- a/machines/jormungand/configuration.nix
+++ b/machines/jormungand/configuration.nix
@@ -8,6 +8,7 @@
../../profiles/ashuffle.nix
../../profiles/common.nix
../../profiles/miniflux.nix
+ ../../profiles/otp.nix
../../profiles/users.nix
../../profiles/vaderetro.nix
../../profiles/zramswap.nix
diff --git a/profiles/otp.nix b/profiles/otp.nix
new file mode 100644
index 0000000..a8207a4
--- /dev/null
+++ b/profiles/otp.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, ... }:
+
+{
+ # use `gen-oath-safe username [hotp|totp]`
+ # scan code & add last line to /etc/users.oath
+ environment.systemPackages = with pkgs; [
+ gen-oath-safe
+ ];
+
+ security.pam.oath.enable = true;
+}