diff options
author | lassulus <lassulus@lassul.us> | 2018-09-29 20:44:50 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-09-29 20:44:50 +0200 |
commit | 913e7b41bb3cb562d6224e30094e8123f09b366f (patch) | |
tree | 1dc2760f5d1454b82be43f9c2f7949f2a3fed8b6 /README.md | |
parent | 7e1bcc4d4ba3d30d29d3f7c6b49eadedde2da98e (diff) | |
parent | 5b27dc84c8dc2fd104393ef5b3574469e1617fea (diff) |
Merge remote-tracking branch 'ni/master' into HEAD
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -1,20 +1,21 @@ # krops (krebs ops) -krops is a lightweigt toolkit to deploy nixos systems, remotely or locally. +krops is a lightweigt toolkit to deploy NixOS systems, remotely or locally. -fancy features include: -- store your secrets in passwordstore +## Some Features + +- store your secrets in [password store](https://www.passwordstore.org/) - build your system remotely -- minimal overhead +- minimal overhead (it's basically just `nixos-rebuild switch`!) - run from custom nixpkgs branch/checkout/fork -minimal example: +## Minimal Example + +Create a file named `krops.nix` (name doesn't matter) with following content: -create a krops.nix somewhere ``` let - #krops = ./.; - krops = builtins.fetchGit { + krops = (import <nixpkgs> {}).fetchgit { url = https://cgit.krebsco.de/krops/; ref = "master"; }; @@ -24,12 +25,11 @@ let source = lib.evalSource [{ nixpkgs.git = { - ref = "origin/nixos-18.03"; - url = https://github.com/NixOS/nixpkgs-channels; + ref = "4b4bbce199d3b3a8001ee93495604289b01aaad3"; + url = https://github.com/NixOS/nixpkgs; }; nixos-config.file = toString (pkgs.writeText "nixos-config" '' { pkgs, ... }: { - fileSystems."/" = { device = "/dev/sda1"; }; boot.loader.systemd-boot.enable = true; services.openssh.enable = true; @@ -47,4 +47,11 @@ in } ``` -and run `$(nix-build krops.nix)`. This results in a script which deploys the machine via ssh & rsync on the target machine. +and run `$(nix-build --no-out-link krops.nix)` to deploy the target machine. + +Under the hood, this will make the sources available on the target machine +below `/var/src`, and execute `nixos-rebuild switch -I /var/src`. + +## References + +- [In-depth example](http://tech.ingolf-wagner.de/nixos/krops/) by [Ingolf Wagner](https://ingolf-wagner.de/) |