Framework 12 Initial setup
This commit is contained in:
parent
af5b392286
commit
3d0fdb6ac4
9 changed files with 294 additions and 9 deletions
93
nixos/hosts/kylekrein-framework12/default.nix
Normal file
93
nixos/hosts/kylekrein-framework12/default.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
unstable-pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../hardware/nvidia
|
||||
|
||||
../../modules/niri
|
||||
|
||||
../../modules/libvirt
|
||||
|
||||
../../users/kylekrein
|
||||
(import ../../modules/libvirt/user.nix {username = "kylekrein";})
|
||||
|
||||
../../users/tania
|
||||
];
|
||||
sops.secrets."ssh_keys/${hwconfig.hostname}" = {};
|
||||
facter.reportPath = lib.mkForce null;
|
||||
nixpkgs.overlays = [
|
||||
# Fixes java crash because of bind mount with impermanence when loading too many mods(ex. All The Mods 9)
|
||||
(self: super: {
|
||||
prismlauncher = pkgs.symlinkJoin {
|
||||
name = "prismlauncher";
|
||||
paths = [ super.prismlauncher];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/prismlauncher --set HOME /persist/home/kylekrein
|
||||
'';
|
||||
};
|
||||
})
|
||||
(self: super: {
|
||||
bottles = pkgs.symlinkJoin {
|
||||
name = "bottles";
|
||||
paths = [ super.bottles];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/bottles --set HOME /persist/home/kylekrein
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
blender
|
||||
ladybird
|
||||
prismlauncher
|
||||
|
||||
#inputs.nix-gaming.packages.${pkgs.system}.star-citizen
|
||||
];
|
||||
|
||||
zramSwap = {
|
||||
enable = true; # Hopefully? helps with freezing when using swap
|
||||
};
|
||||
services.zerotierone = {
|
||||
enable = true;
|
||||
port = 9994;
|
||||
joinNetworks = [
|
||||
"A84AC5C10AD269CA"
|
||||
"db64858fed285e0f"
|
||||
];
|
||||
};
|
||||
#LLMs
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
loadModels = [ "qwq" "llama3.1" "qwen2.5-coder:7b" ];
|
||||
acceleration = "cuda";
|
||||
home = "/persist/ollama";
|
||||
user = "ollama";
|
||||
group = "ollama";
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" "riscv64-linux" ];
|
||||
|
||||
services.open-webui.enable = true;
|
||||
#services.open-webui.package = unstable-pkgs.open-webui;
|
||||
services.open-webui.openFirewall = false;
|
||||
services.open-webui.host = "0.0.0.0";
|
||||
services.open-webui.stateDir = "/persist/open-webui";
|
||||
systemd.services.open-webui.serviceConfig.User = "ollama";
|
||||
systemd.services.open-webui.serviceConfig.Group = "ollama";
|
||||
systemd.services.open-webui.serviceConfig.DynamicUser = lib.mkForce false;
|
||||
|
||||
#Chat host
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 8448 9993 8081] ++ [ config.services.zerotierone.port ];
|
||||
networking.firewall.allowedUDPPorts = [config.services.zerotierone.port];
|
||||
|
||||
systemd.network.wait-online.enable = lib.mkForce false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue