blob: fd1a07b489c19aa5fbe051062882acdcf5a0b1bc [file] [log] [blame]
Skyler Grey1e2187f2023-03-03 22:45:10 +00001{
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: {
Skyler Grey4f3e6062023-03-04 01:29:29 +00007 nixosConfigurations.clicks =
8 let
9 system = "x86_64-linux";
10 pkgs = import nixpkgs {
11 inherit system;
12 config.allowUnfree = true;
13 };
14 in
15 nixpkgs.lib.nixosSystem {
16 inherit system pkgs;
17 modules = [
18 ./default/configuration.nix
19 ./default/hardware-configuration.nix
20 ./modules/mongodb.nix
21 ./modules/git.nix
22 ./modules/caddy.nix
23 ./modules/fuck.nix
24 ./modules/node.nix
25 {
26 security.sudo.wheelNeedsPassword = false;
27 users.mutableUsers = false;
28 }
29 ];
Skyler Grey1e2187f2023-03-03 22:45:10 +000030 };
Skyler Grey1e2187f2023-03-03 22:45:10 +000031
32 deploy.nodes.clicks = {
33 profiles.system = {
34 remoteBuild = true;
35 user = "root";
36 path = deploy-rs.lib.x86_64-linux.activate.nixos
37 self.nixosConfigurations.clicks;
38 };
39 hostname = "192.168.89.74";
40 profilesOrder = [ "system" ];
41 };
Skyler Grey4f3e6062023-03-04 01:29:29 +000042
43 formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
Skyler Grey1e2187f2023-03-03 22:45:10 +000044 };
45}