summary refs log tree commit diff
path: root/machines/bismuth/devices.nix
blob: 64a58090b00b42e2b0bf9b89b387af58bc3224a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{ config, pkgs, ... }:

{
  # boot settings
  boot = {
    kernelPackages = pkgs.linuxPackages_latest;

    loader.grub = {
      enable = true;
      devices = [ "nodev" ];
      efiSupport = true;
      useOSProber = true;
      gfxmodeEfi = "1366x768x32";
    };

    loader.efi.canTouchEfiVariables = true;

    initrd.systemd.enable = true;

    binfmt.emulatedSystems = [
      "aarch64-linux"
      "riscv32-linux" "riscv64-linux"
    ];
  };

  # testing with replacing swap partitions and files
  # and files in lieu of zram.
  zramSwap = {
    enable = true;
    algorithm = "zstd";
    swapDevices = 1;
    memoryPercent = 25; # 50% would just be too big for bismuth.
  };

  # internet
  networking.networkmanager.enable = true;

  # sound
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa = { enable = true; support32Bit = true; };
    pulse.enable = true;
    jack.enable = true;
  };

  # disks
  boot.supportedFilesystems = [ "ntfs" ];

  fileSystems = {
    "/run/media/mel/Main" = {
      device = "/dev/disk/by-label/Main";
      fsType = "ntfs-3g";
      options = [
        "defaults"
        "users"
        "nofail"
        "exec"
        "rw"
        "uid=1000"
      ];
    };

    "/run/media/mel/Two" = {
      device = "/dev/disk/by-label/Two";
      fsType = "ntfs-3g";
      options = [
        "defaults"
        "users"
        "nofail"
        "exec"
        "rw"
        "uid=1000"
      ];
    };
  };

  # printing
  services.printing = {
    enable = true;
    stateless = true;
    startWhenNeeded = true;
  };

  services.avahi.enable = false;
  #services.avahi = {
  #  enable = true;
  #  nssmdns4 = true;
  #  openFirewall = true;
  #};
}