about summary refs log tree commit diff
path: root/users/wpcarro/nixos/ava
diff options
context:
space:
mode:
Diffstat (limited to 'users/wpcarro/nixos/ava')
-rw-r--r--users/wpcarro/nixos/ava/ava.el18
-rw-r--r--users/wpcarro/nixos/ava/default.nix36
-rw-r--r--users/wpcarro/nixos/ava/hardware.nix31
3 files changed, 40 insertions, 45 deletions
diff --git a/users/wpcarro/nixos/ava/ava.el b/users/wpcarro/nixos/ava/ava.el
index 8577e4d9cc..b0b13746b0 100644
--- a/users/wpcarro/nixos/ava/ava.el
+++ b/users/wpcarro/nixos/ava/ava.el
@@ -2,13 +2,23 @@
 ;; Dependencies
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(require 'bookmark)
 (require 'display)
 (require 'window-manager)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Monitor Configuration
+;; Configuration
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(bookmark-install-kbd
+ (make-bookmark :label "hadrian"
+                :path "/hadrian"
+                :kbd "h"))
+
+(setq initial-buffer-choice "/hadrian")
+
+(add-to-list 'ssh-hosts "wpcarro@tarasco")
+
 (display-register primary
                   :output "HDMI-1"
                   :primary t
@@ -47,9 +57,5 @@
              :kbd "h"
              :display display-secondary)))
 
+;; I *think* this needs to be the last statement in this file.
 (window-manager-init :init-hook #'display-arrange-main)
-
-(bookmark-install-kbd
- (make-bookmark :label "hadrian"
-                :path (f-join tvl-depot-path "/hadrian")
-                :kbd "h"))
diff --git a/users/wpcarro/nixos/ava/default.nix b/users/wpcarro/nixos/ava/default.nix
index 267b46fdf5..25c43c003f 100644
--- a/users/wpcarro/nixos/ava/default.nix
+++ b/users/wpcarro/nixos/ava/default.nix
@@ -3,6 +3,7 @@
 
 let
   inherit (depot.users) wpcarro;
+  inherit (depot.users.wpcarro.lib) usermod;
 
   wpcarrosEmacs = wpcarro.emacs.nixos {
     load = [ ./ava.el ];
@@ -15,7 +16,9 @@ let
   };
 in
 {
-  imports = [ ./hardware.nix ];
+  imports = [
+    (usermod "hardware/nopn.nix")
+  ];
 
   # Use the TVL binary cache
   tvl.cache.enable = true;
@@ -26,6 +29,8 @@ in
   # Support IP forwarding to use this device as a Tailscale exit node.
   boot.kernel.sysctl."net.ipv4.ip_forward" = true;
   boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = true;
+  # Additionall exit node settings that Tailscale recommends.
+  networking.firewall.checkReversePath = "loose";
 
   time.timeZone = "America/Los_Angeles";
 
@@ -42,14 +47,23 @@ in
   };
 
   services = wpcarro.common.services // {
+    # Check the amount of available memory and free swap a few times per second
+    # and kill the largest process if both are below 10%.
+    earlyoom.enable = true;
+
     tailscale.enable = true;
 
     openssh.enable = true;
 
+    printing = {
+      enable = true;
+      drivers = with pkgs; [ gutenprint ];
+    };
+
     xserver = {
       enable = true;
-      layout = "us";
-      xkbOptions = "caps:escape";
+      xkb.layout = "us";
+      xkb.options = "caps:escape";
       displayManager = {
         # Give EXWM permission to control the session (from tazjin's setup).
         sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localhost:$USER";
@@ -67,10 +81,13 @@ in
   hardware.pulseaudio.enable = true;
 
   users.mutableUsers = true;
-  users.users.root.openssh.authorizedKeys.keys = [
-    wpcarro.keys.nathan
+  users.users.root.openssh.authorizedKeys.keys = with wpcarro.keys; [
+    iphone
+    nathan
+    tarasco
   ];
   users.users.wpcarro = {
+    initialPassword = "password";
     isNormalUser = true;
     extraGroups = [
       "networkmanager"
@@ -78,8 +95,10 @@ in
       "docker"
     ];
     shell = pkgs.fish;
-    openssh.authorizedKeys.keys = [
-      wpcarro.keys.nathan
+    openssh.authorizedKeys.keys = with wpcarro.keys; [
+      iphone
+      nathan
+      tarasco
     ];
   };
   users.extraGroups.vboxusers.members = [ "wpcarro" ];
@@ -87,7 +106,7 @@ in
   security.sudo.wheelNeedsPassword = false;
 
   fonts = {
-    fonts = with pkgs; [
+    packages = with pkgs; [
       jetbrains-mono
     ];
 
@@ -115,6 +134,7 @@ in
     wpcarro.common.shell-utils ++
     (with pkgs; [
       alacritty
+      ec2-api-tools
       firefox
       google-chrome
       httpie
diff --git a/users/wpcarro/nixos/ava/hardware.nix b/users/wpcarro/nixos/ava/hardware.nix
deleted file mode 100644
index 9892bdc581..0000000000
--- a/users/wpcarro/nixos/ava/hardware.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }:
-
-{
-  imports =
-    [
-      (modulesPath + "/installer/scan/not-detected.nix")
-    ];
-
-  boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
-  boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ "kvm-intel" ];
-  boot.extraModulePackages = [ ];
-
-  fileSystems."/" =
-    {
-      device = "/dev/disk/by-uuid/60d92789-c44e-4620-885d-1d81d0759f1d";
-      fsType = "ext4";
-    };
-
-  fileSystems."/boot" =
-    {
-      device = "/dev/disk/by-uuid/C62C-9B32";
-      fsType = "vfat";
-    };
-
-  swapDevices = [ ];
-
-  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-  # high-resolution display
-  hardware.video.hidpi.enable = lib.mkDefault true;
-}