add yodaTuxHeadless

This commit is contained in:
Daniel Langbein 2025-01-29 20:58:16 +01:00
parent becf2557b0
commit 4b39d35d57
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
7 changed files with 75 additions and 14 deletions

View File

@ -31,6 +31,17 @@ in
};
};
yodaTuxHeadless = { name, nodes, ... }: {
# Import the per-host configuration file.
imports = [ ./hosts/${name}/configuration.nix ];
deployment = {
# Local deployment.
allowLocalDeployment = true;
targetHost = null;
};
};
yodaTab = { name, nodes, ... }: {
# Import the per-host configuration file.
imports = [ ./hosts/${name}/configuration.nix ];

View File

@ -3,6 +3,7 @@
imports =
[
./hardware-configuration.nix
./host-specific.nix
../../modules/tuxedo-rs.nix
../../modules/gpu-amd.nix
@ -23,8 +24,6 @@
# - `reboot`
# - Related: https://unix.stackexchange.com/a/667997
#./benchmark.nix
../../modules/base.nix
../../modules/base-efi-systemd.nix
../../modules/xdg.nix
@ -86,16 +85,4 @@
../../modules/docker.nix
../../modules/docker-pushrm.nix
];
networking.hostName = "yodaTux";
boot.initrd.luks.devices."luks-ea7099e3-320d-4eb3-a4c3-9910a9af817b".allowDiscards = true;
yoda.btrfsFileSystems = ["/"];
#yoda.btrfsMounts = yoda.btrfsFileSystems;
# Systemd Journal entry:
# S Sat Sep 23 16:11:52 2023 p4 kernel: TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
boot.kernelParams = [ "tsc=unstable" ];
# Most users should never change this value after the initial install, for any reason, even if you've upgraded your system to a new NixOS release.
system.stateVersion = "23.05";
}

View File

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
networking.hostName = "yodaTux";
boot.initrd.luks.devices."luks-ea7099e3-320d-4eb3-a4c3-9910a9af817b".allowDiscards = true;
yoda.btrfsFileSystems = ["/"];
#yoda.btrfsMounts = yoda.btrfsFileSystems;
# Systemd Journal entry:
# S Sat Sep 23 16:11:52 2023 p4 kernel: TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.
boot.kernelParams = [ "tsc=unstable" ];
# Most users should never change this value after the initial install, for any reason, even if you've upgraded your system to a new NixOS release.
system.stateVersion = "23.05";
}

View File

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
{
imports = [
./hardware-configuration.nix
./host-specific.nix
#../../modules/tuxedo-rs.nix
#../../modules/gpu-amd.nix
../../modules/base.nix
../../modules/base-efi-systemd.nix
../../modules/headless.nix
./cpu-fixed-frequency.nix
../../modules/java.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View File

@ -0,0 +1,29 @@
{ config, pkgs, lib, ... }:
{
#
# Pin CPU frequency
#
# https://unix.stackexchange.com/a/265611
# See current speed of each core:
# watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"
#
# https://wiki.archlinux.org/title/CPU_frequency_scaling#Userspace_tools
# Gnome uses power-profiles-daemon wich conflicts with tlp.
# https://discourse.nixos.org/t/cant-enable-tlp-when-upgrading-to-21-05/13435/3
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
# https://linrunner.de/tlp/settings/processor.html
settings = {
CPU_SCALING_MIN_FREQ_ON_AC = 1400000;
CPU_SCALING_MAX_FREQ_ON_AC = 1400000;
# Probably useless whenn setting fixed CPU freq above.
CPU_BOOST_ON_AC = 0;
};
};
}

View File

@ -0,0 +1 @@
../yodaTux/hardware-configuration.nix

View File

@ -0,0 +1 @@
../yodaTux/host-specific.nix