tidying and such

This commit is contained in:
serenity-F 2026-08-30 23:41:31 +10:00
parent 45b2ab13bc
commit 84f4170e02
No known key found for this signature in database
10 changed files with 115 additions and 124 deletions

View file

@ -0,0 +1,78 @@
{ self, ... }:
{
# defines a module
flake.nixosModules.hadesConfig =
{
pkgs,
lib,
self,
...
}:
{
# other modules to import
imports = [
self.nixosModules.hadesHardware
self.nixosModules.coreConfig
self.nixosModules.programs
self.nixosModules.niri
];
# set hostname
networking.hostName = "hades";
# specify kernel to use
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
# enable printing support
services.printing.enable = true;
# fstrim for ssd
services.fstrim.enable = true;
# nixify this more betterer
users.users.serenity = {
shell = pkgs.fish;
ignoreShellProgramCheck = true;
isNormalUser = true;
description = "";
extraGroups = [
"networkmanager"
"wheel"
"i2c"
"audio"
"video"
"input"
];
# user specific packages
packages = with pkgs; [
tree
];
};
# enable firefox
programs.firefox.enable = true;
# other packages to include
environment.systemPackages = with pkgs; [
# tools and utilities
git
helix
# packages for hades peripherals
input-remapper
razergenie
openrazer-daemon
openrgb-with-all-plugins
];
# dont touch this
system.stateVersion = "24.11";
};
}

View file

@ -1,25 +1,22 @@
{
pkgs,
lib,
self,
...
}:
{
{ self, inputs, config, ... }: {
# module paths to import
imports = [
./hardware
./network
./radeon
];
flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem {
modules = [
self.nixosModules.hadesHardware
self.nixosModules.hadesConfig
self.nixosModules.coreConfig
# select kernel to use
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
# set hostname
networking.hostName = "hades";
# for ssd
services.fstrim.enable = true;
inputs.home-manager.nixosModules.home-manager
{
home-manager.backupFileExtension = "bak";
home-manager.users.serenity = {
imports = [
config.flake.homeModules.base
config.flake.homeModules.hadesHome
];
};
}
];
};
}

View file

@ -0,0 +1,54 @@
{ ... }:
{
# defines a module
flake.nixosModules.hadesHardware =
{
config,
lib,
modulesPath,
...
}:
{
# important i think lol
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
# shrug
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
# enable amdgpu at boot
boot.initrd.kernelModules = [ "amdgpu" ];
# root partition
fileSystems."/" = {
device = "/dev/disk/by-uuid/2f4a231c-04a1-4bb9-9370-c207573be881";
fsType = "ext4";
};
# boot partition
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7D2E-5F33";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
# swap
swapDevices = [ ];
# specifies x64 uArch
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}