Compare commits

..

10 Commits

7 changed files with 382 additions and 138 deletions
+138 -26
View File
@@ -1,14 +1,27 @@
# 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).
# and in the NixOS manual (accessible by running 'nixos-help').
{ config, pkgs, ... }:
let
# Fetch home-manager
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
};
# Fetch kickstart-nvim
kickstart-nvim = builtins.fetchGit {
url = "https://github.com/0xWheatyz/kickstart.nvim";
ref = "master";
};
in
{
imports =
[ # Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
<home-manager/nixos>
./hardware-configuration.nix
# Import home-manager module
(import "${home-manager}/nixos")
];
## Commented out as defined at the end of the page
@@ -50,9 +63,12 @@
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
#services.displayManager.sddm.enable = true;
#services.desktopManager.plasma6.enable = true;
# Enable Gnome
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
@@ -88,20 +104,24 @@
isNormalUser = true;
description = "Wyatt";
shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" ];
linger = true;
extraGroups = [ "networkmanager" "wheel" "docker" "dialout" ];
};
home-manager.users.l-wyatt = import /home/l-wyatt/.config/home-manager/home.nix;
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
home-manager
firefox
docker
vmware-workstation
cacert
lunar-client
jetbrains.rust-rover
code-cursor
adwaita-icon-theme
obsidian
claude-code
];
# Some programs need SUID wrappers, can be configured further or are
@@ -129,8 +149,37 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment?
system.stateVersion = "25.11"; # Did you read the comment?
# Home Manager Configuration
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.l-wyatt = import ./home.nix;
home-manager.sharedModules = [
# Kickstart-nvim module
({ config, lib, pkgs, ... }: {
options.programs.neovim-kickstart = {
enable = lib.mkEnableOption "kickstart.nvim configuration";
};
config = lib.mkIf config.programs.neovim-kickstart.enable {
home.file.".config/nvim" = {
source = kickstart-nvim;
recursive = true;
};
home.packages = with pkgs; [
neovim
ripgrep
fd
gcc
gnumake
git
];
};
})
];
### Start of self configuration
# Configure grub to provide ubuntu option
boot.loader.grub.enable = true;
@@ -139,7 +188,7 @@
boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable fingerprint sensor
services.fprintd.enable = true;
@@ -148,15 +197,23 @@
services.blueman.enable = true;
# Allow /etc/hosts to be modified without system rebuild
environment.etc.hosts.mode = "0700";
environment.etc.hosts.mode = "0644";
# Enable flakes and extras
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enable docker
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
boot.kernel.sysctl = {
"kernel.unprivileged_userns_clone" = 1;
"user.max_user_namespaces" = 28633;
};
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
virtualisation.vmware.host.enable = true;
@@ -200,17 +257,72 @@
# security.pki.certificateFiles = [ /etc/nixos/certs/ipa-ca.crt ];
programs.hyprland = {
enable = true;
withUWSM = true; # Recommended for NixOS 24.11+
xwayland.enable = true;
};
# Enable necessary services
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
];
};
security.pam.services = {
login.u2fAuth = true;
sudo.u2fAuth = true;
};
services.udev.extraRules = ''
ACTION=="remove",\
ENV{ID_BUS}=="usb",\
ENV{ID_MODEL_ID}=="0407",\
ENV{ID_VENDOR_ID}=="1050",\
ENV{ID_VENDOR}=="Yubico",\
RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
'';
# Optimize shutdown handling to prevent user manager hangs
# Reduce timeout for user manager service during shutdown (default is 90s, reducing to 30s)
# This prevents the 2-minute hang when shutting down with linger enabled
systemd.services."user@".serviceConfig = {
TimeoutStopSec = "30s";
};
# Reduce default timeout for all user services
systemd.user.extraConfig = ''
DefaultTimeoutStopSec=30s
'';
# Gnome Configuration
fonts.packages = [
pkgs.adwaita-icon-theme
pkgs.nerd-fonts._0xproto
];
fonts.fontconfig.enable = true;
services.gnome = {
core-apps.enable = true;
core-developer-tools.enable = true;
games.enable = false;
};
services.desktopManager.gnome.extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer', 'xwayland-native-scaling']
'';
environment.gnome.excludePackages = with pkgs; [
gnome-tour gnome-user-docs
];
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
security.wrappers = {
# Low-level unprivileged sandboxing tool, see <https://github.com/containers/bubblewrap>.
bwrap = {
owner = "root";
group = "root";
source = "${pkgs.bubblewrap}/bin/bwrap";
setuid = true;
};
};
}
+32
View File
@@ -0,0 +1,32 @@
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/j4hbw1ws742nmsfhbd9r22k1qgivk7hc-nixos-25.11/nixos/lib/attrsets.nix:1696:13:
1695| if length values == 1 || pred here (elemAt values 1) (head values) then
1696| head values
| ^
1697| else
… while evaluating the attribute 'value'
at /nix/store/j4hbw1ws742nmsfhbd9r22k1qgivk7hc-nixos-25.11/nixos/lib/modules.nix:1118:7:
1117| // {
1118| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1119| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/j4hbw1ws742nmsfhbd9r22k1qgivk7hc-nixos-25.11/nixos/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/qlchl88ml287pcv5xqyrpcq7jjyl3qgm-home-manager-25.11.tar.gz/home-manager/nixos/common.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `home-manager.users.l-wyatt.programs.neovim-kickstart' does not exist. Definition values:
- In `/home/l-wyatt/Documents/nixos-configuration/configuration.nix':
{
enable = true;
}
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.toplevel --no-out-link' returned non-zero exit status 1.
Generated
+79 -9
View File
@@ -1,5 +1,23 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -7,39 +25,91 @@
]
},
"locked": {
"lastModified": 1762787259,
"narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=",
"lastModified": 1772633058,
"narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e",
"rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"kickstart-nvim": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1771545825,
"narHash": "sha256-xGrTr8aXGzKBpF+RRwnLR8y8yDweojaoqttfA6RH1ws=",
"owner": "0xWheatyz",
"repo": "kickstart.nvim",
"rev": "cef178c27d1b3840d943f5a28b3a45f9eae049d7",
"type": "github"
},
"original": {
"owner": "0xWheatyz",
"repo": "kickstart.nvim",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1762596750,
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
"owner": "NixOS",
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1772822230,
"narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "71caefce12ba78d84fe618cf61644dce01cf3a96",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"kickstart-nvim": "kickstart-nvim",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
+14 -26
View File
@@ -1,36 +1,18 @@
{
description = "FrostPhoenix's nixos configuration";
description = "NixOS configuration with home-manager and kickstart.nvim";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming.url = "github:fufexan/nix-gaming";
nix-flatpak.url = "github:gmodena/nix-flatpak";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
maple-mono = {
url = "github:subframe7536/maple-font/variable";
flake = false;
};
superfile.url = "github:yorukot/superfile";
vicinae.url = "github:vicinaehq/vicinae";
zen-browser.url = "github:0xc000022070/zen-browser-flake/beta";
kickstart-nvim.url = "github:0xWheatyz/kickstart.nvim";
};
outputs = { self, nixpkgs, home-manager, ... }: {
outputs = { self, nixpkgs, home-manager, kickstart-nvim, ... }: {
nixosConfigurations = {
yourhostname = nixpkgs.lib.nixosSystem {
nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
@@ -38,10 +20,16 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.yourusername = import ./home.nix;
home-manager.users.l-wyatt = import /home/l-wyatt/.config/home-manager/home.nix;
home-manager.extraSpecialArgs = {
inherit kickstart-nvim;
};
home-manager.sharedModules = [
kickstart-nvim.homeManagerModules.default
];
}
];
};
};
};
}`
}
+39
View File
@@ -0,0 +1,39 @@
# Do not modify this file! It was generated by 'nixos-generate-config'
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2e63927a-129d-400a-b532-5e98dd1f53d0";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6FAB-C1E3";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp193s0f3u2.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+80 -40
View File
@@ -3,7 +3,7 @@
{
home.username = "l-wyatt";
home.homeDirectory = "/home/l-wyatt";
home.stateVersion = "25.05"; # Don't change after first setup
home.stateVersion = "25.11"; # Don't change after first setup
# Packages for this user
home.packages = with pkgs; [
@@ -16,6 +16,14 @@
nmap
file
freerdp
bitwarden-desktop
bitwarden-cli
lunarvim
minicom
kicad
gnomeExtensions.blur-my-shell
gnomeExtensions.just-perfection
gnomeExtensions.arc-menu
];
# --------------------------
@@ -25,6 +33,10 @@
wayland.windowManager.hyprland = {
enable = true;
settings = {
exec-once = [
"hyprpaper"
];
"$mod" = "SUPER";
bind = [
"$mod, Q, exec, konsole"
@@ -47,21 +59,28 @@
'';
force = true;
};
# Run hyprpaper to set wallpaper
wayland.windowManager.hyprland.settings = {
exec-once = [
"hyprpaper"
];
};
# Enable Zsh and configure it
home.file.".zshrc".force = true;
programs.zsh = {
enable = true;
oh-my-zsh.enable = true;
oh-my-zsh.theme = "agnoster";
initContent = ''
export SHELL=$(which zsh)
alias nix-shell='nix-shell --run $SHELL'
nix() {
if [[ $1 == "develop" ]]; then
shift
command nix develop "$@" -c $SHELL
else
command nix "$@"
fi
}
if [ -n "$NIX_PROJECT_SHELL" ]; then
PROMPT="($NIX_PROJECT_SHELL)$PROMPT"
fi
# Only start Zellij if we're in an interactive terminal
if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then
exec zellij
@@ -69,13 +88,26 @@
'';
};
# Configure cursor theme
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
size = 24;
};
# Manage your git configuration declaratively
programs.git = {
enable = true;
userName = "0xWheatyz";
userEmail = "wyatt@leeworks.dev";
extraConfig = {
settings = {
user = {
name = "0xWheatyz";
email = "wyatt@leeworks.dev";
};
init.defaultBranch = "master";
push.autoSetupRemote = "true";
alias.lg = "log --graph --pretty=format:'%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit";
};
};
@@ -91,35 +123,45 @@
};
};
# Neovim management
programs.neovim = {
enable = true;
defaultEditor = true;
# Neovim management - using kickstart.nvim via flake
# Basic fallback config (uncomment if not using the flake)
#programs.neovim = {
# enable = true;
# defaultEditor = true;
#
# # Load Lua config inline
# extraLuaConfig = ''
# vim.opt.number = true
# vim.opt.tabstop = 2
# vim.opt.shiftwidth = 2
# vim.opt.expandtab = true
# vim.opt.relativenumber = true
#
# require("telescope").setup {}
# require("nvim-treesitter.configs").setup { highlight = { enable = true } }
# '';
#
# plugins = with pkgs.vimPlugins; [
# telescope-nvim
# nvim-treesitter
# nvim-lspconfig
# gruvbox
# ];
#};
# Load Lua config inline
extraLuaConfig = ''
vim.opt.number = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.relativenumber = true
require("telescope").setup {}
require("nvim-treesitter.configs").setup { highlight = { enable = true } }
'';
plugins = with pkgs.vimPlugins; [
telescope-nvim
nvim-treesitter
nvim-lspconfig
gruvbox
];
};
# Use kickstart.nvim configuration from flake
programs.neovim-kickstart.enable = true;
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"vps" = {
"*" = {
controlMaster = "auto";
controlPersist = "1m";
controlPath = "~/.ssh/cm-%r@%h:%p";
};
"vps" = {
hostname = "45.79.198.105";
user = "wyatt";
port = 22;
@@ -136,10 +178,11 @@
hostname = "10.0.0.20";
port = 22;
user = "l-wyatt";
proxyJump = "_JumpHost";
};
"git" = {
hostname = "10.0.0.9";
port = 122;
hostname = "10.0.1.10";
port = 22;
user = "git";
};
};
@@ -151,9 +194,6 @@
# ControlPath /tmp/cm-%r@%h:%p
# '';
controlMaster = "auto";
controlPersist = "1m";
controlPath = "~/.ssh/cm-%r@%h:%p";
};
}
-37
View File
@@ -1,37 +0,0 @@
{ config, pkgs, ... }:
{
imports = [ ./configuration.nix ];
# VM-specific settings
virtualisation = {
memorySize = 4096;
cores = 4;
graphics = true;
resolution = { x = 1920; y = 1080; };
};
# Enable Hyprland for testing
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Minimal desktop setup
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
# Add a test user
users.users.testuser = {
isNormalUser = true;
password = "test";
extraGroups = [ "wheel" ];
};
# Enable auto-login for testing
services.displayManager.autoLogin = {
enable = true;
user = "l-wyatt";
};
}