fix patchNixpkgs function
This commit is contained in:
parent
91580421be
commit
963cd58c86
4 changed files with 15 additions and 13 deletions
|
|
@ -29,7 +29,7 @@ first time.
|
||||||
### Deploy with nixos-rebuild {#demo-homeassistant-deploy-nixosrebuild}
|
### Deploy with nixos-rebuild {#demo-homeassistant-deploy-nixosrebuild}
|
||||||
|
|
||||||
Assuming your current working directory is the one where this Readme file is located, the one-liner
|
Assuming your current working directory is the one where this Readme file is located, the one-liner
|
||||||
command which builds and starts the VM configured to run Self Host Blocks' Nextcloud is:
|
command which builds and starts the VM configured to run Self Host Blocks' Home-Assistant is:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
rm nixos.qcow2; \
|
rm nixos.qcow2; \
|
||||||
|
|
@ -42,7 +42,7 @@ This will deploy the `basic` demo. If you want to deploy the `ldap` demo, use th
|
||||||
uris.
|
uris.
|
||||||
|
|
||||||
You can even test the demos from any directory without cloning this repository by using the GitHub
|
You can even test the demos from any directory without cloning this repository by using the GitHub
|
||||||
uri like `github:ibizaman/selfhostblocks?path=demo/nextcloud`
|
uri like `github:ibizaman/selfhostblocks?path=demo/home-assistant`
|
||||||
|
|
||||||
It is very important to remove leftover `nixos.qcow2` files, if any.
|
It is very important to remove leftover `nixos.qcow2` files, if any.
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ ssh -F ssh_config example
|
||||||
<!--
|
<!--
|
||||||
:::: {.note}
|
:::: {.note}
|
||||||
This section corresponds to the `basic` section of the [Home Assistant
|
This section corresponds to the `basic` section of the [Home Assistant
|
||||||
manual](services-nextcloud.html#services-homeassistant-server-usage-basic).
|
manual](services-homeassitant.html#services-homeassistant-server-usage-basic).
|
||||||
::::
|
::::
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ And that's the end of the demo
|
||||||
<!--
|
<!--
|
||||||
:::: {.note}
|
:::: {.note}
|
||||||
This section corresponds to the `ldap` section of the [Home Assistant
|
This section corresponds to the `ldap` section of the [Home Assistant
|
||||||
manual](services-nextcloud.html#services-homeassistant-server-usage-ldap).
|
manual](services-homeassistant.html#services-homeassistant-server-usage-ldap).
|
||||||
::::
|
::::
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
nixpkgs' = selfhostblocks.lib.${system}.patchedNixpkgs;
|
nixpkgs' = selfhostblocks.lib.${system}.patchedNixpkgs;
|
||||||
nixosSystem' = import "${nixpkgs'}/nixos/lib/eval-config.nix";
|
|
||||||
|
|
||||||
basic = { config, ... }: {
|
basic = { config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -93,7 +92,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
basic = nixosSystem' {
|
basic = nixpkgs'.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
basic
|
basic
|
||||||
|
|
@ -101,7 +100,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
ldap = nixosSystem' {
|
ldap = nixpkgs'.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
basic
|
basic
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
nixpkgs' = selfhostblocks.lib.${system}.patchedNixpkgs;
|
nixpkgs' = selfhostblocks.lib.${system}.patchedNixpkgs;
|
||||||
nixosSystem' = import "${nixpkgs'}/nixos/lib/eval-config.nix";
|
|
||||||
|
|
||||||
basic = { config, ... }: {
|
basic = { config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -160,14 +159,14 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
basic = nixosSystem' {
|
basic = nixpkgs'.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
sopsConfig
|
sopsConfig
|
||||||
basic
|
basic
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
ldap = nixosSystem' {
|
ldap = nixpkgs'.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
sopsConfig
|
sopsConfig
|
||||||
|
|
@ -175,7 +174,7 @@
|
||||||
ldap
|
ldap
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
sso = nixosSystem' {
|
sso = nixpkgs'.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
sopsConfig
|
sopsConfig
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,19 @@
|
||||||
# hash = "sha256-hoLrqV7XtR1hP/m0rV9hjYUBtrSjay0qcPUYlKKuVWk=";
|
# hash = "sha256-hoLrqV7XtR1hP/m0rV9hjYUBtrSjay0qcPUYlKKuVWk=";
|
||||||
# })
|
# })
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# The .src attribute is important to get back to the top-level
|
||||||
|
# and be able to access the .lib attribute.
|
||||||
patchNixpkgs = {
|
patchNixpkgs = {
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
patches,
|
patches,
|
||||||
system,
|
system,
|
||||||
}: nixpkgs.legacyPackages.${system}.applyPatches {
|
}: (nixpkgs.legacyPackages.${system}.applyPatches {
|
||||||
name = "nixpkgs-patched";
|
name = "nixpkgs-patched";
|
||||||
src = nixpkgs;
|
src = nixpkgs;
|
||||||
inherit patches;
|
inherit patches;
|
||||||
};
|
}).src;
|
||||||
|
|
||||||
patchedNixpkgs = (patchNixpkgs {
|
patchedNixpkgs = (patchNixpkgs {
|
||||||
nixpkgs = inputs.nixpkgs;
|
nixpkgs = inputs.nixpkgs;
|
||||||
patches = shbPatches;
|
patches = shbPatches;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue