Compare commits
9 Commits
f61e043b1c
...
tmux
| Author | SHA1 | Date | |
|---|---|---|---|
| 198cfbc9e4 | |||
| 02c3366bff | |||
| 9329547aab | |||
| c19ff6e778 | |||
| cb725d9f1a | |||
| e4863b1b3d | |||
| 50aa7ca367 | |||
| 86a5a36783 | |||
| cab9d1e7f9 |
+61
-13
@@ -8,7 +8,6 @@
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
];
|
||||
|
||||
## Commented out as defined at the end of the page
|
||||
@@ -50,9 +49,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 +90,23 @@
|
||||
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
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
@@ -129,7 +134,7 @@
|
||||
# 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?
|
||||
|
||||
### Start of self configuration
|
||||
# Configure grub to provide ubuntu option
|
||||
@@ -139,7 +144,7 @@
|
||||
boot.loader.grub.efiSupport = true;
|
||||
# boot.loader.grub.efiInstallAsRemovable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
|
||||
# Enable fingerprint sensor
|
||||
services.fprintd.enable = true;
|
||||
|
||||
@@ -154,9 +159,17 @@
|
||||
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;
|
||||
@@ -213,4 +226,39 @@
|
||||
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"
|
||||
'';
|
||||
|
||||
# Gnome Configuration
|
||||
fonts.packages = [
|
||||
pkgs.adwaita-icon-theme
|
||||
pkgs.nerd-fonts._0xproto
|
||||
];
|
||||
fonts.fontconfig.enable = true;
|
||||
services.gnome.core-apps.enable = false;
|
||||
services.gnome.core-developer-tools.enable = false;
|
||||
services.gnome.games.enable = false;
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-tour gnome-user-docs
|
||||
];
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gnome";
|
||||
style = "adwaita-dark";
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
Generated
-48
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762787259,
|
||||
"narHash": "sha256-t2U/GLLXHa2+kJkwnFNRVc2fEJ/lUfyZXBE5iKzJdcs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "37a3d97f2873e0f68711117c34d04b7c7ead8f4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1762596750,
|
||||
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }: {
|
||||
nixosConfigurations = {
|
||||
yourhostname = nixpkgs.lib.nixosSystem {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
@@ -38,7 +38,7 @@
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.yourusername = import ./home.nix;
|
||||
home-manager.users.l-wyatt = import ./home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -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,24 +59,31 @@
|
||||
'';
|
||||
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 = ''
|
||||
# Only start Zellij if we're in an interactive terminal
|
||||
if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then
|
||||
exec zellij
|
||||
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 tmux if we're in an interactive terminal
|
||||
if [ -z "$TMUX" ] && [ "$TERM" != "linux" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
'';
|
||||
|
||||
@@ -72,23 +91,42 @@
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable zellij (terminal multiplexing)
|
||||
programs.zellij = {
|
||||
# Enable tmux (terminal multiplexing)
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
# Optional: write your own config to ~/.config/zellij/config.kdl
|
||||
settings = {
|
||||
theme = "default";
|
||||
pane_frames = true;
|
||||
default_layout = "compact";
|
||||
};
|
||||
# Basic tmux configuration
|
||||
terminal = "screen-256color";
|
||||
historyLimit = 10000;
|
||||
keyMode = "vi";
|
||||
mouse = true;
|
||||
|
||||
extraConfig = ''
|
||||
# Set prefix to Ctrl-a instead of Ctrl-b
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
# Split panes using | and -
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Reload config file
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
'';
|
||||
};
|
||||
|
||||
# Neovim management
|
||||
@@ -118,8 +156,14 @@
|
||||
|
||||
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,6 +180,7 @@
|
||||
hostname = "10.0.0.20";
|
||||
port = 22;
|
||||
user = "l-wyatt";
|
||||
proxyJump = "_JumpHost";
|
||||
};
|
||||
"git" = {
|
||||
hostname = "10.0.0.9";
|
||||
@@ -151,9 +196,6 @@
|
||||
# ControlPath /tmp/cm-%r@%h:%p
|
||||
# '';
|
||||
|
||||
controlMaster = "auto";
|
||||
controlPersist = "1m";
|
||||
controlPath = "~/.ssh/cm-%r@%h:%p";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user