real checkpoint, forgot to add

This commit is contained in:
jeirmeister 2024-11-02 00:21:53 -07:00
parent 8bf68245b1
commit 2769723008
Signed by: jeirmeister
GPG Key ID: 33A40DF62D35C4A7
54 changed files with 273 additions and 255 deletions

View File

@ -9,10 +9,10 @@ gitignore-import-and-ignore: True
# and "Contents of ..." sections
ignore-tree-and-content:
- ".repo-to-text-settings.yaml"
- "documentation"
- ".git-crypt"
# Ignore files and directories for "Contents of ..." section
ignore-content:
- "README.md"
- "LICENSE"
- "documentation"

63
flake.nix Normal file
View File

@ -0,0 +1,63 @@
{
description = "Jeirmeister's NixOS Configuration";
nixConfig = {
extra-substituters = [
"https://nix-gaming.cachix.org"
];
extra-trusted-public-keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
];
};
inputs = {
# Core dependencies
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Gaming-specific inputs
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
};
# Additional tools
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs:
let
lib = nixpkgs.lib.extend
(final: prev: import ./lib { inherit inputs self; lib = final; });
in
{
nixosConfigurations = {
steamnix = lib.mkHost {
hostname = "steamnix";
username = "jeirmeister";
system = "x86_64-linux";
profiles = [ "gaming" "desktop/plasma" ];
};
};
homeConfigurations = {
"jeirmeister@steamnix" = lib.mkHome {
username = "jeirmeister";
hostname = "steamnix";
profiles = [ "desktop" "development" "gaming" ];
};
};
# Custom packages and overlays
overlays = import ./overlays { inherit self; };
# Formatter
formatter = lib.forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt);
};
}

View File

@ -1,39 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./users/jeirmeister/programs/desktop
./users/jeirmeister/programs/development
./users/jeirmeister/programs/gaming
./users/jeirmeister/programs/shell
./users/jeirmeister/programs/development
];
# Basic configuration
home = {
username = "jeirmeister";
homeDirectory = "/home/jeirmeister";
stateVersion = "24.05";
packages = with pkgs; [
fortune
coreutils
gnused
findutils
];
};
# Essential settings
programs.home-manager.enable = true;
xdg.enable = true;
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
}

View File

@ -2,9 +2,7 @@
{
imports = [
./direnv.nix
./common
./languages
./gpg.nix
./ssh.nix
];
}

View File

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
# System management
ll = "ls -la";
update = "sudo nixos-rebuild switch";
# Home manager
hm = "home-manager";
hms = "home-manager switch";
# Tmux
ta = "tmux attach -t";
tl = "tmux list-sessions";
tn = "tmux new-session -s";
"tmux-help" = "bat ${config.xdg.configHome}/tmux/tmux-man.md --plain";
# Tmux natural language commands
"save-session" = "tmux command-prompt -p 'Command:' 'run-shell \"${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/scripts/save.sh\"'";
"restore-session" = "tmux command-prompt -p 'Command:' 'run-shell \"${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/scripts/restore.sh\"'";
"yank-text" = "tmux command-prompt -p 'Command:' 'run-shell \"tmux show-buffer | ${pkgs.xclip}/bin/xclip -selection clipboard\"'";
}

View File

@ -0,0 +1,13 @@
{ config, lib, pkgs, sharedAliases, ... }:
{
programs.bash = {
enable = true;
shellAliases = sharedAliases;
initExtra = ''
# Add nix profile to PATH
export PATH=$HOME/.nix-profile/bin:$PATH
'';
};
}

View File

@ -0,0 +1,88 @@
{ config, lib, pkgs, ... }:
let
sharedAliases = {
# System management
ll = "ls -la";
update = "sudo nixos-rebuild switch";
# Home manager
hm = "home-manager";
hms = "home-manager switch";
# Tmux
ta = "tmux attach -t";
tl = "tmux list-sessions";
tn = "tmux new-session -s";
"tmux-help" = "bat ${config.xdg.configHome}/tmux/tmux-man.md --plain";
# Tmux natural language commands
"save-session" = "tmux command-prompt -p 'Command:' 'run-shell \"${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/scripts/save.sh\"'";
"restore-session" = "tmux command-prompt -p 'Command:' 'run-shell \"${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/scripts/restore.sh\"'";
"yank-text" = "tmux command-prompt -p 'Command:' 'run-shell \"tmux show-buffer | ${pkgs.xclip}/bin/xclip -selection clipboard\"'";
};
in
{
imports = [
./bash.nix
./zsh.nix
];
# Export the shared aliases for importing in other modules
_module.args.sharedAliases = sharedAliases;
# Shared shell options
home.sessionVariables = {
EDITOR = "vim";
SHELL = "${pkgs.zsh}/bin/zsh";
};
# Common shell utilities
home.packages = with pkgs; [
# System Monitoring and Process Management
htop
btop
# Search and Navigation Tools
ripgrep
fd
fzf
tree
# File Management and Manipulation
jq
bat
xclip
unzip
p7zip
file
# System Information and Documentation
neofetch
tldr
];
programs.fzf = {
enable = true;
enableZshIntegration = true;
defaultCommand = "rg --files --hidden --follow";
defaultOptions = [
"--height 40%"
"--layout=reverse"
"--border"
];
};
programs.htop = {
enable = true;
settings = {
color_scheme = 6;
cpu_count_from_one = 0;
delay = 15;
highlight_base_name = 1;
highlight_threads = 1;
show_program_path = 0;
tree_view = 1;
};
};
}

View File

@ -0,0 +1,33 @@
{ config, lib, pkgs, sharedAliases, ... }:
{
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
shellAliases = sharedAliases;
oh-my-zsh = {
enable = true;
theme = "robbyrussell";
plugins = [
"git" # Adds many git aliases and functions
"docker" # Docker aliases and completion
"kubectl" # Kubernetes aliases and completion
"tmux" # Tmux integration and aliases
"fzf" # Fuzzy finder integration
"dirhistory" # Keyboard shortcuts for directory navigation
"history" # Command history searching
"copypath" # Copy current directory path
"copyfile" # Copy file contents
"extract" # Extract any archive format
];
};
initExtra = ''
# Add nix profile to PATH
export PATH=$HOME/.nix-profile/bin:$PATH
'';
};
}

View File

@ -2,7 +2,8 @@
{
imports = [
./access
./env
./languages
./tools
];
}

8
programs/development/env/default.nix vendored Normal file
View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./paths.nix
./versions.nix
];
}

View File

@ -2,10 +2,10 @@
{
imports = [
./gpg.nix
./git.nix
./ssh.nix
./direnv.nix
];
home.packages = with pkgs; [
git
git-credential-manager
@ -14,6 +14,4 @@
git-crypt
sops
];
# Ensure required packages are installed
}

38
proposal.md Normal file
View File

@ -0,0 +1,38 @@
.
├── flake.nix
├── lib # Helper functions
│ ├── default.nix
│ ├── mkHome.nix # Home configuration builder
│ └── mkHost.nix # Host configuration builder
├── hosts
│ └── steamnix # Your Steam Deck configuration
│ ├── configuration.nix
│ ├── hardware-configuration.nix
│ └── default.nix
├── modules
│ ├── core # Essential system modules
│ │ ├── default.nix
│ │ ├── nix.nix # Nix configuration
│ │ └── security.nix # Security settings
│ ├── home # Home-manager modules
│ │ ├── development
│ │ ├── desktop
│ │ └── terminal
│ └── system # System-level modules
│ ├── hardware
│ └── services
├── overlays # Custom package modifications
│ └── default.nix
├── profiles # Reusable configuration profiles
│ ├── desktop
│ │ └── plasma
│ ├── development
│ └── gaming
├── scripts # Maintenance scripts
│ └── rebuild.sh
├── secrets # Encrypted secrets management
│ └── default.nix
└── users
└── jeirmeister
├── home.nix
└── config # User-specific configurations

1
result
View File

@ -1 +0,0 @@
/nix/store/s8pr486jr0xrl4b9m82r0am4d8sgcpi9-home-manager-generation

0
secrets/default.nix Normal file
View File

Binary file not shown.

BIN
secrets/keys/ssh/id_ed25519 Normal file

Binary file not shown.

View File

View File

View File

View File

@ -1,33 +0,0 @@
# Add to common/default.nix
{
config,
pkgs,
lib,
...
}:
{
imports = [
./paths.nix
./versions.nix
];
# Helper function for path concatenation
_module.args.pathJoin = fragments: lib.concatStringsSep "/" fragments;
programs.zsh.initExtra = lib.concatStrings [
''
# Environment Setup
${builtins.concatStringsSep "\n" (
map (path: "export PATH=\"${path}:$PATH\"") config.home.sessionPath
)}
''
];
# Common build tools
home.packages = with pkgs; [
gnumake
gcc
cmake
];
}

View File

@ -1,164 +0,0 @@
{ config, lib, pkgs, ... }:
let
sharedShellOptions = {
sessionVariables = {
EDITOR = "vim";
SHELL = "${pkgs.zsh}/bin/zsh";
};
shellAliases = {
# System management
ll = "ls -la";
update = "sudo nixos-rebuild switch";
# Home manager
hm = "home-manager";
hms = "home-manager switch";
# Tmux
ta = "tmux attach -t";
tl = "tmux list-sessions";
tn = "tmux new-session -s";
"tmux-help" = "bat ${config.xdg.configHome}/tmux/tmux-man.md --plain";
"save-session" = "tmux command-prompt -p 'Command:' 'run-shell \"${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/scripts/save.sh\"'";
"restore-session" = "tmux command-prompt -p 'Command:' 'run-shell \"${pkgs.tmuxPlugins.resurrect}/share/tmux-plugins/resurrect/scripts/restore.sh\"'";
"yank-text" = "tmux command-prompt -p 'Command:' 'run-shell \"tmux show-buffer | ${pkgs.xclip}/bin/xclip -selection clipboard\"'";
};
initExtra = ''
${lib.concatStringsSep "\n" (
map (alias: "alias ${alias}='${sharedShellOptions.shellAliases.${alias}}'") (
builtins.attrNames sharedShellOptions.shellAliases
)
)}
export PATH=$HOME/.nix-profile/bin:$PATH
'';
};
in
{
imports = [
# Language Support
./go.nix
./javascript.nix
./python.nix
./rust.nix
];
home.sessionVariables = sharedShellOptions.sessionVariables;
programs = {
# Shell configurations
bash = {
enable = true;
initExtra = sharedShellOptions.initExtra;
};
zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "robbyrussell";
plugins = [
"git" # Adds many git aliases and functions
"docker" # Docker aliases and completion
"kubectl" # Kubernetes aliases and completion
"tmux" # Tmux integration and aliases
"fzf" # Fuzzy finder integration
"dirhistory" # Keyboard shortcuts for directory navigation
"history" # Command history searching
"copypath" # Copy current directory path
"copyfile" # Copy file contents
"extract" # Extract any archive format
];
};
initExtra = sharedShellOptions.initExtra;
};
# System utilities
fzf = {
enable = true;
enableZshIntegration = true;
defaultCommand = "rg --files --hidden --follow";
defaultOptions = [
"--height 40%"
"--layout=reverse"
"--border"
];
};
htop = {
enable = true;
settings = {
color_scheme = 6;
cpu_count_from_one = 0;
delay = 15;
highlight_base_name = 1;
highlight_threads = 1;
show_program_path = 0;
tree_view = 1;
};
};
};
home.packages = with pkgs; [
# System Monitoring and Process Management
htop
btop
# Search and Navigation Tools
ripgrep # Fast searching
fd # Alternative to find
fzf # Fuzzy finder
tree # Directory structure viewer
# File Management and Manipulation
jq # JSON processor
bat # Better cat
xclip # Clipboard management
unzip
p7zip
file
# Development Tools
git
git-credential-manager
gh # GitHub CLI
# Network Analysis and Management
mtr # Network diagnostic tool
iperf3 # Network performance tool
nmap # Network scanner
tailscale # VPN service
# Communication Tools
signal-cli
signal-export
whatsapp-chat-exporter
discordo
telegram-bot-api
tg
# Task & Time Management
todoist # CLI version
bitwarden-cli
# System Information and Documentation
neofetch # System information
tldr # Simplified man pages
# AppImage Support
appimage-run
zlib
fuse
fuse3
];
xdg.enable = true;
}

View File

@ -1,7 +0,0 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACD04ZD4g8/TdqC+MqnlSIWHTNMExpPcR9xoxXcb0p7WsAAAAJhsVPSrbFT0
qwAAAAtzc2gtZWQyNTUxOQAAACD04ZD4g8/TdqC+MqnlSIWHTNMExpPcR9xoxXcb0p7WsA
AAAEDuUdKAVQz7X+5rGyfRO7yardCsauFdRXJ0/gQpIHSIo/ThkPiDz9N2oL4yqeVIhYdM
0wTGk9xH3GjFdxvSntawAAAAEWplaXJtZWlzdGVyQG5peG9zAQIDBA==
-----END OPENSSH PRIVATE KEY-----