blob: 16ab9b139630cb621e273eee799d78cd4a9eceda [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
Skyler Grey7e4504e2023-03-04 15:19:33 +000025 ./modules/kitty.nix
Skyler Grey5dbad002023-03-04 15:21:51 +000026 ./modules/tesseract.nix
Skyler Grey42876182023-03-05 13:03:42 +000027 ./modules/doas.nix
Skyler Grey29af77b2023-03-05 23:54:31 +000028 ./modules/code-server.nix
Skyler Grey488c2ad2023-03-05 23:59:29 +000029 ./modules/ecryptfs.nix
Skyler Greycad3e8b2023-03-08 00:15:22 +000030 ./modules/clamav.nix
Skyler Grey4f3e6062023-03-04 01:29:29 +000031 {
Skyler Grey4f3e6062023-03-04 01:29:29 +000032 users.mutableUsers = false;
33 }
34 ];
Skyler Grey1e2187f2023-03-03 22:45:10 +000035 };
Skyler Grey1e2187f2023-03-03 22:45:10 +000036
37 deploy.nodes.clicks = {
Skyler Grey42876182023-03-05 13:03:42 +000038 sudo = "doas -u";
Skyler Grey1e2187f2023-03-03 22:45:10 +000039 profiles.system = {
40 remoteBuild = true;
41 user = "root";
42 path = deploy-rs.lib.x86_64-linux.activate.nixos
43 self.nixosConfigurations.clicks;
44 };
45 hostname = "192.168.89.74";
46 profilesOrder = [ "system" ];
47 };
Skyler Grey4f3e6062023-03-04 01:29:29 +000048
49 formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
Skyler Grey1e2187f2023-03-03 22:45:10 +000050 };
51}