Added nixops with deployment for russell

This commit is contained in:
Niten 2021-03-03 23:04:31 +00:00
parent 9cdd5e1fd3
commit bd63433ecc
2 changed files with 48 additions and 0 deletions

29
nixops/common.nix Normal file
View File

@ -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; }

19
nixops/russell.nix Normal file
View File

@ -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";
}