Format everything with alejandra

This commit is contained in:
Toast 2024-03-20 12:54:25 +01:00
parent 82bbd7ce87
commit 7888103b1e
100 changed files with 2827 additions and 2756 deletions

View file

@ -64,14 +64,14 @@
vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs-unstable-raw";
};
nix-flatpak.url = "github:gmodena/nix-flatpak/main";
nur.url = "github:nix-community/NUR";
};
outputs = { ... } @inputs: with inputs;
outputs = {...} @ inputs:
with inputs;
# Patch nixpkgs
# https://ertt.ca/nix/patch-nixpkgs/
let
@ -90,10 +90,9 @@
];
};
# https://discourse.nixos.org/t/proper-way-of-applying-patch-to-system-managed-via-flake/21073/26
nixpkgs-unstable = (import "${nixpkgs-unstable-patched}/flake.nix").outputs { self = inputs.self; };
nixpkgs = (import "${nixpkgs-patched}/flake.nix").outputs { self = inputs.self; };
in
{
nixpkgs-unstable = (import "${nixpkgs-unstable-patched}/flake.nix").outputs {self = inputs.self;};
nixpkgs = (import "${nixpkgs-patched}/flake.nix").outputs {self = inputs.self;};
in {
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
name = "toast-devshell";
# The agenix cli is not needed to activate a configuration, so instead of installing it
@ -105,12 +104,12 @@
just
alejandra
];
shellHook =''
shellHook = ''
export PS1="$PS1(toast-configs)> "
'';
};
packages = {
x86_64-linux = with import nixpkgs-unstable-raw { system = "x86_64-linux"; }; {
x86_64-linux = with import nixpkgs-unstable-raw {system = "x86_64-linux";}; {
anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {};
discord-krisp-fixer = callPackage ./pkgs/discord-krisp-fixer {};
};
@ -118,7 +117,10 @@
nixosConfigurations = {
Archie = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
specialArgs = {
systemPkgs = inputs.nixpkgs-unstable-raw;
flakeSelf = self;
};
/*
I used to set up nixpkgs in the flake, but doing that made
defining overlays in modules impossible (or at least I could
@ -140,7 +142,10 @@
SurfaceGo = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
specialArgs = {
systemPkgs = inputs.nixpkgs-unstable-raw;
flakeSelf = self;
};
modules = [
agenix.nixosModules.default
home-manager-unstable.nixosModule
@ -155,7 +160,10 @@
SteamDeck = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
specialArgs = {
systemPkgs = inputs.nixpkgs-unstable-raw;
flakeSelf = self;
};
modules = [
agenix.nixosModules.default
jovian.nixosModules.default
@ -172,7 +180,10 @@
WinMax2 = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-unstable-raw; flakeSelf = self; };
specialArgs = {
systemPkgs = inputs.nixpkgs-unstable-raw;
flakeSelf = self;
};
modules = [
agenix.nixosModules.default
jovian.nixosModules.default
@ -190,7 +201,10 @@
Everest = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { systemPkgs = inputs.nixpkgs-raw; flakeSelf = self; };
specialArgs = {
systemPkgs = inputs.nixpkgs-raw;
flakeSelf = self;
};
modules = [
agenix.nixosModules.default
home-manager.nixosModule

View file

@ -1,10 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Use grub boot loader
boot.loader = {
systemd-boot.enable = false;
@ -43,7 +44,6 @@
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
hardware.bluetooth.enable = true;
# List packages installed in system profile. To search, run:
@ -76,6 +76,4 @@
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./configuration.nix
./hardware-configuration.nix

View file

@ -1,41 +1,45 @@
# 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")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
# Enable support for the Xbox One wireless dongle
hardware.xone.enable = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fileSystems."/" = {
device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs";
options = [ "subvol=@root" "compress=zstd" ];
options = ["subvol=@root" "compress=zstd"];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" ];
options = ["subvol=@nix" "compress=zstd"];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs";
options = [ "subvol=@boot" "compress=zstd" ];
options = ["subvol=@boot" "compress=zstd"];
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/FB87-4CBC";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/FB87-4CBC";
fsType = "vfat";
};
@ -48,28 +52,28 @@
"/mnt/ssd" = {
device = config.fileSystems."/".device;
fsType = config.fileSystems."/".fsType;
options = [ "subvolid=5" "ro" ];
options = ["subvolid=5" "ro"];
};
"/mnt/windows" = {
device = "/dev/disk/by-uuid/B61AFDAC1AFD6A2F";
fsType = "ntfs3";
neededForBoot = false;
options = [ "noauto" "windows_names" ];
options = ["noauto" "windows_names"];
};
"/home" = {
device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" ];
options = ["subvol=@home" "compress=zstd"];
};
"/persist" = {
device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs";
options = [ "subvol=@persist" "compress=zstd" ];
options = ["subvol=@persist" "compress=zstd"];
neededForBoot = true;
};
};
swapDevices = [ ];
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,10 +1,12 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.timeout = 5;
@ -23,22 +25,24 @@
dhcpcd.enable = false;
interfaces.eno1 = {
wakeOnLan.enable = true;
ipv4.addresses = [ {
ipv4.addresses = [
{
address = "192.168.0.160";
prefixLength = 24;
} ];
}
];
};
# I use networkd, so I need to declare the interface for the default gateway
defaultGateway = {
address = "192.168.0.1";
interface = "eno1";
};
nameservers = [ "9.9.9.9" ];
nameservers = ["9.9.9.9"];
};
# Define a user account. Don't forget to set a password with passwd.
users.users.toast = {
extraGroups = [ "networkmanager" "transmission"];
extraGroups = ["networkmanager" "transmission"];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC2bOVmxUNvg9qFv9DlzMmTRlzcNsyNq1F1wBuAXySwsWAzHGaO+WGdSCINxW3k2ccXn7M/o1r89LeTzRzi8sWQYCpBaIqYVszM/r7SvTS4gASyKhM6lNlyUEPOnvCXH7rdtF+fjoA1TJPv7GBk78QRhGh+eVO3qhY1m++5C1CPFlyrc6sSfgIBQJ5GQZFl/7YEgsrPo+M+0Sd7LkaCOyNmJA0Wi0BA3bbf5sJhrZVMMg/p7w+eMphz2kd1VTVjW3yeMq9zLCiu4SOTBNGCMEvKIdUZbQ83lNrqO2z1/3T1bDwJgpz3xusfkNCeNJSmhfFw5ydHEUp/9jshq38WmulKAMw2Kl/Zed62AVU7Ux7YjUkZkWvo8i3eXuLUxoG891S7cWV1/ijs9QMajOLLT14FG7RbzUYYaYlx+/iNGji9d4sp9/oMYyO45TMe+vEezFSBygP7TY0QFOr4xTi49ZRQFsszbFnGRv+k3wVKoGoeNt0xWB8pBEPFtaeHJpQyJX8= id_rsa_moon"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOeu3crGqtxwaqgoQPt5mWlC8+PL/Icvcvo0MBAaK80L Key for work laptop"
@ -49,7 +53,7 @@
boot.tmp.useTmpfs = false;
home-manager = {
users.toast = { config, ... }: {
users.toast = {config, ...}: {
home = {
file = {
# This symlinks the Transmission downloads folder into my user's downloads folder for easy access
@ -61,8 +65,8 @@
# Open ports in the firewall.
# No idea what ports 5201 and 21027 do tho
networking.firewall.allowedTCPPorts = [ 5201 ];
networking.firewall.allowedUDPPorts = [ 5201 21027];
networking.firewall.allowedTCPPorts = [5201];
networking.firewall.allowedUDPPorts = [5201 21027];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./configuration.nix
./hardware-configuration.nix

View file

@ -1,53 +1,57 @@
# 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")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/Everest";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@"];
options = ["compress=zstd" "subvol=@"];
};
"/nix" = {
device = "/dev/disk/by-label/Everest";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@nix" ];
options = ["compress=zstd" "subvol=@nix"];
};
"/home" = {
device = "/dev/disk/by-label/Everest";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@home" ];
options = ["compress=zstd" "subvol=@home"];
};
"/mnt/hdd" = {
device = "/dev/disk/by-label/Everest";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=/" "ro" ];
options = ["compress=zstd" "subvol=/" "ro"];
};
"/persist" = {
device = "/dev/disk/by-label/Everest";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@persist" ];
options = ["compress=zstd" "subvol=@persist"];
neededForBoot = true;
};
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-label/Boot";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-label/Boot";
fsType = "vfat";
};
swapDevices = [ ];
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

View file

@ -1,10 +1,12 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
# Use grub boot loader
boot.loader = {
systemd-boot.enable = false;
@ -67,7 +69,7 @@
# Large builds (the linux kernel) fail to build because /tmp is too small when using tmpfs
boot.tmp.useTmpfs = false;
environment.systemPackages = [ pkgs.steamdeck-firmware pkgs.steamdeck-hw-theme ];
environment.systemPackages = [pkgs.steamdeck-firmware pkgs.steamdeck-hw-theme];
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
@ -98,6 +100,4 @@
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./configuration.nix
./hardware-configuration.nix

View file

@ -1,25 +1,27 @@
# 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, ... }:
let
{
config,
lib,
pkgs,
modulesPath,
...
}: let
# \x20 is the escape code for a space
ssdLabel = ''Deck\\x20SSD'';
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
# Enable support for the Xbox One wireless dongle
hardware.xone.enable = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems = {
"efi_boot_partition" = {
@ -36,35 +38,35 @@ in
mountPoint = "/mnt/ssd";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvolid=5" "ro" ];
options = ["subvolid=5" "ro"];
};
"btrfs_root" = {
mountPoint = "/";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@" "compress=zstd" ];
options = ["subvol=@" "compress=zstd"];
};
"btrfs_boot" = {
mountPoint = "/boot";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@boot" "compress=zstd" ];
options = ["subvol=@boot" "compress=zstd"];
};
"btrfs_home" = {
mountPoint = "/home";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" ];
options = ["subvol=@home" "compress=zstd"];
};
"btrfs_nix" = {
mountPoint = "/nix";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" ];
options = ["subvol=@nix" "compress=zstd"];
};
};
swapDevices = [ ];
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,10 +1,12 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
boot = {
loader = {
# Use grub boot loader
@ -87,6 +89,4 @@
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./configuration.nix
./hardware-configuration.nix

View file

@ -1,39 +1,41 @@
# Do not modify this file! It was generated by nixos-generate-config
# 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, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
config,
lib,
pkgs,
...
}: {
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.initrd.luks.devices."SSD".device = "/dev/disk/by-uuid/1d8d7578-d3a1-4ea0-90ad-4257266a6caf";
fileSystems."/" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@" "compress=zstd" ];
options = ["subvol=@" "compress=zstd"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@boot" "compress=zstd" ];
options = ["subvol=@boot" "compress=zstd"];
};
fileSystems."/nix" ={
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@nix" "compress=zstd" ];
options = ["subvol=@nix" "compress=zstd"];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/19a52b40-3ff6-47ff-9402-18d8b289643e";
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" ];
options = ["subvol=@home" "compress=zstd"];
};
fileSystems."/boot/efi" = {

View file

@ -1,10 +1,12 @@
# Edit this configuration file to define what should be installed on
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
# Use grub boot loader
boot = {
loader = {
@ -36,18 +38,18 @@
specialisation.noAVX512.configuration = {
# For some reason The Finals crashes on CPUs that support AVX512
boot.kernelParams = [ "clearcpuid=304" ];
boot.kernelParams = ["clearcpuid=304"];
};
# Sleep fixes
boot.kernelParams = [ "rtc_cmos.use_acpi_alarm=1" ];
boot.kernelParams = ["rtc_cmos.use_acpi_alarm=1"];
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="GXTP7385:00", ATTR{power/wakeup}="disabled"
ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="PNP0C50:00", ATTR{power/wakeup}="disabled"
ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="GXTP7385:00", ATTR{power/wakeup}="disabled"
ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="PNP0C50:00", ATTR{power/wakeup}="disabled"
'';
services.handheld-daemon = {
package = pkgs.handheld-daemon.overridePythonAttrs rec{
package = pkgs.handheld-daemon.overridePythonAttrs rec {
src = pkgs.fetchFromGitHub {
owner = "hhd-dev";
repo = "hhd";
@ -70,7 +72,7 @@ ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="PNP0C50:00", ATTR{power/wakeup}="d
services.xserver = {
xkb.layout = lib.mkForce "us";
displayManager.sddm.settings = {
General.GreeterEnvironment="QT_SCREEN_SCALE_FACTORS=1.75";
General.GreeterEnvironment = "QT_SCREEN_SCALE_FACTORS=1.75";
};
};
@ -148,6 +150,4 @@ ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="PNP0C50:00", ATTR{power/wakeup}="d
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./configuration.nix
./hardware-configuration.nix

View file

@ -1,22 +1,23 @@
# 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, modulesPath, ... }:
let
{
config,
lib,
modulesPath,
...
}: let
# \x20 is the escape code for a space
ssdLabel = ''Win\\x20Max\\x202\\x20SSD'';
in
{
in {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usbhid" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
boot.initrd.luks.devices."SSD".device = "/dev/disk/by-label/wm2-enc";
@ -35,36 +36,36 @@ in
mountPoint = "/mnt/ssd";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvolid=5" "ro" ];
options = ["subvolid=5" "ro"];
};
"btrfs_root" = {
mountPoint = "/";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@" ];
options = ["subvol=@"];
};
"btrfs_persist" = {
mountPoint = "/persist";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@persist" ];
options = ["subvol=@persist"];
neededForBoot = true;
};
"btrfs_home" = {
mountPoint = "/home";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@home" ];
options = ["subvol=@home"];
};
"btrfs_nix" = {
mountPoint = "/nix";
label = ssdLabel;
fsType = "btrfs";
options = [ "subvol=@nix" ];
options = ["subvol=@nix"];
};
};
swapDevices = [ ];
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {

View file

@ -1,16 +1,17 @@
{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
, rsync
, gawk
, pv
, gnutar
, zstd
, util-linux
, coreutils
, gnugrep
, findutils
{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
rsync,
gawk,
pv,
gnutar,
zstd,
util-linux,
coreutils,
gnugrep,
findutils,
}:
stdenv.mkDerivation rec {
pname = "anything-sync-daemon";
@ -23,9 +24,9 @@ stdenv.mkDerivation rec {
hash = "sha256-6nfaAMH5YgK6gimuZ8j1zWLTDOi11KIwW7Bf0Iwh7+I=";
};
patches = [ ./disableDaemonStopTargets.patch ];
patches = [./disableDaemonStopTargets.patch];
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [makeWrapper];
postPatch = ''
substituteInPlace init/asd* \
@ -40,11 +41,11 @@ stdenv.mkDerivation rec {
"INITDIR_SYSTEMD=/lib/systemd/system"
];
installTargets = [ "install-systemd-all" ];
installTargets = ["install-systemd-all"];
postInstall = ''
wrapProgram $out/bin/anything-sync-daemon \
--suffix PATH : ${lib.makeBinPath [ rsync gawk pv gnutar zstd util-linux coreutils gnugrep findutils]}
--suffix PATH : ${lib.makeBinPath [rsync gawk pv gnutar zstd util-linux coreutils gnugrep findutils]}
'';
meta = with lib; {

View file

@ -1,7 +1,11 @@
{ config, lib, pkgs, flakeSelf, ... }:
{
imports = [ flakeSelf.inputs.nur.nixosModules.nur ];
config,
lib,
pkgs,
flakeSelf,
...
}: {
imports = [flakeSelf.inputs.nur.nixosModules.nur];
environment = {
# As of the 1st of May 2023, the default packages are nano, perl, rsync and strace
# I don't need any of them, so I just empty the list
@ -24,14 +28,14 @@
algorithm = "zstd";
};
# zswap with zram is not a good idea
boot.kernelParams = [ "zswap.enabled=0" ];
boot.kernelParams = ["zswap.enabled=0"];
# Set up keyboard layout
services.xserver.xkb.layout = "es";
# Set up console
console = {
packages = [ pkgs.terminus_font ];
packages = [pkgs.terminus_font];
earlySetup = true;
# mkDefault has 1000 priority, so that way I don't conflict with nixos-hardware
font = lib.mkOverride 999 "ter-i16n";
@ -39,7 +43,7 @@
useXkbConfig = true;
};
boot.supportedFilesystems = [ "nfs" ];
boot.supportedFilesystems = ["nfs"];
# Set up localisation
i18n = {
@ -63,7 +67,7 @@
users.users.toast = {
isNormalUser = true;
description = "Toast";
extraGroups = [ "wheel" ];
extraGroups = ["wheel"];
};
# Set up time zone.
@ -90,7 +94,7 @@
backupFileExtension = "hm-backup";
useGlobalPkgs = true;
verbose = true;
users.toast = { config, ... }: {
users.toast = {config, ...}: {
home.stateVersion = "23.11";
xdg = {
userDirs = {

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./programs
./services

View file

@ -1,7 +1,5 @@
{ config, ... }:
{
home-manager.users.toast = { config, ... }: {
{config, ...}: {
home-manager.users.toast = {config, ...}: {
programs.bash = {
enable = true;
enableVteIntegration = true;

View file

@ -1,9 +1,13 @@
{ config, pkgs, ... }:
let
themeName = if config.system.nixos.release == "23.11" then "Catppuccin-mocha" else "Catppuccin Mocha";
in
{
config,
pkgs,
...
}: let
themeName =
if config.system.nixos.release == "23.11"
then "Catppuccin-mocha"
else "Catppuccin Mocha";
in {
home-manager = {
users.toast.programs.bat = {
enable = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home-manager = {
users.toast = {
programs.btop = {

View file

@ -1,8 +1,10 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Use nix-index-database's comma wrapper
programs.nix-index-database.comma.enable = true;
# Run programs from the system's nixpkgs
environment.variables = { COMMA_NIXPKGS_FLAKE="system"; };
environment.variables = {COMMA_NIXPKGS_FLAKE = "system";};
}

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
# The nixpkgs command-not-found script does not work with flakes, so I disable it
programs.command-not-found.enable = false;
}

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
./htop.nix
./nix.nix

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.direnv = {
enable = true;
nix-direnv = {

View file

@ -1,15 +1,15 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
catppuccinDelta = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "delta";
rev = "main";
hash = "sha256-0QQLkfLBVuB2re6tjtPNuOQZNK0MDBAIFgNGHZM8afs=";
};
in
{
in {
home-manager.users.toast = {
programs.git = {
enable = true;
@ -22,7 +22,7 @@ in
features = "catppuccin-mocha";
};
};
includes = [{ path = "${catppuccinDelta}/themes/mocha.gitconfig"; }];
includes = [{path = "${catppuccinDelta}/themes/mocha.gitconfig";}];
extraConfig = {
init.defaultBranch = "main";
diff.colorMoved = "default";
@ -31,4 +31,3 @@ in
};
};
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home-manager.users.toast = {
programs.helix = {
enable = true;

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
programs.htop = {
enable = true;
settings = {

View file

@ -1,9 +1,14 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home-manager = {
users.toast = { config, pkgs, ... }:
{
users.toast = {
config,
pkgs,
...
}: {
programs.micro = {
enable = true;
settings = {

View file

@ -1,10 +1,10 @@
{ config, ... }:
{
/* environment.systemPackages = [ pkgs.nix-index ];
{config, ...}: {
/*
environment.systemPackages = [ pkgs.nix-index ];
programs.bash.interactiveShellInit = ''
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
''; */
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
'';
*/
programs.nix-index = {
enable = true;
enableBashIntegration = true;

View file

@ -1,6 +1,8 @@
{ config, systemPkgs, ... }:
{
config,
systemPkgs,
...
}: {
nix = {
settings = {
auto-optimise-store = true;
@ -8,18 +10,25 @@
};
optimise = {
automatic = true;
dates = [ "weekly" ];
dates = ["weekly"];
};
registry = {
agenix = {
from = { id = "agenix"; type = "indirect"; };
to = { owner = "ryantm"; repo = "agenix"; type = "github"; };
from = {
id = "agenix";
type = "indirect";
};
to = {
owner = "ryantm";
repo = "agenix";
type = "github";
};
};
# Write the system's nixpkgs into the registry to avoid mixing nixpkgs versions
# https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html
system.flake = systemPkgs;
};
# I removed this in the past since I thought that I didn't need it, but turns out comma does :)
nixPath = [ "nixpkgs=${systemPkgs}" ];
nixPath = ["nixpkgs=${systemPkgs}"];
};
}

View file

@ -1,9 +1,10 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}:
with lib;
with builtins;
let
with builtins; let
catppuccinFlavour = "mocha";
catppuccinStarship = pkgs.catppuccin + /starship/${catppuccinFlavour}.toml;
@ -21,13 +22,11 @@ let
*/
# Takes a list of attrSets and merges them
mergeAllAttrSets = attrsSets:
foldl' (recursiveUpdate) {} attrsSets;
foldl' recursiveUpdate {} attrsSets;
# Reads a TOML file and parses it
readTomlPreset = file: (fromTOML (readFile file));
in
{
in {
programs.starship = {
enable = true;
settings = mergeAllAttrSets [

View file

@ -1,19 +1,23 @@
{ config, ... }:
let
{config, ...}: let
old = {
nssmdns = true;
};
new = {
nssmdns4 = true;
};
in
{
in {
/*
NixOS 24.05 changed the option for mnds to be able to turn on/off IPv6
23.11 doesn't support this, so I need to use the conditional to be able to
use the same config for both
*/
services.avahi = {
services.avahi =
{
enable = true;
} // (if config.system.nixos.release == "23.11" then old else new);
}
// (
if config.system.nixos.release == "23.11"
then old
else new
);
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./avahi.nix
./tailscale.nix

View file

@ -1,10 +1,10 @@
{ config, flakeSelf, ... }:
let
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName;
in
{
config,
flakeSelf,
...
}: let
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName;
in {
# Get secrets
age.secrets = {
syncthingKey.file = hostSecrets + "/syncthingKey.age";
@ -52,7 +52,7 @@ in
"passwords" = {
label = "KeePassXC Passwords";
id = "rdyaq-ex659";
devices = [ "phone" "pc" "steamdeck" "server" "surface" "winmax2"];
devices = ["phone" "pc" "steamdeck" "server" "surface" "winmax2"];
};
};
};

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
services.tailscale = {
enable = true;
useRoutingFeatures = lib.mkDefault "client";

View file

@ -1,18 +1,20 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Enable scanning
hardware.sane = {
enable = true;
extraBackends = [ pkgs.sane-airscan ];
extraBackends = [pkgs.sane-airscan];
};
users.users.toast.extraGroups = [ "scanner" ];
users.users.toast.extraGroups = ["scanner"];
services.xserver.enable = true;
# Set up fonts
fonts.packages = [
( pkgs.nerdfonts.override { fonts = [ "Hack" "JetBrainsMono" ]; } )
(pkgs.nerdfonts.override {fonts = ["Hack" "JetBrainsMono"];})
];
boot.plymouth.enable = true;

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./services
./programs

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./discord.nix
./firefox.nix

View file

@ -1,13 +1,17 @@
{ config, pkgs, lib, ... }:
let
{
config,
pkgs,
lib,
...
}: let
discordOverlay = self: super: {
discord = super.discord.override {
withOpenASAR = true;
withVencord = true;
};
# Update some stuff while I wait for nixpkgs
/*vencord = super.vencord.overrideAttrs rec {
/*
vencord = super.vencord.overrideAttrs rec {
version = "522fdcd";
src = pkgs.fetchFromGitHub {
owner = "Vendicated";
@ -16,7 +20,8 @@
#rev = "v${version}";
hash = "sha256-9G7FNL4pHaaLachzJmeAol0WpNUj533K2FNa7DH0eBM=";
};
};*/
};
*/
};
stock-discord = self: super: {
discord = super.discord.override {
@ -24,14 +29,13 @@
withVencord = false;
};
};
in
{
in {
# Sometimes discord breaks after updates, and launching it stock once fixes it
specialisation.stockDiscord.configuration = {
nixpkgs.overlays = lib.mkAfter [ stock-discord ];
nixpkgs.overlays = lib.mkAfter [stock-discord];
};
nixpkgs.overlays = [ discordOverlay ];
nixpkgs.overlays = [discordOverlay];
home-manager.users.toast = {
home.packages = with pkgs; [
discord

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
# System wide firefox settings
programs.firefox = {
enable = true;
@ -8,7 +10,7 @@
"DisablePocket" = true;
"DisableTelemetry" = true;
# You need these for Spotify
"EncryptedMediaExtensions" = { "Enabled" = true; };
"EncryptedMediaExtensions" = {"Enabled" = true;};
"ExtensionSettings" = {
# TODO: Install extensions the NUR instead of from AMO
"uBlock0@raymondhill.net" = {
@ -47,11 +49,11 @@
"PasswordManagerEnabled" = false;
"Permissions" = {
"Autoplay" = {
"Allow" = [ "https://www.youtube.com" ];
"Allow" = ["https://www.youtube.com"];
"Default" = "block-audio-video";
};
};
"FirefoxHome" = { "SponsoredTopSites" = false; };
"FirefoxHome" = {"SponsoredTopSites" = false;};
};
};
}

View file

@ -1,6 +1,8 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
home-manager.users.toast = {
programs.git = {
package = pkgs.gitFull;
@ -11,6 +13,6 @@
};
};
home.packages = [ pkgs.git-cola ];
home.packages = [pkgs.git-cola];
};
}

View file

@ -1,5 +1,7 @@
{ config, pkgs, ... }:
{
users.users.toast.packages = [ pkgs.jamesdsp ];
config,
pkgs,
...
}: {
users.users.toast.packages = [pkgs.jamesdsp];
}

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
let
{
config,
pkgs,
lib,
...
}: let
kpxcSettings = lib.generators.toINI {} {
General = {
# Not sure what changing this does, I'll leave it alone
@ -25,15 +28,18 @@ let
};
SSHAgent.Enabled = true;
};
in
{
in {
home-manager = {
extraSpecialArgs = { kpxcSettings = kpxcSettings; };
users.toast = { config, pkgs, kpxcSettings, ... }: {
extraSpecialArgs = {kpxcSettings = kpxcSettings;};
users.toast = {
config,
pkgs,
kpxcSettings,
...
}: {
# No module for KeePassXC config :(
home = {
packages = [ pkgs.keepassxc ];
packages = [pkgs.keepassxc];
file = {
".config/keepassxc/keepassxc.ini".text = kpxcSettings;
# For some reason the autostart .desktop is not the same as the regular one

View file

@ -1,9 +1,15 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
home-manager = {
users.toast = { config, pkgs, ... }:
{
users.toast = {
config,
pkgs,
...
}: {
programs.micro = {
enable = true;
settings = {
@ -15,7 +21,7 @@
On a kde wayland session micro uses xsel or xclip instead of wl-clipboard
which doesn't work, so I only install wl-clipboard here to make micro use it
*/
home.packages = with pkgs; [ wl-clipboard ];
home.packages = with pkgs; [wl-clipboard];
};
};
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
home-manager.users.toast = {
programs.ssh = {
enable = true;

View file

@ -1,7 +1,12 @@
{ config, pkgs, flakeSelf, ... }:
let inputs = flakeSelf.inputs; in
{
nixpkgs.overlays = [ inputs.catppuccin-vsc.overlays.default ];
config,
pkgs,
flakeSelf,
...
}: let
inputs = flakeSelf.inputs;
in {
nixpkgs.overlays = [inputs.catppuccin-vsc.overlays.default];
home-manager.users.toast = {
home.packages = with pkgs; [
nixpkgs-fmt
@ -30,7 +35,7 @@ let inputs = flakeSelf.inputs; in
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${pkgs.nil}/bin/nil";
"nix.serverSettings" = {
"nil"."formatting"."command" = [ "nixpkgs-fmt" ];
"nil"."formatting"."command" = ["nixpkgs-fmt"];
};
"terminal.integrated.minimumContrastRatio" = 1;
"window.titleBarStyle" = "custom";

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./ssh-agent.nix
./flatpak.nix

View file

@ -1,13 +1,16 @@
{ config, pkgs, flakeSelf, ... }:
{
config,
pkgs,
flakeSelf,
...
}: {
services.flatpak.enable = true;
home-manager = {
sharedModules = [{ imports = [ flakeSelf.inputs.nix-flatpak.homeManagerModules.nix-flatpak ]; }];
sharedModules = [{imports = [flakeSelf.inputs.nix-flatpak.homeManagerModules.nix-flatpak];}];
users.toast = {
services.flatpak = {
packages = [ "tv.plex.PlexDesktop" ];
packages = ["tv.plex.PlexDesktop"];
uninstallUnmanagedPackages = true;
update.auto = {
enable = true;

View file

@ -1,10 +1,6 @@
{ config, ... }:
let
{config, ...}: let
tailscaleName = config.services.tailscale.interfaceName;
in
{
in {
networking.networkmanager = {
enable = true;
unmanaged = [

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.pipewire = {
enable = true;
pulse.enable = true;

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.printing = {
enable = true;
startWhenNeeded = true;

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
programs.ssh.startAgent = true;
/*
Home assistant added an option that does this

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.syncthing = {
enable = true;
user = "toast";

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./programs
./services

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
./steam.nix
./mangohud.nix

View file

@ -1,8 +1,5 @@
{ config, ... }:
{
home-manager.users.toast = { config, ... }:
{
{config, ...}: {
home-manager.users.toast = {config, ...}: {
programs.mangohud = {
enable = true;
# This only works for Vulkan, openGL programs still need the mangohud wrapper

View file

@ -1,27 +1,26 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
snes-roms = [
# ActRaiser
( pkgs.fetchzip {
(pkgs.fetchzip {
url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/ActRaiser%20%28USA%29.zip";
hash = "sha256-yxIL5Pqlp8xsx7wvNO1MlB8ffDjS0xpE+yrEfMj61As=";
} )
})
# Kirby Super Star
( pkgs.fetchzip {
(pkgs.fetchzip {
url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Kirby%20Super%20Star%20%28USA%29.zip";
hash = "sha256-NX5OjCthf4ZiAhamclRBRk8GiMjZX3JLeShm8sQdDfc=";
} )
})
# Super Mario Kart
( pkgs.fetchzip {
(pkgs.fetchzip {
url = "https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Super%20Nintendo%20Entertainment%20System/Super%20Mario%20Kart%20%28USA%29.zip";
hash = "sha256-RLBxPBmBrXCuPdnWE07KamBNgGJ5IntQVUPeij+2HUI=";
} )
})
];
in
{
in {
home-manager.users.toast = {
home = {
packages = [(
packages = [
(
pkgs.retroarch.override {
cores = with pkgs.libretro; [
snes9x
@ -61,14 +60,15 @@ in
assets_directory = "${pkgs.retroarch-assets}/share/retroarch/assets";
};
}
)];
)
];
file."Games/Roms/SNES/" = {
onChange = ''
${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/Roms/SNES"
'';
source = pkgs.symlinkJoin {
name = "snes-roms";
paths = [ snes-roms ];
paths = [snes-roms];
};
};
};
@ -85,7 +85,7 @@ in
"retroarch" = {
label = "RetroArch";
id = "jxuou-2yjnu";
devices = [ "steamdeck" "server" "pc" "winmax2" ];
devices = ["steamdeck" "server" "pc" "winmax2"];
path = "~/.local/share/retroarch";
};
};

View file

@ -1,20 +1,24 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
environment.systemPackages = with config; [
nur.repos.ataraxiasjel.rpcs3
];
# Compiling RPCS3 takes quite a while
nix.settings = {
substituters = [ "https://ataraxiadev-foss.cachix.org" ];
trusted-public-keys = [ "ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058=" ];
substituters = ["https://ataraxiadev-foss.cachix.org"];
trusted-public-keys = ["ataraxiadev-foss.cachix.org-1:ws/jmPRUF5R8TkirnV1b525lP9F/uTBsz2KraV61058="];
};
# Increase the memory lock limit
security.pam.loginLimits = [{
security.pam.loginLimits = [
{
domain = "*";
item = "memlock";
type = "-"; # Applies to both hard and soft limits
value = "unlimited";
}];
}
];
}

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
programs.steam = {
enable = true;
# Doubt that I'll use it, but I'll enable it anyways
@ -12,7 +14,10 @@
};
# Some linux native games (rise of the tomb raider) use alsa for sound
services.pipewire.alsa.enable = if config.services.pipewire.pulse.enable == true then true else false;
services.pipewire.alsa.enable =
if config.services.pipewire.pulse.enable == true
then true
else false;
# Celeste mod manager
home-manager.users.toast.services.flatpak.packages = [

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./syncthing.nix
];

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
/*
This file will sync saves for games that don't have cloud saves
TODO: turn this into a module eventually
@ -10,7 +8,7 @@
"steam-201810" = {
label = "Wolfenstein The New Order Saves";
id = "laxxf-t2wmy";
devices = [ "steamdeck" "server" "pc" ];
devices = ["steamdeck" "server" "pc"];
path = "~/.local/share/Steam/steamapps/compatdata/201810/pfx/drive_c/users/steamuser/Saved Games/MachineGames/Wolfenstein The New Order/";
};
};

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./plasma.nix
./sddm.nix

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, flakeSelf, ... }:
let
{
config,
pkgs,
lib,
flakeSelf,
...
}: let
# Set up the default kde options
balooExcludedDirs = lib.strings.intersperse "," [
"$HOME/.cache/"
@ -19,7 +23,7 @@ let
breezeTint = pkgs.stdenv.mkDerivation {
name = "breeze-tint";
src = "${pkgs.breeze-qt5}";
patches = [ ./patches/BreezeTint.patch ];
patches = [./patches/BreezeTint.patch];
installPhase = ''
runHook preInstall
@ -44,10 +48,7 @@ let
runHook postInstall
'';
};
in
{
in {
services.xserver = {
# Enable the Plasma 5 Desktop Environment
desktopManager.plasma5.enable = true;
@ -60,38 +61,49 @@ in
programs.dconf.enable = true;
# Install the patched Breeze color schemes as well as the plasma default configs
environment.systemPackages = [ breezeTint plasmaDefaults ];
environment.systemPackages = [breezeTint plasmaDefaults];
# Plasma configs should be on all users
home-manager.sharedModules = [
(
{ config, ... }:
let gtk2rc = "${config.xdg.configHome}/gtk-2.0/gtkrc"; in
{
{config, ...}: let
gtk2rc = "${config.xdg.configHome}/gtk-2.0/gtkrc";
in {
gtk.gtk2.configLocation = gtk2rc;
# Kde has an annoying habit of overwriting the gtk2 config file
home.file."${gtk2rc}".force = true;
}
)
{
imports = [ flakeSelf.inputs.plasma-manager.homeManagerModules.plasma-manager ];
imports = [flakeSelf.inputs.plasma-manager.homeManagerModules.plasma-manager];
gtk = {
enable = true;
# Most apps are dark, so a white cursor is easier to spot
cursorTheme = { package = pkgs.breeze-qt5; name = "Breeze_Snow"; };
iconTheme = { package = pkgs.breeze-icons; name = "breeze-dark"; };
theme = { package = pkgs.breeze-gtk; name = "Breeze"; };
cursorTheme = {
package = pkgs.breeze-qt5;
name = "Breeze_Snow";
};
iconTheme = {
package = pkgs.breeze-icons;
name = "breeze-dark";
};
theme = {
package = pkgs.breeze-gtk;
name = "Breeze";
};
# Gtk2 doesn't have a dark mode, so I just tell gtk 3 and 4 to use the dark variant
gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
gtk4.extraConfig.gtk-application-prefer-dark-theme = true;
};
home.packages = [(
home.packages = [
(
pkgs.catppuccin-kde.override {
flavour = [ "mocha" ];
accents = [ "mauve" ];
winDecStyles = [ "classic" ];
flavour = ["mocha"];
accents = ["mauve"];
winDecStyles = ["classic"];
}
)];
)
];
programs.plasma = {
enable = true;
overrideConfig = true;
@ -110,11 +122,12 @@ in
};
kwin = {
titlebarButtons = {
left = [ "on-all-desktops" "keep-above-windows" ];
right = [ "minimize" "maximize" "close" ];
left = ["on-all-desktops" "keep-above-windows"];
right = ["minimize" "maximize" "close"];
};
};
panels = [{
panels = [
{
location = "bottom";
height = 44;
widgets = [
@ -132,11 +145,12 @@ in
}
"org.kde.plasma.showdesktop"
];
}];
}
];
shortcuts = {
"kwin" = {
"Switch One Desktop to the Left" = [ "Meta+Ctrl+Left" ];
"Switch One Desktop to the Right" = [ "Meta+Ctrl+Right" ];
"Switch One Desktop to the Left" = ["Meta+Ctrl+Left"];
"Switch One Desktop to the Right" = ["Meta+Ctrl+Right"];
};
};
configFile = {

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
imports = [
./kate.nix
./firefox.nix

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# KDE specific firefox settings
programs.firefox = {
policies = {

View file

@ -1,6 +1,8 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
home-manager.users.toast = {
programs.git = {
extraConfig = {

View file

@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{
environment.systemPackages = [ pkgs.kate ];
config,
pkgs,
...
}: {
environment.systemPackages = [pkgs.kate];
# Use kwrite to open text files, and kate if I'm developing stuff
xdg.mime.defaultApplications = {

View file

@ -1,14 +1,14 @@
{ pkgs, ... }:
let
catppuccinKonsole = pkgs.fetchFromGitHub {
{pkgs, ...}: let
catppuccinKonsole =
pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "konsole";
# Latest commit is 7d86b8a1e56e58f6b5649cdaac543a573ac194ca
rev = "main";
hash = "sha256-EwSJMTxnaj2UlNJm1t6znnatfzgm1awIQQUF3VPfCTM=";
} + /Catppuccin-Mocha.colorscheme;
in
{
}
+ /Catppuccin-Mocha.colorscheme;
in {
home-manager.users.toast = {
xdg.dataFile = {
"konsole/Catppuccin-Mocha.colorscheme".source = catppuccinKonsole;

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home-manager.users.toast = {
home.packages = [ pkgs.neochat ];
home.packages = [pkgs.neochat];
};
}

View file

@ -1,9 +1,12 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
# Only install skanpage if scanning is set up
config = lib.mkIf config.hardware.sane.enable {
environment.systemPackages = [ pkgs.skanpage ];
environment.systemPackages = [pkgs.skanpage];
};
# environment.systemPackages = if config.hardware.sane.enable == true then [ pkgs.skanpage ] else [];
# environment.systemPackages = if config.hardware.sane.enable == true then [ pkgs.skanpage ] else [];
}

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
currentTheme = config.services.xserver.displayManager.sddm.theme;
sddm-sugar-candy = pkgs.stdenv.mkDerivation {
@ -39,18 +41,16 @@ let
runHook postInstall
'';
};
in
{
in {
# Enable SDDM.
services.xserver.displayManager.sddm = {
enable = true;
theme = "sugar-candy";
settings = {
General = { Numlock = "on"; };
Theme = { CursorTheme = "Breeze_Snow"; };
General = {Numlock = "on";};
Theme = {CursorTheme = "Breeze_Snow";};
};
};
environment.systemPackages = [ sddm-sugar-candy customcfg ];
environment.systemPackages = [sddm-sugar-candy customcfg];
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./services
./programs

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
./virtualbox.nix
./idea.nix

View file

@ -1,7 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home-manager.users.toast = {
programs.helix = {
extraPackages = with pkgs; [

View file

@ -1,7 +1,9 @@
{ config, pkgs, ... }:
with pkgs;
{
config,
pkgs,
...
}:
with pkgs; {
environment.systemPackages = with jetbrains; [
idea-ultimate
];

View file

@ -1,9 +1,9 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home-manager.users.toast = {
home.packages = [(
home.packages = [
(
pkgs.unityhub
)];
)
];
};
}

View file

@ -1,15 +1,15 @@
{ config, ... }:
{
{config, ...}: {
# Need to use visual studio 2019 :(
virtualisation.virtualbox.host = {
enable = true;
};
home-manager.sharedModules = [{
home-manager.sharedModules = [
{
systemd.user.tmpfiles.rules = [
"d '/%h/VirtualBox VMs'"
"h '/%h/VirtualBox VMs' - - - - C "
];
}];
users.users.toast.extraGroups = [ "vboxusers" ];
}
];
users.users.toast.extraGroups = ["vboxusers"];
}

View file

@ -1,6 +1,12 @@
{ config, pkgs, lib, flakeSelf, ... }:
let inputs = flakeSelf.inputs; in
{
config,
pkgs,
lib,
flakeSelf,
...
}: let
inputs = flakeSelf.inputs;
in {
home-manager.users.toast.programs.vscode = {
# The redhat xml extension needs an fhs environment
package = lib.mkForce pkgs.vscodium-fhs;

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./syncthing.nix
./mysql.nix

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
services.mongodb = {
enable = true;
package = pkgs.mongodb-4_4;

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}: {
services.mysql = {
enable = true;
package = pkgs.mysql80;

View file

@ -1,11 +1,9 @@
{ config, ... }:
{
{config, ...}: {
services.syncthing.settings.folders = {
"school-things" = {
label = "School things";
id = "z6alc-nfoqr";
devices = [ "steamdeck" "server" "pc" "winmax2" ];
devices = ["steamdeck" "server" "pc" "winmax2"];
path = "~/Documents/School things";
};
};

View file

@ -1,11 +1,13 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
booDark = pkgs.fetchzip {
url = "https://github.com/adorade/boodark/releases/download/v1.1.1/boodark-v1.1.1.zip";
hash = "sha256-GE/FtFlU6A4I9sRyjMhQIidGpDLD99Wzzngz3QI/rSo=";
};
in
{
in {
# I tried setting up httpd + php in class but I just gave up
virtualisation.oci-containers = {
containers."xampp" = {
@ -17,7 +19,7 @@ in
# No dark mode installed by default :(
"${booDark}:/opt/lampp/phpmyadmin/themes/booDark"
];
ports = [ "41061:22" "41062:80" ];
ports = ["41061:22" "41062:80"];
};
};

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.avahi = {
openFirewall = true;
publish = {

View file

@ -1,16 +1,20 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Beep as soon as possible in the initrd
boot.initrd = {
kernelModules = [ "pcspkr" ];
kernelModules = ["pcspkr"];
extraFiles.beep.source = pkgs.beep;
postDeviceCommands = "/beep/bin/beep -f 3000 -l 50 -r 2";
};
/*systemd.services.startupBeep = {
/*
systemd.services.startupBeep = {
description = "Beep when system started booting";
wantedBy = [ "sysinit.target" ];
script = "${pkgs.beep}/bin/beep -f 3000 -l 50 -r 2";
serviceConfig = { Type = "oneshot"; };
};*/
};
*/
}

View file

@ -1,12 +1,12 @@
{ config, flakeSelf, ... }:
let
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName;
in
{
config,
flakeSelf,
...
}: let
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName;
in {
# Set up secrets
age.secrets = { ddclient-passwd.file = hostSecrets + "/ddclient-password.age"; };
age.secrets = {ddclient-passwd.file = hostSecrets + "/ddclient-password.age";};
services.ddclient = {
enable = true;
@ -15,6 +15,6 @@ in
server = "dynamicdns.park-your-domain.com";
username = "toast003.xyz";
passwordFile = config.age.secrets.ddclient-passwd.path;
domains = [ "@" ];
domains = ["@"];
};
}

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./avahi.nix
./nfs.nix

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
services.dnsmasq = {
enable = true;
@ -8,7 +6,7 @@
resolveLocalQueries = false;
settings = {
listen-address = [ "100.73.96.48" ];
listen-address = ["100.73.96.48"];
/*
Dnsmasq tries to use the tailscale dns server, which is bad cause that points to dnsmasq
@ -29,11 +27,11 @@
# Add tailscale hosts
networking.hosts = {
"100.73.96.48" = [ "everest" ];
"100.113.139.93" = [ "archie" ];
"100.85.48.85" = [ "steamdeck" ];
"100.96.92.13" = [ "surfecego" ];
"100.106.73.20" = [ "winmax2" ];
"100.73.96.48" = ["everest"];
"100.113.139.93" = ["archie"];
"100.85.48.85" = ["steamdeck"];
"100.96.92.13" = ["surfecego"];
"100.106.73.20" = ["winmax2"];
};
# Dnsmasq conflicts with the resolved dns stub listener

View file

@ -1,10 +1,8 @@
{ config, ... }:
{
{config, ...}: {
# I prefer using the go implementation
services.endlessh-go = {
enable = true;
openFirewall = true;
extraOptions = [ "-alsologtostderr" "-v=1"] ;
extraOptions = ["-alsologtostderr" "-v=1"];
};
}

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
specialisation.forgejoEnableRegistration.configuration.services.forgejo.settings.service.DISABLE_REGISTRATION = false;
services.forgejo = {
enable = true;
@ -22,7 +24,7 @@
};
# Add a cname for forgejo
services.dnsmasq.settings.cname = [ "git.everest.sable-pancake.ts.net,everest" ];
services.dnsmasq.settings.cname = ["git.everest.sable-pancake.ts.net,everest"];
# Set up traefik as the reverse proxy for Forgejo
services.traefik = {
@ -35,7 +37,7 @@
};
};
services.forgejo.loadBalancer.servers = [
{ url = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}"; }
{url = "http://localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";}
];
};
};

View file

@ -1,5 +1,9 @@
{ config, pkgs, flakeSelf, ... }:
let
{
config,
pkgs,
flakeSelf,
...
}: let
atfc = builtins.fetchurl {
url = "https://www.curseforge.com/api/v1/mods/813246/files/4732590/download";
sha256 = "0yl6ixmhfgqvcj3kfshpf8fy42vkkmjbn7d7yg86jx0ykiiq5f9x";
@ -15,11 +19,10 @@ let
port = 25565;
users = config.users;
in
{
in {
users = {
groups.minecraft = {
members = [ "toast" ];
members = ["toast"];
gid = 987;
};
users.atfc = {
@ -88,28 +91,26 @@ in
"${users.users.atfc.home}:/data"
#"/tmp/minecraft:/data"
];
ports = [ "25565:${toString port}" ];
ports = ["25565:${toString port}"];
};
};
networking.firewall.allowedTCPPorts = [ port ];
networking.firewall.allowedTCPPorts = [port];
# anything-sync-daemon config
systemd.packages = with pkgs; [ flakeSelf.packages.x86_64-linux.anything-sync-daemon ];
environment.systemPackages = with pkgs; [ flakeSelf.packages.x86_64-linux.anything-sync-daemon ];
systemd.packages = with pkgs; [flakeSelf.packages.x86_64-linux.anything-sync-daemon];
environment.systemPackages = with pkgs; [flakeSelf.packages.x86_64-linux.anything-sync-daemon];
fileSystems.minecraftTmpfs = {
device = "none";
fsType = "tmpfs";
mountPoint = "/mnt/minecraftTmpfs";
options = [ "size=4G "];
options = ["size=4G "];
};
environment.etc."asd.conf".text =
''WHATTOSYNC=('/var/lib/minecraft')
VOLATILE="${config.fileSystems.minecraftTmpfs.mountPoint}"
USE_OVERLAYFS="yes" '';
environment.etc."asd.conf".text = '' WHATTOSYNC=('/var/lib/minecraft')
VOLATILE="${config.fileSystems.minecraftTmpfs.mountPoint}"
USE_OVERLAYFS="yes" '';
systemd.services.asd = {
wantedBy = [ "podman-minecraft-atfc.service" ];
before = [ "podman-minecraft-atfc.service" ];
wantedBy = ["podman-minecraft-atfc.service"];
before = ["podman-minecraft-atfc.service"];
};
}

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
services = {
nfs.server = {
enable = true;
@ -15,22 +17,22 @@
avahi.extraServiceFiles = {
Transmission-downloads-nfs = ''
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Transmission Downloads on %h (NFS)</name>
<service>
<type>_nfs._tcp</type>
<port>2049</port>
<txt-record>path=${config.services.transmission.settings.download-dir}</txt-record>
</service>
</service-group>
'';
</service-group>
'';
};
};
networking.firewall = {
allowedTCPPorts = [ 111 2049 4000 40001 4002 ];
allowedUDPPorts = [ 111 2049 4000 40001 4002 ];
allowedTCPPorts = [111 2049 4000 40001 4002];
allowedUDPPorts = [111 2049 4000 40001 4002];
};
}

View file

@ -1,14 +1,16 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
services = {
samba = {
enable = true;
openFirewall = true;
extraConfig = ''
map to guest = bad user
guest account = transmission
'';
map to guest = bad user
guest account = transmission
'';
shares = {
"Transmission downloads" = {
path = "${config.services.transmission.settings.download-dir}";
@ -22,16 +24,16 @@ guest account = transmission
avahi.extraServiceFiles = {
Transmission-downloads-smb = ''
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">SMB shares on %h</name>
<service>
<type>_smb._tcp</type>
<port>139</port>
</service>
</service-group>
'';
</service-group>
'';
};
};
}

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.openssh = {
enable = true;
settings = {

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.syncthing = {
enable = true;
key = config.age.secrets.syncthingKey.path;
@ -13,19 +11,19 @@
"school-things" = {
label = "School things";
id = "z6alc-nfoqr";
devices = [ "steamdeck" "server" "pc" "winmax2" ];
devices = ["steamdeck" "server" "pc" "winmax2"];
path = "${config.services.syncthing.dataDir}/school-things";
};
"steam-201810" = {
label = "Wolfenstein The New Order Saves";
id = "laxxf-t2wmy";
devices = [ "steamdeck" "server" "pc" "winmax2" ];
devices = ["steamdeck" "server" "pc" "winmax2"];
path = "${config.services.syncthing.dataDir}/steam-201810";
};
"retroarch"= {
"retroarch" = {
label = "RetroArch";
id = "jxuou-2yjnu";
devices = [ "steamdeck" "server" "pc" "winmax2" ];
devices = ["steamdeck" "server" "pc" "winmax2"];
path = "${config.services.syncthing.dataDir}/retroarch";
};
};
@ -36,7 +34,7 @@
};
# Add a cname for syncthing
services.dnsmasq.settings.cname = [ "sync.everest.sable-pancake.ts.net,everest" ];
services.dnsmasq.settings.cname = ["sync.everest.sable-pancake.ts.net,everest"];
# Set up traefik as the reverse proxy for syncthing
services.traefik = {
@ -49,7 +47,7 @@
};
};
services.syncthing.loadBalancer.servers = [
{ url = "http://localhost:8384"; }
{url = "http://localhost:8384";}
];
};
};

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
services.tailscale = {
# This is needed for being an exit node
useRoutingFeatures = "server";

View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
specialisation.traefikEnableWebUI.configuration.services.traefik = {
staticConfigOptions = {
api = {
@ -15,13 +13,13 @@
enable = true;
staticConfigOptions = {
entryPoints = {
http = { address = "100.73.96.48:80"; };
http = {address = "100.73.96.48:80";};
};
};
};
systemd = {
units.tailscaled.requiredBy = [ "traefik.service" ];
units.tailscaled.requiredBy = ["traefik.service"];
# We have somewhat frequent power outages, and our ISP router takes
# ages to boot up. If I don't add a delay, traefik tries to bind to
# the tailscale interface before it's ready, making it crash too much
@ -29,5 +27,5 @@
services.traefik.serviceConfig.RestartSec = 120;
};
networking.firewall.allowedTCPPorts = [ 80 8080 ];
networking.firewall.allowedTCPPorts = [80 8080];
}

View file

@ -1,6 +1,4 @@
{ config , ... }:
{
{config, ...}: {
services.transmission = {
enable = true;
openFirewall = true;
@ -13,7 +11,7 @@
};
# Add a cname for transmission
services.dnsmasq.settings.cname = [ "transmission.everest.sable-pancake.ts.net,everest" ];
services.dnsmasq.settings.cname = ["transmission.everest.sable-pancake.ts.net,everest"];
# Set up traefik as the reverse proxy for transmission
services.traefik = {
@ -26,7 +24,7 @@
};
};
services.transmission.loadBalancer.servers = [
{ url = "http://localhost:${toString config.services.transmission.settings.rpc-port}"; }
{url = "http://localhost:${toString config.services.transmission.settings.rpc-port}";}
];
};
};