biiiiig refactor (part 1)
This commit is contained in:
parent
9a7768ff5b
commit
7bacabf0d3
23 changed files with 96 additions and 81 deletions
12
modules/hardware/default.nix
Normal file
12
modules/hardware/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./spacenav.nix
|
||||
./wacom.nix
|
||||
./hardware_key.nix
|
||||
];
|
||||
}
|
20
modules/hardware/hardware_key.nix
Normal file
20
modules/hardware/hardware_key.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{pkgs, ...}: {
|
||||
# nitrokey
|
||||
services.udev.packages = [pkgs.nitrokey-udev-rules];
|
||||
|
||||
# smartcard daemon
|
||||
services.pcscd.enable = true;
|
||||
|
||||
# authenticate using hw key
|
||||
security.pam = {
|
||||
services.jade.u2fAuth = true;
|
||||
u2f = {
|
||||
enable = true;
|
||||
cue = true;
|
||||
control = "sufficient";
|
||||
authFile = "/home/jade/.ssh/u2f_keys";
|
||||
};
|
||||
};
|
||||
|
||||
programs.i3lock.u2fSupport = true;
|
||||
}
|
10
modules/hardware/spacenav.nix
Normal file
10
modules/hardware/spacenav.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
spacenavd
|
||||
libspnav
|
||||
];
|
||||
systemd.services.spacenavd = {
|
||||
wantedBy = ["graphical.target"];
|
||||
script = "${pkgs.spacenavd}/bin/spacenavd -d";
|
||||
};
|
||||
}
|
10
modules/hardware/wacom.nix
Normal file
10
modules/hardware/wacom.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{...}: {
|
||||
services.xserver.wacom.enable = true;
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home.packages = [
|
||||
# TODO: figure out if the previous enabled option depends on these anyway
|
||||
pkgs.libwacom
|
||||
pkgs.wacomtablet
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue