feat: add home-assistant-custom-lovelace-modules/bar-card
This commit is contained in:
parent
0660c722cf
commit
86bb6fb118
6 changed files with 76 additions and 65 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.pre-commit-config.yaml
|
||||
.direnv
|
||||
result
|
||||
|
|
78
flake.lock
generated
78
flake.lock
generated
|
@ -4,15 +4,14 @@
|
|||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701787589,
|
||||
"narHash": "sha256-ce+oQR4Zq9VOsLoh9bZT8Ip9PaMLcjjBUHVPzW5d7Cw=",
|
||||
"lastModified": 1735644329,
|
||||
"narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "44ddedcbcfc2d52a76b64fb6122f209881bd3e1e",
|
||||
"rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -24,11 +23,11 @@
|
|||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -39,14 +38,14 @@
|
|||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -63,11 +62,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -91,11 +90,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1703013332,
|
||||
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||
"lastModified": 1737885589,
|
||||
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
|
||||
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -105,40 +104,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1685801374,
|
||||
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702456155,
|
||||
"narHash": "sha256-I2XhXGAecdGlqi6hPWYT83AQtMgL+aa3ulA85RAEgOk=",
|
||||
"lastModified": 1737465171,
|
||||
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "007a45d064c1c32d04e1b8a0de5ef00984c419bc",
|
||||
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -170,21 +149,6 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -36,7 +35,7 @@
|
|||
nixosModules.default = self.nixosModules.nixos-extra-modules;
|
||||
homeManagerModules.nixos-extra-modules = import ./hm-modules;
|
||||
homeManagerModules.default = self.homeManagerModules.nixos-extra-modules;
|
||||
overlays.nixos-extra-modules = import ./lib inputs;
|
||||
overlays.nixos-extra-modules = import ./overlay.nix inputs;
|
||||
overlays.default = self.overlays.nixos-extra-modules;
|
||||
}
|
||||
// flake-utils.lib.eachDefaultSystem (system: rec {
|
||||
|
@ -44,6 +43,7 @@
|
|||
inherit system;
|
||||
overlays = [
|
||||
devshell.overlays.default
|
||||
self.overlays.default
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -2,17 +2,20 @@ inputs: final: prev:
|
|||
prev.lib.composeManyExtensions (
|
||||
# Order is important to allow using prev instead of final in more places to
|
||||
# speed up evaluation.
|
||||
map (x: import x inputs) [
|
||||
(map (x: import x inputs) [
|
||||
# No dependencies
|
||||
./types.nix
|
||||
./lib/types.nix
|
||||
# No dependencies
|
||||
./misc.nix
|
||||
./lib/misc.nix
|
||||
# No dependencies
|
||||
./disko.nix
|
||||
./lib/disko.nix
|
||||
# Requires misc
|
||||
./net.nix
|
||||
./lib/net.nix
|
||||
# Requires misc, types
|
||||
./wireguard.nix
|
||||
./lib/wireguard.nix
|
||||
])
|
||||
++ [
|
||||
(import ./pkgs)
|
||||
]
|
||||
)
|
||||
final
|
7
pkgs/default.nix
Normal file
7
pkgs/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
_final: prev: {
|
||||
home-assistant-custom-lovelace-modules =
|
||||
prev.home-assistant-custom-lovelace-modules
|
||||
// {
|
||||
bar-card = prev.callPackage ./home-assistant/bar-card.nix {};
|
||||
};
|
||||
}
|
36
pkgs/home-assistant/bar-card.nix
Normal file
36
pkgs/home-assistant/bar-card.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
fetchYarnDeps,
|
||||
yarnConfigHook,
|
||||
yarnBuildHook,
|
||||
nodejs,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "bar-card";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "patrickdag";
|
||||
repo = "bar-card";
|
||||
rev = "ad9b1e83f6cf75b699911ebc34a4782c707f254f";
|
||||
hash = "sha256-1dX6HErKfhMgu9YQATsUk9jPFbCRRoQLhYISM+evVQM=";
|
||||
};
|
||||
offlineCache = fetchYarnDeps {
|
||||
inherit src;
|
||||
hash = "sha256-f/kFCxIinW/9Po0pZM9V8i0ySqiGqz1rmEEFSvw1Gk4=";
|
||||
};
|
||||
nativeBuildInputs = [
|
||||
yarnConfigHook
|
||||
yarnBuildHook
|
||||
nodejs
|
||||
];
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp dist/* $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue