about summary refs log tree commit diff
path: root/users/tazjin/nixos/frog/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/nixos/frog/default.nix')
-rw-r--r--users/tazjin/nixos/frog/default.nix92
1 files changed, 35 insertions, 57 deletions
diff --git a/users/tazjin/nixos/frog/default.nix b/users/tazjin/nixos/frog/default.nix
index 9765554319..dfb6b46d5a 100644
--- a/users/tazjin/nixos/frog/default.nix
+++ b/users/tazjin/nixos/frog/default.nix
@@ -1,30 +1,18 @@
-{ depot, lib, ... }:
+{ depot, lib, pkgs, ... }:
 
-config: let
-  nixpkgs = import depot.third_party.nixpkgsSrc {
-    config.allowUnfree = true;
-  };
-
-  lieer = depot.third_party.lieer {};
-
-  # add google-c-style here because other machines get it from, eh,
-  # elsewhere.
-  frogEmacs = (depot.users.tazjin.emacs.overrideEmacs(epkgs: epkgs ++ [
-    depot.third_party.emacsPackages.google-c-style
-  ]));
+config:
+let
+  inherit (pkgs) lieer;
 
-  quasselClient = depot.third_party.quassel.override {
+  quasselClient = pkgs.quassel.override {
     client = true;
     enableDaemon = false;
     monolithic = false;
   };
-in depot.lib.fix(self: {
-  imports = [
-    "${depot.depotPath}/ops/nixos/v4l2loopback.nix"
-  ];
-
+in
+lib.fix (self: {
   boot = {
-    tmpOnTmpfs = true;
+    tmp.useTmpfs = true;
     kernelModules = [ "kvm-amd" ];
 
     loader = {
@@ -38,14 +26,16 @@ in depot.lib.fix(self: {
       kernelModules = [ "dm-snapshot" ];
     };
 
-    kernelPackages = nixpkgs.linuxPackages_latest;
+    kernelPackages = pkgs.linuxPackages_latest;
     kernel.sysctl = {
       "kernel.perf_event_paranoid" = -1;
     };
 
-    kernelPatches = [
-      depot.third_party.kernelPatches.trx40_usb_audio
-    ];
+    # Enable this again if frog is put back into use ...
+    #
+    # kernelPatches = [
+    #   depot.third_party.kernelPatches.trx40_usb_audio
+    # ];
   };
 
   hardware = {
@@ -59,7 +49,7 @@ in depot.lib.fix(self: {
 
     pulseaudio = {
       enable = true;
-      package = nixpkgs.pulseaudioFull;
+      package = pkgs.pulseaudioFull;
     };
 
     bluetooth = {
@@ -67,19 +57,11 @@ in depot.lib.fix(self: {
     };
   };
 
-  nix = {
-    maxJobs = 48;
-    nixPath = [
-      "depot=/depot"
-      "nixpkgs=${depot.third_party.nixpkgsSrc}"
-    ];
-
-    binaryCaches = ["ssh://nix-ssh@whitby.tvl.fyi"];
-    binaryCachePublicKeys = ["cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc="];
+  nix.settings = {
+    max-jobs = 48;
+    substituters = [ "ssh://nix-ssh@whitby.tvl.fyi" ];
   };
 
-  nixpkgs.pkgs = nixpkgs;
-
   networking = {
     hostName = "frog";
     useDHCP = true;
@@ -96,7 +78,7 @@ in depot.lib.fix(self: {
   # Generate an immutable /etc/resolv.conf from the nameserver settings
   # above (otherwise DHCP overwrites it):
   environment.etc."resolv.conf" = with lib; {
-    source = depot.third_party.writeText "resolv.conf" ''
+    source = pkgs.writeText "resolv.conf" ''
       ${concatStringsSep "\n" (map (ns: "nameserver ${ns}") self.networking.nameservers)}
       options edns0
     '';
@@ -115,7 +97,7 @@ in depot.lib.fix(self: {
     extraGroups = [ "wheel" "audio" "docker" ];
     isNormalUser = true;
     uid = 1000;
-    shell = nixpkgs.fish;
+    shell = pkgs.fish;
   };
 
   security.sudo = {
@@ -124,7 +106,7 @@ in depot.lib.fix(self: {
   };
 
   fonts = {
-    fonts = with nixpkgs; [
+    packages = with pkgs; [
       corefonts
       dejavu_fonts
       jetbrains-mono
@@ -159,7 +141,7 @@ in depot.lib.fix(self: {
   # Required for Yubikey usage as smartcard
   services.pcscd.enable = true;
   services.udev.packages = [
-    nixpkgs.yubikey-personalization
+    pkgs.yubikey-personalization
   ];
 
   # Enable Docker for Nixery testing
@@ -170,13 +152,13 @@ in depot.lib.fix(self: {
 
   services.xserver = {
     enable = true;
-    layout = "us";
-    xkbOptions = "caps:super";
+    xkb.layout = "us";
+    xkb.options = "caps:super";
     exportConfiguration = true;
     videoDrivers = [ "amdgpu" ];
     displayManager = {
       # Give EXWM permission to control the session.
-      sessionCommands = "${nixpkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER";
+      sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER";
 
       lightdm.enable = true;
       lightdm.greeters.gtk.clock-format = "%H·%M"; # TODO(tazjin): TZ?
@@ -184,7 +166,7 @@ in depot.lib.fix(self: {
 
     windowManager.session = lib.singleton {
       name = "exwm";
-      start = "${frogEmacs}/bin/tazjins-emacs";
+      start = "${depot.users.tazjin.emacs}/bin/tazjins-emacs";
     };
   };
 
@@ -219,32 +201,28 @@ in depot.lib.fix(self: {
   environment.systemPackages =
     # programs from the depot
     (with depot; [
-      frogEmacs
       fun.idual.script
       fun.uggc
       lieer
       ops.kontemplate
       quasselClient
-      third_party.ffmpeg
       third_party.git
-      third_party.lutris
-      third_party.rr
       tools.nsfv-setup
+      users.tazjin.emacs
     ]) ++
 
     # programs from nixpkgs
-    (with nixpkgs; [
+    (with pkgs; [
       age
       bat
       chromium
       clang-manpages
       clang-tools
-      clang_10
+      clang
       curl
       direnv
       dnsutils
-      emacs26 # mostly for emacsclient
-      exa
+      emacs28 # mostly for emacsclient
       fd
       file
       gdb
@@ -260,13 +238,12 @@ in depot.lib.fix(self: {
       jq
       kubectl
       linuxPackages.perf
-      manpages
+      man-pages
       miller
       msmtp
       nix-prefetch-github
       notmuch
       obs-studio
-      obs-v4l2sink
       openssh
       openssl
       pass
@@ -279,10 +256,7 @@ in depot.lib.fix(self: {
       ripgrep
       rustup
       screen
-      scrot
-      sourcetrail
       spotify
-      steam
       tokei
       transmission
       tree
@@ -295,6 +269,10 @@ in depot.lib.fix(self: {
       yubico-piv-tool
       yubikey-personalization
       zoxide
+
+      # Commented out because of interim breakage:
+      # steam
+      # lutris
     ]);
 
   # ... and other nonsense.