From 834b5350bf53b432156102b9c7476ab79ca8057a Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Thu, 19 May 2022 15:12:01 +0200 Subject: [PATCH] Add README, make flake readable --- README.md | 9 +++++++++ flake.nix | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9e099f2 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# strato-infra +This is my nix infrastructure that runs on my strato server. + +## nixos image +To get a basic nixos image use `nix build .#register`. + +Afterwards you can import it into lxd using `lxc image import ./result/metadata.tar.xz ./result/lxc.tar.xz --alias nixos` + +You can then use `lxc launch nixos $name$` to make a new lxc container and start it. diff --git a/flake.nix b/flake.nix index 95fe025..5b290e8 100644 --- a/flake.nix +++ b/flake.nix @@ -39,7 +39,10 @@ src = self; buildPhase = "mkdir -p $out; ln -s ${lxc} $out/lxc; ln -s ${metadata} $out/metadata"; - installPhase = "ln -s $out/lxc/tarball/nixos-system-x86_64-linux.tar.xz $out/lxc.tar.xz; ln -s $out/metadata/tarball/nixos-system-x86_64-linux.tar.xz $out/metadata.tar.xz"; + installPhase = '' + ln -s $out/lxc/tarball/nixos-system-x86_64-linux.tar.xz $out/lxc.tar.xz; + ln -s $out/metadata/tarball/nixos-system-x86_64-linux.tar.xz $out/metadata.tar.xz; + ''; }; colmena = {