mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 09:36:14 +01:00
Compare commits
6 commits
2ee4958bdb
...
1ea62e80e2
Author | SHA1 | Date | |
---|---|---|---|
1ea62e80e2 | |||
d925c68f58 | |||
b7d82b950c | |||
1142e4a94b | |||
27f4b1bc33 | |||
b71e57e8af |
|
@ -2143,8 +2143,8 @@
|
|||
"secret": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1704823351,
|
||||
"narHash": "sha256-KAiEA1ftvLVzGEzgi6GwrTJ7vA54i76/a1EHPr/CoYU=",
|
||||
"lastModified": 1705880353,
|
||||
"narHash": "sha256-xhiTJu5C0rIZuS243jhSXj9l/Pu6qCjlBvUI/KQlBL8=",
|
||||
"path": "/home/main/dotfiles/secret",
|
||||
"type": "path"
|
||||
},
|
||||
|
|
|
@ -2143,7 +2143,7 @@
|
|||
"secret": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1704919213,
|
||||
"lastModified": 1705786717,
|
||||
"narHash": "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=",
|
||||
"path": "/var/empty",
|
||||
"type": "path"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
optional
|
||||
;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git-annex
|
||||
file
|
||||
];
|
||||
] ++ (optional (pkgs.stdenv.system != "armv6l-linux" && pkgs.stdenv.system != "armv7l-linux") git-annex);
|
||||
|
||||
imports = [
|
||||
../bash
|
||||
|
|
|
@ -109,6 +109,20 @@ in
|
|||
|
||||
system.stateVersion = "21.05";
|
||||
|
||||
systemd.services.home-assistant-pyscript = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
restartIfChanged = true;
|
||||
path = [ pkgs.rsync ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
script = ''
|
||||
mkdir -p /mnt/kyle/infrastructure/home-assistant/home-assistant/pyscript
|
||||
rsync --chown 403:403 --chmod Du=rwx,Dgo=rx,Fu=rw,Fgo=r -arvc --delete ${secret.pyscript}/. /mnt/kyle/infrastructure/home-assistant/home-assistant/pyscript/
|
||||
'';
|
||||
};
|
||||
|
||||
boot.kernel.sysctl."fs.inotify.max_user_instances" = 256;
|
||||
services.udev.extraRules =
|
||||
let
|
||||
|
|
|
@ -9,13 +9,13 @@ in
|
|||
sshfs
|
||||
];
|
||||
|
||||
services.hashicorp.vault-agent = {
|
||||
settings.template = singleton {
|
||||
source = pkgs.writeText "kodi-samba.cred.vtmpl"
|
||||
''{{ with secret "kv/data/homelab-1/blowhole/kodi_samba.cred" }}{{ .Data.data.cred }}{{ end }}'';
|
||||
destination = "/run/secrets/kodi_samba.cred";
|
||||
};
|
||||
};
|
||||
# services.hashicorp.vault-agent = {
|
||||
# settings.template = singleton {
|
||||
# source = pkgs.writeText "kodi-samba.cred.vtmpl"
|
||||
# ''{{ with secret "kv/data/homelab-1/blowhole/kodi_samba.cred" }}{{ .Data.data.cred }}{{ end }}'';
|
||||
# destination = "/run/secrets/kodi_samba.cred";
|
||||
# };
|
||||
# };
|
||||
|
||||
fileSystems =
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, lib, pkgs, secret, config, config', ...}:
|
||||
{ inputs', lib, pkgs, secret, config, config', ...}:
|
||||
let
|
||||
inherit (lib)
|
||||
concatStringsSep
|
||||
|
@ -71,8 +71,8 @@ in
|
|||
hostPath = "/var/lib/klipper/gcodes";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/dev/serial/by-id/" = {
|
||||
hostPath = "/dev/serial/by-id/";
|
||||
"/dev/ttyEnder3" = {
|
||||
hostPath = "/dev/serial/by-id/usb-Klipper_lpc1768_13E0FF0C469027AEBAA84A52871E00F5-if00";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
@ -90,14 +90,19 @@ in
|
|||
hashicorp-envoy
|
||||
];
|
||||
|
||||
networking.firewall.interfaces.eth0.allowedTCPPorts = [19000];
|
||||
|
||||
services.hashicorp-envoy.mainsail = {
|
||||
envoyPackage = inputs'.nixpkgs-stable.legacyPackages.${pkgs.stdenv.system}.envoy;
|
||||
service = {
|
||||
name = "mainsail";
|
||||
id = "mainsail";
|
||||
address = "10.64.99.6";
|
||||
port = 80;
|
||||
|
||||
connect.sidecar_service = {};
|
||||
connect.sidecar_service = {
|
||||
port = 19000;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
@ -109,7 +114,6 @@ in
|
|||
address = "10.64.99.6:19000";
|
||||
adminBind = "127.0.0.1:19100";
|
||||
hotRestart = false;
|
||||
extraConsulArgs = [ "-ignore-envoy-compatibility" ];
|
||||
};
|
||||
|
||||
users.users.klipper = {
|
||||
|
@ -222,7 +226,7 @@ in
|
|||
};
|
||||
|
||||
mcu = {
|
||||
serial = "/dev/serial/by-id/usb-Klipper_lpc1768_13E0FF0C469027AEBAA84A52871E00F5-if00";
|
||||
serial = "/dev/ttyEnder3";
|
||||
};
|
||||
|
||||
printer = {
|
||||
|
@ -415,10 +419,10 @@ in
|
|||
''
|
||||
G92 E0 # Reset Extruder
|
||||
G1 Z2.0 F3000 # Move Z Axis up little to prevent scratching of Heat Bed
|
||||
G1 X0.1 Y20 Z0.3 F5000.0 # Move to start position
|
||||
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 # Draw the first line
|
||||
G1 X0.4 Y200.0 Z0.3 F5000.0 # Move to side a little
|
||||
G1 X0.4 Y20 Z0.3 F1500.0 E30 # Draw the second line
|
||||
G1 X1 Y20 Z0.3 F5000.0 # Move to start position
|
||||
G1 X1 Y200.0 Z0.3 F1500.0 E15 # Draw the first line
|
||||
G1 X1.3 Y200.0 Z0.3 F5000.0 # Move to side a little
|
||||
G1 X1.3 Y20 Z0.3 F1500.0 E30 # Draw the second line
|
||||
G92 E0 # Reset Extruder
|
||||
G1 Z2.0 F3000 # Move Z Axis up little to prevent scratching of Heat Bed
|
||||
G1 X5 Y20 Z0.3 F5000.0 # Move over to prevent blob squish
|
||||
|
|
|
@ -60,67 +60,67 @@ in {
|
|||
|
||||
hardware.tuxedo-keyboard.enable = true;
|
||||
|
||||
specialisation.nvidia-sync.configuration = {
|
||||
environment.variables.NIXOS_SPECIALIZATION = "nvidia-sync";
|
||||
boot.loader.grub.enable = mkOverride 0 false;
|
||||
# specialisation.nvidia-sync.configuration = {
|
||||
# environment.variables.NIXOS_SPECIALIZATION = "nvidia-sync";
|
||||
# boot.loader.grub.enable = mkOverride 0 false;
|
||||
|
||||
hardware.nvidia = {
|
||||
powerManagement.enable = mkForce false;
|
||||
powerManagement.finegrained = mkForce false;
|
||||
prime.offload.enableOffloadCmd = mkForce false;
|
||||
prime.offload.enable = mkForce false;
|
||||
prime.sync.enable = true;
|
||||
};
|
||||
};
|
||||
# hardware.nvidia = {
|
||||
# powerManagement.enable = mkForce false;
|
||||
# powerManagement.finegrained = mkForce false;
|
||||
# prime.offload.enableOffloadCmd = mkForce false;
|
||||
# prime.offload.enable = mkForce false;
|
||||
# prime.sync.enable = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
specialisation.nouveau.configuration = {
|
||||
environment.variables.NIXOS_SPECIALIZATION = "nouveau";
|
||||
boot.loader.grub.enable = mkOverride 0 false;
|
||||
# specialisation.nouveau.configuration = {
|
||||
# environment.variables.NIXOS_SPECIALIZATION = "nouveau";
|
||||
# boot.loader.grub.enable = mkOverride 0 false;
|
||||
|
||||
hardware.nvidia = mapAttrs (_: v: mkForce v) {
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
prime.offload.enableOffloadCmd = false;
|
||||
prime.offload.enable = false;
|
||||
nvidiaPersistenced = false;
|
||||
# hardware.nvidia = mapAttrs (_: v: mkForce v) {
|
||||
# powerManagement.enable = false;
|
||||
# powerManagement.finegrained = false;
|
||||
# prime.offload.enableOffloadCmd = false;
|
||||
# prime.offload.enable = false;
|
||||
# nvidiaPersistenced = false;
|
||||
|
||||
prime.reverseSync.enable = false;
|
||||
};
|
||||
services.xserver.videoDrivers = mkForce ["modesetting" "nouveau"];
|
||||
};
|
||||
# prime.reverseSync.enable = false;
|
||||
# };
|
||||
# services.xserver.videoDrivers = mkForce ["modesetting" "nouveau"];
|
||||
# };
|
||||
|
||||
specialisation.no-nvidia.configuration = {
|
||||
environment.variables.NIXOS_SPECIALIZATION = "no-nvidia";
|
||||
boot.loader.grub.enable = mkOverride 0 false;
|
||||
# specialisation.no-nvidia.configuration = {
|
||||
# environment.variables.NIXOS_SPECIALIZATION = "no-nvidia";
|
||||
# boot.loader.grub.enable = mkOverride 0 false;
|
||||
|
||||
hardware.nvidia = mapAttrs (_: v: mkForce v) {
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
prime.offload.enableOffloadCmd = false;
|
||||
prime.offload.enable = false;
|
||||
nvidiaPersistenced = false;
|
||||
# hardware.nvidia = mapAttrs (_: v: mkForce v) {
|
||||
# powerManagement.enable = false;
|
||||
# powerManagement.finegrained = false;
|
||||
# prime.offload.enableOffloadCmd = false;
|
||||
# prime.offload.enable = false;
|
||||
# nvidiaPersistenced = false;
|
||||
|
||||
prime.reverseSync.enable = false;
|
||||
};
|
||||
services.xserver.videoDrivers = mkForce ["modesetting"];
|
||||
# prime.reverseSync.enable = false;
|
||||
# };
|
||||
# services.xserver.videoDrivers = mkForce ["modesetting"];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
blacklist nouveau
|
||||
options nouveau modeset=0
|
||||
'';
|
||||
# boot.extraModprobeConfig = ''
|
||||
# blacklist nouveau
|
||||
# options nouveau modeset=0
|
||||
# '';
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA Audio devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA VGA/3D controller devices
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
'';
|
||||
boot.blacklistedKernelModules = ["nouveau" "nvidia" "nvidia_drm" "nvidia_modeset"];
|
||||
};
|
||||
# services.udev.extraRules = ''
|
||||
# # Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# # Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# # Remove NVIDIA Audio devices, if present
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# # Remove NVIDIA VGA/3D controller devices
|
||||
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# '';
|
||||
# boot.blacklistedKernelModules = ["nouveau" "nvidia" "nvidia_drm" "nvidia_modeset"];
|
||||
# };
|
||||
|
||||
hardware.nvidia = {
|
||||
nvidiaPersistenced = true;
|
||||
|
|
Loading…
Reference in a new issue