Find a file
Chris Cochrun 4ecebc0cdd adding qmk to guix
Inside of base we now have the appropriate udev rules and the manifest
to setup qmk. Also we have qmk setup as a submodule.
2023-07-13 06:44:09 -05:00
.config adding some tweaks to env 2023-07-12 11:33:27 -05:00
cachix adding the cachix dir 2023-01-11 06:40:33 -06:00
guix adding qmk to guix 2023-07-13 06:44:09 -05:00
home adding some tweaks to env 2023-07-12 11:33:27 -05:00
modules adding a lot of tweaks to nix stuff 2023-07-11 10:34:36 -05:00
pkgs adding a lot of tweaks to nix stuff 2023-07-11 10:34:36 -05:00
qmk adding qmk to guix 2023-07-13 06:44:09 -05:00
scripts adding some tweaks to env 2023-07-12 11:33:27 -05:00
systemd-units/user lots of refactoring 2023-06-09 07:02:04 -05:00
systems adding immich to caddy 2023-07-09 06:45:37 -05:00
.gitmodules adding qmk to guix 2023-07-13 06:44:09 -05:00
flake.lock all the updates 2023-05-18 17:03:15 -05:00
flake.nix refactore directory structure 2023-06-09 06:06:37 -05:00
README.org adding qml-mode, dolphin and ark 2023-06-29 13:51:37 -05:00

Readme

mailto:chris@tfcconnection.org

Welcome

This repository contains all of my dotfiles to the many programs I like to use on Linux. This is primarily built with NixOS. I have organized this with flakes and modules.

Guix

I am in the process of moving all of my systems to Guix. I'll keep NixOS as a system for most servers probably but for desktop systems, I think I'll start using Guix since I enjoy lisps a lot.

NixOS

The flake points to the correct machine which starts in the system directory. Then it uses the appropriate modules that the machine needs.

Syl

Syl is my laptop and has some configuration unique to that. In particular, it's a Framework Laptop. Honestly a great piece of tech. Love it.

Notice how I am including all of my software here. It may be a big file, but having all of it in one place means I can easily grok through it and remove something.

Hardware

Now in the hardware-configuration.nix file, I didn't change much because I wanted to keep it roughly the same in case things do get overwritten, but this is another nice feature of literate programming, should things change in the /etc folder, I'll have this readme as a backup of what it was before the changes.

{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" "acpi_call" ];
  boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];

  boot.loader.efi.efiSysMountPoint = "/boot/efi";

  zramSwap.enable = true;

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/db28ba7c-a15d-4c81-8373-99f2f171cac5";
      fsType = "btrfs";
      options = [ "subvol=@" ];
    };

  fileSystems."/boot/efi" =
    { device = "/dev/disk/by-uuid/BA76-3723";
      fsType = "vfat";
    };

  swapDevices = [ ];

  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
  # (the default) this is the recommended approach. When using systemd-networkd it's
  # still possible to use this option, but it's recommended to use it in conjunction
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
  networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlp170s0.useDHCP = lib.mkDefault true;

  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
  # high-resolution display
  hardware.video.hidpi.enable = lib.mkDefault true;
}

Kaladin

Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 and 64gb of memory and an Nvidia 1080. Basically I use this for video editing, animation, and some other things. Here is it's configuration.

hardware

And here is it's hardware config.

{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ config.boot.kernelPackages.nvidiaPackages.latest ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10";
      fsType = "btrfs";
      options = [ "subvol=@" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ];
    };

  fileSystems."/home" =
    { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10";
      fsType = "btrfs";
      options = [ "subvol=@home" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ];
    };

  fileSystems."/nix" =
    { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10";
      fsType = "btrfs";
      options = [ "subvol=@nix" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ];
    };

  fileSystems."/var/log" =
    { device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10";
      fsType = "btrfs";
      options = [ "subvol=@log" "noatime" "ssd" "space_cache" "clear_cache" "compress=zstd" ];
    };

  fileSystems."/run/media/chris/Storage" =
    { device = "/dev/disk/by-uuid/4c7d4273-7b72-4aa8-8e1c-e281543d06cb";
      fsType = "btrfs";
      options = [ "noatime" "space_cache" "clear_cache" "compress=zstd" ];
    };

  fileSystems."/run/media/chris/backup" =
    { device = "/dev/disk/by-uuid/4286b9ef-e8ed-49a0-9eec-91b8ee05b2cb";
      fsType = "btrfs";
      options = [ "noatime" "space_cache" "clear_cache" "compress=zstd" ];
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/35A0-C1F1";
      fsType = "vfat";
    };

  swapDevices = [ ];

  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
  # (the default) this is the recommended approach. When using systemd-networkd it's
  # still possible to use this option, but it's recommended to use it in conjunction
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
  networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;

  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

Kaladin is still not fullly setup, so I'll be working on that more and more as time goes.

Dalinar

Dalinar is my home server. It's built with an old laptop at the moment, but the way everything is orchestrated is to protect from screw ups.

Containers

Here are Dalinar's containers

First off, I'm not entirely sure how this works, but this is my best guess.

jellyfin = {
  config = { config, pkgs, ... }:
  {
    # ...
  };
};

Hardware Configuration

Dalinar's hardware

# Do not modify this file!  It was generated by nixos-generate-config
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/103a24d5-ffb5-4f7c-ab68-48e0b766b3ac";
      fsType = "btrfs";
      options = [ "subvol=@" "noatime" "nodiratime" "compress=zstd" ];
    };

  fileSystems."/boot" =
    { device = "/dev/disk/by-uuid/55C5-7725";
      fsType = "vfat";
    };

  fileSystems."/storage" =
    { device = "/dev/disk/by-uuid/f1804953-14e5-42db-a974-1e18f16d884c";
      fsType = "btrfs";
      options = [ "noatime" "nodiratime" "compress=zstd" ];
    };

  swapDevices = [ ];

  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
  # (the default) this is the recommended approach. When using systemd-networkd it's
  # still possible to use this option, but it's recommended to use it in conjunction
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
  networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;

  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

Kohlin

Kohlin is another home server. It's built with an old laptop at the moment, but the way everything is orchestrated is to protect from screw ups.

Containers

Hardware Configuration

Kohlin's hardware

# Do not modify this file!  It was generated by nixos-generate-config
# and may be overwritten by future invocations.  Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-intel" ];
  boot.extraModulePackages = [ ];

  fileSystems."/" =
    { device = "/dev/disk/by-uuid/3dc76272-54d9-445e-846f-591cd407b085";
      fsType = "ext4";
    };

  fileSystems."/boot/efi" =
    { device = "/dev/disk/by-uuid/DDA5-32A1";
      fsType = "vfat";
    };

  swapDevices =
    [ { device = "/dev/disk/by-uuid/b25464c5-2268-4963-80cb-6dc51dcba91b"; }
    ];

  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
  # (the default) this is the recommended approach. When using systemd-networkd it's
  # still possible to use this option, but it's recommended to use it in conjunction
  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
  networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.eno1.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;

  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

Home

I also use home-manager for managing dotfiles. This means that everything is contained in this folder and then tangled out to their respective places when rebuilding the system.

Thanks!

EXTRA

Possible efibootmgr command to make efistub work on desktop

efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Arch Linux" --loader /boot/vmlinuz-linux-zen --unicode 'root=PARTUUID=d920ee9c-3b42-4c83-9c4c-a33406421ed1 rootflags=subvol=@ rw noatime nodiratime compress=zstd:3 ssd space_cache initrd=\initramfs-linux-zen.img' --verbose