dotfiles/nixos/roles/workstation.nix

131 lines
3.6 KiB
Nix
Raw Permalink Normal View History

2017-02-02 16:31:19 +01:00
{ config, lib, pkgs, ... }:
2022-04-11 13:26:26 +02:00
{
2022-07-06 09:25:49 +02:00
services.fwupd.enable = true;
2023-04-23 09:42:35 +02:00
programs.fish.enable = true;
2022-04-11 13:26:26 +02:00
users.users.yorick = {
extraGroups = [ "input" "wireshark" "dialout" "video" "libvirtd" ];
shell = pkgs.fish;
};
2017-02-02 16:31:19 +01:00
services.printing = {
enable = true;
2022-04-11 13:26:26 +02:00
drivers = with pkgs; [ gutenprint cups-dymo ];
2017-02-02 16:31:19 +01:00
};
2020-05-21 17:39:38 +02:00
environment.systemPackages = with pkgs; [
2022-04-11 13:26:26 +02:00
ghostscript yubikey-manager glib
2020-05-21 17:39:38 +02:00
];
environment.sessionVariables.XDG_DATA_DIRS = with pkgs; [
"${gnome-themes-extra}/share"
"${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
2022-04-11 13:26:26 +02:00
# emacs?
];
2024-02-17 15:14:16 +01:00
nix.gc.automatic = lib.mkOverride 30 false;
2020-05-21 17:39:38 +02:00
virtualisation.libvirtd.enable = true;
2022-04-11 13:26:26 +02:00
# fix glasgow, fomu, backlight
2020-05-21 17:39:38 +02:00
services.udev.extraRules = ''
2022-04-11 13:26:26 +02:00
SUBSYSTEM=="usb", ATTRS{idVendor}=="20b7", ATTRS{idProduct}=="9db1", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5bf0", TAG+="uaccess"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness"
2020-05-21 17:39:38 +02:00
'';
# picoscope
services.udev.packages = [
(pkgs.writeTextDir "lib/udev/rules.d/95-pico.rules" ''
2022-04-11 13:26:26 +02:00
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", TAG+="uaccess"
'')
];
# development
services.postgresql = {
2022-11-19 17:55:30 +01:00
enable = false;
enableTCPIP = true;
2022-11-19 17:55:30 +01:00
package = pkgs.postgresql_11;
};
# git
boot.kernel.sysctl."fs.inotify.max_user_watches" = 1024000000;
2021-01-03 17:38:59 +01:00
2024-04-24 16:57:50 +02:00
yorick.lumi-vpn.enable = false;
2022-04-11 13:26:26 +02:00
yorick.lumi-cache.enable = true;
2021-05-23 17:19:28 +02:00
2021-08-14 12:18:09 +02:00
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true; # todo: support32bit?
pulse.enable = true;
};
2023-07-20 15:29:02 +02:00
# bluetooth battery indicator
hardware.bluetooth = {
package = pkgs.bluez5-experimental;
settings.General.Experimental = true;
};
2021-05-23 17:19:28 +02:00
xdg.portal = {
enable = true;
2022-09-15 10:14:50 +02:00
wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
2021-05-23 17:19:28 +02:00
};
2022-04-11 13:26:26 +02:00
hardware.opengl = {
enable = true;
driSupport32Bit = true;
};
fonts = {
fontDir.enable = true;
enableGhostscriptFonts = true;
2024-03-23 10:01:27 +01:00
packages = with pkgs; [
2022-04-11 13:26:26 +02:00
corefonts # Micrsoft free fonts
inconsolata # monospaced
source-code-pro
ubuntu_font_family # Ubuntu fonts
2022-10-04 10:15:29 +02:00
source-han-sans
2024-02-17 15:14:16 +01:00
(nerdfonts.override {
fonts = [
"DejaVuSansMono"
"Noto"
2024-03-23 10:07:45 +01:00
"NerdFontsSymbolsOnly"
2024-02-17 15:14:16 +01:00
];
})
2022-04-11 13:26:26 +02:00
iosevka
emojione
font-awesome
];
};
# spotify, castnow
networking.firewall = {
allowedTCPPorts = [ 55025 57621 5353 ];
allowedTCPPortRanges = [ { from = 4100; to = 4105; } ];
allowedUDPPorts = [ 55025 57621 ];
};
programs = {
dconf.enable = true;
noisetorch.enable = true;
wireshark.enable = true;
2023-05-20 13:40:23 +02:00
kdeconnect.enable = true;
2022-04-11 13:26:26 +02:00
sway = {
enable = true;
extraSessionCommands = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${
lib.makeLibraryPath (with pkgs; [ libxkbcommon libglvnd wayland ])
}
'';
};
};
services.pcscd.enable = true;
2023-09-17 18:17:29 +02:00
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.webp-pixbuf-loader ];
2024-04-20 09:29:22 +02:00
hardware.ledger.enable = true;
2024-04-24 16:57:50 +02:00
networking.wireguard.interfaces.wg-dk = {
privateKeyFile =
"/home/yorick/datakami/infra/keys/wg.yorick.key";
ips = [ "10.100.0.4/32" ];
peers = [{
publicKey = "teCEYc4KWT6rGchNOp6sIFO0jmkhwTjv6reOzGscAm8=";
endpoint = "dk-1.datakami.nl:51820";
allowedIPs = [ "10.100.0.0/24" ];
persistentKeepalive = 25;
}];
};
2018-05-12 18:15:42 +02:00
}