diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-07-08 18:52:07 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-07-12 08:36:46 -0400 |
commit | 45ffdaceed8bb63e563094f9dc99a9afcd0fad7b (patch) | |
tree | 9b3850b988a346462b5d91cfd7cc824b9cd3708b /machines | |
parent | 0500f17d6277a75a64fddb03e690d392a87363bf (diff) |
updates
Diffstat (limited to 'machines')
-rw-r--r-- | machines/firelink.nix | 105 |
1 files changed, 51 insertions, 54 deletions
diff --git a/machines/firelink.nix b/machines/firelink.nix index 74109fd..4f23835 100644 --- a/machines/firelink.nix +++ b/machines/firelink.nix @@ -2,9 +2,9 @@ let my-overlay = self: super: { - my-linuxPackages = - let linuxPkgs = super.unstable.linuxPackages_latest; - in linuxPkgs.extend (self: super: { + my-linuxPackages = let linuxPkgs = super.unstable.linuxPackages_latest; + in linuxPkgs.extend (self: super: + { # xpadneo = super.xpadneo.overrideAttrs (o: rec { # version = "master"; # src = pkgs.fetchFromGitHub { @@ -15,35 +15,33 @@ let # }; # }); }); - }; -in -{ + }; +in { orbekk.gaming.enable = true; orbekk.desktop.enable = true; orbekk.builder.enableRemoteBuilds = true; - orbekk.simple-firewall.allowedTCPPorts = - [ - # pulseaudio - 4713 - ]; - orbekk.simple-firewall.allowedUDPPorts = - [ - # avahi - 5353 - ]; + orbekk.simple-firewall.allowedTCPPorts = [ + # pulseaudio + 4713 + ]; + orbekk.simple-firewall.allowedUDPPorts = [ + # avahi + 5353 + ]; environment.systemPackages = with pkgs; [ openmw minecraft - (kodi.withPackages (p: with p; [ - inputstream-adaptive - # controllers.default - joystick - inputstreamhelper - ])) + (kodi.withPackages (p: + with p; [ + inputstream-adaptive + # controllers.default + joystick + inputstreamhelper + ])) retroarch - wmctrl # for steam launcher + wmctrl # for steam launcher ]; nixpkgs.config.retroarch = { enableMGBA = true; @@ -83,9 +81,7 @@ in }; systemd.services.pulseaudio = { # environment."JACK_PROMISCUOUS_SERVER" = "jackaudio"; - serviceConfig = { - LimitMEMLOCK = "infinity"; - }; + serviceConfig = { LimitMEMLOCK = "infinity"; }; }; # users.extraUsers.pulse.extraGroups = [ "jackaudio" ]; @@ -103,12 +99,12 @@ in programs.bcc.enable = true; systemd.extraConfig = "DefaultLimitNOFILE=1048576"; - + security.pam.loginLimits = [{ - domain = "*"; - type = "hard"; - item = "nofile"; - value = "1048576"; + domain = "*"; + type = "hard"; + item = "nofile"; + value = "1048576"; }]; systemd.timers.duckdns = { @@ -123,7 +119,10 @@ in hardware.steam-hardware.enable = true; services.xserver.videoDrivers = [ "amdgpu" ]; - services.xserver.resolutions = [{x=2560; y=1440;}]; + services.xserver.resolutions = [{ + x = 2560; + y = 1440; + }]; hardware.cpu.amd.updateMicrocode = true; hardware.enableAllFirmware = true; @@ -134,10 +133,10 @@ in console.earlySetup = true; boot.loader.grub.enable = true; - boot.loader.grub.version = 2; - boot.loader.grub.device = "nodev"; + boot.loader.grub.devices = ["nodev"]; boot.loader.grub.efiSupport = true; boot.loader.efi.canTouchEfiVariables = true; + # boot.loader.grub.efiInstallAsRemovable = true; boot.kernelPackages = pkgs.my-linuxPackages; boot.kernelModules = [ "kvm-amd" "i2c-dev" "amdgpu" ]; @@ -160,7 +159,8 @@ in systemd.services.monitor-switch-to-me = { description = "Switch monitor to this computer"; path = [ pkgs.ddcutil ]; - script = let target = "0x0f"; in '' + script = let target = "0x0f"; + in '' # Would like to avoid switching if possible; sadly this doesn't reliably # report other input sources. # ddcutil --mfg HPN getvcp 60 | grep sl=${target} || \ @@ -198,41 +198,38 @@ in # linux = pkgs.callPackage linux_pkg {}; # in pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux); - boot.kernelParams = []; + boot.kernelParams = [ ]; networking.hostName = "firelink"; # Define your hostname. system.stateVersion = lib.mkForce "20.03"; # SSD configuration - fileSystems."/" = - { device = "/dev/mapper/cryptsystem"; - fsType = "ext4"; - options = ["noatime" "discard"]; - }; + fileSystems."/" = { + device = "/dev/mapper/cryptsystem"; + fsType = "ext4"; + options = [ "noatime" "discard" ]; + }; - boot.initrd.luks.devices."cryptsystem".device = "/dev/disk/by-uuid/8acc11c2-e540-4561-8c88-34176fca1a72"; + boot.initrd.luks.devices."cryptsystem".device = + "/dev/disk/by-uuid/8acc11c2-e540-4561-8c88-34176fca1a72"; boot.initrd.luks.devices."cryptsystem".allowDiscards = true; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C636-D264"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/C636-D264"; + fsType = "vfat"; + }; programs.ssh.askPassword = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"; # 60 fps - services.xserver.xrandrHeads = - let monitor = name: { + services.xserver.xrandrHeads = let + monitor = name: { output = name; monitorConfig = '' ModeLine "3840x2160" 594.00 3840 4016 4104 4400 2160 2168 2178 2250 +hsync +vsync Option "PreferredMode" "3840x2160_60" ''; - }; in - [ - (monitor "HDMI-A-0") - (monitor "HDMI-A-1") - ]; + }; + in [ (monitor "HDMI-A-0") (monitor "HDMI-A-1") ]; } - |