refactor para nuevo sistema de shenvs
This commit is contained in:
		
							parent
							
								
									8f48524a76
								
							
						
					
					
						commit
						d102de290e
					
				
					 14 changed files with 225 additions and 195 deletions
				
			
		|  | @ -1,19 +0,0 @@ | |||
| { | ||||
|   "files.autoSave" = "onFocusChange"; | ||||
|   "explorer.confirmDelete" = false; | ||||
|   "explorer.confirmDragAndDrop" = false; | ||||
|   "security.workspace.trust.enabled" = false; | ||||
|   "workbench.startupEditor" = "none"; | ||||
|   "workbench.colorTheme" = "Default High Contrast"; | ||||
|   "editor.mouseWheelZoom" = true; | ||||
|   "editor.cursorSmoothCaretAnimation" = true; | ||||
|   "workbench.list.smoothScrolling" = true; | ||||
|   "editor.smoothScrolling" = true; | ||||
|   "editor.rulers" = [80 120]; | ||||
|   "workbench.iconTheme" = "simple-icons"; | ||||
|   "workbench.editor.untitled.hint" = "hidden"; | ||||
|   "editor.autoClosingDelete" = "never"; | ||||
|   "editor.autoClosingOvertype" = "never"; | ||||
|   "editor.autoClosingBrackets" = "never"; | ||||
|   "editor.autoClosingQuotes" = "never"; | ||||
| } | ||||
							
								
								
									
										109
									
								
								home/default.nix
									
										
									
									
									
								
							
							
						
						
									
										109
									
								
								home/default.nix
									
										
									
									
									
								
							|  | @ -1,23 +1,21 @@ | |||
| # man page: https://rycee.gitlab.io/home-manager/options.html | ||||
| 
 | ||||
| { nixpkgs, self, hm-isolation }: | ||||
| { config, pkgs, lib, ... }: with lib; { | ||||
|    | ||||
|   nixpkgs.overlays = [ self.overlay ]; | ||||
| 
 | ||||
| { config, pkgs, lib, ... } : | ||||
| with lib; | ||||
| { | ||||
|   imports = [ | ||||
|     (hm-isolation.homeManagerModule) | ||||
|     ./desktop | ||||
|     ./gui | ||||
|     ./isolation.nix | ||||
|     ./steam | ||||
|     ./path.nix | ||||
|     ./systemd | ||||
|   ]; | ||||
| 
 | ||||
|   nixpkgs.overlays = [ self.overlay ]; | ||||
| 
 | ||||
|   home = { | ||||
|     stateVersion = "21.11"; # No tocar esto | ||||
|     username = "fabian"; | ||||
|     homeDirectory = "/home/fabian"; | ||||
|     packages = import ./path.nix pkgs; | ||||
|     sessionVariables = { | ||||
|       "EDITOR" = "nvim"; | ||||
|       "TERMINAL" = "kitty"; | ||||
|  | @ -28,82 +26,29 @@ | |||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   systemd.user.tmpfiles.rules = [ | ||||
|     "d %t/tmp 0700 fabian fabian 24h" | ||||
|   ]; | ||||
| 
 | ||||
|   nix.registry."system".to = { | ||||
|     type = "path"; | ||||
|     path = "/home/fabian/nix"; | ||||
|   }; | ||||
| 
 | ||||
|   nix.registry."nixpkgs".flake = nixpkgs; | ||||
| 
 | ||||
|   nixpkgs.config.allowUnfree = true; | ||||
| 
 | ||||
|   programs.home-manager.enable = true; | ||||
|   programs.neovim.enable = true; | ||||
|   programs.zsh = { | ||||
|     enable = true; | ||||
|     enableSyntaxHighlighting = true; | ||||
|     initExtra = import ./zshrc.nix pkgs; | ||||
|   }; | ||||
| 
 | ||||
|   programs.kitty = { | ||||
|     enable = true; | ||||
|     extraConfig = import ./kitty.conf.nix; | ||||
|   }; | ||||
| 
 | ||||
|   programs.tmux = { | ||||
|     enable = true; | ||||
|     aggressiveResize = true; | ||||
|     clock24 = true; | ||||
|     escapeTime = 10; | ||||
|     terminal = "xterm-256color"; | ||||
|     keyMode = "emacs"; | ||||
| 
 | ||||
|     extraConfig = '' | ||||
|     set -g mouse on | ||||
|     set -ga update-environment " LIFT_PID" | ||||
|     set -g set-titles on | ||||
|     set -g renumber-windows on | ||||
|     set -sa terminal-overrides ',xterm-termite:RGB' | ||||
|     set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y" | ||||
|       ''; | ||||
|   }; | ||||
| 
 | ||||
|   # configurable = [ neovim keyboardlayout pulsaudio rofi ]; | ||||
| 
 | ||||
|   programs.vscode = { | ||||
|     enable = true; | ||||
|     package = pkgs.vscodium; | ||||
|     userSettings = import ./codium.nix; | ||||
|     haskell = { | ||||
|       enable = true; | ||||
|       hie.enable = false; | ||||
|   nix.registry = { | ||||
|     "system".to = { | ||||
|       type = "path"; | ||||
|       path = "/home/fabian/nix"; | ||||
|     }; | ||||
| 
 | ||||
|     mutableExtensionsDir = false; | ||||
|     extensions = (with pkgs.vscode-extensions; [ | ||||
|       bbenoist.nix | ||||
|       # justusadam.language-haskell | ||||
|       ms-toolsai.jupyter | ||||
|       ms-vscode.cpptools | ||||
|       # github.copilot | ||||
|    ]) ++ (with pkgs.local.vscode-extensions; [ | ||||
|       laurenttreguier.vscode-simple-icons | ||||
|       rust-lang.rust | ||||
|       sirtori.indenticator | ||||
|     ]); | ||||
|    | ||||
|     "nixpkgs".flake = nixpkgs; | ||||
|   }; | ||||
| 
 | ||||
|   programs.git = { | ||||
|     enable = true; | ||||
|     userEmail = "fabian@cluster451.org"; | ||||
|     userName = "Fabián Montero"; | ||||
|     signing.key = "E77A808BF9A955D668EEEA6473FA9C9CB5F0249B"; | ||||
|   programs = { | ||||
|     home-manager.enable = true; | ||||
|     neovim.enable = true;  | ||||
|     zsh = {  | ||||
|       enable = true; | ||||
|       enableSyntaxHighlighting = true; | ||||
|       initExtra = import ./zshrc.nix pkgs; | ||||
|     }; | ||||
|     git = { | ||||
|       enable = true; | ||||
|       userEmail = "fabian@cluster451.org"; | ||||
|       userName = "Fabián Montero"; | ||||
|       signing.key = "E77A808BF9A955D668EEEA6473FA9C9CB5F0249B"; | ||||
|     }; | ||||
|   }; | ||||
| 
 | ||||
|   programs.steam.enable = true; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,34 +0,0 @@ | |||
| { config, pkgs, lib, ... }: with lib; { | ||||
|    | ||||
|   imports = [ ./i3.nix ./polybar.nix ]; | ||||
|    | ||||
|   xsession.enable = true; | ||||
| 
 | ||||
|   services.picom = { | ||||
|     enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   services.dunst = { | ||||
|     enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   services.betterlockscreen = { | ||||
|     enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   xdg.mimeApps = { | ||||
|     enable = true; | ||||
|     defaultApplications = { | ||||
|       "application/pdf" = [ "org.kde.okular.desktop" ]; | ||||
|       "application/x-extension-htm" = [ "firefox.desktop" ]; | ||||
|       "application/x-extension-html" = [ "firefox.desktop" ]; | ||||
|       "application/x-extension-shtml" = [ "firefox.desktop" ]; | ||||
|       "application/x-extension-xht" = [ "firefox.desktop" ]; | ||||
|       "application/x-extension-xhtml" = [ "firefox.desktop" ]; | ||||
|       "application/xhtml+xml" = [ "firefox.desktop" ]; | ||||
|       "text/html" = [ "firefox.desktop" ]; | ||||
|       "x-scheme-handler/http" = [ "firefox.desktop" ]; | ||||
|       "x-scheme-handler/https" = [ "firefox.desktop" ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										39
									
								
								home/gui/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								home/gui/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| { config, pkgs, lib, ... } : | ||||
| with lib; | ||||
| { | ||||
| 
 | ||||
|   imports = [ ./i3.nix ./polybar.nix ./desktop ]; | ||||
| 
 | ||||
|   config = mkIf ( !config.home.isolation.active ) {  | ||||
| 
 | ||||
|     xsession.enable = true; | ||||
|    | ||||
|     services.picom = { | ||||
|       enable = true; | ||||
|     }; | ||||
|    | ||||
|     services.dunst = { | ||||
|       enable = true; | ||||
|     }; | ||||
|    | ||||
|     services.betterlockscreen = { | ||||
|       enable = true; | ||||
|     }; | ||||
|    | ||||
|     xdg.mimeApps = { | ||||
|       enable = true; | ||||
|       defaultApplications = { | ||||
|         "application/pdf" = [ "org.kde.okular.desktop" ]; | ||||
|         "application/x-extension-htm" = [ "firefox.desktop" ]; | ||||
|         "application/x-extension-html" = [ "firefox.desktop" ]; | ||||
|         "application/x-extension-shtml" = [ "firefox.desktop" ]; | ||||
|         "application/x-extension-xht" = [ "firefox.desktop" ]; | ||||
|         "application/x-extension-xhtml" = [ "firefox.desktop" ]; | ||||
|         "application/xhtml+xml" = [ "firefox.desktop" ]; | ||||
|         "text/html" = [ "firefox.desktop" ]; | ||||
|         "x-scheme-handler/http" = [ "firefox.desktop" ]; | ||||
|         "x-scheme-handler/https" = [ "firefox.desktop" ]; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										13
									
								
								home/gui/desktop/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								home/gui/desktop/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| { config, lib, pkgs, ...} : | ||||
| with lib; | ||||
| { | ||||
|   imports = [ | ||||
|     ./terminal.nix | ||||
|     ./steam | ||||
|     ./vscode.nix | ||||
|   ]; | ||||
|                           # el sistema de shenvs detecta | ||||
|                           # que esto solo va para mi home, | ||||
|                           # no para las shenvs | ||||
|   programs.steam.enable = !config.home.isolation.active; | ||||
| } | ||||
							
								
								
									
										28
									
								
								home/gui/desktop/terminal.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								home/gui/desktop/terminal.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| {config, lib, pkgs, ...} : | ||||
| with lib; | ||||
| { | ||||
|   programs = mkIf ( !config.home.isolation.active ) { | ||||
|     kitty = { | ||||
|         enable = true; | ||||
|         extraConfig = import ./kitty.conf.nix; | ||||
|     }; | ||||
| 
 | ||||
|     tmux = { | ||||
|         enable = true; | ||||
|         aggressiveResize = true; | ||||
|         clock24 = true; | ||||
|         escapeTime = 10; | ||||
|         terminal = "xterm-256color"; | ||||
|         keyMode = "emacs"; | ||||
| 
 | ||||
|         extraConfig = '' | ||||
|         set -g mouse on | ||||
|         set -ga update-environment " LIFT_PID" | ||||
|         set -g set-titles on | ||||
|         set -g renumber-windows on | ||||
|         set -sa terminal-overrides ',xterm-termite:RGB' | ||||
|         set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y" | ||||
|         ''; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										43
									
								
								home/gui/desktop/vscode.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								home/gui/desktop/vscode.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| {config, lib, pkgs, ...} : | ||||
| with lib; | ||||
| { | ||||
|   programs.vscode = mkIf ( !config.home.isolation.active ) { | ||||
|     enable = true; | ||||
|     package = pkgs.vscodium; | ||||
|     haskell = { | ||||
|       enable = true; | ||||
|       hie.enable = false; | ||||
|     }; | ||||
|     mutableExtensionsDir = false; | ||||
|     extensions = (with pkgs.vscode-extensions; [ | ||||
|       bbenoist.nix | ||||
|       # justusadam.language-haskell | ||||
|       ms-toolsai.jupyter | ||||
|       ms-vscode.cpptools | ||||
|       # github.copilot | ||||
|     ]) ++ (with pkgs.local.vscode-extensions; [ | ||||
|       laurenttreguier.vscode-simple-icons | ||||
|       rust-lang.rust | ||||
|       sirtori.indenticator | ||||
|     ]); | ||||
|     userSettings = { | ||||
|       "files.autoSave" = "onFocusChange"; | ||||
|       "explorer.confirmDelete" = false; | ||||
|       "explorer.confirmDragAndDrop" = false; | ||||
|       "security.workspace.trust.enabled" = false; | ||||
|       "workbench.startupEditor" = "none"; | ||||
|       "workbench.colorTheme" = "Default High Contrast"; | ||||
|       "editor.mouseWheelZoom" = true; | ||||
|       "editor.cursorSmoothCaretAnimation" = true; | ||||
|       "workbench.list.smoothScrolling" = true; | ||||
|       "editor.smoothScrolling" = true; | ||||
|       "editor.rulers" = [80 120]; | ||||
|       "workbench.iconTheme" = "simple-icons"; | ||||
|       "workbench.editor.untitled.hint" = "hidden"; | ||||
|       "editor.autoClosingDelete" = "never"; | ||||
|       "editor.autoClosingOvertype" = "never"; | ||||
|       "editor.autoClosingBrackets" = "never"; | ||||
|       "editor.autoClosingQuotes" = "never"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -1,6 +1,8 @@ | |||
| { config, pkgs, lib, ... }: with lib; { | ||||
| { config, pkgs, lib, ... } : | ||||
| with lib; | ||||
| { | ||||
|    | ||||
|   xsession.windowManager.i3 = { | ||||
|   xsession.windowManager.i3 = mkIf ( !config.home.isolation.active ) { | ||||
|     enable = true; | ||||
|     package = pkgs.i3-gaps; | ||||
|      | ||||
|  | @ -1,5 +1,7 @@ | |||
| { config, pkgs, lib, ... }: with lib; { | ||||
|   services.polybar = { | ||||
| { config, pkgs, lib, ... } : | ||||
| with lib; | ||||
| { | ||||
|   services.polybar = mkIf ( !config.home.isolation.active ) { | ||||
|     enable = true; | ||||
|     package = pkgs.polybarFull; | ||||
|     script = '' | ||||
							
								
								
									
										114
									
								
								home/path.nix
									
										
									
									
									
								
							
							
						
						
									
										114
									
								
								home/path.nix
									
										
									
									
									
								
							|  | @ -1,54 +1,60 @@ | |||
| pkgs: with pkgs; [ | ||||
|   arandr | ||||
|   arduino | ||||
|   betterdiscordctl | ||||
|   blas | ||||
|   calc | ||||
|   cargo-edit | ||||
|   chromium | ||||
|   deluge | ||||
|   discord | ||||
|   file | ||||
|   firefox | ||||
|   gcc | ||||
|   gruvbox-dark-icons-gtk | ||||
|   helix | ||||
|   htop | ||||
|   jetbrains.pycharm-professional | ||||
|   jellyfin-media-player | ||||
|   jq | ||||
|   killall | ||||
|   libsForQt5.breeze-gtk | ||||
|   maim | ||||
|   man-pages | ||||
|   man-pages-posix | ||||
|   mpv | ||||
|   obs-studio | ||||
|   okular | ||||
|   pandoc | ||||
|   pavucontrol | ||||
|   pdfarranger | ||||
|   polymc | ||||
|   protonup | ||||
|   rar | ||||
|   runelite | ||||
|   rust-analyzer | ||||
|   rustup | ||||
|   signal-desktop | ||||
|   spotify | ||||
|   tdesktop | ||||
|   teams | ||||
|   thunderbird | ||||
|   tree | ||||
|   tor | ||||
|   tor-browser-bundle-bin | ||||
|   usbutils | ||||
|   units | ||||
|   unzip | ||||
|   virt-manager | ||||
|   vlc | ||||
|   xclip | ||||
|   xournalpp | ||||
|   zip | ||||
|   zoom-us | ||||
| ] | ||||
| { config, lib, pkgs, ... } : | ||||
| with lib; | ||||
| { | ||||
|   home.packages = with pkgs;  | ||||
|   [ | ||||
|     file | ||||
|     gcc | ||||
|     helix | ||||
|     killall | ||||
|     libsForQt5.breeze-gtk | ||||
|     man-pages | ||||
|     man-pages-posix | ||||
|     tree | ||||
|     units | ||||
|     unzip | ||||
|     zip | ||||
|   ] ++ optionals ( !config.home.isolation.active ) [ | ||||
|     arandr | ||||
|     arduino | ||||
|     betterdiscordctl | ||||
|     blas | ||||
|     calc | ||||
|     cargo-edit | ||||
|     chromium | ||||
|     deluge | ||||
|     discord | ||||
|     firefox | ||||
|     gruvbox-dark-icons-gtk | ||||
|     htop | ||||
|     jetbrains.pycharm-professional | ||||
|     jellyfin-media-player | ||||
|     jq | ||||
|     maim | ||||
|     mpv | ||||
|     obs-studio | ||||
|     okular | ||||
|     pandoc | ||||
|     pavucontrol | ||||
|     pdfarranger | ||||
|     polymc | ||||
|     protonup | ||||
|     rar | ||||
|     runelite | ||||
|     rust-analyzer | ||||
|     rustup | ||||
|     signal-desktop | ||||
|     spotify | ||||
|     tdesktop | ||||
|     teams | ||||
|     thunderbird | ||||
|     tor | ||||
|     tor-browser-bundle-bin | ||||
|     usbutils | ||||
|     virt-manager | ||||
|     vlc | ||||
|     xclip | ||||
|     xournalpp | ||||
|     zoom-us | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -1,2 +1,7 @@ | |||
| { lib, pkgs, ... }: | ||||
| with lib; {} | ||||
| { lib, pkgs, ... } : | ||||
| with lib; | ||||
| { | ||||
|   systemd.user.tmpfiles.rules = [ | ||||
|     "d %t/tmp 0700 fabian fabian 24h" | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
		Reference in a new issue
	
	 Fabián Montero
						Fabián Montero