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,
|
2023-02-18 08:56:19 +00:00
|
|
|
lib,
|
2022-06-12 15:39:15 +00:00
|
|
|
...
|
|
|
|
} @ 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-12-08 10:57:08 +00:00
|
|
|
./services/docker.nix
|
2022-12-31 09:52:01 +00:00
|
|
|
./services/cifs.nix
|
2023-12-27 16:00:50 +00:00
|
|
|
# ./programs/virtualbox.nix
|
2022-01-18 13:55:16 +00:00
|
|
|
];
|
2023-01-06 09:28:49 +00:00
|
|
|
fonts = {
|
|
|
|
fontDir.enable = true;
|
|
|
|
fontconfig = {
|
|
|
|
enable = true;
|
|
|
|
defaultFonts = {
|
2023-01-12 13:21:58 +00:00
|
|
|
emoji = ["Noto Color Emoji"];
|
|
|
|
monospace = ["Fira Code" "Font Awesome 5 Free"];
|
|
|
|
sansSerif = ["Noto Sans" "Font Awesome 5 Free"];
|
|
|
|
serif = ["Noto Serif" "Font Awesome 5 Free"];
|
2023-01-06 09:28:49 +00:00
|
|
|
};
|
|
|
|
};
|
2023-09-08 11:39:34 +00:00
|
|
|
packages = with pkgs; [
|
2023-01-06 09:28:49 +00:00
|
|
|
fira-code
|
|
|
|
fira-code-symbols
|
|
|
|
font-awesome
|
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk
|
|
|
|
noto-fonts-emoji
|
|
|
|
noto-fonts-extra
|
|
|
|
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "Noto"];})
|
2023-06-13 05:46:23 +00:00
|
|
|
nasin-nanpa
|
|
|
|
fairfax-hd
|
2023-07-17 04:54:19 +00:00
|
|
|
(pkgs.stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "zbalermorna";
|
|
|
|
version = "920b28d798ae1c06885c674bbf02b08ffed12b2f";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "jackhumbert";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "00sl3f1x4frh166mq85lwl9v1f5r3ckkfg8id5fibafymick5vyp";
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/fonts
|
|
|
|
cp -r $src/fonts/*.otf $out/share/fonts
|
|
|
|
'';
|
|
|
|
})
|
2023-01-06 09:28:49 +00:00
|
|
|
];
|
|
|
|
};
|
2022-06-14 07:28:08 +00:00
|
|
|
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;
|
2023-12-11 19:30:28 +00:00
|
|
|
services.sddm.u2fAuth = true;
|
2022-12-31 09:18:40 +00:00
|
|
|
services.swaylock.u2fAuth = true;
|
2022-02-02 19:01:25 +00:00
|
|
|
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}"
|
2023-06-19 13:48:35 +00:00
|
|
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
|
|
|
|
ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="e621", ATTRS{idProduct}=="0000", TAG+="uaccess"
|
|
|
|
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0337", TAG+="uaccess"
|
|
|
|
ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess"
|
|
|
|
ACTION=="add", SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0330", TAG+="uaccess"
|
|
|
|
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS={idProduct}=="6010", OWNER="user", MODE="0777", GROUP="dialout"
|
2022-02-02 19:01:25 +00:00
|
|
|
'';
|
2023-03-27 18:59:49 +00:00
|
|
|
programs.steam.enable = system == "x86_64-linux";
|
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-09-18 16:24:45 +00:00
|
|
|
services.flatpak.enable = true;
|
2022-02-22 06:59:53 +00:00
|
|
|
programs.java.enable = true;
|
2022-03-05 19:16:12 +00:00
|
|
|
hardware.opengl.driSupport = true;
|
2023-03-27 18:47:36 +00:00
|
|
|
hardware.opengl.driSupport32Bit = lib.mkForce (system == "x86_64-linux");
|
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];
|
2023-10-01 14:47:26 +00:00
|
|
|
networking.firewall.allowedTCPPortRanges = [
|
|
|
|
{
|
|
|
|
from = 1714;
|
|
|
|
to = 1764;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
networking.firewall.allowedUDPPortRanges = [
|
|
|
|
{
|
|
|
|
from = 1714;
|
|
|
|
to = 1764;
|
|
|
|
}
|
|
|
|
];
|
2022-07-06 06:59:56 +00:00
|
|
|
|
2022-08-14 18:11:45 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2023-01-10 20:05:07 +00:00
|
|
|
pinentry-qt
|
2023-10-01 14:47:26 +00:00
|
|
|
dotool
|
|
|
|
wl-clipboard
|
2024-03-06 07:39:41 +00:00
|
|
|
#plasma5Packages.thirdParty.lightly
|
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;
|
|
|
|
libinput.enable = true;
|
|
|
|
layout = "de";
|
|
|
|
xkbVariant = "neo";
|
2023-12-11 19:30:28 +00:00
|
|
|
displayManager.sddm.enable = true;
|
2024-03-06 07:39:41 +00:00
|
|
|
displayManager.sddm.wayland.enable = true;
|
|
|
|
desktopManager.plasma6.enable = true;
|
|
|
|
displayManager.defaultSession = "plasma";
|
2023-07-29 12:54:19 +00:00
|
|
|
extraLayouts.zlr = {
|
|
|
|
description = "lojban layout";
|
|
|
|
languages = ["jbo"];
|
|
|
|
symbolsFile = ../extra/keyboard/symbols;
|
|
|
|
};
|
2022-07-10 08:34:55 +00:00
|
|
|
};
|
2023-12-11 19:30:28 +00:00
|
|
|
i18n.inputMethod = {
|
|
|
|
enabled = "ibus";
|
|
|
|
ibus.engines = with pkgs.ibus-engines; [anthy];
|
|
|
|
};
|
2023-01-01 13:38:29 +00:00
|
|
|
security.polkit.enable = true;
|
2023-01-06 09:28:49 +00:00
|
|
|
services.dbus.enable = true;
|
2023-01-12 13:21:58 +00:00
|
|
|
services.dbus.packages = with pkgs; [dconf];
|
|
|
|
# Futureproofing: on non-x86 machines, emulate x86
|
|
|
|
boot.binfmt.emulatedSystems =
|
|
|
|
if system != "x86_64-linux"
|
|
|
|
then [
|
|
|
|
"x86_64-linux"
|
|
|
|
"i686-linux"
|
|
|
|
]
|
|
|
|
else [];
|
2023-05-21 17:32:58 +00:00
|
|
|
|
|
|
|
virtualisation = {
|
|
|
|
waydroid.enable = true;
|
|
|
|
lxd.enable = true;
|
|
|
|
};
|
2023-03-03 20:09:06 +00:00
|
|
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
|
|
|
enableSSHSupport = true;
|
|
|
|
};
|
2023-11-18 19:21:33 +00:00
|
|
|
programs.gamemode.enable = true;
|
2024-02-02 16:27:31 +00:00
|
|
|
nixpkgs.config.permittedInsecurePackages = ["electron-25.9.0"];
|
2022-01-18 13:55:16 +00:00
|
|
|
}
|