Compare commits

...

7 Commits

Author SHA1 Message Date
Giulio De Pasquale
2758be3937 Merge branch 'master' of ssh://git.giugl.io/peperunas/nixos 2024-12-11 14:22:22 +00:00
Giulio De Pasquale
832761b32f feat(flake.nix, homeassistant.nix): enable CUDA for ctranslate2 and set device to cuda 2024-12-11 00:49:55 +00:00
Giulio De Pasquale
0f18c6ec87 feat(homeassistant.nix): include themes directory for frontend 2024-12-11 00:11:48 +00:00
Giulio De Pasquale
4f299b0ca3 feat(flake): add cachix overlay to extOverlays 2024-12-10 23:59:28 +00:00
Giulio De Pasquale
44f757f535 feat(cachix): add cachix configuration files and update host.nix
- Added `cachix.nix` for configuring Cachix substituters
- Added `cachix/nix-community.nix` for Nix Community Cachix settings
- Updated `lib/host.nix` to include `pkgs.nixosModules.cachixConfig` in the list of NixOS modules
2024-12-10 23:58:47 +00:00
Giulio De Pasquale
2f23f3db9e fix(radarr.nix): add "lan" to dnsInterfaces 2024-12-10 21:58:07 +00:00
Giulio De Pasquale
e910399750 feat(homeassistant.nix): add new integrations and packages 2024-12-10 21:37:02 +00:00
6 changed files with 49 additions and 3 deletions

13
cachix.nix Normal file
View File

@ -0,0 +1,13 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.settings.substituters = ["https://cache.nixos.org/"];
}

13
cachix/nix-community.nix Normal file
View File

@ -0,0 +1,13 @@
{
nix = {
settings = {
substituters = [
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
};
}

View File

@ -40,8 +40,16 @@
allowUnfree = true; allowUnfree = true;
}; };
cachixOverlay = final: prev: {
nixosModules = (prev.nixosModules or { }) // {
cachixConfig = import ./cachix.nix;
};
};
extOverlays = [ extOverlays = [
(nvidia-patch.overlays.default) (nvidia-patch.overlays.default)
cachixOverlay
]; ];
importNixpkgs = { flake }: importNixpkgs = { flake }:
@ -67,7 +75,14 @@
in in
import nixpkgs { import nixpkgs {
inherit system config; inherit system config;
overlays = additionalOverlays ++ extOverlays; overlays = additionalOverlays ++ extOverlays ++ [
(final: prev: {
ctranslate2 = prev.ctranslate2.override {
withCUDA = true;
withCuDNN = true;
};
})
];
}; };
wrapUtils = { pkgs }: wrapUtils = { pkgs }:

View File

@ -15,7 +15,7 @@ in
enable = true; enable = true;
uri = "tcp://127.0.0.1:${toString whisperPort}"; uri = "tcp://127.0.0.1:${toString whisperPort}";
model = "large-v3"; model = "large-v3";
device = "auto"; device = "cuda";
language = "en"; language = "en";
}; };
}; };
@ -24,6 +24,7 @@ in
enable = true; enable = true;
uri = "tcp://127.0.0.1:${toString piperPort}"; uri = "tcp://127.0.0.1:${toString piperPort}";
voice = "en-us-ryan-medium"; voice = "en-us-ryan-medium";
lengthScale = 0.63;
}; };
}; };
}; };
@ -44,6 +45,7 @@ in
}; };
default_config = { }; default_config = { };
automation = "!include automations.yaml"; automation = "!include automations.yaml";
frontend.themes = "!include_dir_merge_named themes";
binary_sensor = [{ binary_sensor = [{
platform = "template"; platform = "template";
sensors = { sensors = {
@ -1101,6 +1103,8 @@ in
"mqtt_json" "mqtt_json"
"mqtt_room" "mqtt_room"
"mqtt_statestream" "mqtt_statestream"
"github"
"webostv"
]; ];
extraPackages = python3Packages: with python3Packages; [ extraPackages = python3Packages: with python3Packages; [
pkgs.openai-whisper pkgs.openai-whisper

View File

@ -11,7 +11,7 @@ in
}; };
architect.vhost.${domain} = with config.architect.networks; { architect.vhost.${domain} = with config.architect.networks; {
dnsInterfaces = [ "tailscale" ]; dnsInterfaces = [ "tailscale" "lan" ];
locations."/" = { locations."/" = {
port = 7878; port = 7878;
allowLan = true; allowLan = true;

View File

@ -42,6 +42,7 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
../hosts/${name}/default.nix ../hosts/${name}/default.nix
pkgs.nixosModules.cachixConfig
]; ];
}; };
} }