nixos-config/config/desktop.nix

61 lines
1.4 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
let
lockscreen-all = pkgs.writeScript "lockscreen-all" ''
#!${pkgs.bash}/bin/bash
if ${pkgs.coreutils}/bin/[ -z "$(${pkgs.usbutils}/bin/lsusb | grep Yubico)" ]; then
${pkgs.systemd}/bin/loginctl list-sessions | ${pkgs.gnugrep}/bin/grep '^\ ' | ${pkgs.gawk}/bin/awk '{print $1}' | ${pkgs.findutils}/bin/xargs -i ${pkgs.systemd}/bin/loginctl lock-session {}
fi
'';
in
{
2022-01-18 13:55:16 +00:00
imports = [
./services/sway.nix
2022-01-18 19:57:00 +00:00
./services/pipewire.nix
2022-01-18 13:55:16 +00:00
];
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts
dina-font
proggyfonts
2022-01-19 10:58:37 +00:00
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Noto" ]; })
2022-01-20 10:28:25 +00:00
(import ../packages/linja-sike.nix pkgs)
2022-01-18 13:55:16 +00:00
];
2022-01-18 16:17:38 +00:00
zramSwap = {
enable = true;
};
2022-01-19 08:28:39 +00:00
2022-01-18 16:19:54 +00:00
time.timeZone = "Etc/GMT-1"; # Confusing naming, it's 1 hour east of GMT
2022-02-02 09:58:25 +00:00
services.pcscd.enable = true;
security.pam = {
services.login.u2fAuth = true;
services.sddm.u2fAuth = true;
services.swaylock.u2fAuth = true;
u2f = {
enable = true;
2022-02-02 19:19:50 +00:00
control = "required";
};
};
services.udev.extraRules = ''
ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${lockscreen-all}"
'';
2022-02-08 07:20:05 +00:00
programs.steam.enable = true;
2022-02-08 11:10:50 +00:00
nixpkgs.overlays = [
(curr: prev: {
steam = prev.steam.override {
extraPkgs = pkgs: with pkgs; [
mono
];
};
})
];
2022-01-18 13:55:16 +00:00
}