(refactor) simplified structure even more, added sops and git-crypt secrets management
This commit is contained in:
parent
d475f895a0
commit
9a4eea5444
12
.gitattributes
vendored
Normal file
12
.gitattributes
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# Encrypt sensitive keys
|
||||
secrets/keys/gpg/private.key filter=git-crypt diff=git-crypt
|
||||
secrets/keys/ssh/id_ed25519 filter=git-crypt diff=git-crypt
|
||||
secrets/keys/ssh/*_rsa filter=git-crypt diff=git-crypt
|
||||
|
||||
# Don't encrypt public keys
|
||||
secrets/keys/gpg/public.key !filter !diff
|
||||
secrets/keys/ssh/*.pub !filter !diff
|
||||
|
||||
# Don't encrypt configuration files
|
||||
*.nix !filter !diff
|
||||
.gitattributes !filter !diff
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"users/jeirmeister/programs/shell/terminals/kitty.nix": "{ config, pkgs, ... }:\n\n{\n programs.kitty = {\n enable = true;\n settings = {\n font_family = \"JetBrains Mono\";\n font_size = 12;\n window_padding_width = 4;\n background_opacity = \"0.95\";\n hide_window_decorations = \"yes\";\n tab_bar_style = \"powerline\";\n \n # Dracula theme colors\n foreground = \"#F8F8F2\";\n background = \"#282A36\";\n selection_foreground = \"#ffffff\";\n selection_background = \"#44475a\";\n url_color = \"#8be9fd\";\n cursor = \"#f8f8f2\";\n\n # black\n color0 = \"#21222c\";\n color8 = \"#6272a4\";\n\n # red\n color1 = \"#ff5555\";\n color9 = \"#ff6e6e\";\n\n # green\n color2 = \"#50fa7b\";\n color10 = \"#69ff94\";\n\n # yellow\n color3 = \"#f1fa8c\";\n color11 = \"#ffffa5\";\n\n # blue\n color4 = \"#bd93f9\";\n color12 = \"#d6acff\";\n\n # magenta\n color5 = \"#ff79c6\";\n color13 = \"#ff92df\";\n\n # cyan\n color6 = \"#8be9fd\";\n color14 = \"#a4ffff\";\n\n # white\n color7 = \"#f8f8f2\";\n color15 = \"#ffffff\";\n\n # tab bar\n active_tab_foreground = \"#282a36\";\n active_tab_background = \"#f8f8f2\";\n inactive_tab_foreground = \"#282a36\";\n inactive_tab_background = \"#6272a4\";\n };\n };\n}"
|
||||
}
|
32
config.sh
32
config.sh
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# README # ------
|
||||
# Configure the config.json file in this same directory for an AI chatbot to
|
||||
# Assist in making direct changes to files.
|
||||
set -euo pipefail
|
||||
|
||||
# Make sure jq is available
|
||||
if ! command -v jq &> /dev/null; then
|
||||
echo "Error: jq is required but not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure config.json exists
|
||||
if [ ! -f "config.json" ]; then
|
||||
echo "Error: config.json not found in current directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating directories and files..."
|
||||
|
||||
# Process each key in the JSON configuration
|
||||
for file in $(jq -r 'keys[]' config.json); do
|
||||
# Create directory if it doesn't exist
|
||||
dir=$(dirname "$file")
|
||||
mkdir -p "$dir"
|
||||
|
||||
# Write content to file
|
||||
jq -r --arg file "$file" '.[$file]' config.json > "$file"
|
||||
echo "Created: $file"
|
||||
done
|
||||
|
||||
echo "Configuration files have been created successfully!"
|
16
home.nix
16
home.nix
@ -1,13 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
customPackages = import ./users/jeirmeister/packages { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./users/jeirmeister/programs
|
||||
./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";
|
||||
@ -15,10 +18,15 @@ in
|
||||
|
||||
packages = with pkgs; [
|
||||
fortune
|
||||
coreutils
|
||||
gnused
|
||||
findutils
|
||||
];
|
||||
};
|
||||
|
||||
# Essential settings
|
||||
programs.home-manager.enable = true;
|
||||
xdg.enable = true;
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
|
@ -52,9 +52,15 @@ in
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
substituters = [ "cache.nixos.org" ];
|
||||
allowed-users = [ "@wheel" "jeirmeister" ];
|
||||
allowed-users = [
|
||||
"@wheel"
|
||||
"jeirmeister"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
@ -86,7 +92,10 @@ in
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
videoDrivers = [ "displaylink" "modesetting" ];
|
||||
videoDrivers = [
|
||||
"displaylink"
|
||||
"modesetting"
|
||||
];
|
||||
desktopManager.plasma6 = {
|
||||
enable = true;
|
||||
extraSessionCommands = ''
|
||||
@ -174,8 +183,8 @@ in
|
||||
|
||||
groups = {
|
||||
steamos.gid = 1000;
|
||||
gamepad = {};
|
||||
render = {};
|
||||
gamepad = { };
|
||||
render = { };
|
||||
};
|
||||
};
|
||||
|
||||
@ -209,17 +218,17 @@ in
|
||||
];
|
||||
}
|
||||
# TODO: Incorporate this part later
|
||||
# Immersed Video Service
|
||||
# immersed-video = {
|
||||
# description = "Load v4l2loopback module for Immersed";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# after = [ "systemd-modules-load.service" ];
|
||||
# requires = [ "systemd-modules-load.service" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# RemainAfterExit = true;
|
||||
# ExecStartPre = "${pkgs.kmod}/bin/modprobe -r v4l2loopback || true";
|
||||
# ExecStart = "${pkgs.kmod}/bin/modprobe v4l2loopback exclusive_caps=1 video_nr=0 card_label='Immersed Virtual Camera'";
|
||||
# ExecStop = "${pkgs.kmod}/bin/rmmod v4l2loopback || true";
|
||||
# };
|
||||
# };
|
||||
# Immersed Video Service
|
||||
# immersed-video = {
|
||||
# description = "Load v4l2loopback module for Immersed";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# after = [ "systemd-modules-load.service" ];
|
||||
# requires = [ "systemd-modules-load.service" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# RemainAfterExit = true;
|
||||
# ExecStartPre = "${pkgs.kmod}/bin/modprobe -r v4l2loopback || true";
|
||||
# ExecStart = "${pkgs.kmod}/bin/modprobe v4l2loopback exclusive_caps=1 video_nr=0 card_label='Immersed Virtual Camera'";
|
||||
# ExecStop = "${pkgs.kmod}/bin/rmmod v4l2loopback || true";
|
||||
# };
|
||||
# };
|
||||
|
@ -1,28 +1,43 @@
|
||||
# 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, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f3cc4aae-428e-435d-b9f7-333f7dad06b2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/f3cc4aae-428e-435d-b9f7-333f7dad06b2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/580E-5E90";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/580E-5E90";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
|
1
result
Symbolic link
1
result
Symbolic link
@ -0,0 +1 @@
|
||||
/nix/store/s8pr486jr0xrl4b9m82r0am4d8sgcpi9-home-manager-generation
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./floorp.nix
|
||||
./ungoogled-chromium.nix
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
floorp
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ungoogled-chromium
|
||||
];
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Signal
|
||||
signal-cli
|
||||
signal-export
|
||||
signal-desktop
|
||||
|
||||
# Telegram
|
||||
telegram-desktop
|
||||
telegram-bot-api
|
||||
tg
|
||||
tdl
|
||||
|
||||
# WhatsApp
|
||||
whatsapp-for-linux
|
||||
whatsapp-chat-exporter
|
||||
|
||||
# Video conferencing
|
||||
zoom-us
|
||||
];
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./browsers
|
||||
./communication
|
||||
./development
|
||||
./gaming
|
||||
./productivity
|
||||
./shell
|
||||
./system
|
||||
|
||||
];
|
||||
}
|
22
users/jeirmeister/programs/desktop/apps.nix
Normal file
22
users/jeirmeister/programs/desktop/apps.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Communication
|
||||
signal-desktop
|
||||
telegram-desktop
|
||||
whatsapp-for-linux
|
||||
|
||||
# Productivity
|
||||
zoom-us
|
||||
obsidian
|
||||
bitwarden-desktop
|
||||
todoist-electron
|
||||
obs-studio
|
||||
|
||||
# Browsers
|
||||
floorp
|
||||
ungoogled-chromium
|
||||
brave
|
||||
];
|
||||
}
|
@ -2,7 +2,8 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./sublime.nix
|
||||
./vscode.nix
|
||||
./editors
|
||||
./terminals
|
||||
./apps.nix
|
||||
];
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./fzf.nix
|
||||
./sublime.nix
|
||||
./vscode
|
||||
];
|
||||
}
|
47
users/jeirmeister/programs/desktop/editors/sublime.nix
Normal file
47
users/jeirmeister/programs/desktop/editors/sublime.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Install Sublime Text through home.packages
|
||||
home.packages = with pkgs; [
|
||||
sublime4 # Or sublime3 if you prefer
|
||||
];
|
||||
|
||||
# Sublime settings live in a specific directory
|
||||
home.file = {
|
||||
".config/sublime-text/Packages/User/Preferences.sublime-settings".text = builtins.toJSON {
|
||||
# Your sublime settings here
|
||||
font_size = 12;
|
||||
font_face = "FiraCode Nerd Font";
|
||||
theme = "Adaptive.sublime-theme";
|
||||
color_scheme = "Packages/Color Scheme - Default/Monokai.sublime-color-scheme";
|
||||
ignored_packages = [ "Vintage" ];
|
||||
rulers = [
|
||||
80
|
||||
120
|
||||
];
|
||||
tab_size = 2;
|
||||
translate_tabs_to_spaces = true;
|
||||
ensure_newline_at_eof_on_save = true;
|
||||
trim_trailing_white_space_on_save = true;
|
||||
};
|
||||
|
||||
# Key bindings
|
||||
".config/sublime-text/Packages/User/Default (Linux).sublime-keymap".text = builtins.toJSON [
|
||||
{
|
||||
keys = [ "ctrl+shift+f" ];
|
||||
command = "reindent";
|
||||
}
|
||||
];
|
||||
|
||||
# Package Control settings
|
||||
".config/sublime-text/Packages/User/Package Control.sublime-settings".text = builtins.toJSON {
|
||||
installed_packages = [
|
||||
"Package Control"
|
||||
"SideBarEnhancements"
|
||||
"A File Icon"
|
||||
"Dracula Color Scheme"
|
||||
"GitGutter"
|
||||
"MarkdownEditing"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
userSettings = import ./settings.nix { inherit pkgs; };
|
||||
extensions = import ./extensions.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
extensions = extensions;
|
||||
userSettings = userSettings;
|
||||
};
|
||||
|
||||
# Your other configurations like home.packages etc.
|
||||
home.packages = with pkgs; [
|
||||
nixpkgs-fmt
|
||||
nil
|
||||
];
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
ms-vsliveshare.vsliveshare
|
||||
ms-python.python
|
||||
rust-lang.rust-analyzer
|
||||
ms-azuretools.vscode-docker
|
||||
pkief.material-icon-theme
|
||||
dracula-theme.theme-dracula
|
||||
jnoortheen.nix-ide
|
||||
]
|
@ -0,0 +1,54 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Set the default integrated terminal to zsh
|
||||
"terminal.integrated.shell.linux" = "${pkgs.zsh}/bin/zsh";
|
||||
"terminal.integrated.defaultProfile.linux" = "zsh";
|
||||
|
||||
# Existing settings
|
||||
"editor.fontSize" = 14;
|
||||
"editor.fontFamily" = "FiraCode Nerd Font";
|
||||
"editor.formatOnSave" = true;
|
||||
"files.autoSave" = "onWindowChange";
|
||||
"workbench.colorTheme" = "Dracula";
|
||||
"editor.minimap.enabled" = false;
|
||||
"editor.rulers" = [
|
||||
80
|
||||
120
|
||||
];
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
|
||||
# Git settings (unchanged)
|
||||
"git.enabled" = true;
|
||||
"git.autofetch" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.path" = "${pkgs.git}/bin/git";
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
|
||||
# GitLens settings (unchanged)
|
||||
"gitlens.hovers.currentLine.over" = "line";
|
||||
"gitlens.currentLine.enabled" = true;
|
||||
"gitlens.hovers.enabled" = true;
|
||||
"gitlens.mode.active" = "zen";
|
||||
|
||||
# Credential manager integration (unchanged)
|
||||
"git.terminalAuthentication" = true;
|
||||
"git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
|
||||
# Nix configuration
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "nil";
|
||||
"nix.serverSettings" = {
|
||||
"nil" = {
|
||||
"formatting" = {
|
||||
"command" = [ "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
"[nix]" = {
|
||||
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||
"editor.formatOnSave" = true;
|
||||
};
|
||||
|
||||
}
|
44
users/jeirmeister/programs/desktop/plasma/default.nix
Normal file
44
users/jeirmeister/programs/desktop/plasma/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Install plasma-manager as part of home packages
|
||||
home.packages = [ pkgs.plasma-manager ];
|
||||
|
||||
# Enable systemd user services for plasma-manager (optional)
|
||||
systemd.user.services.plasma-manager = {
|
||||
description = "Plasma Manager Service";
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.plasma-manager}/bin/plasma-manager apply";
|
||||
Restart = "always"; # Ensure the service restarts if it crashes
|
||||
};
|
||||
wantedBy = [ "default.target" ]; # Start the service when the user session starts
|
||||
};
|
||||
|
||||
# Example of setting some KDE preferences declaratively
|
||||
programs.plasma-manager.enable = true;
|
||||
|
||||
# Example of setting some specific preferences
|
||||
programs.plasma-manager.settings = {
|
||||
# # Set wallpaper
|
||||
# "plasmashell-desktop" = {
|
||||
# wallpaper = "/path/to/your/wallpaper.jpg";
|
||||
# };
|
||||
|
||||
# Set panel visibility
|
||||
"plasmashell-panel" = {
|
||||
autohide = true;
|
||||
};
|
||||
|
||||
# Set theme
|
||||
"lookandfeel" = {
|
||||
theme = "BreezeDark";
|
||||
};
|
||||
|
||||
# Override configuration for full declarative control
|
||||
overrideConfig = true;
|
||||
};
|
||||
|
||||
# Optionally, you can enable lingering to keep the service running even after logout
|
||||
systemd.user.linger.enable = true;
|
||||
}
|
@ -10,7 +10,7 @@
|
||||
background_opacity = "0.95";
|
||||
hide_window_decorations = "yes";
|
||||
tab_bar_style = "powerline";
|
||||
|
||||
|
||||
# Dracula theme colors
|
||||
foreground = "#F8F8F2";
|
||||
background = "#282A36";
|
19
users/jeirmeister/programs/development/access/default.nix
Normal file
19
users/jeirmeister/programs/development/access/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gpg.nix
|
||||
./git.nix
|
||||
./ssh.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
git-credential-manager
|
||||
gh
|
||||
ttyd
|
||||
git-crypt
|
||||
sops
|
||||
];
|
||||
# Ensure required packages are installed
|
||||
|
||||
}
|
48
users/jeirmeister/programs/development/access/git.nix
Normal file
48
users/jeirmeister/programs/development/access/git.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
lfs.enable = true;
|
||||
userName = "jeirmeister";
|
||||
userEmail = "jeir@jeirslab.xyz";
|
||||
|
||||
# Enable commit and tag signing with specific GPG key
|
||||
signing = {
|
||||
key = "0x33A40DF62D35C4A7"; # Your specific key ID
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = false;
|
||||
|
||||
# GPG program configuration
|
||||
gpg = {
|
||||
program = "${pkgs.gnupg}/bin/gpg2";
|
||||
format = "openpgp";
|
||||
};
|
||||
|
||||
# Credential configuration
|
||||
credential = {
|
||||
helper = lib.mkForce "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
credentialStore = "plaintext";
|
||||
interactive = false;
|
||||
};
|
||||
|
||||
# Enable GPG signing for commits and tags
|
||||
commit.gpgSign = true;
|
||||
tag.gpgSign = true;
|
||||
|
||||
safe.directory = "*";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
}
|
71
users/jeirmeister/programs/development/access/gpg.nix
Normal file
71
users/jeirmeister/programs/development/access/gpg.nix
Normal file
@ -0,0 +1,71 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Your default key
|
||||
default-key = "0x33A40DF62D35C4A7";
|
||||
|
||||
# Key server settings
|
||||
keyserver = "hkps://keys.openpgp.org";
|
||||
keyserver-options = "auto-key-retrieve no-honor-keyserver-url";
|
||||
|
||||
# Trust model settings
|
||||
trust-model = "tofu+pgp";
|
||||
tofu-default-policy = "auto";
|
||||
|
||||
# Modern cipher preferences
|
||||
personal-cipher-preferences = "AES256 AES192 AES";
|
||||
personal-digest-preferences = "SHA512 SHA384 SHA256";
|
||||
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
|
||||
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
|
||||
|
||||
# Security settings
|
||||
require-cross-certification = true;
|
||||
no-emit-version = true;
|
||||
no-comments = true;
|
||||
keyid-format = "0xlong";
|
||||
with-fingerprint = true;
|
||||
list-options = "show-uid-validity";
|
||||
verify-options = "show-uid-validity";
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
defaultCacheTtl = 1800;
|
||||
maxCacheTtl = 7200;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
extraConfig = ''
|
||||
allow-preset-passphrase
|
||||
allow-loopback-pinentry
|
||||
enable-ssh-support
|
||||
write-env-file
|
||||
default-cache-ttl-ssh 1800
|
||||
max-cache-ttl-ssh 7200
|
||||
'';
|
||||
};
|
||||
|
||||
# Fix GPG home directory permissions
|
||||
home.activation.fixGpgPerms = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
if [ -d "$HOME/.gnupg" ]; then
|
||||
chmod 700 "$HOME/.gnupg"
|
||||
find "$HOME/.gnupg" -type f -exec chmod 600 {} \;
|
||||
find "$HOME/.gnupg" -type d -exec chmod 700 {} \;
|
||||
fi
|
||||
'';
|
||||
|
||||
# Make sure we have the right packages
|
||||
home.packages = with pkgs; [
|
||||
gnupg
|
||||
pinentry-qt
|
||||
pgpdump # Analyze PGP/GPG keys and packets
|
||||
|
||||
# Future secret management tools
|
||||
sops # Simple encryption tool
|
||||
age # Modern encryption tool (required for agenix)
|
||||
ssh-to-age # Convert SSH keys to age keys
|
||||
];
|
||||
}
|
67
users/jeirmeister/programs/development/access/ssh.nix
Normal file
67
users/jeirmeister/programs/development/access/ssh.nix
Normal file
@ -0,0 +1,67 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
UseKeychain yes
|
||||
IdentitiesOnly yes
|
||||
HashKnownHosts yes
|
||||
# Set default identity file for all hosts
|
||||
IdentityFile ~/.ssh/jeirmeister
|
||||
'';
|
||||
|
||||
# For better security
|
||||
serverAliveInterval = 60;
|
||||
serverAliveCountMax = 2;
|
||||
|
||||
# Manage known hosts
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
|
||||
# Common configuration for all jeir.lan hosts
|
||||
matchBlocks = {
|
||||
# Default for all hosts
|
||||
"*" = {
|
||||
identityFile = "~/.ssh/jeirmeister";
|
||||
compression = true;
|
||||
serverAliveInterval = 60;
|
||||
};
|
||||
|
||||
# Shared configuration for all machines in jeir.lan
|
||||
"*.jeir.lan" = {
|
||||
user = "root";
|
||||
identityFile = "~/.ssh/jeirmeister";
|
||||
};
|
||||
|
||||
# Individual machine configurations
|
||||
"openwrt.jeir.lan" = {
|
||||
hostname = "openwrt.jeir.lan";
|
||||
};
|
||||
"probabe.jeir.lan" = {
|
||||
hostname = "probabe.jeir.lan";
|
||||
};
|
||||
"lenovobabe.jeir.lan" = {
|
||||
hostname = "lenovobabe.jeir.lan";
|
||||
};
|
||||
"minibabe.jeir.lan" = {
|
||||
hostname = "minibabe.jeir.lan";
|
||||
};
|
||||
"littlebabe.jeir.lan" = {
|
||||
hostname = "littlebabe.jeir.lan";
|
||||
};
|
||||
"monsterbabe.jeir.lan" = {
|
||||
hostname = "monsterbabe.jeir.lan";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure SSH directory exists with correct permissions
|
||||
home.file.".ssh/.keep".text = "";
|
||||
home.activation.sshPermissions = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
chmod 700 ~/.ssh
|
||||
chmod 600 ~/.ssh/jeirmeister
|
||||
chmod 644 ~/.ssh/jeirmeister.pub
|
||||
'';
|
||||
}
|
@ -2,9 +2,7 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./editors
|
||||
./access
|
||||
./env
|
||||
./tools.nix
|
||||
./docs.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
tldr
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
sublime4
|
||||
];
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# Existing extensions
|
||||
ms-vsliveshare.vsliveshare
|
||||
ms-python.python
|
||||
rust-lang.rust-analyzer
|
||||
ms-azuretools.vscode-docker
|
||||
pkief.material-icon-theme
|
||||
dracula-theme.theme-dracula
|
||||
|
||||
# Add Nix support
|
||||
jnoortheen.nix-ide # Comprehensive Nix IDE support
|
||||
# or alternatively: bbenoist.nix
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
# Existing settings
|
||||
"editor.fontSize" = 14;
|
||||
"editor.fontFamily" = "FiraCode Nerd Font";
|
||||
"editor.formatOnSave" = true;
|
||||
"files.autoSave" = "onFocusChange";
|
||||
"workbench.colorTheme" = "Dracula";
|
||||
"editor.minimap.enabled" = false;
|
||||
"editor.rulers" = [ 80 120 ];
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
|
||||
# Git settings (unchanged)
|
||||
"git.enabled" = true;
|
||||
"git.autofetch" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.path" = "${pkgs.git}/bin/git";
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
|
||||
# GitLens settings (unchanged)
|
||||
"gitlens.hovers.currentLine.over" = "line";
|
||||
"gitlens.currentLine.enabled" = true;
|
||||
"gitlens.hovers.enabled" = true;
|
||||
"gitlens.mode.active" = "zen";
|
||||
|
||||
# Credential manager integration (unchanged)
|
||||
"git.terminalAuthentication" = true;
|
||||
"git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
|
||||
# Nix formatting settings
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "nil";
|
||||
"nix.formatterPath" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
|
||||
"[nix]" = {
|
||||
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||
"editor.formatOnSave" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure nixpkgs-fmt is available in the environment
|
||||
home.packages = with pkgs; [
|
||||
nixpkgs-fmt
|
||||
nil # Nix language server
|
||||
];
|
||||
}
|
@ -1,17 +1,33 @@
|
||||
# Add to common/default.nix
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./paths.nix ./versions.nix ];
|
||||
imports = [
|
||||
./paths.nix
|
||||
./versions.nix
|
||||
];
|
||||
|
||||
# Helper function for path concatenation
|
||||
_module.args.pathJoin = fragments:
|
||||
lib.concatStringsSep "/" fragments;
|
||||
_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)}
|
||||
${builtins.concatStringsSep "\n" (
|
||||
map (path: "export PATH=\"${path}:$PATH\"") config.home.sessionPath
|
||||
)}
|
||||
''
|
||||
];
|
||||
}
|
||||
|
||||
# Common build tools
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
gcc
|
||||
cmake
|
||||
];
|
||||
}
|
||||
|
@ -40,4 +40,4 @@
|
||||
message = "XDG Base Directory support must be enabled";
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,4 @@
|
||||
GO_VERSION = "1.21";
|
||||
RUST_VERSION = "stable";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,4 @@
|
||||
./languages
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@
|
||||
nix-direnv.enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -12,4 +12,4 @@
|
||||
GOPATH = "${config.home.sessionVariables.GO_PATH}";
|
||||
GOBIN = "${config.home.sessionVariables.GO_PATH}/bin";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@
|
||||
./node.nix
|
||||
./package-managers
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
nodeVersion = if builtins.getEnv "NODE_VERSION" != ""
|
||||
then builtins.getEnv "NODE_VERSION"
|
||||
else "20";
|
||||
nodeVersion = if builtins.getEnv "NODE_VERSION" != "" then builtins.getEnv "NODE_VERSION" else "20";
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
@ -13,4 +11,4 @@ in
|
||||
home.sessionVariables = {
|
||||
NODE_PATH = "${config.home.sessionVariables.NODE_PACKAGES_DIR}/lib/node_modules";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@
|
||||
./pnpm.nix
|
||||
./yarn.nix
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,4 @@
|
||||
home.file.".npmrc".text = ''
|
||||
prefix=${config.home.sessionVariables.NODE_PACKAGES_DIR}
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,4 @@
|
||||
pnpm-version=8.9.0
|
||||
store-dir=${config.home.sessionVariables.XDG_DATA_HOME}/pnpm
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@
|
||||
home.file.".yarnrc".text = ''
|
||||
cache-folder "${config.home.sessionVariables.XDG_CACHE_HOME}/yarn"
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
pythonVersion = builtins.replaceStrings ["."] [""]
|
||||
(if builtins.getEnv "PYTHON_VERSION" != ""
|
||||
then builtins.getEnv "PYTHON_VERSION"
|
||||
else "311");
|
||||
pythonVersion = builtins.replaceStrings [ "." ] [ "" ] (
|
||||
if builtins.getEnv "PYTHON_VERSION" != "" then builtins.getEnv "PYTHON_VERSION" else "311"
|
||||
);
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
@ -12,6 +11,13 @@ in
|
||||
pkgs."python${pythonVersion}Packages"."pip"
|
||||
pkgs."python${pythonVersion}Packages"."setuptools"
|
||||
pkgs."python${pythonVersion}Packages"."wheel"
|
||||
pkgs."python${pythonVersion}Packages"."black"
|
||||
pkgs."python${pythonVersion}Packages"."pylint"
|
||||
pkgs."python${pythonVersion}Packages"."mypy"
|
||||
pkgs."python${pythonVersion}Packages"."pytest"
|
||||
pkgs."python${pythonVersion}Packages"."pytest-cov"
|
||||
pkgs."python${pythonVersion}Packages"."toggl-cli"
|
||||
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
@ -19,4 +25,4 @@ in
|
||||
PYTHONIOENCODING = "UTF-8";
|
||||
VIRTUAL_ENV_DISABLE_PROMPT = 1;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@
|
||||
./base.nix
|
||||
./package-managers
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,4 @@
|
||||
./poetry
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -11,4 +11,4 @@
|
||||
PIPENV_IGNORE_VIRTUALENVS = "1";
|
||||
PIPENV_MAX_DEPTH = "5";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -29,4 +29,4 @@ in
|
||||
create = true
|
||||
clear = false
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
repo-to-text = pkgs.callPackage ./repo-to-text.nix {};
|
||||
repo-to-text = pkgs.callPackage ./repo-to-text.nix { };
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
repo-to-text
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, python311Packages
|
||||
, fetchPypi
|
||||
, tree
|
||||
{
|
||||
lib,
|
||||
python311Packages,
|
||||
fetchPypi,
|
||||
tree,
|
||||
}:
|
||||
|
||||
python311Packages.buildPythonPackage rec {
|
||||
@ -31,7 +32,7 @@ python311Packages.buildPythonPackage rec {
|
||||
description = "Convert directory/repository structure and contents into a single text file";
|
||||
homepage = "https://github.com/kirill-markin/repo-to-text";
|
||||
license = licenses.mit;
|
||||
maintainers = [];
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
|
@ -14,5 +14,5 @@
|
||||
|
||||
[cargo-new]
|
||||
vcs = "git"
|
||||
'';
|
||||
'';
|
||||
}
|
||||
|
@ -13,4 +13,4 @@
|
||||
default_toolchain = "${config.home.sessionVariables.RUST_VERSION}"
|
||||
profile = "default"
|
||||
'';
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
gh
|
||||
gnumake
|
||||
gcc
|
||||
cmake
|
||||
# Python development tools
|
||||
python311Packages.black
|
||||
python311Packages.pylint
|
||||
python311Packages.mypy
|
||||
python311Packages.pytest
|
||||
python311Packages.pytest-cov
|
||||
];
|
||||
}
|
@ -2,6 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vr
|
||||
./vr
|
||||
];
|
||||
}
|
||||
|
@ -8,21 +8,24 @@
|
||||
systemd.user.services.immersed = {
|
||||
Unit = {
|
||||
Description = "Immersed VR Client";
|
||||
After = [ "graphical-session.target" "network.target" ];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
"network.target"
|
||||
];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
Requires = [ "network.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 2"; # Give the video device time to initialize
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 2"; # Give the video device time to initialize
|
||||
ExecStart = "${pkgs.immersed}/bin/immersed";
|
||||
Environment = [
|
||||
"DISPLAY=:0"
|
||||
"XDG_CURRENT_DESKTOP=KDE" # Since you're using Plasma
|
||||
"QT_QPA_PLATFORM=xcb" # Force X11 mode for better compatibility
|
||||
"XDG_CURRENT_DESKTOP=KDE" # Since you're using Plasma
|
||||
"QT_QPA_PLATFORM=xcb" # Force X11 mode for better compatibility
|
||||
"XDG_RUNTIME_DIR=/run/user/1000"
|
||||
"XDG_SESSION_TYPE=x11" # Force X11 mode
|
||||
"XDG_SESSION_TYPE=x11" # Force X11 mode
|
||||
];
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
@ -39,4 +42,4 @@
|
||||
# Create required directories
|
||||
home.file.".local/share/immersed/.keep".text = "";
|
||||
home.file.".config/immersed/.keep".text = "";
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
bitwarden-desktop
|
||||
bitwarden-cli
|
||||
];
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./obsidian.nix
|
||||
./bitwarden.nix
|
||||
./todoist.nix
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
obsidian
|
||||
];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
todoist
|
||||
todoist-electron
|
||||
];
|
||||
}
|
@ -1,10 +1,58 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
sharedShellOptions = {
|
||||
sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -la";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
hm = "home-manager";
|
||||
hms = "home-manager switch";
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
${lib.concatStringsSep "\n" (
|
||||
map (alias: "alias ${alias}='${sharedShellOptions.shellAliases.${alias}}'") (
|
||||
builtins.attrNames sharedShellOptions.shellAliases
|
||||
)
|
||||
)}
|
||||
export PATH=$HOME/.nix-profile/bin:$PATH
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./terminals
|
||||
./multiplexers
|
||||
./shells
|
||||
./utilities
|
||||
./tmux.nix
|
||||
./utilities.nix
|
||||
];
|
||||
|
||||
home.sessionVariables = sharedShellOptions.sessionVariables;
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = sharedShellOptions.initExtra;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "robbyrussell";
|
||||
plugins = [
|
||||
"git"
|
||||
"docker"
|
||||
"kubectl"
|
||||
];
|
||||
};
|
||||
|
||||
initExtra = sharedShellOptions.initExtra;
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./tmux.nix
|
||||
];
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh.shellAliases = {
|
||||
ll = "ls -la";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
hm = "home-manager";
|
||||
hms = "home-manager switch";
|
||||
};
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./aliases
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "robbyrussell";
|
||||
plugins = [ "git" "docker" "kubectl" ];
|
||||
};
|
||||
|
||||
# Add this section to ensure home-manager paths are properly sourced
|
||||
initExtra = ''
|
||||
# Add home-manager applications to PATH
|
||||
export PATH=$HOME/.nix-profile/bin:$PATH
|
||||
'';
|
||||
};
|
||||
|
||||
# Make zsh the default shell
|
||||
home.sessionVariables = {
|
||||
SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
}
|
87
users/jeirmeister/programs/shell/utilities.nix
Normal file
87
users/jeirmeister/programs/shell/utilities.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
# FZF (Fuzzy Finder) configuration
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
defaultCommand = "rg --files --hidden --follow";
|
||||
defaultOptions = [
|
||||
"--height 40%"
|
||||
"--layout=reverse"
|
||||
"--border"
|
||||
];
|
||||
};
|
||||
|
||||
# Htop configuration
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
# System Information and Documentation
|
||||
neofetch # System information
|
||||
tldr # Simplified man pages
|
||||
|
||||
# AppImage Support
|
||||
appimage-run
|
||||
zlib
|
||||
fuse
|
||||
fuse3
|
||||
];
|
||||
|
||||
xdg.enable = true;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./security
|
||||
./version-control
|
||||
./navigation
|
||||
./process
|
||||
./tools.nix
|
||||
./network
|
||||
./files
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./tools.nix
|
||||
];
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
unzip
|
||||
p7zip
|
||||
file
|
||||
];
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
defaultCommand = "rg --files --hidden --follow";
|
||||
defaultOptions = [ "--height 40%" "--layout=reverse" "--border" ];
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./tools.nix
|
||||
];
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
mtr
|
||||
iperf3
|
||||
nmap
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
btop
|
||||
];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./htop.nix
|
||||
./btop.nix
|
||||
];
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gpg.nix
|
||||
./ssh.nix
|
||||
];
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
keyserver = "hkps://keys.openpgp.org";
|
||||
# Trust model settings
|
||||
trust-model = "tofu+pgp";
|
||||
tofu-default-policy = "auto";
|
||||
# Better key discovery
|
||||
keyserver-options = "auto-key-retrieve";
|
||||
# Modern cipher preferences
|
||||
personal-cipher-preferences = "AES256 AES192 AES";
|
||||
personal-digest-preferences = "SHA512 SHA384 SHA256";
|
||||
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
|
||||
# Default key preferences
|
||||
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
|
||||
};
|
||||
# If you have specific public keys to trust, add them here
|
||||
publicKeys = [
|
||||
# Example:
|
||||
# {
|
||||
# source = ./path/to/key.pub;
|
||||
# trust = "ultimate";
|
||||
# }
|
||||
];
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
defaultCacheTtl = 1800;
|
||||
maxCacheTtl = 7200;
|
||||
# For KDE/Plasma, use pinentry-qt
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
extraConfig = ''
|
||||
allow-preset-passphrase
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
};
|
||||
|
||||
# Make sure we have the right packages
|
||||
home.packages = with pkgs; [
|
||||
gnupg
|
||||
pinentry-qt
|
||||
paperkey # Backup GPG keys on paper
|
||||
pgpdump # Analyze PGP/GPG keys and packets
|
||||
];
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
UseKeychain yes
|
||||
IdentitiesOnly yes
|
||||
HashKnownHosts yes
|
||||
'';
|
||||
|
||||
# For better security
|
||||
serverAliveInterval = 60;
|
||||
serverAliveCountMax = 2;
|
||||
|
||||
# Manage known hosts
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
|
||||
# Example host configurations
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "~/.ssh/github";
|
||||
extraOptions = {
|
||||
PreferredAuthentications = "publickey";
|
||||
};
|
||||
};
|
||||
"*" = {
|
||||
compression = true;
|
||||
serverAliveInterval = 60;
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file."${config.home.sessionVariables.XDG_DATA_HOME}/ssh/.keep".text = "";
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
btop
|
||||
ripgrep
|
||||
fd
|
||||
jq
|
||||
tree
|
||||
xclip
|
||||
bat
|
||||
fzf
|
||||
neofetch
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
];
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.git; # Explicitly specify git package
|
||||
lfs.enable = true;
|
||||
userName = "jeirmeister";
|
||||
userEmail = "jeir@jeirslab.xyz";
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = false;
|
||||
|
||||
# More explicit credential configuration
|
||||
credential = {
|
||||
helper = lib.mkForce "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
credentialStore = "plaintext";
|
||||
interactive = false;
|
||||
};
|
||||
|
||||
safe.directory = "*";
|
||||
};
|
||||
};
|
||||
|
||||
# Ensure required packages are installed
|
||||
home.packages = with pkgs; [
|
||||
git-credential-manager
|
||||
];
|
||||
|
||||
xdg.enable = true;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Required for AppImage support
|
||||
appimage-run
|
||||
|
||||
# Optional but useful tools for AppImage management
|
||||
zlib
|
||||
fuse
|
||||
fuse3
|
||||
];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./appimage.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
tailscale
|
||||
];
|
||||
}
|
30
users/jeirmeister/secrets/secrets.nix
Normal file
30
users/jeirmeister/secrets/secrets.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
users = {
|
||||
jeirmeister = [
|
||||
"0x33A40DF62D35C4A7" # Your GPG key ID
|
||||
];
|
||||
};
|
||||
|
||||
systems = {
|
||||
steamnix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuZYkDQGN6k+uxu3npJ/PN5hwVU9c4HPU5kJCVVitGt root@nixos";
|
||||
};
|
||||
|
||||
allUsers = lib.flatten (builtins.attrValues users);
|
||||
allSystems = builtins.attrValues systems;
|
||||
in
|
||||
{
|
||||
# Custom SSH key
|
||||
"jeirmeister/ssh/jeirmeister.age".publicKeys =
|
||||
users.jeirmeister ++ (builtins.attrValues systems);
|
||||
|
||||
# GPG key
|
||||
"jeirmeister/gpg/private.age".publicKeys =
|
||||
users.jeirmeister ++ (builtins.attrValues systems);
|
||||
|
||||
home.packages = with pkgs; [
|
||||
git-crypt # For transparent file encryption in git repositories
|
||||
sops # Preparing for future sops integration
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user