perf: Home-manager to module

feat: Optionise config
This commit is contained in:
2025-02-02 14:57:36 +03:00
parent f2c215460b
commit ea39ab9992
97 changed files with 395 additions and 488 deletions

View File

@ -0,0 +1,26 @@
{ config, pkgs, pkgs-stable, lib, inputs, ...}: {
imports = [
./secrets/secrets.nix
./modules/aagl.nix
./modules/grub.nix
./modules/zram.nix
../modules/nvidia.nix
(import ../modules/common.nix {
inherit lib;
inherit inputs;
hostname = "Eclipse";
})
(import ../../user/common.nix {
inherit config;
inherit pkgs;
inherit pkgs-stable;
inherit lib;
inherit inputs;
name = "chest";
})
];
programs.gamemode.enable = true;
}

View File

@ -0,0 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/34e32809-6876-4361-95d8-70a479ea8e19";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2B65-0D2E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/mnt/D" = {
device = "/dev/disk/by-uuid/E030A4DF30A4BDC2";
fsType = "ntfs";
options = ["umask=0022" "gid=100" "uid=1002"];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -0,0 +1,29 @@
{ inputs, ... }: {
imports = [ inputs.aagl.nixosModules.default ];
nix.settings = inputs.aagl.nixConfig; # Set up Cachix
programs.honkers-railway-launcher.enable = true;
networking.hosts."0.0.0.0" = [
"overseauspider.yuanshen.com"
"log-upload-os.hoyoverse.com"
"log-upload-os.mihoyo.com"
"dump.gamesafe.qq.com"
"apm-log-upload-os.hoyoverse.com"
"zzz-log-upload-os.hoyoverse.com"
"log-upload.mihoyo.com"
"devlog-upload.mihoyo.com"
"uspider.yuanshen.com"
"sg-public-data-api.hoyoverse.com"
"hkrpg-log-upload-os.hoyoverse.com"
"public-data-api.mihoyo.com"
"prd-lender.cdp.internal.unity3d.com"
"thind-prd-knob.data.ie.unity3d.com"
"thind-gke-usc.prd.data.corp.unity3d.com"
"cdp.cloud.unity3d.com"
"remote-config-proxy-prd.uca.cloud.unity3d.com"
"pc.crashsight.wetest.net"
];
}

View File

@ -0,0 +1,13 @@
{ pkgs, ... }: let
theme = pkgs.fetchFromGitHub {
owner = "OliveThePuffin";
repo = "yorha-grub-theme";
rev = "4d9cd37baf56c4f5510cc4ff61be278f11077c81";
hash = "sha256-XVzYDwJM7Q9DvdF4ZOqayjiYpasUeMhAWWcXtnhJ0WQ=";
};
in {
boot.loader.grub = {
gfxmodeEfi = "1920x1080";
theme = "${theme}/yorha-1920x1080";
};
}

View File

@ -0,0 +1,8 @@
{
zramSwap = {
enable = true;
algorithm = "lz4";
memoryPercent = 50;
priority = 999;
};
}

View File

@ -0,0 +1,9 @@
{
sops = {
age.keyFile = "/root/age.key";
secrets.vpn_bolt = {
format = "binary";
sopsFile = ./vpn_bolt.db;
};
};
}

File diff suppressed because one or more lines are too long