Skyler Grey | 1e2187f | 2023-03-03 22:45:10 +0000 | [diff] [blame] | 1 | { |
| 2 | description = "A flake to deploy and configure Clicks' NixOS server"; |
| 3 | |
| 4 | inputs.deploy-rs.url = "github:serokell/deploy-rs"; |
| 5 | |
| 6 | outputs = { self, nixpkgs, deploy-rs, ... }@inputs: { |
| 7 | nixosConfigurations.clicks = let |
| 8 | system = "x86_64-linux"; |
| 9 | pkgs = import nixpkgs { |
| 10 | inherit system; |
| 11 | config.allowUnfree = true; |
| 12 | }; |
| 13 | in nixpkgs.lib.nixosSystem { |
| 14 | inherit system pkgs; |
| 15 | modules = [ |
| 16 | ./default/configuration.nix |
| 17 | ./default/hardware-configuration.nix |
| 18 | ./services/mongodb.nix |
| 19 | { |
| 20 | security.sudo.wheelNeedsPassword = false; |
| 21 | users.mutableUsers = false; |
| 22 | } |
| 23 | ]; |
| 24 | }; |
| 25 | |
| 26 | deploy.nodes.clicks = { |
| 27 | profiles.system = { |
| 28 | remoteBuild = true; |
| 29 | user = "root"; |
| 30 | path = deploy-rs.lib.x86_64-linux.activate.nixos |
| 31 | self.nixosConfigurations.clicks; |
| 32 | }; |
| 33 | hostname = "192.168.89.74"; |
| 34 | profilesOrder = [ "system" ]; |
| 35 | }; |
| 36 | }; |
| 37 | } |