Merge branch 'master' of ssh://ssh.nx2.site:50022/nx2/dotfiles
This commit is contained in:
@@ -17,11 +17,9 @@ in
|
||||
|
||||
environment.systemPackages = with pkgs; [ sbctl ];
|
||||
boot = {
|
||||
lanzaboote =
|
||||
let
|
||||
lanzaboote = let
|
||||
windows-efi-shell-fs-alias = "HD0a65535a2";
|
||||
in
|
||||
{
|
||||
in {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
package = lib.mkForce (pkgs.writeShellApplication {
|
||||
@@ -105,7 +103,7 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
kernelPackages = pkgs-unstable.linuxPackages_6_10;
|
||||
kernelPackages = pkgs-unstable.linuxPackages_6_11;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1'';
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
newcomputermodern
|
||||
atkinson-hyperlegible
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
lib.mkIf (host == "NxNORTH" || host == "NxACE")
|
||||
{
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
gamemode = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
} else {};
|
||||
|
||||
hardware.opengl.extraPackages = if host == "NxXPS" then with pkgs; [
|
||||
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.05") then vaapiIntel else intel-vaapi-driver)
|
||||
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") then vaapiIntel else intel-vaapi-driver)
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
] else [];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, lib, host, ... }:
|
||||
{ pkgs, lib, host, ... }:
|
||||
lib.mkIf (host != "NxACE")
|
||||
{
|
||||
systemd.timers."health_reminder" = {
|
||||
@@ -11,11 +11,10 @@ lib.mkIf (host != "NxACE")
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."health_reminder" =
|
||||
let
|
||||
hm =
|
||||
let p = /*python*/ ''
|
||||
#!${pkgs.python3}/bin/python3
|
||||
systemd.services."health_reminder" = let
|
||||
hm = pkgs.writers.writePython3Bin "health_reminder" {
|
||||
flakeIgnore = [ "E302" "E305" "E226" "E501" ];
|
||||
} /*python*/ ''
|
||||
import random
|
||||
import re
|
||||
|
||||
@@ -27,33 +26,29 @@ lib.mkIf (host != "NxACE")
|
||||
|
||||
def __str__(self):
|
||||
try:
|
||||
choice = random.choice(self.options)
|
||||
choice = random.choice(self.options)
|
||||
except IndexError:
|
||||
choice = ""
|
||||
|
||||
|
||||
action = re.sub("%o", choice, self.action)
|
||||
return action
|
||||
|
||||
actions = [
|
||||
Action("look away for %o Seconds!",300, ["10", "15"] ),
|
||||
Action("Posture Check!", 90 ),
|
||||
Action("Do %o Biceps curls!", 5, ["50", "100", "150"] ),
|
||||
Action("Do %o Shourlder thingees", 5, ["40 + 40", "50", "60"]),
|
||||
Action("Plank for %o senonds!", 5, ["60", "60", "70"] ),
|
||||
Action("Strech your upper body!", 20 ),
|
||||
Action("Strech your core!", 10 ),
|
||||
Action("Strech your legs!", 10 ),
|
||||
Action("Make Tea!", 5 ),
|
||||
Action("Touch Grass!", 5 )
|
||||
Action(action="look away for %o Seconds!", likelihood=300, options=["10", "15"]),
|
||||
Action(action="Posture Check!", likelihood=300),
|
||||
Action(action="Strech your upper body!", likelihood=20),
|
||||
Action(action="Strech your core!", likelihood=10),
|
||||
Action(action="Strech your legs!", likelihood=10),
|
||||
Action(action="Strech your arms/hands!", likelihood=10),
|
||||
Action(action="Make Tea!", likelihood=5),
|
||||
Action(action="说现在中文的时间!", likelihood=2),
|
||||
]
|
||||
|
||||
total_likelihood = sum(a.likelihood for a in actions)
|
||||
random_action = random.choices(actions, [a.likelihood for a in actions], k=1)[0]
|
||||
print(random_action)
|
||||
'';
|
||||
in pkgs.writeScriptBin "health_reminder" p;
|
||||
in
|
||||
{
|
||||
in {
|
||||
script = ''
|
||||
set -eu
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
|
||||
|
||||
@@ -57,11 +57,10 @@ lib.mkIf nvidia.enable
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta; };
|
||||
opengl = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
graphics = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ in {
|
||||
package = p;
|
||||
enable = true;
|
||||
acceleration = lib.mkIf nvidia.enable "cuda";
|
||||
listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434";
|
||||
host = if host == "NxACE" then "0.0.0.0" else "127.0.0.1";
|
||||
port = 11434;
|
||||
environmentVariables = {
|
||||
OLLAMA_ORIGINS = "*";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user