fedora-csb-system-manager
  1{
  2  libx,
  3  pkgs,
  4  lib,
  5  globals,
  6  ...
  7}:
  8{
  9
 10  imports = [
 11    ../common/hardware/laptop.nix
 12    ../common/programs/direnv.nix
 13    ../common/programs/git.nix
 14    ../common/programs/tmux.nix
 15    ../common/services/networkmanager.nix
 16    ../common/services/containers.nix
 17    ../common/services/docker.nix
 18    ../common/services/libvirt.nix
 19    ../common/services/binfmt.nix
 20
 21    ../redhat
 22  ];
 23
 24  # It takes.. multiple GB, and I don't really use it...
 25  programs.obs-studio = {
 26    enable = false;
 27    plugins = with pkgs.obs-studio-plugins; [
 28      wlrobs
 29      obs-backgroundremoval
 30      obs-pipewire-audio-capture
 31      input-overlay
 32    ];
 33  };
 34
 35  services = {
 36    getty = {
 37      autologinOnce = true;
 38      autologinUser = "vincent";
 39    };
 40    # TODO probably migrate elsewhere
 41    kanata = {
 42      enable = true;
 43      package = pkgs.kanata-with-cmd;
 44      keyboards.x1 = {
 45        devices = [ "/dev/input/event0" ]; # internal keyboard
 46        config = builtins.readFile (./. + "/main.kbd");
 47        extraDefCfg = ''
 48          	danger-enable-cmd yes
 49            process-unmapped-keys yes
 50            override-release-on-activation yes
 51            concurrent-tap-hold yes
 52        '';
 53      };
 54    };
 55    dictd = {
 56      enable = true;
 57      DBs = with pkgs.dictdDBs; [
 58        wiktionary
 59        wordnet
 60        fra2eng
 61        eng2fra
 62      ];
 63    };
 64    locate = {
 65      enable = true;
 66      pruneBindMounts = true;
 67    };
 68    wireguard = {
 69      enable = true;
 70      ips = libx.wg-ips globals.machines.kyushu.net.vpn.ips;
 71      endpoint = "${globals.net.vpn.endpoint}";
 72      endpointPublicKey = "${globals.machines.kerkouane.net.vpn.pubkey}";
 73    };
 74    hardware.bolt.enable = true;
 75    printing = {
 76      enable = true;
 77      drivers = with pkgs; [
 78        # cnijfilter2 # Disabled: broken in nixpkgs-unstable (bool typedef error)
 79        gutenprint
 80        gutenprintBin
 81      ];
 82    };
 83  };
 84
 85  hardware.keyboard.qmk.enable = true;
 86
 87  services.udev.packages = [ pkgs.sane-airscan ];
 88  hardware.sane = {
 89    enable = true;
 90    extraBackends = [ pkgs.sane-airscan ];
 91    openFirewall = true;
 92    netConf = "192.168.12.70";
 93  };
 94
 95  environment.systemPackages = with pkgs; [
 96    kanata
 97    nixos-rebuild-ng
 98    battery-monitor
 99    # backup
100    virt-manager
101  ];
102
103  # Make sure we don't start docker until required
104  systemd.services.docker.wantedBy = lib.mkForce [ ];
105}