diff options
-rw-r--r-- | ops/machines/all-systems.nix | 1 | ||||
-rw-r--r-- | users/grfn/system/home/default.nix | 4 | ||||
-rw-r--r-- | users/grfn/system/home/machines/ogopogo.nix | 68 | ||||
-rw-r--r-- | users/grfn/system/system/default.nix | 5 | ||||
-rw-r--r-- | users/grfn/system/system/machines/ogopogo.nix | 73 |
5 files changed, 151 insertions, 0 deletions
diff --git a/ops/machines/all-systems.nix b/ops/machines/all-systems.nix index e59187cabbf8..f11b0e06b621 100644 --- a/ops/machines/all-systems.nix +++ b/ops/machines/all-systems.nix @@ -15,6 +15,7 @@ (with depot.users.grfn.system.system; [ yeren mugwump + ogopogo ]) ++ (with depot.users.wpcarro.nixos; [ diff --git a/users/grfn/system/home/default.nix b/users/grfn/system/home/default.nix index 874d7b2cb281..f821999b9957 100644 --- a/users/grfn/system/home/default.nix +++ b/users/grfn/system/home/default.nix @@ -22,6 +22,10 @@ rec { dobharchuHome = dobharchu.activation-script; + ogopogo = home ./machines/ogopogo.nix; + + ogopogoHome = ogopogo.activation-script; + yeren = home ./machines/yeren.nix; yerenHome = yeren.activation-script; diff --git a/users/grfn/system/home/machines/ogopogo.nix b/users/grfn/system/home/machines/ogopogo.nix new file mode 100644 index 000000000000..19d3a5467265 --- /dev/null +++ b/users/grfn/system/home/machines/ogopogo.nix @@ -0,0 +1,68 @@ +{ pkgs, lib, config, ... }: + +let + inherit (builtins) pathExists; + laptopKeyboardId = "5"; +in + +{ + imports = [ + ../platforms/linux.nix + ../modules/common.nix + ../modules/desktop.nix + ../modules/development/agda.nix + ../modules/development/readyset.nix + ] ++ (lib.optional (pathExists ../modules/private.nix) ../modules/private.nix); + + programs.home-manager.enable = true; + home.stateVersion = "21.11"; + + system.machine = { + wirelessInterface = "wlp4s0"; + i3FontSize = 9; + }; + + home.packages = with pkgs; [ + zoom-us + slack + mysql + graphviz + gnuplot + mypaint + xdot + tdesktop + subsurface + discord + steam + ]; + + systemd.user.services.laptop-keyboard = { + Unit = { + Description = "Swap caps+escape and alt+super, but only on the built-in laptop keyboard"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { WantedBy = [ "graphical-session.target" ]; }; + + Service = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = ( + "${pkgs.xorg.setxkbmap}/bin/setxkbmap " + + "-device ${laptopKeyboardId} " + + "-option caps:swapescape " + + "-option compose:ralt " + + "-option altwin:swap_alt_win" + ); + }; + }; + + xsession.windowManager.i3.config.keybindings.F9 = "exec lock"; + + # Telegram adds this to ~/.config/mimeapps.list if it isn't already there, + # preventing home manager from installing (since it doesn't want to overwrite + # the file) + xdg.mimeApps.defaultApplications."x-scheme-handler/tg" = + "userapp-Telegram Desktop-K290F1.desktop"; +} diff --git a/users/grfn/system/system/default.nix b/users/grfn/system/system/default.nix index 9196758e64db..ec3a002051e8 100644 --- a/users/grfn/system/system/default.nix +++ b/users/grfn/system/system/default.nix @@ -22,6 +22,10 @@ rec { }; })).system; + ogopogo = import ./machines/ogopogo.nix; + + ogopogoSystem = (depot.ops.nixos.nixosFor ogopogo).system; + yeren = import ./machines/yeren.nix; yerenSystem = (depot.ops.nixos.nixosFor yeren).system; @@ -31,6 +35,7 @@ rec { meta.ci.targets = [ "mugwumpSystem" "roswellSystem" + "ogopogoSystem" "yerenSystem" "iso" diff --git a/users/grfn/system/system/machines/ogopogo.nix b/users/grfn/system/system/machines/ogopogo.nix new file mode 100644 index 000000000000..e5387d005974 --- /dev/null +++ b/users/grfn/system/system/machines/ogopogo.nix @@ -0,0 +1,73 @@ +{ depot, modulesPath, config, lib, pkgs, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ../modules/common.nix + ../modules/xserver.nix + ../modules/fonts.nix + ../modules/sound.nix + # ../modules/tvl.nix + ../modules/development.nix + ../modules/work/kolide.nix + ]; + + networking.hostName = "ogopogo"; + + system.stateVersion = "22.11"; + + boot = { + initrd = { + availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + kernelModules = [ ]; + }; + + kernelPackages = pkgs.linuxPackages_5_15; + + kernelModules = [ "kvm-amd" ]; + blacklistedKernelModules = [ ]; + extraModulePackages = [ ]; + + kernel.sysctl = { + "kernel.perf_event_paranoid" = -1; + }; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/d67506cf-7039-484d-97c0-00321a7858dc"; + fsType = "ext4"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/AE73-03A3"; + fsType = "vfat"; + }; + }; + + swapDevices = [{ + device = "/dev/disk/by-uuid/8bdae7c8-5160-491f-8cd0-4f0a79acadf9"; + }]; + + services.earlyoom = { + enable = true; + freeMemThreshold = 5; + }; + + nixpkgs.config.allowUnfree = true; + hardware.enableAllFirmware = true; + + hardware.pulseaudio.extraConfig = '' + load-module module-remap-source source_name=KompleteAudio6_1 source_properties=device.description=KompleteAudio6Input1 master=alsa_input.usb-Native_Instruments_Komplete_Audio_6_458E0FFD-00.multichannel-input remix=no channels=1 master_channel_map=front-left channel_map=mono + load-module module-remap-source source_name=KompleteAudio6_2 source_properties=device.description=KompleteAudio6Input2 master=alsa_input.usb-Native_Instruments_Komplete_Audio_6_458E0FFD-00.multichannel-input remix=no channels=1 master_channel_map=front-right channel_map=mono + load-module module-remap-sink sink_name=KompleteAudio6_12 sink_properties=device.description=KompleteAudio6_12 remix=no master=alsa_output.usb-Native_Instruments_Komplete_Audio_6_458E0FFD-00.analog-surround-21 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right + ''; + + services.fwupd.enable = true; + + services.tailscale.enable = true; + + # Nvidia + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.opengl.enable = true; +} |