fixed ipv6 on cirrus, fixed remote backups on cirrostratus.
This commit is contained in:
		
							parent
							
								
									084e4ca421
								
							
						
					
					
						commit
						31d93e3770
					
				
					 6 changed files with 11 additions and 18 deletions
				
			
		| 
						 | 
					@ -15,7 +15,6 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
    ./disk-config.nix
 | 
					    ./disk-config.nix
 | 
				
			||||||
    ./hardware-configuration.nix
 | 
					    ./hardware-configuration.nix
 | 
				
			||||||
    ./restic.nix
 | 
					    ./restic.nix
 | 
				
			||||||
    ./nginx.nix
 | 
					 | 
				
			||||||
    ./copyparty.nix
 | 
					    ./copyparty.nix
 | 
				
			||||||
    ./torrent.nix
 | 
					    ./torrent.nix
 | 
				
			||||||
    ../../configs/nixos/common.nix
 | 
					    ../../configs/nixos/common.nix
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +0,0 @@
 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  inputs,
 | 
					 | 
				
			||||||
  config,
 | 
					 | 
				
			||||||
  pkgs,
 | 
					 | 
				
			||||||
  lib,
 | 
					 | 
				
			||||||
  ...
 | 
					 | 
				
			||||||
}: {
 | 
					 | 
				
			||||||
  imports = [
 | 
					 | 
				
			||||||
    ../../configs/nixos/nginx.nix
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
  #Restic submits some huge requests sometimes.
 | 
					 | 
				
			||||||
  services.nginx.clientMaxBodySize = "1000m";
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -25,7 +25,7 @@ in {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  host.restic = {
 | 
					  host.restic = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    repository = "/backup/restic/";
 | 
					    repository = config.sops.secrets.restic-url.path;
 | 
				
			||||||
    passwordFile = config.sops.secrets.restic-password.path;
 | 
					    passwordFile = config.sops.secrets.restic-password.path;
 | 
				
			||||||
    server = {
 | 
					    server = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,8 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
      networking.useNetworkd = true;
 | 
					      networking.useNetworkd = true;
 | 
				
			||||||
      systemd.network = {
 | 
					      systemd.network = {
 | 
				
			||||||
        enable = true;
 | 
					        enable = true;
 | 
				
			||||||
        networks."enp1s0" = {
 | 
					        networks."10-enp1s0" = {
 | 
				
			||||||
 | 
					          name = "enp1s0";
 | 
				
			||||||
          networkConfig.DHCP = "ipv4";
 | 
					          networkConfig.DHCP = "ipv4";
 | 
				
			||||||
          gateway = ["fe80::1"];
 | 
					          gateway = ["fe80::1"];
 | 
				
			||||||
          address = ["2a01:4f8:1c1b:6c7c::1/64"];
 | 
					          address = ["2a01:4f8:1c1b:6c7c::1/64"];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										3
									
								
								justfile
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								justfile
									
										
									
									
									
								
							| 
						 | 
					@ -9,6 +9,9 @@ home-manager target=(`whoami`+"@"+`hostname`):
 | 
				
			||||||
    git add -AN
 | 
					    git add -AN
 | 
				
			||||||
    home-manager --flake .#{{target}} switch
 | 
					    home-manager --flake .#{{target}} switch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					deploy target:
 | 
				
			||||||
 | 
					    nixos-rebuild --flake .#{{target}} switch --target-host root@{{target}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
check:
 | 
					check:
 | 
				
			||||||
    git add -AN
 | 
					    git add -AN
 | 
				
			||||||
    nix flake check --keep-going
 | 
					    nix flake check --keep-going
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -100,7 +100,8 @@
 | 
				
			||||||
      htpasswd-file = cfg.server.htpasswdPath;
 | 
					      htpasswd-file = cfg.server.htpasswdPath;
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    services.nginx.virtualHosts =
 | 
					    #Restic submits some huge requests sometimes.
 | 
				
			||||||
 | 
					    services.nginx =
 | 
				
			||||||
      lib.mkIf (
 | 
					      lib.mkIf (
 | 
				
			||||||
        cfg.server.enable
 | 
					        cfg.server.enable
 | 
				
			||||||
        && (lib.asserts.assertMsg
 | 
					        && (lib.asserts.assertMsg
 | 
				
			||||||
| 
						 | 
					@ -108,7 +109,8 @@
 | 
				
			||||||
          "NGINX must be enabled")
 | 
					          "NGINX must be enabled")
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        "${cfg.server.domain}" = {
 | 
					        clientMaxBodySize = "1000m";
 | 
				
			||||||
 | 
					        virtualHosts."${cfg.server.domain}" = {
 | 
				
			||||||
          enableACME = lib.asserts.assertMsg (
 | 
					          enableACME = lib.asserts.assertMsg (
 | 
				
			||||||
            config.security.acme.acceptTerms
 | 
					            config.security.acme.acceptTerms
 | 
				
			||||||
            == true
 | 
					            == true
 | 
				
			||||||
| 
						 | 
					@ -131,6 +133,7 @@
 | 
				
			||||||
          paths = null;
 | 
					          paths = null;
 | 
				
			||||||
          timerConfig = timer;
 | 
					          timerConfig = timer;
 | 
				
			||||||
          pruneOpts = pruneOpts;
 | 
					          pruneOpts = pruneOpts;
 | 
				
			||||||
 | 
					          user = "restic";
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
      (
 | 
					      (
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue