@cryptotaxi247 / infra-1 / commits / 3cef09c1

Add flake for Silvan modules demo

Eelco Dolstra committed Aug 10, 2021 at 18:51 UTC 3cef09c1eca704975f61d8f475b829872df9403a
3 files changed +61
ngi0/silvan-demo/flake.lock new
+26
@@ -0,0 +1,26 @@
1 +{
2 + "nodes": {
3 + "nixpkgs": {
4 + "locked": {
5 + "lastModified": 1628523294,
6 + "narHash": "sha256-qMkH/JRRmcqb/eOa/pKksrKGOy2YEPQNH/457QyoyFg=",
7 + "owner": "NixOS",
8 + "repo": "nixpkgs",
9 + "rev": "b09c989b82f7a4f7319802a1dcf8bfe859d65362",
10 + "type": "github"
11 + },
12 + "original": {
13 + "id": "nixpkgs",
14 + "ref": "nixos-21.05",
15 + "type": "indirect"
16 + }
17 + },
18 + "root": {
19 + "inputs": {
20 + "nixpkgs": "nixpkgs"
21 + }
22 + }
23 + },
24 + "root": "root",
25 + "version": 7
26 +}
ngi0/silvan-demo/flake.nix new
+33
@@ -0,0 +1,33 @@
1 +# To bootstrap:
2 +# $ nix-shell -p nixUnstable git --run "nix build --experimental-features 'nix-command flakes' ~/nixos-org-configurations/ngi0/silvan-demo#nixosConfigurations.modules.config.system.build.toplevel"
3 +# $ ./result/bin/switch-to-configuration test
4 +#
5 +# To update:
6 +# $ nixos-rebuild test --flake ~/nixos-org-configurations/ngi0/silvan-demo
7 +
8 +{
9 + inputs.nixpkgs.url = "nixpkgs/nixos-21.05";
10 +
11 + outputs = { self, nixpkgs }: rec {
12 +
13 + nixosConfigurations.modules = nixpkgs.lib.nixosSystem {
14 + system = "x86_64-linux";
15 + modules =
16 + [
17 + "${nixpkgs}/nixos/modules/virtualisation/amazon-image.nix"
18 + ../../modules/common.nix
19 + ({ config, pkgs, ... }:
20 + {
21 + ec2.hvm = true;
22 + networking.hostName = "modules";
23 + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
24 + nix.package = pkgs.nixUnstable;
25 + nix.registry.nixpkgs.flake = nixpkgs;
26 + users.users.root.openssh.authorizedKeys.keys = with import ../../ssh-keys.nix; [ silvan ];
27 + })
28 + ];
29 + };
30 +
31 + };
32 +
33 +}
ssh-keys.nix
+2
@@ -20,4 +20,6 @@
20
21 regnat = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINOPHs47r7r7W55vVlH9Dm9JEud+HOh80YbtrlVSuBm4";
22
23 + silvan = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHjY4cuUk4IWgBgnEJSULkIHO+njUmIFP+WSWy7IobBs infinisil@vario";
24 +
25 }