diff --git a/nixops/common.nix b/nixops/common.nix new file mode 100644 index 0000000..86b948c --- /dev/null +++ b/nixops/common.nix @@ -0,0 +1,29 @@ +let + home-manager-package = builtins.fetchGit { + url = "https://github.com/nix-community/home-manager.git"; + ref = "release-20.09"; + }; + + pkgs = builtins.fetchGit { + url = "https://github.com/NixOS/nixpkgs.git"; + ref = "release-20.09"; + }; + + initialize = import ../initialize.nix; + + host-config = ip: config: + { ... }: { + imports = [ + (initialize { + hostname = config.hostname; + profile = config.profile; + site = config.site; + domain = config.domain; + home-manager-package = home-manager-package; + }) + ]; + + deployment.targetHost = ip; + }; + +in { host-config = host-config; } diff --git a/nixops/russell.nix b/nixops/russell.nix new file mode 100644 index 0000000..5263146 --- /dev/null +++ b/nixops/russell.nix @@ -0,0 +1,19 @@ +let + common = import ./common.nix; + domain = "rus.selby.ca"; + site = "russell"; + + russell-host-config = ip: hostname: profile: + common.host-config ip { + hostname = hostname; + profile = profile; + domain = domain; + site = site; + }; + +in { + network.description = "Russell home network."; + + clunk = russell-host-config "10.0.0.1" "clunk" "server"; + plato = russell-host-config "10.0.0.102" "plato" "server"; +}