feat: Initial NixOS systems config for laptop

This commit is contained in:
2025-12-03 18:06:10 -05:00
committed by Hunter Halloran
commit 04a3562973
11 changed files with 940 additions and 0 deletions

43
users/default.nix Normal file
View File

@@ -0,0 +1,43 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
# Define a user account. Don't forget to set a password with passwd.
users.users = {
root.hashedPassword = "!";
engr-ugaif = {
isNormalUser = true;
description = "UGA Innovation Factory";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
];
hashedPassword = "$6$El6e2NhPrhVFjbFU$imlGZqUiizWw5fMP/ib0CeboOcFhYjIVb8oR1V1dP2NjDeri3jMoUm4ZABOB2uAF8UEDjAGHhFuZxhtbHg647/";
};
hdh20267 = {
isNormalUser = true;
description = "Hunter Halloran";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
];
shell = pkgs.zsh;
};
};
# Home Manager configs per user
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users = {
"engr-ugaif" = import ./engr-ugaif.nix;
"hdh20267" = import ./hdh20267.nix;
"root" = import ./root.nix;
};
};
}

78
users/engr-ugaif.nix Normal file
View File

@@ -0,0 +1,78 @@
{ config, pkgs, lib, ... }:
let
# Fetch upstream OMP theme once
jyumppTheme = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/Jyumpp/jyumpp-zsh-theme/refs/heads/master/.jyumpp.omp.json";
# After first build Nix will show the wanted hash; add it here for reproducibility:
hash = "sha256-jsN3hkyT0dJNTYEmDHQPp++oscQLgYGNj7PZAcIW2TA=";
};
in
{
home.username = "engr-ugaif";
home.homeDirectory = "/home/engr-ugaif";
home.stateVersion = "25.11";
home.packages = [];
programs.zsh = {
enable = true;
# Plugins
historySubstringSearch = {
enable = true;
searchDownKey = "^[[B";
searchUpKey = "^[[A";
};
zplug = {
enable = true;
plugins = [
{
name = "jeffreytse/zsh-vi-mode";
}
{
name = "BronzeDeer/zsh-completion-sync";
}
];
};
history = {
append = true;
};
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.lsd = {
enable = true;
enableZshIntegration = true;
};
programs.oh-my-posh = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile(jyumppTheme)));
};
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
xdg.configFile."nvim/parser".source =
let
parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [
c
lua
])).dependencies;
};
in
"${parsers}/parser";
}

78
users/hdh20267.nix Normal file
View File

@@ -0,0 +1,78 @@
{ config, pkgs, lib, ... }:
let
# Fetch upstream OMP theme once
jyumppTheme = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/Jyumpp/jyumpp-zsh-theme/refs/heads/master/.jyumpp.omp.json";
# After first build Nix will show the wanted hash; add it here for reproducibility:
hash = "sha256-jsN3hkyT0dJNTYEmDHQPp++oscQLgYGNj7PZAcIW2TA=";
};
in
{
home.username = "hdh20267";
home.homeDirectory = "/home/hdh20267";
home.stateVersion = "25.11";
home.packages = [];
programs.zsh = {
enable = true;
# Plugins
historySubstringSearch = {
enable = true;
searchDownKey = "^[[B";
searchUpKey = "^[[A";
};
zplug = {
enable = true;
plugins = [
{
name = "jeffreytse/zsh-vi-mode";
}
{
name = "BronzeDeer/zsh-completion-sync";
}
];
};
history = {
append = true;
};
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.lsd = {
enable = true;
enableZshIntegration = true;
};
programs.oh-my-posh = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile(jyumppTheme)));
};
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
xdg.configFile."nvim/parser".source =
let
parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [
c
lua
])).dependencies;
};
in
"${parsers}/parser";
}

51
users/root.nix Normal file
View File

@@ -0,0 +1,51 @@
{ config, pkgs, lib, ... }:
let
# Fetch upstream OMP theme once
jyumppTheme = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/Jyumpp/jyumpp-zsh-theme/refs/heads/master/.jyumpp.omp.json";
# After first build Nix will show the wanted hash; add it here for reproducibility:
sha256 = "sha256-jsN3hkyT0dJNTYEmDHQPp++oscQLgYGNj7PZAcIW2TA=";
};
# Make a root variant with red username (wraps {{ .UserName }} with ANSI red)
jyumppRootTheme = pkgs.runCommand "jyumpp-root.omp.json" {} ''
sed -E 's|\{\{[[:space:]]*\.UserName[[:space:]]*\}\}|<#FF3B30>{{ .UserName }}</>|g' \
${jyumppTheme} > $out
'';
in
{
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "25.05";
programs.zsh = {
enable = true;
# Plugins
historySubstringSearch = {
enable = true;
searchDownKey = "^[[B";
searchUpKey = "^[[A";
};
history = {
append = true;
};
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
programs.oh-my-posh = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
settings = builtins.fromJSON (builtins.unsafeDiscardStringContext (builtins.readFile(jyumppRootTheme)));
};
# Add any root-specific HM packages if desired
home.packages = [ ];
}