Improve modularity

This commit is contained in:
Isshi0417 2024-07-11 13:22:57 +09:00
parent badaddedef
commit 3e587c83e3
15 changed files with 87 additions and 27 deletions

View File

@ -8,7 +8,13 @@
imports = imports =
[ # Hardware-related [ # Hardware-related
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/nixos/alienware/alienware.nix ../../modules/hardware
# NH
../../modules/nh
# Gaming
../../modules/gaming
# Gnome customization # Gnome customization
../../modules/nixos/gnome.nix ../../modules/nixos/gnome.nix
@ -35,6 +41,24 @@
}; };
}; };
swapDevices = [{
device = "/var/lib/swapfile";
size = 20*1024;
}];
hardware = {
enableRedistributableFirmware = lib.mkDefault true;
};
services = {
fwupd = {
enable = lib.mkDefault true;
};
thermald = {
enable = lib.mkDefault true;
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "alienware"; # Define your hostname. networking.hostName = "alienware"; # Define your hostname.

View File

@ -65,10 +65,7 @@
# Home Manager is pretty good at managing dotfiles. The primary way to manage # Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'. # plain files is through 'home.file'.
home.file = { home.file = {
".config/awesome" = {
recursive = true;
source = ../../modules/nixos/alienware/awesomewm;
};
}; };
# Home Manager can also manage your environment variables through # Home Manager can also manage your environment variables through

View File

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./steam
./lutris
./gayshit
];
}

View File

@ -1,22 +1,6 @@
{ pkgs, ... }: { ... }:
{ {
# Enable Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
# Enable wine
environment.systemPackages = with pkgs; [
wineWowPackages.stable
wineWowPackages.staging
winetricks
lutris
];
# Aagl config # Aagl config
nix.settings = { nix.settings = {
substituters = [ "https://ezkea.cachix.org" ]; substituters = [ "https://ezkea.cachix.org" ];

View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
# Enable wine
environment.systemPackages = with pkgs; [
wineWowPackages.stable
wineWowPackages.staging
winetricks
lutris
];
}

View File

@ -0,0 +1,11 @@
{ ... }:
{
# Enable Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
}

View File

@ -1,4 +1,8 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
imports = [
./tiger-lake.nix
];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -1,7 +1,6 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
imports = [ imports = [
./intel.nix
../gpu/intel.nix ../gpu/intel.nix
]; ];
config = lib.mkMerge [ config = lib.mkMerge [

View File

@ -0,0 +1,9 @@
{ ... }:
{
imports = [
./cpu
./gpu
./ssd
];
}

View File

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./nvidia.nix
];
}

9
modules/nh/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
};
}

View File

@ -2,10 +2,6 @@
{ {
imports = [ imports = [
./hardware/cpu/tiger-lake.nix
./hardware/gpu/nvidia.nix
./hardware/ssd/ssd.nix
./gaming.nix
./nh.nix ./nh.nix
]; ];