mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat(goliath): refactor, make fans sane
This commit is contained in:
parent
67f6cccf47
commit
69d4363c8c
18 changed files with 178 additions and 335 deletions
215
flake.lock
generated
215
flake.lock
generated
|
|
@ -17,61 +17,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"artemiscli": {
|
|
||||||
"inputs": {
|
|
||||||
"artemiscore": [
|
|
||||||
"artemiscore"
|
|
||||||
],
|
|
||||||
"flake-utils": [
|
|
||||||
"utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"poetry2nix": "poetry2nix",
|
|
||||||
"std": [
|
|
||||||
"std"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1693677435,
|
|
||||||
"narHash": "sha256-Vs3NQ3JnCEkg7QFXKcJZ/p8YImV3FNyYXw0K6kYJn2M=",
|
|
||||||
"ref": "refs/heads/main",
|
|
||||||
"rev": "301c1544b5d7eca590df277eefc3ffb14ad1427d",
|
|
||||||
"revCount": 175,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@github.com/Glamorous-ai/metaflow-cli-plugin.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@github.com/Glamorous-ai/metaflow-cli-plugin.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"artemiscore": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"poetry2nix": "poetry2nix_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1695031434,
|
|
||||||
"narHash": "sha256-mAcZz0n0cORv+WHnCbLfAhB2RrLNgSThuw70GBuyFHk=",
|
|
||||||
"ref": "develop",
|
|
||||||
"rev": "717b0a497bc8027d540a46e5ad0ac260c1b3660c",
|
|
||||||
"revCount": 113,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@github.com/Glamorous-ai/metaflow-core-plugin.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "develop",
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@github.com/Glamorous-ai/metaflow-core-plugin.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16": {
|
"base16": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flakelib": "flakelib",
|
"flakelib": "flakelib",
|
||||||
|
|
@ -230,42 +175,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689068808,
|
|
||||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689068808,
|
|
||||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flakelib": {
|
"flakelib": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fl-config": "fl-config",
|
"fl-config": "fl-config",
|
||||||
|
|
@ -400,50 +309,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-github-actions": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"artemiscli",
|
|
||||||
"poetry2nix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688870561,
|
|
||||||
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-github-actions",
|
|
||||||
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-github-actions",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-github-actions_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"artemiscore",
|
|
||||||
"poetry2nix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1688870561,
|
|
||||||
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-github-actions",
|
|
||||||
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nix-github-actions",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -564,52 +429,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"poetry2nix": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nix-github-actions": "nix-github-actions",
|
|
||||||
"nixpkgs": [
|
|
||||||
"artemiscli",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689512738,
|
|
||||||
"narHash": "sha256-p2hKM6WYl4dJ6C6qmf8kct2PYJRNii3eAoRUhWjkGdU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "poetry2nix",
|
|
||||||
"rev": "e7a88dfc2c5aa0c660a3ec4661a695c1c2380a8a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "poetry2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"poetry2nix_2": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils_2",
|
|
||||||
"nix-github-actions": "nix-github-actions_2",
|
|
||||||
"nixpkgs": [
|
|
||||||
"artemiscore",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1689512738,
|
|
||||||
"narHash": "sha256-p2hKM6WYl4dJ6C6qmf8kct2PYJRNii3eAoRUhWjkGdU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "poetry2nix",
|
|
||||||
"rev": "e7a88dfc2c5aa0c660a3ec4661a695c1c2380a8a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "poetry2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pypi-deps-db": {
|
"pypi-deps-db": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
@ -629,8 +448,6 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"arcexprs": "arcexprs",
|
"arcexprs": "arcexprs",
|
||||||
"artemiscli": "artemiscli",
|
|
||||||
"artemiscore": "artemiscore",
|
|
||||||
"base16": "base16",
|
"base16": "base16",
|
||||||
"base16-data": "base16-data",
|
"base16-data": "base16-data",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
|
|
@ -789,36 +606,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tree": {
|
"tree": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -844,7 +631,7 @@
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701680307,
|
"lastModified": 1701680307,
|
||||||
|
|
|
||||||
17
flake.nix
17
flake.nix
|
|
@ -139,23 +139,6 @@
|
||||||
home-manager.follows = "home-manager";
|
home-manager.follows = "home-manager";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# work
|
|
||||||
artemiscore = {
|
|
||||||
url = "git+ssh://git@github.com/Glamorous-ai/metaflow-core-plugin.git?ref=develop";
|
|
||||||
inputs = {
|
|
||||||
flake-utils.follows = "utils";
|
|
||||||
nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
artemiscli = {
|
|
||||||
url = "git+ssh://git@github.com/Glamorous-ai/metaflow-cli-plugin.git";
|
|
||||||
inputs = {
|
|
||||||
artemiscore.follows = "artemiscore";
|
|
||||||
flake-utils.follows = "utils";
|
|
||||||
nixpkgs.follows = "nixpkgs";
|
|
||||||
std.follows = "std";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
outputs = inputs: import ./outputs.nix {inherit inputs;};
|
outputs = inputs: import ./outputs.nix {inherit inputs;};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkMerge;
|
|
||||||
inherit (inputs.base16-data.lib.base16-data) schemeSources;
|
inherit (inputs.base16-data.lib.base16-data) schemeSources;
|
||||||
in {
|
in {
|
||||||
base16 = {
|
base16 = {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
kubectl # kubectl
|
kubectl # kubectl
|
||||||
k9s # cute k8s client, canines~
|
k9s # cute k8s client, canines~
|
||||||
kubernetes-helm # k8s package manager
|
kubernetes-helm # k8s package manager
|
||||||
|
kustomize # config management and patching, ...
|
||||||
|
|
||||||
# AWS
|
# AWS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
inherit (lib.options) mkOption;
|
|
||||||
inherit (lib.types) enum;
|
|
||||||
in {
|
|
||||||
options.machine = {
|
|
||||||
cpuVendor = mkOption {
|
|
||||||
type = enum [
|
|
||||||
"intel"
|
|
||||||
"amd"
|
|
||||||
"apple"
|
|
||||||
];
|
|
||||||
description = "CPU vendor";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
10
nixos/hardware/amd_cpu.nix
Normal file
10
nixos/hardware/amd_cpu.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkDefault;
|
||||||
|
in {
|
||||||
|
boot.kernelModules = ["kvm-amd"];
|
||||||
|
hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
5
nixos/hardware/amd_gpu.nix
Normal file
5
nixos/hardware/amd_gpu.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
boot.kernelParams = [
|
||||||
|
"amdgpu.gpu_recovery=1"
|
||||||
|
];
|
||||||
|
}
|
||||||
91
nixos/hardware/b550m-itx-ac.nix
Normal file
91
nixos/hardware/b550m-itx-ac.nix
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
systemd.services.fanSetup = let
|
||||||
|
# https://github.com/arcnmx/home/blob/9eb1cd4dd43883e1a0c6a2a55c00d7c3bede1776/hw/x370gpc/default.nix#L80 <3
|
||||||
|
nct = "/sys/devices/platform/nct6775.656/hwmon/hwmon*/";
|
||||||
|
# https://www.kernel.org/doc/html/next/hwmon/nct6775.html
|
||||||
|
#nct = ".//.//.sys.devices.platform.nct6775/656.hwmon.hwmon0";
|
||||||
|
|
||||||
|
# take in celcius, turn it into millicelcius
|
||||||
|
tempIn = x: toString (x * 1000);
|
||||||
|
# take in a percentage, turn it into a number between 0 and 255
|
||||||
|
pwmIn = x: toString (x * 255 / 100);
|
||||||
|
|
||||||
|
pwmEnable = {
|
||||||
|
maximum = 0;
|
||||||
|
manual = 1;
|
||||||
|
thermalCruise = 2;
|
||||||
|
speedCruise = 3;
|
||||||
|
# smart_fan_3 = 4;
|
||||||
|
smart_fan = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
cpu_sensor = 2;
|
||||||
|
mobo_sensor = 3;
|
||||||
|
|
||||||
|
cpu_temp = "temp${toString cpu_sensor}";
|
||||||
|
mobo_temp = "temp${toString mobo_sensor}";
|
||||||
|
exhaust = "pwm1";
|
||||||
|
intake = "pwm3";
|
||||||
|
|
||||||
|
temps = {
|
||||||
|
cpu = {
|
||||||
|
max = 80;
|
||||||
|
max_hyst = 75;
|
||||||
|
};
|
||||||
|
|
||||||
|
mobo = {
|
||||||
|
max = 50;
|
||||||
|
max_hyst = 45;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fanScript = pkgs.writeShellScriptBin "fan" ''
|
||||||
|
cd ${nct}
|
||||||
|
echo "${toString temps.cpu.max}" > ${cpu_temp}_max
|
||||||
|
echo "${toString temps.cpu.max_hyst}" > ${cpu_temp}_max_hyst
|
||||||
|
echo "${toString temps.mobo.max}" > ${mobo_temp}_max
|
||||||
|
echo "${toString temps.mobo.max_hyst}" > ${mobo_temp}_max_hyst
|
||||||
|
|
||||||
|
# Rear and Top Exhaust
|
||||||
|
|
||||||
|
echo "${toString pwmEnable.smart_fan}" > ${exhaust}_enable
|
||||||
|
echo "${toString mobo_sensor}" > ${exhaust}_temp_sel
|
||||||
|
echo "${tempIn 35}" > ${exhaust}_auto_point1_temp
|
||||||
|
echo "${pwmIn 10}" > ${exhaust}_auto_point1_pwm
|
||||||
|
echo "${tempIn 40}" > ${exhaust}_auto_point2_temp
|
||||||
|
echo "${pwmIn 20}" > ${exhaust}_auto_point2_pwm
|
||||||
|
echo "${tempIn 45}" > ${exhaust}_auto_point3_temp
|
||||||
|
echo "${pwmIn 50}" > ${exhaust}_auto_point3_pwm
|
||||||
|
echo "${tempIn 50}" > ${exhaust}_auto_point4_temp
|
||||||
|
echo "${pwmIn 75}" > ${exhaust}_auto_point4_pwm
|
||||||
|
echo "${tempIn 55}" > ${exhaust}_auto_point5_temp
|
||||||
|
echo "${pwmIn 100}" > ${exhaust}_auto_point5_pwm
|
||||||
|
|
||||||
|
# Bottom Intake
|
||||||
|
|
||||||
|
echo "${toString pwmEnable.smart_fan}" > ${intake}_enable
|
||||||
|
echo "${toString mobo_sensor}" > ${intake}_temp_sel
|
||||||
|
echo "${tempIn 35}" > ${intake}_auto_point1_temp
|
||||||
|
echo "${pwmIn 10}" > ${intake}_auto_point1_pwm
|
||||||
|
echo "${tempIn 40}" > ${intake}_auto_point2_temp
|
||||||
|
echo "${pwmIn 20}" > ${intake}_auto_point2_pwm
|
||||||
|
echo "${tempIn 45}" > ${intake}_auto_point3_temp
|
||||||
|
echo "${pwmIn 50}" > ${intake}_auto_point3_pwm
|
||||||
|
echo "${tempIn 50}" > ${intake}_auto_point4_temp
|
||||||
|
echo "${pwmIn 75}" > ${intake}_auto_point4_pwm
|
||||||
|
echo "${tempIn 55}" > ${intake}_auto_point5_temp
|
||||||
|
echo "${pwmIn 100}" > ${intake}_auto_point5_pwm
|
||||||
|
|
||||||
|
# CLC
|
||||||
|
${pkgs.liquidctl}/bin/liquidctl --match clc set fan speed 20 0 30 0 40 10 50 50 60 75 70 100
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
description = "Set up the fan speeds for the system";
|
||||||
|
after = ["systemd-modules-load.service"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${fanScript}/bin/fan";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib.modules) mkIf;
|
|
||||||
in {
|
|
||||||
config = mkIf (config.machine.cpuVendor == "intel") {
|
|
||||||
boot.kernelModules = ["kvm-intel"];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
5
nixos/hardware/intel_cpu.nix
Normal file
5
nixos/hardware/intel_cpu.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: let
|
||||||
|
in {
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
services.thermald.enable = true;
|
||||||
|
}
|
||||||
13
nixos/hardware/uefi.nix
Normal file
13
nixos/hardware/uefi.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
_: {
|
||||||
|
boot.loader = {
|
||||||
|
grub = {
|
||||||
|
devices = ["nodev"];
|
||||||
|
efiSupport = true;
|
||||||
|
gfxmodeEfi = "1920x1080";
|
||||||
|
};
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
efiSysMountPoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
_: {
|
_: {
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
timeout = -1;
|
timeout = null;
|
||||||
grub = {
|
grub = {
|
||||||
# theme = pkgs.nixos-grub2-theme; # so like, this turbo-breaks the fuck out of GRUB, i have no clue why?
|
enable = true;
|
||||||
|
useOSProber = true;
|
||||||
splashImage = ./splash.jpg;
|
splashImage = ./splash.jpg;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set color_normal=black/black
|
set color_normal=black/black
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
dnsutils
|
dnsutils
|
||||||
firefox
|
firefox
|
||||||
usbutils
|
usbutils
|
||||||
|
plexamp
|
||||||
inputs.konawall-py.packages.${pkgs.system}.konawall-py
|
inputs.konawall-py.packages.${pkgs.system}.konawall-py
|
||||||
];
|
];
|
||||||
services.udev.packages = [
|
services.udev.packages = [
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib.modules) mkIf;
|
|
||||||
in {
|
|
||||||
config = mkIf (config.machine.cpuVendor == "intel") {
|
|
||||||
services.thermald.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -6,10 +6,40 @@ _: let
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkDefault;
|
inherit (lib.lists) singleton;
|
||||||
|
drives = {
|
||||||
|
root = {
|
||||||
|
raw = "/dev/disk/by-uuid/af144e7f-e35b-49e7-be90-ef7001cc2abd";
|
||||||
|
luks = "luks-af144e7f-e35b-49e7-be90-ef7001cc2abd";
|
||||||
|
result = {
|
||||||
|
device = "/dev/disk/by-uuid/cf7fc410-4e27-4797-8464-a409766928c1";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot = rec {
|
||||||
|
raw = "/dev/disk/by-uuid/D0D8-F8BF";
|
||||||
|
result = {
|
||||||
|
device = raw;
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
swap = {
|
||||||
|
raw = "/dev/disk/by-uuid/111c4857-5d73-4e75-89c7-43be9b044ade";
|
||||||
|
luks = "luks-111c4857-5d73-4e75-89c7-43be9b044ade";
|
||||||
|
result = {
|
||||||
|
device = "/dev/disk/by-uuid/bebdb14c-4707-4e05-848f-5867764b7c27";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports =
|
imports =
|
||||||
(with tree.nixos.profiles; [
|
(with tree.nixos.hardware; [
|
||||||
|
amd_cpu
|
||||||
|
amd_gpu
|
||||||
|
b550m-itx-ac
|
||||||
|
uefi
|
||||||
|
])
|
||||||
|
++ (with tree.nixos.profiles; [
|
||||||
graphical
|
graphical
|
||||||
wireless
|
wireless
|
||||||
gaming
|
gaming
|
||||||
|
|
@ -27,72 +57,37 @@ _: let
|
||||||
kde
|
kde
|
||||||
]);
|
]);
|
||||||
|
|
||||||
machine = {
|
|
||||||
cpuVendor = "amd";
|
|
||||||
};
|
|
||||||
|
|
||||||
# to-do: add this and kvm-amd to automation
|
|
||||||
hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
fd # fd, better fine!
|
|
||||||
ripgrep # rg, better grep!
|
|
||||||
deadnix # dead-code scanner
|
|
||||||
alejandra # code formatter
|
|
||||||
statix # anti-pattern finder
|
|
||||||
deploy-rs.deploy-rs # deployment system
|
|
||||||
rnix-lsp # vscode nix extensions
|
|
||||||
terraform # terraform
|
|
||||||
kubectl
|
|
||||||
k9s
|
|
||||||
];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
devices = ["nodev"];
|
|
||||||
enableCryptodisk = true;
|
enableCryptodisk = true;
|
||||||
useOSProber = true;
|
|
||||||
gfxmodeBios = "1920x1080";
|
|
||||||
gfxmodeEfi = "1920x1080";
|
|
||||||
};
|
|
||||||
efi = {
|
|
||||||
canTouchEfiVariables = true;
|
|
||||||
efiSysMountPoint = "/boot";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Enable swap on luks
|
|
||||||
initrd = {
|
initrd = {
|
||||||
luks.devices = {
|
luks.devices = {
|
||||||
"luks-111c4857-5d73-4e75-89c7-43be9b044ade".device = "/dev/disk/by-uuid/111c4857-5d73-4e75-89c7-43be9b044ade";
|
${drives.swap.luks} = {
|
||||||
"luks-111c4857-5d73-4e75-89c7-43be9b044ade".keyFile = "/crypto_keyfile.bin";
|
device = drives.swap.raw;
|
||||||
"luks-af144e7f-e35b-49e7-be90-ef7001cc2abd".device = "/dev/disk/by-uuid/af144e7f-e35b-49e7-be90-ef7001cc2abd";
|
keyFile = "/crypto_keyfile.bin";
|
||||||
};
|
};
|
||||||
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
${drives.root.luks}.device = drives.root.raw;
|
||||||
|
};
|
||||||
|
#
|
||||||
secrets = {
|
secrets = {
|
||||||
"/crypto_keyfile.bin" = null;
|
"/crypto_keyfile.bin" = null;
|
||||||
};
|
};
|
||||||
|
availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||||
};
|
};
|
||||||
kernelParams = [
|
kernelModules = ["nct6775"];
|
||||||
"amdgpu.gpu_recovery=1"
|
|
||||||
];
|
|
||||||
kernelModules = ["kvm-amd"];
|
|
||||||
supportedFilesystems = ["ntfs"];
|
supportedFilesystems = ["ntfs"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = drives.root.result;
|
||||||
device = "/dev/disk/by-uuid/cf7fc410-4e27-4797-8464-a409766928c1";
|
"/boot" = drives.boot.result;
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/D0D8-F8BF";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
swapDevices = singleton drives.swap.result;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
hostKeys = [
|
hostKeys = [
|
||||||
{
|
{
|
||||||
|
|
@ -111,15 +106,6 @@ _: let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{device = "/dev/disk/by-uuid/bebdb14c-4707-4e05-848f-5867764b7c27";}
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostId = "dddbb888";
|
|
||||||
useDHCP = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
system.stateVersion = "21.11";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ _: let
|
||||||
boot.kernelPackages = pkgs.linuxPackages_6_3;
|
boot.kernelPackages = pkgs.linuxPackages_6_3;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
inputs.artemiscli.packages.aarch64-linux.artemiscli
|
|
||||||
awscli2
|
awscli2
|
||||||
kubectl
|
kubectl
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
_: let
|
_: let
|
||||||
hostConfig = {
|
hostConfig = {tree, ...}: {
|
||||||
tree,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = with tree.darwin; [
|
imports = with tree.darwin; [
|
||||||
orbstack
|
orbstack
|
||||||
packages
|
packages
|
||||||
|
|
|
||||||
3
tree.nix
3
tree.nix
|
|
@ -64,6 +64,9 @@
|
||||||
"nixos/hardware" = {
|
"nixos/hardware" = {
|
||||||
external = inputs.nixos-hardware.outputs.nixosModules;
|
external = inputs.nixos-hardware.outputs.nixosModules;
|
||||||
};
|
};
|
||||||
|
"nixos/hardware/conditional" = {
|
||||||
|
functor.enable = true;
|
||||||
|
};
|
||||||
"modules/nixos" = {
|
"modules/nixos" = {
|
||||||
functor = {
|
functor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue