Nix format
This commit is contained in:
parent
8fdef84eb2
commit
f18cd49b01
7 changed files with 70 additions and 64 deletions
15
flake.nix
15
flake.nix
|
@ -61,7 +61,10 @@
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
smolboi = nixpkgs.lib.nixosSystem {
|
smolboi = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; inherit pkgs-unstable; };
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit pkgs-unstable;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
stylix.nixosModules.stylix
|
stylix.nixosModules.stylix
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
|
@ -82,7 +85,10 @@
|
||||||
};
|
};
|
||||||
zeus = nixpkgs.lib.nixosSystem {
|
zeus = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; inherit pkgs-unstable; };
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit pkgs-unstable;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
./systems/zeus/configuration.nix
|
./systems/zeus/configuration.nix
|
||||||
|
@ -95,7 +101,10 @@
|
||||||
};
|
};
|
||||||
orangepihole = nixpkgs.lib.nixosSystem {
|
orangepihole = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = { inherit inputs; inherit pkgs-unstable; };
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit pkgs-unstable;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
./systems/orangepihole/configuration.nix
|
./systems/orangepihole/configuration.nix
|
||||||
|
|
|
@ -2,29 +2,28 @@
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkEnableOption mkOption types;
|
inherit (lib) mkIf mkEnableOption mkOption types;
|
||||||
cfg = config.services.zwave-js-ui;
|
cfg = config.services.zwave-js-ui;
|
||||||
in
|
in {
|
||||||
{
|
options.services.zwave-js-ui = {
|
||||||
options.services.zwave-js-ui = {
|
enable = mkEnableOption "zwave-js-ui";
|
||||||
enable = mkEnableOption "zwave-js-ui";
|
store = mkOption {
|
||||||
store = mkOption {
|
type = types.path;
|
||||||
type = types.path;
|
default = "/var/lib/zwave-js-ui";
|
||||||
default = "/var/lib/zwave-js-ui";
|
description = ''
|
||||||
description = ''
|
Where zwave-js-ui information will be stored
|
||||||
Where zwave-js-ui information will be stored
|
'';
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
};
|
||||||
assertions = [{
|
config = mkIf cfg.enable {
|
||||||
assertion = !config.services.zwave-js.enable;
|
assertions = [{
|
||||||
message = "zwave-js-ui conflicts with zwave-js";
|
assertion = !config.services.zwave-js.enable;
|
||||||
}];
|
message = "zwave-js-ui conflicts with zwave-js";
|
||||||
systemd.services.zwave-js-ui = {
|
}];
|
||||||
environment = {
|
systemd.services.zwave-js-ui = {
|
||||||
STORE_DIR = cfg.store;
|
environment = {
|
||||||
ZWAVEJS_EXTERNAL_CONFIG = "${cfg.store}/.config-db";
|
STORE_DIR = cfg.store;
|
||||||
};
|
ZWAVEJS_EXTERNAL_CONFIG = "${cfg.store}/.config-db";
|
||||||
script = "${pkgs.zwave-js-ui}/bin/zwave-js-ui";
|
|
||||||
};
|
};
|
||||||
|
script = "${pkgs.zwave-js-ui}/bin/zwave-js-ui";
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
os = "linux";
|
os = "linux";
|
||||||
arch = "x64";
|
arch = "x64";
|
||||||
hash = "sha256:04vg1s86krg7baifcpnqr5zg6jd6nfw0jhjsq09zzpxwg5skxlf7";
|
hash = "sha256:04vg1s86krg7baifcpnqr5zg6jd6nfw0jhjsq09zzpxwg5skxlf7";
|
||||||
version = "7.2.1";
|
version = "7.2.1";
|
||||||
in
|
in {
|
||||||
{
|
recyclarr = prev.recyclarr.overrideAttrs (old: {
|
||||||
recyclarr = prev.recyclarr.overrideAttrs (old: {
|
inherit version;
|
||||||
inherit version;
|
name = "recyclarr-${version}";
|
||||||
name = "recyclarr-${version}";
|
src = prev.fetchurl {
|
||||||
src = prev.fetchurl {
|
url =
|
||||||
url = "https://github.com/recyclarr/recyclarr/releases/download/v${version}/recyclarr-${os}-${arch}.tar.xz";
|
"https://github.com/recyclarr/recyclarr/releases/download/v${version}/recyclarr-${os}-${arch}.tar.xz";
|
||||||
inherit hash;
|
inherit hash;
|
||||||
};
|
};
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/recyclarr \
|
wrapProgram $out/bin/recyclarr \
|
||||||
--prefix PATH : ${prev.lib.makeBinPath [prev.git]} \
|
--prefix PATH : ${prev.lib.makeBinPath [ prev.git ]} \
|
||||||
--prefix LD_LIBRARY_PATH : ${prev.lib.makeLibraryPath [prev.icu prev.openssl prev.zlib]}
|
--prefix LD_LIBRARY_PATH : ${
|
||||||
'';
|
prev.lib.makeLibraryPath [ prev.icu prev.openssl prev.zlib ]
|
||||||
});
|
}
|
||||||
}
|
'';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
final: prev:
|
final: prev: { zwave-js-ui = (prev.callPackage ../pkgs/zwave-js-ui.nix { }); }
|
||||||
{
|
|
||||||
zwave-js-ui = ( prev.callPackage ../pkgs/zwave-js-ui.nix {} );
|
|
||||||
}
|
|
||||||
|
|
|
@ -16,6 +16,6 @@ buildNpmPackage rec {
|
||||||
description = "Full featured Z-Wave Control Panel and MQTT Gateway.";
|
description = "Full featured Z-Wave Control Panel and MQTT Gateway.";
|
||||||
homepage = "https://zwave-js.github.io/zwave-js-ui/";
|
homepage = "https://zwave-js.github.io/zwave-js-ui/";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [cdombroski];
|
maintainers = with lib.maintainers; [ cdombroski ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,12 +37,8 @@
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
permittedInsecurePackages = [ "electron-25.9.0" "nix-2.16.2" ];
|
permittedInsecurePackages = [ "electron-25.9.0" "nix-2.16.2" ];
|
||||||
packageOverrides = pkgs: {
|
packageOverrides = pkgs: {
|
||||||
steam = pkgs.steam.override {
|
steam =
|
||||||
extraPkgs = pkgs:
|
pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ winetricks ]; };
|
||||||
with pkgs; [
|
|
||||||
winetricks
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
secrets."tailscale/authkey" = {};
|
secrets."tailscale/authkey" = { };
|
||||||
templates."docker.env".content = ''
|
templates."docker.env".content = ''
|
||||||
TAILSCALE_AUTHKEY=${config.sops.placeholder."tailscale/authkey"}
|
TAILSCALE_AUTHKEY=${config.sops.placeholder."tailscale/authkey"}
|
||||||
'';
|
'';
|
||||||
|
@ -132,13 +132,17 @@
|
||||||
};
|
};
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
image = "lscr.io/linuxserver/jellyfin:latest";
|
image = "lscr.io/linuxserver/jellyfin:latest";
|
||||||
volumes = [ "jellyfin-config:/config" "/video-data/media:/data/media" "jellyfin-tailscale:/var/lib/tailscale"];
|
volumes = [
|
||||||
|
"jellyfin-config:/config"
|
||||||
|
"/video-data/media:/data/media"
|
||||||
|
"jellyfin-tailscale:/var/lib/tailscale"
|
||||||
|
];
|
||||||
environment = {
|
environment = {
|
||||||
DOCKER_MODS="ghcr.io/tailscale-dev/docker-mod:main";
|
DOCKER_MODS = "ghcr.io/tailscale-dev/docker-mod:main";
|
||||||
TAILSCALE_STATE_DIR="/var/lib/tailscale";
|
TAILSCALE_STATE_DIR = "/var/lib/tailscale";
|
||||||
TAILSCALE_HOSTNAME="jellyfin";
|
TAILSCALE_HOSTNAME = "jellyfin";
|
||||||
TAILSCALE_SERVE_PORT="8096";
|
TAILSCALE_SERVE_PORT = "8096";
|
||||||
TAILSCALE_SERVE_MODE="http";
|
TAILSCALE_SERVE_MODE = "http";
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
};
|
||||||
environmentFiles = [ config.sops.templates."docker.env".path ];
|
environmentFiles = [ config.sops.templates."docker.env".path ];
|
||||||
|
@ -151,7 +155,7 @@
|
||||||
imageFile = pkgs.dockerTools.buildLayeredImage {
|
imageFile = pkgs.dockerTools.buildLayeredImage {
|
||||||
name = "my-zwave-js-ui";
|
name = "my-zwave-js-ui";
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
contents = with pkgs; [cacert];
|
contents = with pkgs; [ cacert ];
|
||||||
config.Cmd = [ "${pkgs.zwave-js-ui}/bin/zwave-js-ui" ];
|
config.Cmd = [ "${pkgs.zwave-js-ui}/bin/zwave-js-ui" ];
|
||||||
};
|
};
|
||||||
volumes = [ "zwave-config:/usr/src/app/store" ];
|
volumes = [ "zwave-config:/usr/src/app/store" ];
|
||||||
|
@ -165,8 +169,7 @@
|
||||||
swag_url = "zwave.icanttype.org";
|
swag_url = "zwave.icanttype.org";
|
||||||
swag_port = "8091";
|
swag_port = "8091";
|
||||||
};
|
};
|
||||||
extraOptions =
|
extraOptions = [ "--network=www" "--device=/dev/ttyACM0:/dev/zwave" ];
|
||||||
[ "--network=www" "--device=/dev/ttyACM0:/dev/zwave" ];
|
|
||||||
};
|
};
|
||||||
homeassistant = {
|
homeassistant = {
|
||||||
image = "lscr.io/linuxserver/homeassistant:latest";
|
image = "lscr.io/linuxserver/homeassistant:latest";
|
||||||
|
|
Loading…
Reference in a new issue