tidying and such
This commit is contained in:
parent
45b2ab13bc
commit
84f4170e02
10 changed files with 115 additions and 124 deletions
|
|
@ -1,11 +1,19 @@
|
||||||
{ self, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
# defines a module
|
||||||
flake.nixosModules.hadesConfig =
|
flake.nixosModules.hadesConfig =
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
|
self,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
# other modules to import
|
||||||
imports = [
|
imports = [
|
||||||
self.nixosModules.hadesHardware
|
self.nixosModules.hadesHardware
|
||||||
self.nixosModules.coreConfig
|
self.nixosModules.coreConfig
|
||||||
|
|
@ -13,8 +21,19 @@
|
||||||
self.nixosModules.niri
|
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;
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# fstrim for ssd
|
||||||
|
services.fstrim.enable = true;
|
||||||
|
|
||||||
|
# nixify this more betterer
|
||||||
users.users.serenity = {
|
users.users.serenity = {
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
ignoreShellProgramCheck = true;
|
ignoreShellProgramCheck = true;
|
||||||
|
|
@ -28,26 +47,32 @@
|
||||||
"video"
|
"video"
|
||||||
"input"
|
"input"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# user specific packages
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
tree
|
tree
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# enable firefox
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# other packages to include
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
|
||||||
wget
|
# tools and utilities
|
||||||
git
|
git
|
||||||
curl
|
helix
|
||||||
bat
|
|
||||||
xclip
|
# packages for hades peripherals
|
||||||
ddcutil
|
input-remapper
|
||||||
unzip
|
razergenie
|
||||||
ripgrep
|
openrazer-daemon
|
||||||
tealdeer
|
openrgb-with-all-plugins
|
||||||
chezmoi
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# dont touch this
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,25 +1,22 @@
|
||||||
{
|
{ self, inputs, config, ... }: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
self,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
# module paths to import
|
flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
self.nixosModules.hadesHardware
|
||||||
|
self.nixosModules.hadesConfig
|
||||||
|
self.nixosModules.coreConfig
|
||||||
|
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.backupFileExtension = "bak";
|
||||||
|
home-manager.users.serenity = {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware
|
config.flake.homeModules.base
|
||||||
./network
|
config.flake.homeModules.hadesHome
|
||||||
./radeon
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
# select kernel to use
|
];
|
||||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
};
|
||||||
|
|
||||||
# set hostname
|
|
||||||
networking.hostName = "hades";
|
|
||||||
|
|
||||||
# for ssd
|
|
||||||
services.fstrim.enable = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
{ self, inputs, ... }: {
|
|
||||||
|
|
||||||
flake.nixosModules.hadesConfiguration = { pkgs, lib, ... }: {
|
|
||||||
# import any other modules from here
|
|
||||||
imports = [
|
|
||||||
self.nixosModules.hadesHardware
|
|
||||||
self.nixosModules.niri
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# peripherals & Input
|
|
||||||
input-remapper # Input control
|
|
||||||
razergenie # Razer frontend
|
|
||||||
openrazer-daemon # Razer daemon
|
|
||||||
openrgb-with-all-plugins # RGB control
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{ self, inputs, ... }: {
|
|
||||||
flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
self.nixosModules.hadesConfiguration
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
{ self, inputs, config, ... }: {
|
|
||||||
|
|
||||||
flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem {
|
|
||||||
modules = [
|
|
||||||
self.nixosModules.hadesHardware
|
|
||||||
self.nixosModules.hadesConfig
|
|
||||||
self.nixosModules.coreConfig
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.backupFileExtension = "bak";
|
|
||||||
home-manager.users.serenity = {
|
|
||||||
imports = [
|
|
||||||
config.flake.homeModules.base
|
|
||||||
config.flake.homeModules.hadesHome
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
flake.nixosModules.desktopHardware =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
|
||||||
"xhci_pci"
|
|
||||||
"ahci"
|
|
||||||
"nvme"
|
|
||||||
"usbhid"
|
|
||||||
"usb_storage"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/2f4a231c-04a1-4bb9-9370-c207573be881";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/7D2E-5F33";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [
|
|
||||||
"fmask=0077"
|
|
||||||
"dmask=0077"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -11,6 +11,14 @@
|
||||||
self.nixosModules.corePackages
|
self.nixosModules.corePackages
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# extra features
|
||||||
|
nix.settings.experimental-features = [
|
||||||
|
# flake based config requires flakes
|
||||||
|
"flakes"
|
||||||
|
#fancier nix usage
|
||||||
|
"nix-command"
|
||||||
|
];
|
||||||
|
|
||||||
# compresses half the ram for use as swap
|
# compresses half the ram for use as swap
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue