forked from jan-leila/nix-config
		
	main #1
					 6 changed files with 477 additions and 470 deletions
				
			
		|  | @ -1,8 +1,4 @@ | ||||||
| { | {osConfig, ...}: { | ||||||
|   osConfig, |  | ||||||
|   config, |  | ||||||
|   ... |  | ||||||
| }: { |  | ||||||
|   imports = [ |   imports = [ | ||||||
|     ./i18n.nix |     ./i18n.nix | ||||||
|     ./packages.nix |     ./packages.nix | ||||||
|  | @ -108,44 +104,5 @@ | ||||||
|         }; |         }; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 |  | ||||||
|     programs = { |  | ||||||
|       # Let Home Manager install and manage itself. |  | ||||||
|       home-manager.enable = true; |  | ||||||
| 
 |  | ||||||
|       # set up git defaults |  | ||||||
|       git = { |  | ||||||
|         enable = true; |  | ||||||
|         userName = "Leyla Becker"; |  | ||||||
|         userEmail = "git@jan-leila.com"; |  | ||||||
|         extraConfig.init.defaultBranch = "main"; |  | ||||||
|       }; |  | ||||||
| 
 |  | ||||||
|       # add direnv to auto load flakes for development |  | ||||||
|       direnv = { |  | ||||||
|         enable = true; |  | ||||||
|         enableBashIntegration = true; |  | ||||||
|         nix-direnv.enable = true; |  | ||||||
|         config = { |  | ||||||
|           global.hide_env_diff = true; |  | ||||||
|           whitelist.exact = ["/home/leyla/documents/code/nix-config"]; |  | ||||||
|         }; |  | ||||||
|       }; |  | ||||||
|       bash.enable = true; |  | ||||||
| 
 |  | ||||||
|       openssh = { |  | ||||||
|         authorizedKeys = [ |  | ||||||
|           "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon" |  | ||||||
|           "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant" |  | ||||||
|           "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight" |  | ||||||
|         ]; |  | ||||||
|         hostKeys = [ |  | ||||||
|           { |  | ||||||
|             type = "ed25519"; |  | ||||||
|             path = "${config.home.username}_${osConfig.networking.hostName}_ed25519"; |  | ||||||
|           } |  | ||||||
|         ]; |  | ||||||
|       }; |  | ||||||
|     }; |  | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2,8 +2,12 @@ | ||||||
|   lib, |   lib, | ||||||
|   pkgs, |   pkgs, | ||||||
|   inputs, |   inputs, | ||||||
|  |   osConfig, | ||||||
|   ... |   ... | ||||||
| }: { | }: let | ||||||
|  |   is-desktop-user = osConfig.host.users.leyla.isDesktopUser; | ||||||
|  | in { | ||||||
|  |   config = lib.mkIf is-desktop-user { | ||||||
|     programs.firefox = { |     programs.firefox = { | ||||||
|       enable = true; |       enable = true; | ||||||
|       profiles.leyla = { |       profiles.leyla = { | ||||||
|  | @ -339,4 +343,5 @@ | ||||||
|         }; |         }; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|  |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| { | { | ||||||
|   lib, |   lib, | ||||||
|  |   config, | ||||||
|   osConfig, |   osConfig, | ||||||
|   pkgs, |   pkgs, | ||||||
|   ... |   ... | ||||||
|  | @ -12,22 +13,22 @@ in { | ||||||
|     ./firefox.nix |     ./firefox.nix | ||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   nixpkgs.config = { |   config = lib.mkMerge [ | ||||||
|     allowUnfree = true; |     (lib.mkIf userConfig.isTerminalUser { | ||||||
|   }; |       home.packages = with pkgs; [ | ||||||
| 
 |  | ||||||
|   home = { |  | ||||||
|     packages = |  | ||||||
|       lib.lists.optionals userConfig.isTerminalUser ( |  | ||||||
|         with pkgs; [ |  | ||||||
|         # command line tools |         # command line tools | ||||||
|         sox |         sox | ||||||
|         yt-dlp |         yt-dlp | ||||||
|         ffmpeg |         ffmpeg | ||||||
|         imagemagick |         imagemagick | ||||||
|         ] |       ]; | ||||||
|       ) |     }) | ||||||
|       ++ ( |     (lib.mkIf userConfig.isDesktopUser { | ||||||
|  |       nixpkgs.config = { | ||||||
|  |         allowUnfree = true; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       home.packages = ( | ||||||
|         lib.lists.optionals userConfig.isDesktopUser ( |         lib.lists.optionals userConfig.isDesktopUser ( | ||||||
|           (with pkgs; [ |           (with pkgs; [ | ||||||
|             # helvetica font |             # helvetica font | ||||||
|  | @ -91,5 +92,44 @@ in { | ||||||
|           ) |           ) | ||||||
|         ) |         ) | ||||||
|       ); |       ); | ||||||
|  |       programs = lib.mkIf userConfig.isDesktopUser { | ||||||
|  |         # Let Home Manager install and manage itself. | ||||||
|  |         home-manager.enable = true; | ||||||
|  | 
 | ||||||
|  |         # set up git defaults | ||||||
|  |         git = { | ||||||
|  |           enable = true; | ||||||
|  |           userName = "Leyla Becker"; | ||||||
|  |           userEmail = "git@jan-leila.com"; | ||||||
|  |           extraConfig.init.defaultBranch = "main"; | ||||||
|         }; |         }; | ||||||
|  | 
 | ||||||
|  |         # add direnv to auto load flakes for development | ||||||
|  |         direnv = { | ||||||
|  |           enable = true; | ||||||
|  |           enableBashIntegration = true; | ||||||
|  |           nix-direnv.enable = true; | ||||||
|  |           config = { | ||||||
|  |             global.hide_env_diff = true; | ||||||
|  |             whitelist.exact = ["/home/leyla/documents/code/nix-config"]; | ||||||
|  |           }; | ||||||
|  |         }; | ||||||
|  |         bash.enable = true; | ||||||
|  | 
 | ||||||
|  |         openssh = { | ||||||
|  |           authorizedKeys = [ | ||||||
|  |             "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHeItmt8TRW43uNcOC+eIurYC7Eunc0V3LGocQqLaYj leyla@horizon" | ||||||
|  |             "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIILimFIW2exEH/Xo7LtXkqgE04qusvnPNpPWSCeNrFkP leyla@defiant" | ||||||
|  |             "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKBiZkg1c2aaNHiieBX4cEziqvJVj9pcDfzUrKU/mO0I leyla@twilight" | ||||||
|  |           ]; | ||||||
|  |           hostKeys = [ | ||||||
|  |             { | ||||||
|  |               type = "ed25519"; | ||||||
|  |               path = "${config.home.username}_${osConfig.networking.hostName}_ed25519"; | ||||||
|  |             } | ||||||
|  |           ]; | ||||||
|  |         }; | ||||||
|  |       }; | ||||||
|  |     }) | ||||||
|  |   ]; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -8,7 +8,9 @@ | ||||||
| }: let | }: let | ||||||
|   nix-development-enabled = osConfig.host.nix-development.enable; |   nix-development-enabled = osConfig.host.nix-development.enable; | ||||||
|   ai-tooling-enabled = config.user.continue.enable && osConfig.host.ai.enable; |   ai-tooling-enabled = config.user.continue.enable && osConfig.host.ai.enable; | ||||||
|  |   is-desktop-user = osConfig.host.users.leyla.isDesktopUser; | ||||||
| in { | in { | ||||||
|  |   config = lib.mkIf is-desktop-user { | ||||||
|     nixpkgs = { |     nixpkgs = { | ||||||
|       overlays = [ |       overlays = [ | ||||||
|         inputs.nix-vscode-extensions.overlays.default |         inputs.nix-vscode-extensions.overlays.default | ||||||
|  | @ -115,4 +117,5 @@ in { | ||||||
|         }; |         }; | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
|  |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,6 +1,9 @@ | ||||||
| { config, lib, pkgs, ... }: |  | ||||||
| { | { | ||||||
| 
 |   config, | ||||||
|  |   lib, | ||||||
|  |   pkgs, | ||||||
|  |   ... | ||||||
|  | }: { | ||||||
|   # Enable OpenGL |   # Enable OpenGL | ||||||
|   hardware.graphics = { |   hardware.graphics = { | ||||||
|     enable = true; |     enable = true; | ||||||
|  | @ -10,7 +13,6 @@ | ||||||
|   services.xserver.videoDrivers = ["nvidia"]; |   services.xserver.videoDrivers = ["nvidia"]; | ||||||
| 
 | 
 | ||||||
|   hardware.nvidia = { |   hardware.nvidia = { | ||||||
| 
 |  | ||||||
|     # Modesetting is required. |     # Modesetting is required. | ||||||
|     modesetting.enable = true; |     modesetting.enable = true; | ||||||
| 
 | 
 | ||||||
|  | @ -39,4 +41,4 @@ | ||||||
|     # Optionally, you may need to select the appropriate driver version for your specific GPU. |     # Optionally, you may need to select the appropriate driver version for your specific GPU. | ||||||
|     package = config.boot.kernelPackages.nvidiaPackages.stable; |     package = config.boot.kernelPackages.nvidiaPackages.stable; | ||||||
|   }; |   }; | ||||||
|  } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue