nixos-config

My NixOS configuration files

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
{
  config,
  lib,
  pkgs,
  ...
}:

{
  imports = [
    # Include the results of the hardware scan.
    ./hardware-configuration.nix
  ];

  networking.hostName = "Framework-13";

  environment.systemPackages = with pkgs; [
    # WolframAlpha at home
    # Don't try to build sage-tests if missing from cache.nixos.org
    # A bit questionable since that means some Sage test is failing but whatever
    (sage.override {
      requireSageTests = false;
    })
  ];

  # TODO: Microphone doesn't work and importing the nixos-hardware config doesn't help
  # https://github.com/NixOS/nixos-hardware/blob/master/framework/13-inch/amd-ai-300-series/default.nix

  # Fingerprint authentication
  services.fprintd.enable = true;
  # Don't enable fprintd for everything, otherwise plasmalogin takes 30 seconds to log in
  # Also, pam_kwallet5.so needs my password which obviously doesn't work with fingerprint login
  # https://github.com/NixOS/nixpkgs/issues/239770#issuecomment-1868402338
  security.pam.services.login.fprintAuth = false;
  # fprintd is buggy if running during sleep so kill it first
  # This is an fprintd bug so Plasma updates probably won't fix it
  systemd.services.kill-fprintd = {
    wantedBy = [ "sleep.target" ];
    before = [ "sleep.target" ];
    serviceConfig.ExecStart = "${pkgs.killall}/bin/killall fprintd";
  };

  services.ollama = {
    enable = true;
    package = pkgs.ollama-vulkan;
  };
}