From 999bf89a7b5bf71cd281a103d728bdcfa762b9b9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 1 May 2018 15:56:49 +0200 Subject: init README.md --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..933f462 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# kops (krebs ops) + +kops is a lightweigt toolkit to deploy nixos systems, remotely or locally. + +fancy features include: +- store your secrets in passwordstore +- build your system remotely +- minimal overhead +- run from custom nixpkgs branch/checkout/fork + +minimal example: + +create a kops.nix somewhere +``` +let + kops = (import {}).fetchgit { + url = https://cgit.krebsco.de/kops/; + rev = "3022582ade8049e6ccf18f358cedb996d6716945"; + sha256 = "0wg8d80sxa46z4i7ir79sci2hwmv3qskzqdgksi64p6vazy8vckb"; + }; + + lib = import "${kops}/lib"; + pkgs = import "${kops}/pkgs" {}; + + source = lib.evalSource [{ + nixpkgs.git = { + ref = "4b4bbce199d3b3a8001ee93495604289b01aaad3"; + url = https://github.com/NixOS/nixpkgs; + }; + nixos-config.file = pkgs.writeText "nixos-config" '' + { config, pkgs, ... }: + { + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + # boot.loader.grub.efiSupport = true; + # boot.loader.grub.efiInstallAsRemovable = true; + # boot.loader.efi.efiSysMountPoint = "/boot/efi"; + # Define on which hard drive you want to install Grub. + boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + } + ''; + }]; +in + pkgs.kops.writeDeploy "deploy" { + source = source; + target = "localhost"; + } +``` + +and run `nix-build kops.nix` -- cgit v1.2.3