Compare commits
1 Commits
bead/nixos
...
bead/nixos
| Author | SHA1 | Date | |
|---|---|---|---|
| 79ff0b8aa4 |
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build Live USB ISO from flake configuration
|
||||
# Creates an uncompressed ISO suitable for Ventoy and other USB boot tools
|
||||
|
||||
set -e
|
||||
|
||||
echo "Building Live USB ISO..."
|
||||
nix build .#nixosConfigurations.live-usb.config.system.build.isoImage --show-trace
|
||||
|
||||
if [ -f "./result/iso/"*.iso ]; then
|
||||
iso_file=$(ls ./result/iso/*.iso)
|
||||
echo "✅ Build complete!"
|
||||
echo "📁 ISO location: $iso_file"
|
||||
echo "💾 Ready for Ventoy or dd to USB"
|
||||
else
|
||||
echo "❌ Build failed - no ISO file found"
|
||||
exit 1
|
||||
fi
|
||||
18
flake.nix
18
flake.nix
@@ -275,6 +275,16 @@
|
||||
export PATH="${pkgs.lib.makeBinPath commonDeps}:$PATH"
|
||||
${builtins.readFile ./scripts/upgrade.sh}
|
||||
'';
|
||||
|
||||
bootstrap = pkgs.writeShellScriptBin "bootstrap" ''
|
||||
export PATH="${pkgs.lib.makeBinPath commonDeps}:$PATH"
|
||||
${builtins.readFile ./scripts/bootstrap.sh}
|
||||
'';
|
||||
|
||||
build-liveusb = pkgs.writeShellScriptBin "build-liveusb" ''
|
||||
export PATH="${pkgs.lib.makeBinPath commonDeps}:$PATH"
|
||||
${builtins.readFile ./scripts/build-liveusb.sh}
|
||||
'';
|
||||
in {
|
||||
update-doomemacs = {
|
||||
type = "app";
|
||||
@@ -292,6 +302,14 @@
|
||||
type = "app";
|
||||
program = "${upgrade}/bin/upgrade";
|
||||
};
|
||||
bootstrap = {
|
||||
type = "app";
|
||||
program = "${bootstrap}/bin/bootstrap";
|
||||
};
|
||||
build-liveusb = {
|
||||
type = "app";
|
||||
program = "${build-liveusb}/bin/build-liveusb";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.communication;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.communication = {
|
||||
@@ -13,14 +12,14 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
# For logging back into google chat (cross-platform)
|
||||
globalInputs.google-cookie-retrieval.packages.${system}.default
|
||||
] ++ optionals isLinux [
|
||||
# Linux-only communication apps (Electron apps don't build on Darwin)
|
||||
# Communication apps
|
||||
pkgs.element-desktop
|
||||
# Re-enabled in 25.11 after security issues were resolved
|
||||
pkgs.fluffychat
|
||||
pkgs.nextcloud-talk-desktop
|
||||
|
||||
# For logging back into google chat
|
||||
globalInputs.google-cookie-retrieval.packages.${system}.default
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.desktop;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.desktop = {
|
||||
@@ -13,29 +12,27 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Cross-platform desktop applications
|
||||
# Desktop applications
|
||||
bitwarden-desktop
|
||||
keepassxc
|
||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
||||
] ++ optionals isLinux [
|
||||
# Linux-only desktop applications
|
||||
dunst
|
||||
keepassxc
|
||||
unstable.ghostty
|
||||
|
||||
# Linux-only desktop utilities
|
||||
# Desktop utilities
|
||||
feh # Image viewer and wallpaper setter for X11
|
||||
rofi # Application launcher for X11
|
||||
solaar # Logitech management software
|
||||
waybar
|
||||
wofi # Application launcher for Wayland
|
||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
||||
|
||||
# Linux-only system utilities with GUI components
|
||||
# System utilities with GUI components
|
||||
(snapcast.override { pulseaudioSupport = true; })
|
||||
|
||||
# KDE tiling window management (Linux-only)
|
||||
# KDE tiling window management
|
||||
kdePackages.krohnkite # Dynamic tiling extension for KWin 6
|
||||
|
||||
# KDE PIM applications for email, calendar, and contacts (Linux-only)
|
||||
# KDE PIM applications for email, calendar, and contacts
|
||||
kdePackages.kmail
|
||||
kdePackages.kmail-account-wizard
|
||||
kdePackages.kmailtransport
|
||||
@@ -43,33 +40,33 @@ in
|
||||
kdePackages.kaddressbook
|
||||
kdePackages.kontact
|
||||
|
||||
# KDE System components needed for proper integration (Linux-only)
|
||||
# KDE System components needed for proper integration
|
||||
kdePackages.kded
|
||||
kdePackages.systemsettings
|
||||
kdePackages.kmenuedit
|
||||
|
||||
# Desktop menu support (Linux-only)
|
||||
# Desktop menu support
|
||||
kdePackages.plasma-desktop # Contains applications.menu
|
||||
|
||||
# KDE Online Accounts support (Linux-only)
|
||||
# KDE Online Accounts support
|
||||
kdePackages.kaccounts-integration
|
||||
kdePackages.kaccounts-providers
|
||||
kdePackages.signond
|
||||
|
||||
# KDE Mapping (Linux-only)
|
||||
# KDE Mapping
|
||||
kdePackages.marble # Virtual globe and world atlas
|
||||
|
||||
# KDE Productivity (Linux-only)
|
||||
# KDE Productivity
|
||||
kdePackages.kate # Advanced text editor with syntax highlighting
|
||||
kdePackages.okular # Universal document viewer (PDF, ePub, etc.)
|
||||
kdePackages.spectacle # Screenshot capture utility
|
||||
kdePackages.filelight # Visual disk usage analyzer
|
||||
|
||||
# KDE Multimedia (Linux-only)
|
||||
# KDE Multimedia
|
||||
kdePackages.gwenview # Image viewer and basic editor
|
||||
kdePackages.elisa # Music player
|
||||
|
||||
# KDE System Utilities (Linux-only)
|
||||
# KDE System Utilities
|
||||
kdePackages.ark # Archive manager (zip, tar, 7z, etc.)
|
||||
kdePackages.yakuake # Drop-down terminal emulator
|
||||
];
|
||||
@@ -80,15 +77,12 @@ in
|
||||
|
||||
programs.spotify-player.enable = true;
|
||||
|
||||
# Linux-only: GNOME keyring service
|
||||
services.gnome-keyring = mkIf isLinux {
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Linux-only: systemd user services for rbw vault unlock
|
||||
systemd.user.services = mkIf isLinux {
|
||||
# rbw vault unlock on login
|
||||
rbw-unlock-on-login = {
|
||||
# rbw vault unlock on login and resume from suspend
|
||||
systemd.user.services.rbw-unlock-on-login = {
|
||||
Unit = {
|
||||
Description = "Unlock rbw vault at login";
|
||||
After = [ "graphical-session.target" ];
|
||||
@@ -107,8 +101,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# rbw vault unlock on resume from suspend
|
||||
rbw-unlock-on-resume = {
|
||||
systemd.user.services.rbw-unlock-on-resume = {
|
||||
Unit = {
|
||||
Description = "Unlock rbw vault after resume from suspend";
|
||||
After = [ "suspend.target" ];
|
||||
@@ -126,10 +119,9 @@ in
|
||||
WantedBy = [ "suspend.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Linux-only: KDE environment variables for proper integration
|
||||
home.sessionVariables = mkIf isLinux {
|
||||
# KDE environment variables for proper integration
|
||||
home.sessionVariables = {
|
||||
QT_QPA_PLATFORMTHEME = "kde";
|
||||
KDE_SESSION_VERSION = "6";
|
||||
};
|
||||
@@ -149,14 +141,13 @@ in
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
};
|
||||
defaultApplications = {
|
||||
# Web browsers (cross-platform)
|
||||
# Web browsers
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
} // optionalAttrs isLinux {
|
||||
# Linux-only: KDE application associations
|
||||
|
||||
# Documents
|
||||
"application/pdf" = "okular.desktop";
|
||||
"text/plain" = "kate.desktop";
|
||||
@@ -199,11 +190,9 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Linux-only: Fix for KDE applications.menu file issue on Plasma 6
|
||||
# Fix for KDE applications.menu file issue on Plasma 6
|
||||
# KDE still looks for applications.menu but Plasma 6 renamed it to plasma-applications.menu
|
||||
xdg.configFile."menus/applications.menu" = mkIf isLinux {
|
||||
source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
};
|
||||
xdg.configFile."menus/applications.menu".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
|
||||
# Note: modules must be imported at top-level home config
|
||||
};
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.email;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.email = {
|
||||
@@ -90,9 +89,8 @@ in
|
||||
account default : proton
|
||||
'';
|
||||
|
||||
# Linux-only: Systemd service for mail sync (Darwin uses launchd instead)
|
||||
systemd.user.services = mkIf isLinux {
|
||||
mbsync = {
|
||||
# Systemd service for mail sync
|
||||
systemd.user.services.mbsync = {
|
||||
Unit = {
|
||||
Description = "Mailbox synchronization service";
|
||||
After = [ "network-online.target" ];
|
||||
@@ -106,11 +104,9 @@ in
|
||||
StandardError = "journal";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Linux-only: Systemd timer for automatic sync
|
||||
systemd.user.timers = mkIf isLinux {
|
||||
mbsync = {
|
||||
# Systemd timer for automatic sync
|
||||
systemd.user.timers.mbsync = {
|
||||
Unit = {
|
||||
Description = "Mailbox synchronization timer";
|
||||
};
|
||||
@@ -124,5 +120,4 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,15 +4,13 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.kdeconnect;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.kdeconnect = {
|
||||
enable = mkEnableOption "Enable KDE Connect for device integration";
|
||||
};
|
||||
|
||||
# KDE Connect services are Linux-only (requires D-Bus and systemd)
|
||||
config = mkIf (cfg.enable && isLinux) {
|
||||
config = mkIf cfg.enable {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
|
||||
@@ -4,7 +4,6 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.sync;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.sync = {
|
||||
@@ -12,10 +11,9 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Linux-only: syncthingtray requires system tray support
|
||||
home.packages = optionals isLinux (with pkgs; [
|
||||
home.packages = with pkgs; [
|
||||
syncthingtray
|
||||
]);
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
4
bootstrap.sh → scripts/bootstrap.sh
Executable file → Normal file
4
bootstrap.sh → scripts/bootstrap.sh
Executable file → Normal file
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# bootstrap.sh
|
||||
# Usage: sudo ./bootstrap.sh <hostname>
|
||||
# Usage: nix run .#bootstrap -- <hostname>
|
||||
# Or: sudo ./scripts/bootstrap.sh <hostname>
|
||||
set -euo pipefail
|
||||
|
||||
NEW_HOSTNAME="${1:?missing hostname}"
|
||||
@@ -8,4 +9,3 @@ FLAKE_URI="git+https://git.johnogle.info/johno/nixos-configs.git#${NEW_HOSTNAME}
|
||||
|
||||
export NIX_CONFIG="experimental-features = nix-command flakes"
|
||||
nixos-rebuild switch --flake "$FLAKE_URI"
|
||||
|
||||
22
scripts/build-liveusb.sh
Normal file
22
scripts/build-liveusb.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Live USB ISO from flake configuration
|
||||
# Creates an uncompressed ISO suitable for Ventoy and other USB boot tools
|
||||
# Usage: nix run .#build-liveusb
|
||||
# Or: ./scripts/build-liveusb.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
|
||||
|
||||
echo "Building Live USB ISO..."
|
||||
nix build "${REPO_ROOT}#nixosConfigurations.live-usb.config.system.build.isoImage" --show-trace
|
||||
|
||||
if ls "${REPO_ROOT}/result/iso/"*.iso 1> /dev/null 2>&1; then
|
||||
iso_file=$(ls "${REPO_ROOT}/result/iso/"*.iso)
|
||||
echo "Build complete!"
|
||||
echo "ISO location: $iso_file"
|
||||
echo "Ready for Ventoy or dd to USB"
|
||||
else
|
||||
echo "Build failed - no ISO file found"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user