update hub

This commit is contained in:
Kopatz
2024-11-25 14:20:57 +01:00
parent 5fdbafd29b
commit 41e669aee7
7 changed files with 52 additions and 10 deletions

View File

@@ -25,5 +25,6 @@
#./cosmic.nix #./cosmic.nix
./shared.nix ./shared.nix
./nightlight.nix ./nightlight.nix
./xfce.nix
]; ];
} }

View File

@@ -0,0 +1,19 @@
{lib, config, pkgs, ...}:
with lib;
let
cfg = config.custom.graphical.xfce;
in
{
options.custom.graphical.xfce = {
enable = mkEnableOption "Enables lxqt";
};
config = mkIf cfg.enable {
services.xserver = {
xkb.layout = config.mainUser.layout;
xkb.variant = config.mainUser.variant;
enable = true;
desktopManager.xfce.enable = true;
};
};
}

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchGit { src = fetchGit {
url = "git@github.com:oberprofis/hub.git"; url = "git@github.com:oberprofis/hub.git";
ref = "master"; ref = "master";
rev = "062c128597e2b2e4275f7c8ce27644cdc6b5e49b"; rev = "8b689e230a8ecbc85d4e2eae7544018ccefc735a";
}; };
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out

20
pkgs/hub/update.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq nix-prefetch-git
set -e
PACKAGE_FILE="default.nix" # Replace with your package file path
REPO_URL="git@github.com:oberprofis/hub.git" # Replace with the repository URL
echo "Fetching latest revision from $REPO_URL..."
# Get the latest revision and sha256
latest_rev=$(nix-prefetch-git $REPO_URL | jq -r '.rev')
echo "Latest revision: $latest_rev"
# Update the package file with the new revision and sha256
sed -i "s|rev = \".*\";|rev = \"$latest_rev\";|" $PACKAGE_FILE
echo "Package file $PACKAGE_FILE updated successfully."

View File

@@ -8,6 +8,7 @@
../../modules/fail2ban.nix ../../modules/fail2ban.nix
../../modules/logging.nix ../../modules/logging.nix
../../modules/motd.nix ../../modules/motd.nix
../../modules/kernel.nix
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];

View File

@@ -7,6 +7,7 @@
{ {
imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/kernel.nix
]; ];
custom = { custom = {
@@ -48,6 +49,7 @@
sddm.enable = true; sddm.enable = true;
nightlight.enable = true; nightlight.enable = true;
i3.enable = true; i3.enable = true;
xfce.enable = true;
shared.enable = true; shared.enable = true;
}; };
}; };
@@ -59,7 +61,8 @@
systemd.services.start-vm = { systemd.services.start-vm = {
description = "Start VM"; description = "Start VM";
wants = [ "network-online.target" ]; wants = [ "network-online.target" ];
after = [ "network.target" "network-online.target" "vmware-networks.service" ]; after =
[ "network.target" "network-online.target" "vmware-networks.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
@@ -90,11 +93,6 @@
boot.kernelModules = [ "zenpower" ]; boot.kernelModules = [ "zenpower" ];
boot.blacklistedKernelModules = [ "k10temp" ]; boot.blacklistedKernelModules = [ "k10temp" ];
services.xserver.desktopManager = {
xfce.enable = true;
xterm.enable = false;
};
networking.hostName = "amd-server"; # Define your hostname. networking.hostName = "amd-server"; # Define your hostname.
nixpkgs.config.permittedInsecurePackages = nixpkgs.config.permittedInsecurePackages =
[ "electron-28.3.3" "electron-27.3.11" ]; [ "electron-28.3.3" "electron-27.3.11" ];

View File

@@ -77,6 +77,10 @@
stylix.enable = true; stylix.enable = true;
}; };
}; };
services.ollama = {
enable = true;
acceleration = "cuda";
};
#nvidida drivers fail to build on new kernel https://github.com/NixOS/nixpkgs/issues/357643 #nvidida drivers fail to build on new kernel https://github.com/NixOS/nixpkgs/issues/357643
boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_6_11; boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_6_11;
@@ -114,7 +118,6 @@
EndSection EndSection
''; '';
#zenpower for ryzen #zenpower for ryzen
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
boot.kernelModules = [ "zenpower" ]; boot.kernelModules = [ "zenpower" ];