Compare commits
10 Commits
2bdbece800
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bb71d0b7e | |||
| 0bc134f557 | |||
| 1b9df3926e | |||
| bd98793528 | |||
| d78637cf13 | |||
| 08d16bd2c9 | |||
| a14ff9be4d | |||
| 90217ec85a | |||
| f99f4069f0 | |||
| 320a2d3738 |
18
.gitea/workflows/ci.yml
Normal file
18
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@main
|
||||
|
||||
- name: Check flake
|
||||
run: nix flake check
|
||||
@@ -9,7 +9,7 @@ Directory Structure:
|
||||
----------------------
|
||||
• packages/ - Custom Nix packages leveraged across various configurations.
|
||||
• roles/ - Role-based configurations (e.g., kodi, bluetooth) each with its own module (default.nix) for inclusion in machine setups.
|
||||
• machines/ - Machine-specific configurations (e.g., nix-book, z790prors, boxy, wixos) including configuration.nix and hardware-configuration.nix tailored for each hardware.
|
||||
• machines/ - Machine-specific configurations (e.g., nix-book, zix790prors, boxy) including configuration.nix and hardware-configuration.nix tailored for each hardware.
|
||||
• home/ - Home-manager configurations for personal environments and application settings (e.g., home-nix-book.nix, home-z790prors.nix).
|
||||
|
||||
Design Principles:
|
||||
|
||||
@@ -14,7 +14,7 @@ This repository uses `beads` for issue tracking and management. Run `bd quicksta
|
||||
|
||||
### Flake Structure
|
||||
- **flake.nix**: Main entry point defining inputs (nixpkgs, home-manager, plasma-manager, etc.) and outputs for multiple NixOS configurations
|
||||
- **Machines**: `nix-book`, `boxy`, `wixos` (WSL configuration), `zix790prors`, `live-usb`, `johno-macbookpro` (Darwin/macOS)
|
||||
- **Machines**: `nix-book`, `boxy`, `zix790prors`, `live-usb`, `johno-macbookpro` (Darwin/macOS)
|
||||
- **Home configurations**: Standalone home-manager configuration for user `johno`
|
||||
|
||||
### Directory Structure
|
||||
@@ -78,7 +78,6 @@ The repository also uses a modular home-manager role system for user-space confi
|
||||
- **nix-book**: Compact laptop → excludes office/media roles due to SSD space constraints
|
||||
- **boxy**: Living room media center → optimized for media consumption, excludes sync/office (shared machine)
|
||||
- **zix790prors**: All-purpose workstation → full desktop experience with all roles enabled
|
||||
- **wixos**: WSL2 development → full desktop experience, inherits from zix790prors Windows host
|
||||
- **live-usb**: Temporary environment → only base + desktop roles, no persistent services
|
||||
- **johno-macbookpro**: macOS work laptop → Darwin-specific configuration with development tools
|
||||
|
||||
@@ -111,7 +110,6 @@ darwin-rebuild build --flake .#johno-macbookpro
|
||||
- `nix-book`: Compact laptop with storage constraints, uses `home/home-laptop-compact.nix`
|
||||
- `boxy`: Shared living room media center/gaming desktop with AMD GPU, uses `home/home-media-center.nix`
|
||||
- `zix790prors`: Powerful all-purpose workstation (gaming, 3D modeling, development), dual-boots Windows 11 with shared btrfs /games partition, uses `home/home-desktop.nix`
|
||||
- `wixos`: WSL2 development environment running in Windows partition of zix790prors, uses `home/home-desktop.nix`
|
||||
- `live-usb`: Bootable ISO configuration, uses `home/home-live-usb.nix`
|
||||
- `johno-macbookpro`: macOS work laptop, uses `home/home-darwin-work.nix`
|
||||
|
||||
|
||||
67
flake.lock
generated
67
flake.lock
generated
@@ -60,22 +60,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1765121682,
|
||||
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
@@ -241,38 +225,18 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765841014,
|
||||
"narHash": "sha256-55V0AJ36V5Egh4kMhWtDh117eE3GOjwq5LhwxDn9eHg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "be4af8042e7a61fa12fda58fe9a3b3babdefe17b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "main",
|
||||
"repo": "NixOS-WSL",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1765472234,
|
||||
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1767480499,
|
||||
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
|
||||
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -293,22 +257,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1767480499,
|
||||
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
@@ -364,8 +312,7 @@
|
||||
"jovian": "jovian",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"plasma-manager-unstable": "plasma-manager-unstable"
|
||||
|
||||
16
flake.nix
16
flake.nix
@@ -4,7 +4,6 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
|
||||
@@ -55,7 +54,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-wsl, ... } @ inputs: let
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, ... } @ inputs: let
|
||||
# Shared overlay function to reduce duplication across module sets
|
||||
# Parameters:
|
||||
# unstableOverlays: Additional overlays to apply when importing nixpkgs-unstable
|
||||
@@ -84,6 +83,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
nixosModules = [
|
||||
./roles
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@@ -157,18 +157,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.wixos = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = nixosModules ++ [
|
||||
nixos-wsl.nixosModules.default
|
||||
./machines/wixos/configuration.nix
|
||||
{
|
||||
home-manager.users.johno = import ./home/home-desktop.nix;
|
||||
home-manager.extraSpecialArgs = { inherit system; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations.zix790prors = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = nixosModules ++ [
|
||||
|
||||
@@ -4,6 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.communication;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.communication = {
|
||||
@@ -12,14 +13,14 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
# Communication apps
|
||||
# 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)
|
||||
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,6 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.desktop;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.desktop = {
|
||||
@@ -12,27 +13,29 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Desktop applications
|
||||
# Cross-platform desktop applications
|
||||
bitwarden-desktop
|
||||
dunst
|
||||
keepassxc
|
||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
||||
] ++ optionals isLinux [
|
||||
# Linux-only desktop applications
|
||||
dunst
|
||||
unstable.ghostty
|
||||
|
||||
# Desktop utilities
|
||||
# Linux-only 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
|
||||
|
||||
# System utilities with GUI components
|
||||
# Linux-only system utilities with GUI components
|
||||
(snapcast.override { pulseaudioSupport = true; })
|
||||
|
||||
# KDE tiling window management
|
||||
# KDE tiling window management (Linux-only)
|
||||
kdePackages.krohnkite # Dynamic tiling extension for KWin 6
|
||||
|
||||
# KDE PIM applications for email, calendar, and contacts
|
||||
# KDE PIM applications for email, calendar, and contacts (Linux-only)
|
||||
kdePackages.kmail
|
||||
kdePackages.kmail-account-wizard
|
||||
kdePackages.kmailtransport
|
||||
@@ -40,33 +43,33 @@ in
|
||||
kdePackages.kaddressbook
|
||||
kdePackages.kontact
|
||||
|
||||
# KDE System components needed for proper integration
|
||||
# KDE System components needed for proper integration (Linux-only)
|
||||
kdePackages.kded
|
||||
kdePackages.systemsettings
|
||||
kdePackages.kmenuedit
|
||||
|
||||
# Desktop menu support
|
||||
# Desktop menu support (Linux-only)
|
||||
kdePackages.plasma-desktop # Contains applications.menu
|
||||
|
||||
# KDE Online Accounts support
|
||||
# KDE Online Accounts support (Linux-only)
|
||||
kdePackages.kaccounts-integration
|
||||
kdePackages.kaccounts-providers
|
||||
kdePackages.signond
|
||||
|
||||
# KDE Mapping
|
||||
# KDE Mapping (Linux-only)
|
||||
kdePackages.marble # Virtual globe and world atlas
|
||||
|
||||
# KDE Productivity
|
||||
# KDE Productivity (Linux-only)
|
||||
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
|
||||
# KDE Multimedia (Linux-only)
|
||||
kdePackages.gwenview # Image viewer and basic editor
|
||||
kdePackages.elisa # Music player
|
||||
|
||||
# KDE System Utilities
|
||||
# KDE System Utilities (Linux-only)
|
||||
kdePackages.ark # Archive manager (zip, tar, 7z, etc.)
|
||||
kdePackages.yakuake # Drop-down terminal emulator
|
||||
];
|
||||
@@ -77,12 +80,15 @@ in
|
||||
|
||||
programs.spotify-player.enable = true;
|
||||
|
||||
services.gnome-keyring = {
|
||||
# Linux-only: GNOME keyring service
|
||||
services.gnome-keyring = mkIf isLinux {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# rbw vault unlock on login and resume from suspend
|
||||
systemd.user.services.rbw-unlock-on-login = {
|
||||
# Linux-only: systemd user services for rbw vault unlock
|
||||
systemd.user.services = mkIf isLinux {
|
||||
# rbw vault unlock on login
|
||||
rbw-unlock-on-login = {
|
||||
Unit = {
|
||||
Description = "Unlock rbw vault at login";
|
||||
After = [ "graphical-session.target" ];
|
||||
@@ -101,7 +107,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.rbw-unlock-on-resume = {
|
||||
# rbw vault unlock on resume from suspend
|
||||
rbw-unlock-on-resume = {
|
||||
Unit = {
|
||||
Description = "Unlock rbw vault after resume from suspend";
|
||||
After = [ "suspend.target" ];
|
||||
@@ -119,9 +126,10 @@ in
|
||||
WantedBy = [ "suspend.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# KDE environment variables for proper integration
|
||||
home.sessionVariables = {
|
||||
# Linux-only: KDE environment variables for proper integration
|
||||
home.sessionVariables = mkIf isLinux {
|
||||
QT_QPA_PLATFORMTHEME = "kde";
|
||||
KDE_SESSION_VERSION = "6";
|
||||
};
|
||||
@@ -141,13 +149,14 @@ in
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
};
|
||||
defaultApplications = {
|
||||
# Web browsers
|
||||
# Web browsers (cross-platform)
|
||||
"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";
|
||||
@@ -190,9 +199,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# Fix for KDE applications.menu file issue on Plasma 6
|
||||
# Linux-only: 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".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
xdg.configFile."menus/applications.menu" = mkIf isLinux {
|
||||
source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||
};
|
||||
|
||||
# Note: modules must be imported at top-level home config
|
||||
};
|
||||
|
||||
@@ -225,11 +225,16 @@
|
||||
mu4e-headers-time-format "%H:%M")
|
||||
|
||||
;; Sending mail via msmtp
|
||||
(setq message-send-mail-function 'message-send-mail-with-sendmail
|
||||
sendmail-program (executable-find "msmtp")
|
||||
message-sendmail-envelope-from 'header
|
||||
mail-envelope-from 'header
|
||||
mail-specify-envelope-from t))
|
||||
;; NOTE: message-sendmail-f-is-evil and --read-envelope-from are required
|
||||
;; to prevent msmtp from stripping the email body when processing headers.
|
||||
;; Without these, multipart messages (especially from org-msg) may arrive
|
||||
;; with empty bodies.
|
||||
(setq sendmail-program (executable-find "msmtp")
|
||||
send-mail-function #'message-send-mail-with-sendmail
|
||||
message-send-mail-function #'message-send-mail-with-sendmail
|
||||
message-sendmail-f-is-evil t
|
||||
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||
message-sendmail-envelope-from 'header))
|
||||
|
||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||
|
||||
@@ -4,6 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.email;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.email = {
|
||||
@@ -89,8 +90,9 @@ in
|
||||
account default : proton
|
||||
'';
|
||||
|
||||
# Systemd service for mail sync
|
||||
systemd.user.services.mbsync = {
|
||||
# Linux-only: Systemd service for mail sync (Darwin uses launchd instead)
|
||||
systemd.user.services = mkIf isLinux {
|
||||
mbsync = {
|
||||
Unit = {
|
||||
Description = "Mailbox synchronization service";
|
||||
After = [ "network-online.target" ];
|
||||
@@ -104,9 +106,11 @@ in
|
||||
StandardError = "journal";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Systemd timer for automatic sync
|
||||
systemd.user.timers.mbsync = {
|
||||
# Linux-only: Systemd timer for automatic sync
|
||||
systemd.user.timers = mkIf isLinux {
|
||||
mbsync = {
|
||||
Unit = {
|
||||
Description = "Mailbox synchronization timer";
|
||||
};
|
||||
@@ -120,4 +124,5 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,13 +4,15 @@ 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";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# KDE Connect services are Linux-only (requires D-Bus and systemd)
|
||||
config = mkIf (cfg.enable && isLinux) {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
|
||||
@@ -4,6 +4,7 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.sync;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.sync = {
|
||||
@@ -11,9 +12,10 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Linux-only: syncthingtray requires system tray support
|
||||
home.packages = optionals isLinux (with pkgs; [
|
||||
syncthingtray
|
||||
];
|
||||
]);
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
|
||||
# https://github.com/nix-community/NixOS-WSL
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
roles = {
|
||||
audio.enable = true;
|
||||
desktop = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
nvidia = {
|
||||
enable = true;
|
||||
package = "latest";
|
||||
graphics.extraPackages = with pkgs; [
|
||||
mesa
|
||||
libvdpau-va-gl
|
||||
libva-vdpau-driver
|
||||
];
|
||||
};
|
||||
users.enable = true;
|
||||
};
|
||||
|
||||
networking.hostName = "wixos";
|
||||
|
||||
wsl.enable = true;
|
||||
wsl.defaultUser = "johno";
|
||||
wsl.startMenuLaunchers = true;
|
||||
wsl.useWindowsDriver = true;
|
||||
wsl.wslConf.network.hostname = "wixos";
|
||||
wsl.wslConf.user.default = "johno";
|
||||
|
||||
# WSL-specific environment variables for graphics
|
||||
environment.sessionVariables = {
|
||||
LD_LIBRARY_PATH = [
|
||||
"/usr/lib/wsl/lib"
|
||||
"/run/opengl-driver/lib"
|
||||
];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# 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 = "24.05"; # Did you read the comment?
|
||||
}
|
||||
@@ -21,6 +21,8 @@ in
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,6 +8,21 @@ in
|
||||
{
|
||||
options.roles.nfs-mounts = {
|
||||
enable = mkEnableOption "Enable default NFS mounts";
|
||||
server = mkOption {
|
||||
type = types.str;
|
||||
default = "10.0.0.43";
|
||||
description = "IP address or hostname of the NFS server";
|
||||
};
|
||||
remotePath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media";
|
||||
description = "Remote path to mount from the NFS server";
|
||||
};
|
||||
mountPoint = mkOption {
|
||||
type = types.str;
|
||||
default = "/media";
|
||||
description = "Local mount point for the NFS share";
|
||||
};
|
||||
# TODO: implement requireMount
|
||||
requireMount = mkOption {
|
||||
type = types.bool;
|
||||
@@ -18,8 +33,8 @@ in
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
fileSystems."/media" = {
|
||||
device = "10.0.0.43:/media";
|
||||
fileSystems.${cfg.mountPoint} = {
|
||||
device = "${cfg.server}:${cfg.remotePath}";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"defaults"
|
||||
|
||||
@@ -8,6 +8,21 @@ in
|
||||
{
|
||||
options.roles.printing = {
|
||||
enable = mkEnableOption "Enable default printing setup";
|
||||
printerName = mkOption {
|
||||
type = types.str;
|
||||
default = "MFC-L8900CDW_series";
|
||||
description = "Name for the default printer";
|
||||
};
|
||||
printerUri = mkOption {
|
||||
type = types.str;
|
||||
default = "ipp://brother.oglehome/ipp/print";
|
||||
description = "Device URI for the default printer (e.g., ipp://hostname/ipp/print)";
|
||||
};
|
||||
printerModel = mkOption {
|
||||
type = types.str;
|
||||
default = "everywhere";
|
||||
description = "PPD model for the printer (use 'everywhere' for driverless IPP)";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
@@ -21,11 +36,11 @@ in
|
||||
};
|
||||
|
||||
hardware.printers.ensurePrinters = [{
|
||||
name = "MFC-L8900CDW_series";
|
||||
deviceUri = "ipp://brother.oglehome/ipp/print";
|
||||
model = "everywhere";
|
||||
name = cfg.printerName;
|
||||
deviceUri = cfg.printerUri;
|
||||
model = cfg.printerModel;
|
||||
}];
|
||||
hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series";
|
||||
hardware.printers.ensureDefaultPrinter = cfg.printerName;
|
||||
|
||||
# Fix ensure-printers service to wait for network availability
|
||||
systemd.services.ensure-printers = {
|
||||
|
||||
@@ -8,6 +8,11 @@ in
|
||||
{
|
||||
options.roles.virtualisation = {
|
||||
enable = mkEnableOption "Enable virtualisation";
|
||||
dockerUsers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "johno" ];
|
||||
description = "List of users to add to the docker group";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
@@ -15,6 +20,6 @@ in
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
users.extraGroups.docker.members = [ "johno" ];
|
||||
users.extraGroups.docker.members = cfg.dockerUsers;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Rotate to the next wallpaper in the configured list."
|
||||
echo ""
|
||||
echo "This script increments the currentIndex in home/wallpapers/default.nix,"
|
||||
echo "cycling through available wallpapers. Rebuild your system to apply"
|
||||
echo "the new wallpaper."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
@@ -1,6 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Update Doom Emacs to the latest commit from the doomemacs repository."
|
||||
echo ""
|
||||
echo "This script fetches the latest commit SHA from the default branch,"
|
||||
echo "updates the rev and sha256 in home/roles/emacs/default.nix, and"
|
||||
echo "prepares the configuration for a system rebuild."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--help|-h)
|
||||
echo "Usage: $0 [OPTIONS]"
|
||||
echo ""
|
||||
echo "Perform a major upgrade of the NixOS configuration."
|
||||
echo ""
|
||||
echo "This script runs the following steps:"
|
||||
echo " 1. Update all flake inputs (nix flake update)"
|
||||
echo " 2. Update Doom Emacs to the latest commit"
|
||||
echo " 3. Update Claude Code to the latest version"
|
||||
echo " 4. Rotate to the next wallpaper"
|
||||
echo ""
|
||||
echo "After completion, review changes with 'git diff' and rebuild"
|
||||
echo "your system with 'sudo nixos-rebuild switch --flake .'"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --help, -h Show this help message"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
||||
Reference in New Issue
Block a user