survey: Add initial config
Eelco Dolstra committed
Jan 25, 2022 at 17:33 UTC
4aa7bdda45ae6a4a3e8a4addb60ce7c974056eb0
1 file changed
+22
-1
survey/flake.nix
+22
-1
@@ -1,10 +1,31 @@
1
+# To bootstrap:
2
+# $ nix-shell -p nixUnstable git --run "nix build --experimental-features 'nix-command flakes' ~/nixos-org-configurations/survey#nixosConfigurations.survey.config.system.build.toplevel"
3
+# $ ./result/bin/switch-to-configuration test
4
+#
5
+# To update:
6
+# $ nixos-rebuild switch --flake ~/nixos-org-configurations/survey
7
+
8
{
9
inputs.nixpkgs.url = "nixpkgs/nixos-21.11";
10
11
outputs = flakes @ { self, nixpkgs }: {
12
nixosConfigurations.survey = nixpkgs.lib.nixosSystem {
13
system = "x86_64-linux";
7
- modules = [ (import ./configuration.nix flakes) ];
14
+ modules =
15
+ [
16
+ "${nixpkgs}/nixos/modules/virtualisation/amazon-image.nix"
17
+ ../modules/common.nix
18
+ ({ config, pkgs, ... }:
19
+ {
20
+ ec2.hvm = true;
21
+ networking.hostName = "survey";
22
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
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; [ eelco garbas ];
27
+ })
28
+ ];
29
};
30
31
devShell.x86_64-linux =