forked from fabian/nix
		
	unified all nixos configurations
This commit is contained in:
		
							parent
							
								
									001642dc94
								
							
						
					
					
						commit
						42530f5cfc
					
				
					 32 changed files with 1054 additions and 56 deletions
				
			
		|  | @ -1,4 +1,3 @@ | |||
| #TODO: keys will not be shared in all platforms | ||||
| { | ||||
|   flakes, | ||||
|   config, | ||||
|  | @ -7,56 +6,7 @@ | |||
|   ... | ||||
| }: | ||||
| with lib; { | ||||
|    | ||||
|   imports = [ | ||||
|     ./modules | ||||
|   ]; | ||||
| 
 | ||||
|   xdg.enable = true; | ||||
| 
 | ||||
|   programs = { | ||||
|     zsh = { | ||||
|       enable = true; | ||||
|       syntaxHighlighting.enable = true; | ||||
|       initExtra = import ./zshrc.nix pkgs; | ||||
|     }; | ||||
| 
 | ||||
|     git = { | ||||
|       enable = true; | ||||
|       userEmail = "fabian@posixlycorrect.com"; | ||||
|       userName = "Fabian Montero"; | ||||
|       signing = { | ||||
|         key = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; | ||||
|         signByDefault = true; | ||||
|       }; | ||||
|     }; | ||||
|     gpg = { | ||||
|       enable = true; | ||||
|       settings = { | ||||
|         default-key = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   services.gpg-agent = { | ||||
|     enable = true; | ||||
|     enableZshIntegration = true; | ||||
|     pinentryPackage = pkgs.pinentry-emacs; | ||||
|   }; | ||||
| 
 | ||||
|   accounts.email.accounts = { | ||||
|     "fabian@posixlycorrect.com" = { | ||||
|       address = "fabian@posixlycorrect.com"; | ||||
|       userName = "fabianmontero@fastmail.com"; | ||||
|       realName = "fabian"; | ||||
|       primary = true; | ||||
|       flavor = "fastmail.com"; | ||||
| 
 | ||||
|       gpg = { | ||||
|         encryptByDefault = true; | ||||
|         signByDefault = true; | ||||
|         key = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										16
									
								
								home/modules/baseline.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								home/modules/baseline.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,16 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.local.baseline; | ||||
| in { | ||||
|   options.local.baseline = { | ||||
|     enable = mkEnableOption "Basic settings"; | ||||
|   }; | ||||
|   config = mkIf cfg.enable { | ||||
|     xdg.enable = true; | ||||
|   }; | ||||
| } | ||||
|  | @ -7,5 +7,6 @@ | |||
|   imports = [ | ||||
|     ./terminal | ||||
|     ./neovim.nix | ||||
|     ./baseline.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }:  | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.local.apps.neovim; | ||||
| in { | ||||
|  | @ -19,10 +19,10 @@ in { | |||
| 
 | ||||
|       extraConfig = '' | ||||
|         set nobackup | ||||
|         set showmatch               " show matching  | ||||
|         set hlsearch                " highlight search  | ||||
|         set showmatch               " show matching | ||||
|         set hlsearch                " highlight search | ||||
|         set incsearch               " incremental search | ||||
|         set tabstop=4               " number of columns occupied by a tab  | ||||
|         set tabstop=4               " number of columns occupied by a tab | ||||
|         set softtabstop=4           " see multiple spaces as tabstops so <BS> does the right thing | ||||
|         set shiftwidth=4            " width for autoindents | ||||
|         set autoindent              " indent a new line the same amount as the line just typed | ||||
|  |  | |||
|  | @ -33,5 +33,50 @@ in { | |||
|         ''; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     programs.zsh = { | ||||
|       enable = true; | ||||
|       syntaxHighlighting.enable = true; | ||||
|       initExtra = import ./zshrc.nix pkgs; | ||||
|     }; | ||||
| 
 | ||||
|     programs.git = { | ||||
|       enable = true; | ||||
|       userEmail = "fabian@posixlycorrect.com"; | ||||
|       userName = "Fabian Montero"; | ||||
|       #signing = { | ||||
|       #  key = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; | ||||
|       #  signByDefault = true; | ||||
|       #}; | ||||
|     }; | ||||
| 
 | ||||
|     programs.gpg = { | ||||
|       enable = true; | ||||
|       #settings = { | ||||
|       #  default-key = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; | ||||
|       #}; | ||||
|     }; | ||||
| 
 | ||||
|     services.gpg-agent = { | ||||
|       enable = true; | ||||
|       enableZshIntegration = true; | ||||
|       pinentryPackage = pkgs.pinentry-emacs; | ||||
|     }; | ||||
| 
 | ||||
|     accounts.email.accounts = { | ||||
|       "fabian@posixlycorrect.com" = { | ||||
|         address = "fabian@posixlycorrect.com"; | ||||
|         userName = "fabianmontero@fastmail.com"; | ||||
|         realName = "fabian"; | ||||
|         primary = true; | ||||
|         flavor = "fastmail.com"; | ||||
| 
 | ||||
|         gpg = { | ||||
|           encryptByDefault = true; | ||||
|           signByDefault = true; | ||||
|           key = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ | |||
|     ./isolation.nix | ||||
|   ]; | ||||
| 
 | ||||
|   local.baseline = true; | ||||
|   local.apps.terminal.enable = true; | ||||
|   local.apps.neovim.enable = true; | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										29
									
								
								home/platforms/fabian@vps/cli.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								home/platforms/fabian@vps/cli.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; { | ||||
|   programs = { | ||||
|     zsh = { | ||||
|       enable = true; | ||||
|       syntaxHighlighting.enable = true; | ||||
|     }; | ||||
|     git = { | ||||
|       enable = true; | ||||
|       userEmail = "fabian@posixlycorrect.com"; | ||||
|       userName = "fabian"; | ||||
|     }; | ||||
|     neovim.enable = true; | ||||
|   }; | ||||
|   home.packages = with pkgs; [ | ||||
|     file | ||||
|     htop | ||||
|     killall | ||||
|     man-pages | ||||
|     man-pages-posix | ||||
|     tree | ||||
|     zip | ||||
|     unzip | ||||
|   ]; | ||||
| } | ||||
							
								
								
									
										33
									
								
								home/platforms/fabian@vps/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								home/platforms/fabian@vps/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| { | ||||
|   config, | ||||
|   pkgs, | ||||
|   lib, | ||||
|   flakes, | ||||
|   ... | ||||
| }: | ||||
| with lib; { | ||||
|   imports = [ | ||||
|     ./cli.nix | ||||
|   ]; | ||||
| 
 | ||||
|   home = { | ||||
|     stateVersion = "24.05"; # No tocar esto | ||||
|     username = "fabian"; | ||||
|     homeDirectory = "/home/fabian"; | ||||
|     sessionVariables = { | ||||
|       "EDITOR" = "nvim"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   xdg.enable = true; | ||||
| 
 | ||||
|   nix.registry = { | ||||
|     "system".to = { | ||||
|       type = "path"; | ||||
|       path = "/home/fabian/nix"; | ||||
|     }; | ||||
| 
 | ||||
|     "nixpkgs".flake = flakes.nixpkgs; | ||||
|     "unstable".flake = flakes.unstable; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue