chore: work on modularization of config
This commit is contained in:
parent
ab897f750d
commit
850454a6c6
16 changed files with 300 additions and 94 deletions
13
nix/hardware/overheating/base_config.nix
Normal file
13
nix/hardware/overheating/base_config.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, config, ... }: {
|
||||
imports = [
|
||||
../../modules/ironbar_config.nix
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.monitor = [
|
||||
# default
|
||||
"eDP-1,2944x1840@90,0x0,2"
|
||||
|
||||
# all others
|
||||
",highrr,auto,1"
|
||||
];
|
||||
programs.ironbar.monitor = "eDP-1";
|
||||
}
|
||||
|
|
@ -1 +1,78 @@
|
|||
{}
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# WARNING: Simply change this for each config
|
||||
networking.hostName = "overheating";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Zurich";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
|
||||
# allows user change later on
|
||||
users.mutableUsers = true;
|
||||
users.users.dashie = {
|
||||
isNormalUser = true;
|
||||
description = "dashie";
|
||||
extraGroups = [ "networkmanager" "wheel" "gamemode" ];
|
||||
packages = with pkgs; [
|
||||
home-manager
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
# this password will only last for the first login
|
||||
# e.g. login, then change to whatever else, this also ensures no public hash is available
|
||||
password = "firstlogin";
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
builders-use-substitutes = true;
|
||||
# substituters to use
|
||||
substituters = [
|
||||
"https://anyrun.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "unstable";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./overheating.nix
|
||||
./configuration.nix
|
||||
./overheating.nix
|
||||
./configuration.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,57 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }: { }
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-label/ROOT";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{
|
||||
device = "/dev/disk/by-label/HOME";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-label/SWAP"; }];
|
||||
|
||||
# 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.enp15s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp16s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
nix.settings.auto-optimise-store = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue