2022-06-12 15:39:15 +00:00
|
|
|
{
|
2022-06-14 06:42:42 +00:00
|
|
|
system,
|
|
|
|
nix-packages,
|
2022-06-12 15:39:15 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
} @ args: let
|
2022-02-02 19:01:25 +00:00
|
|
|
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
|
|
|
|
'';
|
2022-06-12 15:39:15 +00:00
|
|
|
in {
|
2022-01-18 13:55:16 +00:00
|
|
|
imports = [
|
2022-01-18 19:57:00 +00:00
|
|
|
./services/pipewire.nix
|
2022-05-11 18:34:55 +00:00
|
|
|
./desktop-secrets.nix
|
2022-05-25 08:36:03 +00:00
|
|
|
./services/cups.nix
|
2022-01-18 13:55:16 +00:00
|
|
|
];
|
|
|
|
fonts.fonts = with pkgs; [
|
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk
|
|
|
|
noto-fonts-emoji
|
2022-06-12 15:39:15 +00:00
|
|
|
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
|
2022-06-14 14:35:35 +00:00
|
|
|
nix-packages.packages.${system}.nasin-nanpa
|
2022-06-14 06:42:42 +00:00
|
|
|
nix-packages.packages.${system}.fairfax-hd
|
2022-01-18 13:55:16 +00:00
|
|
|
];
|
2022-06-14 07:28:08 +00:00
|
|
|
fonts.fontconfig.enable = true;
|
|
|
|
fonts.fontconfig.localConf = ''
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
|
|
|
<fontconfig>
|
|
|
|
<match target="scan">
|
|
|
|
<test name="family">
|
|
|
|
<string>Fairfax HD</string>
|
|
|
|
</test>
|
|
|
|
<edit name="spacing">
|
|
|
|
<int>100</int>
|
|
|
|
</edit>
|
|
|
|
</match>
|
|
|
|
</fontconfig>
|
|
|
|
'';
|
2022-06-14 11:50:10 +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;
|
2022-02-02 19:01:25 +00:00
|
|
|
|
|
|
|
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";
|
2022-02-02 19:01:25 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
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 {
|
2022-06-12 15:39:15 +00:00
|
|
|
extraPkgs = pkgs:
|
|
|
|
with pkgs; [
|
|
|
|
mono
|
2022-09-18 15:57:51 +00:00
|
|
|
fuse
|
2022-06-12 15:39:15 +00:00
|
|
|
];
|
2022-02-08 11:10:50 +00:00
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
2022-02-22 06:59:53 +00:00
|
|
|
programs.java.enable = true;
|
2022-03-05 19:16:12 +00:00
|
|
|
hardware.opengl.driSupport = true;
|
|
|
|
hardware.opengl.driSupport32Bit = true;
|
2022-06-12 15:39:15 +00:00
|
|
|
home-manager.users.darkkirb = import ./home-manager/darkkirb.nix {
|
|
|
|
desktop = true;
|
|
|
|
inherit args;
|
|
|
|
};
|
2022-03-20 13:38:52 +00:00
|
|
|
|
2022-04-06 07:22:37 +00:00
|
|
|
# For syncthing
|
2022-06-12 15:39:15 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [22000];
|
|
|
|
networking.firewall.allowedUDPPorts = [22000];
|
2022-07-06 06:59:56 +00:00
|
|
|
|
2022-08-14 18:11:45 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2022-08-14 18:09:04 +00:00
|
|
|
pinentry-gtk2
|
2022-07-06 06:59:56 +00:00
|
|
|
];
|
2022-08-14 18:09:04 +00:00
|
|
|
programs.gnupg.agent.pinentryFlavor = "gtk2";
|
2022-07-06 06:59:56 +00:00
|
|
|
|
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
wlr.enable = true;
|
|
|
|
# gtk portal needed to make gtk apps happy
|
2022-07-06 10:50:25 +00:00
|
|
|
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
2022-07-06 06:59:56 +00:00
|
|
|
};
|
2022-07-06 18:08:58 +00:00
|
|
|
programs.dconf.enable = true;
|
2022-07-10 08:34:55 +00:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
2022-07-10 09:00:59 +00:00
|
|
|
displayManager.defaultSession = "sway";
|
2022-07-10 08:34:55 +00:00
|
|
|
displayManager.sddm.enable = true;
|
|
|
|
libinput.enable = true;
|
|
|
|
layout = "de";
|
|
|
|
xkbVariant = "neo";
|
|
|
|
};
|
2022-07-10 09:58:30 +00:00
|
|
|
programs.sway.enable = true;
|
2022-01-18 13:55:16 +00:00
|
|
|
}
|