{ config, lib, pkgs, ... }: let ports = { minecraft = 25565; }; in { age.secrets.test-secret.file = ../secrets/test-secret.age; age.secrets.test-secret.owner = "orbekk"; orbekk.backups.enableServer = true; orbekk.backups.enableClient = true; orbekk.gaming.enable = true; orbekk.desktop.enable = true; orbekk.thinkpad.enable = true; orbekk.simple-firewall.allowedTCPPorts = [ ports.minecraft 631 5353 ]; # socks proxy orbekk.login.enable = true; services.printing.enable = true; services.printing.drivers = with pkgs; [ gutenprint brlaser ]; services.openssh.enable = true; networking.networkmanager.enable = true; networking = { hostName = "pincer"; extraHosts = '' 0.0.0.0 minecraft.net ''; }; programs.xwayland.enable = true; programs.dconf.enable = true; environment.systemPackages = with pkgs; [ river ]; programs.sway = { enable = true; wrapperFeatures.gtk = true; # so that gtk works properly extraPackages = with pkgs; [ grim swaylock swayidle wl-clipboard mako # notification daemon alacritty # Alacritty is the default terminal in the config dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native foot ]; }; services.xserver.displayManager.session = [ { manage = "window"; name = "river"; start = '' XKB_DEFAULT_LAYOUT="us(dvorak)" XKB_DEFAULT_OPTIONS="caps:ctrl_modifier,compose:ralt" ${pkgs.river}/bin/river & waitPID=$! ''; } ]; # services.displayManager.slim.enable = lib.mkForce false; # services.xserver.desktopManager.kodi.enable = true; boot = { loader.grub = { enable = true; version = 2; device = "nodev"; efiSupport = true; }; loader.efi.canTouchEfiVariables = true; kernelPackages = pkgs.linuxPackages_latest; kernelModules = ["xpad" "kvm-intel" ]; initrd.luks.devices = { cryptroot = { device = "/dev/sda6"; allowDiscards = true; }; }; extraModprobeConfig = '' # option iwlwifi swcrypto=1 options iwlmvm power_scheme=1 ''; }; fileSystems = { "/boot" = { mountPoint = "/boot"; device = "/dev/sda1"; fsType = "vfat"; }; "/" = { mountPoint = "/"; device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = ["subvol=active/nixos-root" "discard" "compress=lzo"]; }; "/btrfs" = { mountPoint = "/btrfs"; device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = ["discard" "compress=lzo"]; }; }; systemd.extraConfig = "DefaultLimitNOFILE=1048576"; security.pam.loginLimits = [{ domain = "*"; type = "hard"; item = "nofile"; value = "1048576"; }]; # hardware-configuration.nix boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" ]; nix.maxJobs = lib.mkDefault 4; hardware.enableRedistributableFirmware = lib.mkDefault true; system.stateVersion = "17.04"; }