mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: ...get internet again. git-hooks.nix adopt
This commit is contained in:
parent
7a0f09e700
commit
e00ec8f2f2
116 changed files with 1157 additions and 4681 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, pkgs, ... }: let
|
||||
inherit (lib.modules) mkForce;
|
||||
{lib, ...} @ specyArgs: let
|
||||
inherit (lib.attrsets) removeAttrs;
|
||||
hostConfig = {
|
||||
tree,
|
||||
modulesPath,
|
||||
|
|
@ -9,6 +9,10 @@
|
|||
[
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
]
|
||||
++ (with tree.nixos; [
|
||||
container-host
|
||||
microvm-host
|
||||
])
|
||||
++ (with tree.nixos.profiles; [
|
||||
server
|
||||
])
|
||||
|
|
@ -22,6 +26,29 @@
|
|||
web
|
||||
]);
|
||||
|
||||
# TODO: Add config.microvm.stateDir to backup schedule?
|
||||
# TODO: figure out updateFlake?
|
||||
microvm = {
|
||||
host.enable = true;
|
||||
vms = {
|
||||
syncthing = {
|
||||
autostart = true;
|
||||
specialArgs = removeAttrs specyArgs ["config" "pkgs" "lib"];
|
||||
config = {
|
||||
imports = [
|
||||
tree.nixos.servers.syncthing
|
||||
];
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
restartIfChanged = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
};
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ _: let
|
|||
...
|
||||
}: let
|
||||
inherit (lib.attrsets) nameValuePair listToAttrs;
|
||||
inherit (lib.meta) getExe';
|
||||
datasets = [
|
||||
"root"
|
||||
"nix"
|
||||
|
|
@ -98,21 +97,41 @@ _: let
|
|||
];
|
||||
};
|
||||
waybar.settings.main = {
|
||||
modules-center = [
|
||||
modules-right = [
|
||||
"custom/nvidia-vram"
|
||||
];
|
||||
"custom/nvidia-vram" = {
|
||||
tooltip = false;
|
||||
format = "nvidia {}";
|
||||
interval = 1;
|
||||
exec = "${getExe' config.hardware.nvidia.package "nvidia-smi"} --query-gpu=memory.used,memory.total,pstate --format=csv,noheader,nounits";
|
||||
return-type = "";
|
||||
};
|
||||
tooltip = false;
|
||||
format = "vram {}";
|
||||
interval = 1;
|
||||
exec = let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (pkgs) writeShellScriptBin bc;
|
||||
nvidia-vram = writeShellScriptBin "nvidia-vram" ''
|
||||
export PATH="$PATH:${lib.makeBinPath [
|
||||
config.hardware.nvidia.package
|
||||
bc
|
||||
]}"
|
||||
exec ${../packages/nvidia-vram/nvidia-vram.sh} "$@"
|
||||
'';
|
||||
in "${getExe nvidia-vram}";
|
||||
return-type = "";
|
||||
};
|
||||
};
|
||||
niri.settings = {
|
||||
outputs = {
|
||||
"LG Electronics LG Ultra HD 0x0001AC91" = {
|
||||
scale = 1.0;
|
||||
position = {
|
||||
x = 1920;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
"Samsung Electric Company SAMSUNG Unknown" = {
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
"PNP(XXX) Beyond TV 0x00010000" = {
|
||||
mode = {
|
||||
|
|
@ -132,13 +151,13 @@ _: let
|
|||
};
|
||||
};
|
||||
imports =
|
||||
(with tree.home.profiles; [
|
||||
graphical
|
||||
])
|
||||
++ (with tree.home.environments; [
|
||||
#hyprland
|
||||
niri
|
||||
]);
|
||||
(with tree.home.profiles; [
|
||||
graphical
|
||||
])
|
||||
++ (with tree.home.environments; [
|
||||
#hyprland
|
||||
niri
|
||||
]);
|
||||
};
|
||||
|
||||
networking.hostId = "c3b94e85";
|
||||
|
|
@ -167,7 +186,6 @@ _: let
|
|||
'';
|
||||
};
|
||||
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ _: let
|
|||
in {
|
||||
imports =
|
||||
(with tree.nixos.hardware; [
|
||||
])
|
||||
])
|
||||
++ (with tree.nixos.profiles; [
|
||||
graphical
|
||||
])
|
||||
|
|
@ -63,12 +63,12 @@ _: let
|
|||
};
|
||||
};
|
||||
imports =
|
||||
(with tree.home.profiles; [
|
||||
graphical
|
||||
])
|
||||
++ (with tree.home.environments; [
|
||||
niri
|
||||
]);
|
||||
(with tree.home.profiles; [
|
||||
graphical
|
||||
])
|
||||
++ (with tree.home.environments; [
|
||||
niri
|
||||
]);
|
||||
};
|
||||
|
||||
fileSystems =
|
||||
|
|
|
|||
|
|
@ -73,12 +73,12 @@ _: let
|
|||
};
|
||||
};
|
||||
imports =
|
||||
(with tree.home.profiles; [
|
||||
graphical
|
||||
])
|
||||
++ (with tree.home.environments; [
|
||||
niri
|
||||
]);
|
||||
(with tree.home.profiles; [
|
||||
graphical
|
||||
])
|
||||
++ (with tree.home.environments; [
|
||||
niri
|
||||
]);
|
||||
};
|
||||
|
||||
fileSystems =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue