made nix-secrets input comment-out-able.
This commit is contained in:
		
							parent
							
								
									f27b5ac056
								
							
						
					
					
						commit
						6147ddb903
					
				
					 10 changed files with 51 additions and 27 deletions
				
			
		| 
						 | 
				
			
			@ -24,7 +24,7 @@
 | 
			
		|||
 | 
			
		||||
  programs.himalaya.enable = true;
 | 
			
		||||
 | 
			
		||||
  accounts.email.accounts.gmail = {
 | 
			
		||||
  accounts.email.accounts.gmail = lib.mkIf (lib.hasAttrByPath ["sops" "secrets" "gmail-password"] config) {
 | 
			
		||||
    address = "gabevenberg@gmail.com";
 | 
			
		||||
    primary = true;
 | 
			
		||||
    flavor = "gmail.com";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,15 +5,17 @@
 | 
			
		|||
  pkgs,
 | 
			
		||||
  ...
 | 
			
		||||
}: let
 | 
			
		||||
  secretsDirectory = builtins.toString inputs.nix-secrets;
 | 
			
		||||
  secretsDirectory = builtins.toString (inputs.nix-secrets or "");
 | 
			
		||||
in {
 | 
			
		||||
  sops = {
 | 
			
		||||
    defaultSopsFile = "${secretsDirectory}/common.yaml";
 | 
			
		||||
    validateSopsFiles = false;
 | 
			
		||||
    age = {
 | 
			
		||||
      sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
 | 
			
		||||
      keyFile = "${config.home.homeDirectory}/.config/sops-nix/key.txt";
 | 
			
		||||
      generateKey = true;
 | 
			
		||||
  config = lib.mkIf (inputs ? nix-secrets) {
 | 
			
		||||
    sops = {
 | 
			
		||||
      defaultSopsFile = "${secretsDirectory}/common.yaml";
 | 
			
		||||
      validateSopsFiles = false;
 | 
			
		||||
      age = {
 | 
			
		||||
        sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
 | 
			
		||||
        keyFile = "${config.home.homeDirectory}/.config/sops-nix/key.txt";
 | 
			
		||||
        generateKey = true;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,7 +29,7 @@
 | 
			
		|||
            "#gamingonlinux"
 | 
			
		||||
            "##chat"
 | 
			
		||||
          ];
 | 
			
		||||
          sasl = {
 | 
			
		||||
          sasl = lib.mkIf (lib.hasAttrByPath ["sops" "secrets" "irc-cert"] config) {
 | 
			
		||||
            username = "toric";
 | 
			
		||||
            pem = config.sops.secrets.irc-cert.path;
 | 
			
		||||
          };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue