1
1
Fork 1
mirror of https://github.com/oddlama/nixos-extra-modules.git synced 2025-10-10 22:00:39 +02:00

feat: add home-assistant-custom-lovelace-modules/bar-card

This commit is contained in:
Patrick 2025-01-28 21:01:26 +01:00
parent 0660c722cf
commit 86bb6fb118
No known key found for this signature in database
GPG key ID: 451F95EFB8BECD0F
6 changed files with 76 additions and 65 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.pre-commit-config.yaml .pre-commit-config.yaml
.direnv .direnv
result

78
flake.lock generated
View file

@ -4,15 +4,14 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701787589, "lastModified": 1735644329,
"narHash": "sha256-ce+oQR4Zq9VOsLoh9bZT8Ip9PaMLcjjBUHVPzW5d7Cw=", "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "44ddedcbcfc2d52a76b64fb6122f209881bd3e1e", "rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -24,11 +23,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1696426674,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,14 +38,14 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1731533236,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -63,11 +62,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1660459072, "lastModified": 1709087332,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -91,11 +90,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1703013332, "lastModified": 1737885589,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -105,40 +104,20 @@
"type": "github" "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": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": [
"flake-utils"
],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1702456155, "lastModified": 1737465171,
"narHash": "sha256-I2XhXGAecdGlqi6hPWYT83AQtMgL+aa3ulA85RAEgOk=", "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "007a45d064c1c32d04e1b8a0de5ef00984c419bc", "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -170,21 +149,6 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View file

@ -19,7 +19,6 @@
pre-commit-hooks = { pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix"; url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
}; };
}; };
@ -36,7 +35,7 @@
nixosModules.default = self.nixosModules.nixos-extra-modules; nixosModules.default = self.nixosModules.nixos-extra-modules;
homeManagerModules.nixos-extra-modules = import ./hm-modules; homeManagerModules.nixos-extra-modules = import ./hm-modules;
homeManagerModules.default = self.homeManagerModules.nixos-extra-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; overlays.default = self.overlays.nixos-extra-modules;
} }
// flake-utils.lib.eachDefaultSystem (system: rec { // flake-utils.lib.eachDefaultSystem (system: rec {
@ -44,6 +43,7 @@
inherit system; inherit system;
overlays = [ overlays = [
devshell.overlays.default devshell.overlays.default
self.overlays.default
]; ];
}; };

View file

@ -2,17 +2,20 @@ inputs: final: prev:
prev.lib.composeManyExtensions ( prev.lib.composeManyExtensions (
# Order is important to allow using prev instead of final in more places to # Order is important to allow using prev instead of final in more places to
# speed up evaluation. # speed up evaluation.
map (x: import x inputs) [ (map (x: import x inputs) [
# No dependencies # No dependencies
./types.nix ./lib/types.nix
# No dependencies # No dependencies
./misc.nix ./lib/misc.nix
# No dependencies # No dependencies
./disko.nix ./lib/disko.nix
# Requires misc # Requires misc
./net.nix ./lib/net.nix
# Requires misc, types # Requires misc, types
./wireguard.nix ./lib/wireguard.nix
])
++ [
(import ./pkgs)
] ]
) )
final final

7
pkgs/default.nix Normal file
View 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 {};
};
}

View 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
'';
}