deduplicated host configs, defined more things in common.nix files.

This commit is contained in:
Gabe Venberg 2024-06-05 13:39:25 -05:00
parent fada583de6
commit 04783f1580
6 changed files with 24 additions and 70 deletions

View file

@ -36,9 +36,16 @@
};
# packages that should be on every system.
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
];
environment.systemPackages = [pkgs.neovim];
programs.zsh.enable = lib.mkDefault true;
environment.shells = lib.mkDefault [pkgs.zsh];
users.users.${config.host.user} = {
isNormalUser = true;
description = config.host.fullName;
shell = pkgs.zsh;
extraGroups = ["wheel"];
};
imports = [
../../modules/hostopts.nix

View file

@ -27,25 +27,17 @@ inputs.nixpkgs.lib.nixosSystem {
}: {
host = {
user = "gabe";
fullName = "Gabe Venberg";
gui.enable = true;
isVm = true;
};
networking.hostName = "archlaptop-vm"; # Define your hostname.
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
users.mutableUsers = false;
# Define a user account. Don't forget to set a password with passwd.
users.users.${config.host.user} = {
hashedPasswordFile = config.sops.secrets.gv-password.path;
isNormalUser = true;
description = "Gabe Venberg";
shell = pkgs.zsh;
extraGroups = ["wheel"];
packages = with pkgs; [
firefox
# thunderbird
];
packages = with pkgs; [firefox];
};
home-manager.sharedModules = [
@ -60,7 +52,7 @@ inputs.nixpkgs.lib.nixosSystem {
user = {
git = {
profile = {
name = "Gabe Venberg";
name = config.host.fullName;
email = "gabevenberg@gmail.com";
};
workProfile.enable = false;

View file

@ -33,38 +33,17 @@ inputs.nixpkgs.lib.nixosSystem {
}: {
host = {
user = "gabe";
fullName = "Gabe Venberg";
gui.enable = true;
isVm = true;
};
networking.hostName = "workstation-vm"; # Define your hostname.
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
users.users.root.openssh.authorizedKeys.keys =
configLib.dirToStrings "${inputs.nix-secrets}/public-keys";
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.${config.host.user} = {
hashedPasswordFile = config.sops.secrets.gv-password.path;
isNormalUser = true;
description = "Gabe Venberg";
shell = pkgs.zsh;
extraGroups = ["wheel"];
packages = with pkgs; [
firefox
# thunderbird
];
};
@ -89,8 +68,6 @@ inputs.nixpkgs.lib.nixosSystem {
inputs.nixvim.homeManagerModules.nixvim
];
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;

View file

@ -22,20 +22,10 @@ inputs.nixpkgs.lib.nixosSystem {
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
host = {
user = "nixos";
fullName = "Gabe Venberg";
};
networking.hostName = "gv-wsl"; # Define your hostname.
# Set your time zone.
time.timeZone = "America/Chicago";
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
# Define a user account. Don't forget to set a password with passwd.
users.users.${config.host.user} = {
isNormalUser = true;
description = "Gabe Venberg";
shell = pkgs.zsh;
extraGroups = ["wheel"];
};
home-manager.users.${config.host.user} = {
inputs,
osConfig,
@ -49,7 +39,7 @@ inputs.nixpkgs.lib.nixosSystem {
};
git = {
profile = {
name = "Gabe Venberg";
name = config.host.fullName;
email = "gabevenberg@gmail.com";
};
workProfile.enable = false;
@ -62,8 +52,6 @@ inputs.nixpkgs.lib.nixosSystem {
];
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -22,15 +22,10 @@ inputs.nixos-generators.nixosGenerate {
imports = [(modulesPath + "/virtualisation/proxmox-lxc.nix")];
proxmoxLXC.manageHostName = false;
host.user = "gabe";
host.fullName = "Gabe Venberg";
users.users.root.password = "nixos";
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
users.users.${config.host.user} = {
isNormalUser = true;
description = "Gabe Venberg";
shell = pkgs.zsh;
extraGroups = ["wheel"];
password = "nixos";
};
@ -43,7 +38,7 @@ inputs.nixos-generators.nixosGenerate {
user = {
git = {
profile = {
name = "Gabe Venberg";
name = config.host.fullName;
email = "gabevenberg@gmail.com";
};
workProfile.enable = false;

View file

@ -22,15 +22,10 @@ inputs.nixos-generators.nixosGenerate {
}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
host.user = "gabe";
host.fullName = "Gabe Venberg";
users.users.root.password = "nixos";
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
users.users.${config.host.user} = {
isNormalUser = true;
description = "Gabe Venberg";
shell = pkgs.zsh;
extraGroups = ["wheel"];
password = "nixos";
};
@ -43,7 +38,7 @@ inputs.nixos-generators.nixosGenerate {
user = {
git = {
profile = {
name = "Gabe Venberg";
name = config.host.fullName;
email = "gabevenberg@gmail.com";
};
workProfile.enable = false;