Compare commits

...

4 commits

Author SHA1 Message Date
430bafb0b2 Run deadnix 2024-03-20 13:03:05 +01:00
7888103b1e Format everything with alejandra 2024-03-20 12:54:25 +01:00
82bbd7ce87 Editors: format using alejandra 2024-03-20 12:44:55 +01:00
9351f85534 Flake: add alejandra to devshell 2024-03-20 11:45:17 +01:00
102 changed files with 2744 additions and 2780 deletions

3
.helix/languages.toml Normal file
View file

@ -0,0 +1,3 @@
[[language]]
name = "nix"
formatter = { command = "alejandra" }

12
.vscode/settings.json vendored
View file

@ -1,5 +1,15 @@
{ {
"editor.detectIndentation": true, "editor.detectIndentation": true,
"editor.insertSpaces": true, "editor.insertSpaces": true,
"editor.defaultFormatter": "jnoortheen.nix-ide" "editor.defaultFormatter": "jnoortheen.nix-ide",
"nix.formatterPath": "alejandra",
"nix.serverSettings": {
"nil": {
"formatting": {
"command": [
"alejandra"
]
}
}
}
} }

View file

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

View file

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

View file

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

View file

@ -1,11 +1,14 @@
# 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 # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
# Enable support for the Xbox One wireless dongle # Enable support for the Xbox One wireless dongle
@ -16,26 +19,26 @@
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf"; device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=@root" "compress=zstd"]; options = ["subvol=@root" "compress=zstd"];
}; };
fileSystems."/nix" = fileSystems."/nix" = {
{ device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf"; device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=@nix" "compress=zstd"]; options = ["subvol=@nix" "compress=zstd"];
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf"; device = "/dev/disk/by-uuid/5322c217-b87b-4150-8b4c-a8fa17a899bf";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=@boot" "compress=zstd"]; options = ["subvol=@boot" "compress=zstd"];
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{ device = "/dev/disk/by-uuid/FB87-4CBC"; device = "/dev/disk/by-uuid/FB87-4CBC";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -1,10 +1,7 @@
# 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 # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{lib, ...}: {
{ config, pkgs, lib, ... }:
{
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.timeout = 5; boot.loader.timeout = 5;
@ -23,10 +20,12 @@
dhcpcd.enable = false; dhcpcd.enable = false;
interfaces.eno1 = { interfaces.eno1 = {
wakeOnLan.enable = true; wakeOnLan.enable = true;
ipv4.addresses = [ { ipv4.addresses = [
{
address = "192.168.0.160"; address = "192.168.0.160";
prefixLength = 24; prefixLength = 24;
} ]; }
];
}; };
# I use networkd, so I need to declare the interface for the default gateway # I use networkd, so I need to declare the interface for the default gateway
defaultGateway = { defaultGateway = {

View file

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

View file

@ -1,11 +1,14 @@
# 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 # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
@ -42,8 +45,8 @@
}; };
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{ device = "/dev/disk/by-label/Boot"; device = "/dev/disk/by-label/Boot";
fsType = "vfat"; fsType = "vfat";
}; };

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 # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`). # and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
# Use grub boot loader # Use grub boot loader
boot.loader = { boot.loader = {
systemd-boot.enable = false; systemd-boot.enable = false;
@ -98,6 +100,4 @@
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix. # accidentally delete configuration.nix.
# system.copySystemConfiguration = true; # system.copySystemConfiguration = true;
} }

View file

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

View file

@ -1,16 +1,17 @@
# 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 # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
let lib,
modulesPath,
...
}: let
# \x20 is the escape code for a space # \x20 is the escape code for a space
ssdLabel = ''Deck\\x20SSD''; ssdLabel = ''Deck\\x20SSD'';
in in {
imports = [
{ (modulesPath + "/installer/scan/not-detected.nix")
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
# Enable support for the Xbox One wireless dongle # Enable support for the Xbox One wireless dongle

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 # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`). # and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
boot = { boot = {
loader = { loader = {
# Use grub boot loader # Use grub boot loader
@ -87,6 +89,4 @@
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix. # accidentally delete configuration.nix.
# system.copySystemConfiguration = true; # system.copySystemConfiguration = true;
} }

View file

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

View file

@ -1,10 +1,11 @@
# 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 # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{ {
config,
lib,
...
}: {
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc"]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];

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 # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running `nixos-help`). # and in the NixOS manual (accessible by running `nixos-help`).
{ config, pkgs, lib, ... }:
{ {
config,
pkgs,
lib,
...
}: {
# Use grub boot loader # Use grub boot loader
boot = { boot = {
loader = { loader = {
@ -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 # (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix. # accidentally delete configuration.nix.
# system.copySystemConfiguration = true; # system.copySystemConfiguration = true;
} }

View file

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

View file

@ -1,14 +1,15 @@
# 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 # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
let lib,
modulesPath,
...
}: let
# \x20 is the escape code for a space # \x20 is the escape code for a space
ssdLabel = ''Win\\x20Max\\x202\\x20SSD''; ssdLabel = ''Win\\x20Max\\x202\\x20SSD'';
in in {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];

View file

@ -1,16 +1,17 @@
{ stdenv {
, lib stdenv,
, fetchFromGitHub lib,
, makeWrapper fetchFromGitHub,
, rsync makeWrapper,
, gawk rsync,
, pv gawk,
, gnutar pv,
, zstd gnutar,
, util-linux zstd,
, coreutils util-linux,
, gnugrep coreutils,
, findutils gnugrep,
findutils,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "anything-sync-daemon"; pname = "anything-sync-daemon";

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, flakeSelf, ... }:
{ {
config,
lib,
pkgs,
flakeSelf,
...
}: {
imports = [flakeSelf.inputs.nur.nixosModules.nur]; imports = [flakeSelf.inputs.nur.nixosModules.nur];
environment = { environment = {
# As of the 1st of May 2023, the default packages are nano, perl, rsync and strace # As of the 1st of May 2023, the default packages are nano, perl, rsync and strace
@ -90,7 +94,7 @@
backupFileExtension = "hm-backup"; backupFileExtension = "hm-backup";
useGlobalPkgs = true; useGlobalPkgs = true;
verbose = true; verbose = true;
users.toast = { config, ... }: { users.toast = {...}: {
home.stateVersion = "23.11"; home.stateVersion = "23.11";
xdg = { xdg = {
userDirs = { userDirs = {

View file

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

View file

@ -1,7 +1,5 @@
{ config, ... }: {...}: {
home-manager.users.toast = {...}: {
{
home-manager.users.toast = { config, ... }: {
programs.bash = { programs.bash = {
enable = true; enable = true;
enableVteIntegration = 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 = { home-manager = {
users.toast.programs.bat = { users.toast.programs.bat = {
enable = true; enable = true;

View file

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

View file

@ -1,6 +1,4 @@
{ config, pkgs, ... }: {...}: {
{
# Use nix-index-database's comma wrapper # Use nix-index-database's comma wrapper
programs.nix-index-database.comma.enable = true; programs.nix-index-database.comma.enable = true;
# Run programs from the system's nixpkgs # Run programs from the system's nixpkgs

View file

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

View file

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

View file

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

View file

@ -1,15 +1,11 @@
{ config, pkgs, ... }: {pkgs, ...}: let
let
catppuccinDelta = pkgs.fetchFromGitHub { catppuccinDelta = pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
repo = "delta"; repo = "delta";
rev = "main"; rev = "main";
hash = "sha256-0QQLkfLBVuB2re6tjtPNuOQZNK0MDBAIFgNGHZM8afs="; hash = "sha256-0QQLkfLBVuB2re6tjtPNuOQZNK0MDBAIFgNGHZM8afs=";
}; };
in in {
{
home-manager.users.toast = { home-manager.users.toast = {
programs.git = { programs.git = {
enable = true; enable = true;
@ -31,4 +27,3 @@ in
}; };
}; };
} }

View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
{ config, ... }: {...}: {
/*
{ environment.systemPackages = [ pkgs.nix-index ];
/* environment.systemPackages = [ pkgs.nix-index ];
programs.bash.interactiveShellInit = '' 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 = { programs.nix-index = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;

View file

@ -1,6 +1,4 @@
{ config, systemPkgs, ... }: {systemPkgs, ...}: {
{
nix = { nix = {
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
@ -12,8 +10,15 @@
}; };
registry = { registry = {
agenix = { agenix = {
from = { id = "agenix"; type = "indirect"; }; from = {
to = { owner = "ryantm"; repo = "agenix"; type = "github"; }; id = "agenix";
type = "indirect";
};
to = {
owner = "ryantm";
repo = "agenix";
type = "github";
};
}; };
# Write the system's nixpkgs into the registry to avoid mixing nixpkgs versions # 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 # https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html

View file

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

View file

@ -1,19 +1,23 @@
{ config, ... }: {config, ...}: let
let
old = { old = {
nssmdns = true; nssmdns = true;
}; };
new = { new = {
nssmdns4 = true; nssmdns4 = true;
}; };
in in {
{
/* /*
NixOS 24.05 changed the option for mnds to be able to turn on/off IPv6 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 23.11 doesn't support this, so I need to use the conditional to be able to
use the same config for both use the same config for both
*/ */
services.avahi = { services.avahi =
{
enable = true; 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 = [ imports = [
./avahi.nix ./avahi.nix
./tailscale.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 # Get secrets
age.secrets = { age.secrets = {
syncthingKey.file = hostSecrets + "/syncthingKey.age"; syncthingKey.file = hostSecrets + "/syncthingKey.age";

View file

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

View file

@ -1,6 +1,4 @@
{ config, pkgs, ... }: {pkgs, ...}: {
{
# Enable scanning # Enable scanning
hardware.sane = { hardware.sane = {
enable = true; enable = true;

View file

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

View file

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

View file

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

View file

@ -1,6 +1,4 @@
{ config, lib, ... }: {lib, ...}: {
{
# System wide firefox settings # System wide firefox settings
programs.firefox = { programs.firefox = {
enable = true; enable = true;

View file

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

View file

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

View file

@ -1,6 +1,4 @@
{ config, pkgs, lib, ... }: {lib, ...}: let
let
kpxcSettings = lib.generators.toINI {} { kpxcSettings = lib.generators.toINI {} {
General = { General = {
# Not sure what changing this does, I'll leave it alone # Not sure what changing this does, I'll leave it alone
@ -25,12 +23,14 @@ let
}; };
SSHAgent.Enabled = true; SSHAgent.Enabled = true;
}; };
in in {
{
home-manager = { home-manager = {
extraSpecialArgs = {kpxcSettings = kpxcSettings;}; extraSpecialArgs = {kpxcSettings = kpxcSettings;};
users.toast = { config, pkgs, kpxcSettings, ... }: { users.toast = {
pkgs,
kpxcSettings,
...
}: {
# No module for KeePassXC config :( # No module for KeePassXC config :(
home = { home = {
packages = [pkgs.keepassxc]; packages = [pkgs.keepassxc];

View file

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

View file

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

View file

@ -1,6 +1,10 @@
{ config, pkgs, flakeSelf, ... }:
let inputs = flakeSelf.inputs; in
{ {
pkgs,
flakeSelf,
...
}: let
inputs = flakeSelf.inputs;
in {
nixpkgs.overlays = [inputs.catppuccin-vsc.overlays.default]; nixpkgs.overlays = [inputs.catppuccin-vsc.overlays.default];
home-manager.users.toast = { home-manager.users.toast = {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

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

View file

@ -1,6 +1,4 @@
{ config, pkgs, flakeSelf, ... }: {flakeSelf, ...}: {
{
services.flatpak.enable = true; services.flatpak.enable = true;
home-manager = { home-manager = {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: let
let
snes-roms = [ snes-roms = [
# ActRaiser # ActRaiser
(pkgs.fetchzip { (pkgs.fetchzip {
@ -17,11 +16,11 @@ let
hash = "sha256-RLBxPBmBrXCuPdnWE07KamBNgGJ5IntQVUPeij+2HUI="; hash = "sha256-RLBxPBmBrXCuPdnWE07KamBNgGJ5IntQVUPeij+2HUI=";
}) })
]; ];
in in {
{
home-manager.users.toast = { home-manager.users.toast = {
home = { home = {
packages = [( packages = [
(
pkgs.retroarch.override { pkgs.retroarch.override {
cores = with pkgs.libretro; [ cores = with pkgs.libretro; [
snes9x snes9x
@ -61,7 +60,8 @@ in
assets_directory = "${pkgs.retroarch-assets}/share/retroarch/assets"; assets_directory = "${pkgs.retroarch-assets}/share/retroarch/assets";
}; };
} }
)]; )
];
file."Games/Roms/SNES/" = { file."Games/Roms/SNES/" = {
onChange = '' onChange = ''
${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/Roms/SNES" ${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/Roms/SNES"

View file

@ -1,6 +1,4 @@
{ config, pkgs, ... }: {config, ...}: {
{
environment.systemPackages = with config; [ environment.systemPackages = with config; [
nur.repos.ataraxiasjel.rpcs3 nur.repos.ataraxiasjel.rpcs3
]; ];
@ -11,10 +9,12 @@
}; };
# Increase the memory lock limit # Increase the memory lock limit
security.pam.loginLimits = [{ security.pam.loginLimits = [
{
domain = "*"; domain = "*";
item = "memlock"; item = "memlock";
type = "-"; # Applies to both hard and soft limits type = "-"; # Applies to both hard and soft limits
value = "unlimited"; value = "unlimited";
}]; }
];
} }

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
programs.steam = { programs.steam = {
enable = true; enable = true;
# Doubt that I'll use it, but I'll enable it anyways # 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 # 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 # Celeste mod manager
home-manager.users.toast.services.flatpak.packages = [ home-manager.users.toast.services.flatpak.packages = [

View file

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

View file

@ -1,6 +1,4 @@
{ config, ... }: {...}: {
{
/* /*
This file will sync saves for games that don't have cloud saves This file will sync saves for games that don't have cloud saves
TODO: turn this into a module eventually TODO: turn this into a module eventually

View file

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

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, flakeSelf, ... }: {
config,
let pkgs,
lib,
flakeSelf,
...
}: let
# Set up the default kde options # Set up the default kde options
balooExcludedDirs = lib.strings.intersperse "," [ balooExcludedDirs = lib.strings.intersperse "," [
"$HOME/.cache/" "$HOME/.cache/"
@ -44,10 +48,7 @@ let
runHook postInstall runHook postInstall
''; '';
}; };
in {
in
{
services.xserver = { services.xserver = {
# Enable the Plasma 5 Desktop Environment # Enable the Plasma 5 Desktop Environment
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;
@ -65,9 +66,9 @@ in
# Plasma configs should be on all users # Plasma configs should be on all users
home-manager.sharedModules = [ home-manager.sharedModules = [
( (
{ config, ... }: {config, ...}: let
let gtk2rc = "${config.xdg.configHome}/gtk-2.0/gtkrc"; in gtk2rc = "${config.xdg.configHome}/gtk-2.0/gtkrc";
{ in {
gtk.gtk2.configLocation = gtk2rc; gtk.gtk2.configLocation = gtk2rc;
# Kde has an annoying habit of overwriting the gtk2 config file # Kde has an annoying habit of overwriting the gtk2 config file
home.file."${gtk2rc}".force = true; home.file."${gtk2rc}".force = true;
@ -78,20 +79,31 @@ in
gtk = { gtk = {
enable = true; enable = true;
# Most apps are dark, so a white cursor is easier to spot # Most apps are dark, so a white cursor is easier to spot
cursorTheme = { package = pkgs.breeze-qt5; name = "Breeze_Snow"; }; cursorTheme = {
iconTheme = { package = pkgs.breeze-icons; name = "breeze-dark"; }; package = pkgs.breeze-qt5;
theme = { package = pkgs.breeze-gtk; name = "Breeze"; }; 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 # 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; gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
gtk4.extraConfig.gtk-application-prefer-dark-theme = true; gtk4.extraConfig.gtk-application-prefer-dark-theme = true;
}; };
home.packages = [( home.packages = [
(
pkgs.catppuccin-kde.override { pkgs.catppuccin-kde.override {
flavour = ["mocha"]; flavour = ["mocha"];
accents = ["mauve"]; accents = ["mauve"];
winDecStyles = ["classic"]; winDecStyles = ["classic"];
} }
)]; )
];
programs.plasma = { programs.plasma = {
enable = true; enable = true;
overrideConfig = true; overrideConfig = true;
@ -114,7 +126,8 @@ in
right = ["minimize" "maximize" "close"]; right = ["minimize" "maximize" "close"];
}; };
}; };
panels = [{ panels = [
{
location = "bottom"; location = "bottom";
height = 44; height = 44;
widgets = [ widgets = [
@ -132,7 +145,8 @@ in
} }
"org.kde.plasma.showdesktop" "org.kde.plasma.showdesktop"
]; ];
}]; }
];
shortcuts = { shortcuts = {
"kwin" = { "kwin" = {
"Switch One Desktop to the Left" = ["Meta+Ctrl+Left"]; "Switch One Desktop to the Left" = ["Meta+Ctrl+Left"];

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
currentTheme = config.services.xserver.displayManager.sddm.theme; currentTheme = config.services.xserver.displayManager.sddm.theme;
sddm-sugar-candy = pkgs.stdenv.mkDerivation { sddm-sugar-candy = pkgs.stdenv.mkDerivation {
@ -39,9 +41,7 @@ let
runHook postInstall runHook postInstall
''; '';
}; };
in in {
{
# Enable SDDM. # Enable SDDM.
services.xserver.displayManager.sddm = { services.xserver.displayManager.sddm = {
enable = true; enable = true;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,4 @@
{ config, ... }: {...}: {
{
services.syncthing.settings.folders = { services.syncthing.settings.folders = {
"school-things" = { "school-things" = {
label = "School things"; label = "School things";

View file

@ -1,11 +1,9 @@
{ config, pkgs, ... }: {pkgs, ...}: let
let
booDark = pkgs.fetchzip { booDark = pkgs.fetchzip {
url = "https://github.com/adorade/boodark/releases/download/v1.1.1/boodark-v1.1.1.zip"; url = "https://github.com/adorade/boodark/releases/download/v1.1.1/boodark-v1.1.1.zip";
hash = "sha256-GE/FtFlU6A4I9sRyjMhQIidGpDLD99Wzzngz3QI/rSo="; hash = "sha256-GE/FtFlU6A4I9sRyjMhQIidGpDLD99Wzzngz3QI/rSo=";
}; };
in in {
{
# I tried setting up httpd + php in class but I just gave up # I tried setting up httpd + php in class but I just gave up
virtualisation.oci-containers = { virtualisation.oci-containers = {
containers."xampp" = { containers."xampp" = {

View file

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

View file

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

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 {
# Set up secrets # Set up secrets
age.secrets = {ddclient-passwd.file = hostSecrets + "/ddclient-password.age";}; age.secrets = {ddclient-passwd.file = hostSecrets + "/ddclient-password.age";};

View file

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

View file

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

View file

@ -1,6 +1,4 @@
{ config, ... }: {...}: {
{
# I prefer using the go implementation # I prefer using the go implementation
services.endlessh-go = { services.endlessh-go = {
enable = true; enable = true;

View file

@ -1,6 +1,8 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
specialisation.forgejoEnableRegistration.configuration.services.forgejo.settings.service.DISABLE_REGISTRATION = false; specialisation.forgejoEnableRegistration.configuration.services.forgejo.settings.service.DISABLE_REGISTRATION = false;
services.forgejo = { services.forgejo = {
enable = true; enable = true;

View file

@ -1,5 +1,9 @@
{ config, pkgs, flakeSelf, ... }: {
let config,
pkgs,
flakeSelf,
...
}: let
atfc = builtins.fetchurl { atfc = builtins.fetchurl {
url = "https://www.curseforge.com/api/v1/mods/813246/files/4732590/download"; url = "https://www.curseforge.com/api/v1/mods/813246/files/4732590/download";
sha256 = "0yl6ixmhfgqvcj3kfshpf8fy42vkkmjbn7d7yg86jx0ykiiq5f9x"; sha256 = "0yl6ixmhfgqvcj3kfshpf8fy42vkkmjbn7d7yg86jx0ykiiq5f9x";
@ -15,8 +19,7 @@ let
port = 25565; port = 25565;
users = config.users; users = config.users;
in in {
{
users = { users = {
groups.minecraft = { groups.minecraft = {
members = ["toast"]; members = ["toast"];
@ -103,13 +106,11 @@ in
mountPoint = "/mnt/minecraftTmpfs"; mountPoint = "/mnt/minecraftTmpfs";
options = ["size=4G "]; options = ["size=4G "];
}; };
environment.etc."asd.conf".text = environment.etc."asd.conf".text = '' WHATTOSYNC=('/var/lib/minecraft')
''WHATTOSYNC=('/var/lib/minecraft')
VOLATILE="${config.fileSystems.minecraftTmpfs.mountPoint}" VOLATILE="${config.fileSystems.minecraftTmpfs.mountPoint}"
USE_OVERLAYFS="yes" ''; USE_OVERLAYFS="yes" '';
systemd.services.asd = { systemd.services.asd = {
wantedBy = ["podman-minecraft-atfc.service"]; wantedBy = ["podman-minecraft-atfc.service"];
before = ["podman-minecraft-atfc.service"]; before = ["podman-minecraft-atfc.service"];
}; };
} }

View file

@ -1,6 +1,4 @@
{ config, lib, ... }: {config, ...}: {
{
services = { services = {
nfs.server = { nfs.server = {
enable = true; enable = true;

View file

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

View file

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

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
services.syncthing = { services.syncthing = {
enable = true; enable = true;
key = config.age.secrets.syncthingKey.path; key = config.age.secrets.syncthingKey.path;

View file

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

Some files were not shown because too many files have changed in this diff Show more