formatting and hooks

This commit is contained in:
ari committed 2026-04-13 16:39:18 -04:00
1 parent 7d5ddd9013
commit 2d956525cc
15 files changed
+146 -65

No files matched your search

+1 -2
View File
@@ -12,8 +12,7 @@ result.diff
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml
# nix build
result
+1
View File
@@ -0,0 +1 @@
/nix/store/3alj2xk8hgfqh6rrdh6bvfmmbzh9w92q-pre-commit-config.json
Generated
+60
View File
@@ -212,6 +212,22 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -270,6 +286,28 @@
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1775585728,
"narHash": "sha256-8Psjt+TWvE4thRKktJsXfR6PA/fWWsZ04DVaY6PUhr4=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "580633fa3fe5fc0379905986543fd7495481913d",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"git-hooks-nix": {
"inputs": {
"flake-compat": "flake-compat",
@@ -296,6 +334,27 @@
"url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
@@ -801,6 +860,7 @@
"inputs": {
"determinate": "determinate",
"dms": "dms",
"git-hooks": "git-hooks",
"home-manager": "home-manager",
"hyprlauncher": "hyprlauncher",
"nix-darwin": "nix-darwin",
+19 -6
View File
@@ -3,6 +3,11 @@
# Hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
systems.url = "github:nix-systems/default";
# Pre-commit hooks
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nixpkgs
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";
@@ -46,6 +51,7 @@
, stylix
, hyprlauncher
, dms
, git-hooks
,
}:
let
@@ -86,6 +92,12 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pre-commit-check = git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
};
};
in
{
default = pkgs.mkShell {
@@ -97,6 +109,7 @@
];
shellHook = ''
export PATH=$PATH:$(pwd)/bin
${pre-commit-check.shellHook}
'';
};
}
@@ -183,12 +196,12 @@
./hosts/hl-terra1.hardware-configuration.nix
];
};
iso = lib.makeIso {
hostName = "skygnix";
configuration = [
./hosts/iso.nix
];
};
iso = lib.makeIso {
hostName = "skygnix";
configuration = [
./hosts/iso.nix
];
};
};
};
}
+1
View File
@@ -193,6 +193,7 @@ in
code-cursor-fhs
nix-prefetch
orca-slicer
devcontainer
# Run macos apps
darling-dmg
+16 -9
View File
@@ -2,7 +2,8 @@
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "ohci_pci" "ehci_pci" "pata_atiixp" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
@@ -10,42 +11,48 @@
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.loader.grub = {
enable = true;
device = "/dev/sdb"; # install GRUB to MBR
enable = true;
device = "/dev/sdb"; # install GRUB to MBR
efiSupport = false;
};
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
{
device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
fsType = "btrfs";
options = [ "subvol=@root" "compress=zstd" "noatime" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ccc80fd2-b38b-412b-9988-12a3194a5b57";
{
device = "/dev/disk/by-uuid/ccc80fd2-b38b-412b-9988-12a3194a5b57";
fsType = "ext4";
};
fileSystems."/var" =
{ device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
{
device = "/dev/disk/by-uuid/5bf4a352-412f-47e1-9455-68f3aa629722";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@var" "noatime" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/8cd6e560-4db9-4cf1-8048-27a7c6308965";
{
device = "/dev/disk/by-uuid/8cd6e560-4db9-4cf1-8048-27a7c6308965";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@nix" "noatime" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/6f4b2adc-5818-41ea-a4ba-720fb96b8f98";
{
device = "/dev/disk/by-uuid/6f4b2adc-5818-41ea-a4ba-720fb96b8f98";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@home" "noatime" ];
};
fileSystems."/data/fourTerra" =
{ device = "/dev/sde1";
{
device = "/dev/sde1";
fsType = "btrfs";
options = [ "compress=zstd" "subvol=@data" "noatime" ];
};
+7 -7
View File
@@ -1,12 +1,12 @@
{ config, pkgs, ... }:
let
ports = {
nixServe = 5000;
lockdPort = 4001;
mountdPort = 4002;
statdPort = 4000;
};
openPorts = builtins.attrValues ports;
ports = {
nixServe = 5000;
lockdPort = 4001;
mountdPort = 4002;
statdPort = 4000;
};
openPorts = builtins.attrValues ports;
in
{
skyg = {
+8 -8
View File
@@ -11,7 +11,7 @@ let
comfyui = 8188;
};
openPorts = [
ports.ollama
ports.ollama
ports.tabby
ports.fastWhisper
ports.piper
@@ -143,11 +143,11 @@ in
environmentVariables = {
# Stability fix — SDMA is buggy on Strix Halo unified memory
HSA_ENABLE_SDMA = "0";
HSA_ENABLE_SDMA = "0";
# Flash attention for better performance
OLLAMA_FLASH_ATTENTION = "1";
# Keep models loaded
OLLAMA_KEEP_ALIVE = "24h";
OLLAMA_KEEP_ALIVE = "24h";
};
};
hardware.graphics.enable = true;
@@ -175,11 +175,11 @@ in
streaming = true;
};
faster-whisper.servers.todd = {
enable = true;
uri = "tcp://0.0.0.0:${toString ports.fastWhisper}";
model = "tiny.en";
language = "en";
device = "auto";
enable = true;
uri = "tcp://0.0.0.0:${toString ports.fastWhisper}";
model = "tiny.en";
language = "en";
device = "auto";
};
};
virtualisation.docker = {
+1 -1
View File
@@ -53,7 +53,7 @@ in
openFirewall = true;
port = ports.audiobookshelf;
configDir = "/mnt/Data/audiobookshelf/config";
metadtaDir = "/mnt/Data/audiobookshelf/metadata";
metadataDir = "/mnt/Data/audiobookshelf/metadata";
};
};
services.dockerRegistry = {
+1 -1
View File
@@ -1,6 +1,6 @@
{ pkgs, ... }:
let
openPorts = [
openPorts = [
# nfs
111
2049
+2 -2
View File
@@ -7,7 +7,7 @@
# Networking
networking.networkmanager.enable = true;
# Skyg Settings
# Skyg Settings
skyg = {
user.enable = true;
nixos.common = {
@@ -26,7 +26,7 @@
environment.systemPackages = with pkgs; [
# Disk tools
parted
gparted # GUI partitioner
gparted # GUI partitioner
cryptsetup
btrfs-progs
dosfstools
+6 -6
View File
@@ -22,11 +22,11 @@ let
}
);
osModules = [
determinate.nixosModules.default
stylix.nixosModules.stylix
home-manager.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
specialArgs.dms.nixosModules.dank-material-shell
determinate.nixosModules.default
stylix.nixosModules.stylix
home-manager.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
specialArgs.dms.nixosModules.dank-material-shell
];
# makeHomeManagerUsers =
# { modules ? [ ]
@@ -96,7 +96,7 @@ in
hostName
systemStateVersion
homeManagerVersion
;
;
})
] ++ configuration;
};
+19 -19
View File
@@ -4,27 +4,27 @@
}:
let
cfg = config.skyg.networkDrives;
makeCommonOption = {
defaultHost,
enabledByDefault ? true
} : lib.mkOption {
type = lib.types.submodule {
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = enabledByDefault;
};
host = lib.mkOption {
type = lib.types.str;
default = defaultHost;
makeCommonOption =
{ defaultHost
, enabledByDefault ? true
}: lib.mkOption {
type = lib.types.submodule {
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = enabledByDefault;
};
host = lib.mkOption {
type = lib.types.str;
default = defaultHost;
};
};
};
default = {
enable = enabledByDefault;
host = defaultHost;
};
};
default = {
enable = enabledByDefault;
host = defaultHost;
};
};
in
{
options = {
@@ -77,7 +77,7 @@ in
};
fileSystems."/homelab/bigbox2/data/fourTerra" = lib.mkIf cfg.bigBox2.enable {
device = "${cfg.terra1.host}:/data/fourTerra";
device = "${cfg.bigBox2.host}:/data/fourTerra";
fsType = "nfs";
options = cfg.options;
};
+2 -2
View File
@@ -58,8 +58,8 @@
services.cron = {
enable = true;
systemCronJobs = [
"* 23 * * * root nix-collect-garbage --delete-older-than 7d"
"* 23 * * * ${config.skyg.user.name} nix-collect-garbage --delete-older-than 7d"
"0 23 * * * root nix-collect-garbage --delete-older-than 7d"
"0 23 * * * ${config.skyg.user.name} nix-collect-garbage --delete-older-than 7d"
];
};
}
@@ -23,7 +23,7 @@ in {
type = types.str;
};
metadtaDir = mkOption {
metadataDir = mkOption {
description =
"Path to Audiobookshelf config folder";
type = types.str;
@@ -80,7 +80,7 @@ in {
ExecStart =
"${cfg.package}/bin/audiobookshelf --host ${cfg.host} --port ${
toString cfg.port
} --config ${cfg.configDir} --metadata ${cfg.metadtaDir}";
} --config ${cfg.configDir} --metadata ${cfg.metadataDir}";
Restart = "on-failure";
};
};