Compare commits
9 Commits
f61e043b1c
...
tmux
| Author | SHA1 | Date | |
|---|---|---|---|
| 198cfbc9e4 | |||
| 02c3366bff | |||
| 9329547aab | |||
| c19ff6e778 | |||
| cb725d9f1a | |||
| e4863b1b3d | |||
| 50aa7ca367 | |||
| 86a5a36783 | |||
| cab9d1e7f9 |
+59
-11
@@ -8,7 +8,6 @@
|
|||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
/etc/nixos/hardware-configuration.nix
|
/etc/nixos/hardware-configuration.nix
|
||||||
<home-manager/nixos>
|
|
||||||
];
|
];
|
||||||
|
|
||||||
## Commented out as defined at the end of the page
|
## Commented out as defined at the end of the page
|
||||||
@@ -50,9 +49,12 @@
|
|||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
# Enable the KDE Plasma Desktop Environment.
|
||||||
services.displayManager.sddm.enable = true;
|
#services.displayManager.sddm.enable = true;
|
||||||
services.desktopManager.plasma6.enable = true;
|
#services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
# Enable Gnome
|
||||||
|
services.displayManager.gdm.enable = true;
|
||||||
|
services.desktopManager.gnome.enable = true;
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver.xkb = {
|
services.xserver.xkb = {
|
||||||
layout = "us";
|
layout = "us";
|
||||||
@@ -88,20 +90,23 @@
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Wyatt";
|
description = "Wyatt";
|
||||||
shell = pkgs.zsh;
|
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;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
home-manager
|
home-manager
|
||||||
firefox
|
firefox
|
||||||
docker
|
|
||||||
vmware-workstation
|
vmware-workstation
|
||||||
cacert
|
cacert
|
||||||
|
lunar-client
|
||||||
|
jetbrains.rust-rover
|
||||||
|
code-cursor
|
||||||
|
adwaita-icon-theme
|
||||||
|
obsidian
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# 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.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (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
|
### Start of self configuration
|
||||||
# Configure grub to provide ubuntu option
|
# Configure grub to provide ubuntu option
|
||||||
@@ -154,9 +159,17 @@
|
|||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Enable docker
|
# Enable docker
|
||||||
virtualisation.docker.rootless = {
|
boot.kernel.sysctl = {
|
||||||
enable = true;
|
"kernel.unprivileged_userns_clone" = 1;
|
||||||
setSocketVariable = true;
|
"user.max_user_namespaces" = 28633;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
rootless = {
|
||||||
|
enable = true;
|
||||||
|
setSocketVariable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.vmware.host.enable = true;
|
virtualisation.vmware.host.enable = true;
|
||||||
@@ -213,4 +226,39 @@
|
|||||||
xdg-desktop-portal-hyprland
|
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, ... }: {
|
outputs = { self, nixpkgs, home-manager, ... }: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
yourhostname = nixpkgs.lib.nixosSystem {
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = 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.username = "l-wyatt";
|
||||||
home.homeDirectory = "/home/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
|
# Packages for this user
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@@ -16,6 +16,14 @@
|
|||||||
nmap
|
nmap
|
||||||
file
|
file
|
||||||
freerdp
|
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 = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"hyprpaper"
|
||||||
|
];
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
bind = [
|
bind = [
|
||||||
"$mod, Q, exec, konsole"
|
"$mod, Q, exec, konsole"
|
||||||
@@ -47,24 +59,31 @@
|
|||||||
'';
|
'';
|
||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
# Run hyprpaper to set wallpaper
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
|
||||||
exec-once = [
|
|
||||||
"hyprpaper"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# Enable Zsh and configure it
|
# Enable Zsh and configure it
|
||||||
home.file.".zshrc".force = true;
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
oh-my-zsh.enable = true;
|
oh-my-zsh.enable = true;
|
||||||
oh-my-zsh.theme = "agnoster";
|
oh-my-zsh.theme = "agnoster";
|
||||||
initContent = ''
|
initContent = ''
|
||||||
# Only start Zellij if we're in an interactive terminal
|
export SHELL=$(which zsh)
|
||||||
if [ -z "$ZELLIJ" ] && [ "$TERM" != "linux" ]; then
|
alias nix-shell='nix-shell --run $SHELL'
|
||||||
exec zellij
|
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
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@@ -72,23 +91,42 @@
|
|||||||
# Manage your git configuration declaratively
|
# Manage your git configuration declaratively
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "0xWheatyz";
|
settings = {
|
||||||
userEmail = "wyatt@leeworks.dev";
|
user = {
|
||||||
extraConfig = {
|
name = "0xWheatyz";
|
||||||
|
email = "wyatt@leeworks.dev";
|
||||||
|
};
|
||||||
init.defaultBranch = "master";
|
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)
|
# Enable tmux (terminal multiplexing)
|
||||||
programs.zellij = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Optional: write your own config to ~/.config/zellij/config.kdl
|
# Basic tmux configuration
|
||||||
settings = {
|
terminal = "screen-256color";
|
||||||
theme = "default";
|
historyLimit = 10000;
|
||||||
pane_frames = true;
|
keyMode = "vi";
|
||||||
default_layout = "compact";
|
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
|
# Neovim management
|
||||||
@@ -118,8 +156,14 @@
|
|||||||
|
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableDefaultConfig = false;
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
"vps" = {
|
"*" = {
|
||||||
|
controlMaster = "auto";
|
||||||
|
controlPersist = "1m";
|
||||||
|
controlPath = "~/.ssh/cm-%r@%h:%p";
|
||||||
|
};
|
||||||
|
"vps" = {
|
||||||
hostname = "45.79.198.105";
|
hostname = "45.79.198.105";
|
||||||
user = "wyatt";
|
user = "wyatt";
|
||||||
port = 22;
|
port = 22;
|
||||||
@@ -136,6 +180,7 @@
|
|||||||
hostname = "10.0.0.20";
|
hostname = "10.0.0.20";
|
||||||
port = 22;
|
port = 22;
|
||||||
user = "l-wyatt";
|
user = "l-wyatt";
|
||||||
|
proxyJump = "_JumpHost";
|
||||||
};
|
};
|
||||||
"git" = {
|
"git" = {
|
||||||
hostname = "10.0.0.9";
|
hostname = "10.0.0.9";
|
||||||
@@ -151,9 +196,6 @@
|
|||||||
# ControlPath /tmp/cm-%r@%h:%p
|
# 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