Compare commits
1 Commits
bead/nixos
...
c057becb59
| Author | SHA1 | Date | |
|---|---|---|---|
| c057becb59 |
@@ -9,7 +9,7 @@ Directory Structure:
|
|||||||
----------------------
|
----------------------
|
||||||
• packages/ - Custom Nix packages leveraged across various configurations.
|
• 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.
|
• 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).
|
• home/ - Home-manager configurations for personal environments and application settings (e.g., home-nix-book.nix, home-z790prors.nix).
|
||||||
|
|
||||||
Design Principles:
|
Design Principles:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ This is a NixOS configuration repository using flakes, managing multiple machine
|
|||||||
|
|
||||||
### Flake Structure
|
### Flake Structure
|
||||||
- **flake.nix**: Main entry point defining inputs (nixpkgs, home-manager, plasma-manager, etc.) and outputs for multiple NixOS configurations
|
- **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`
|
- **Home configurations**: Standalone home-manager configuration for user `johno`
|
||||||
|
|
||||||
### Directory Structure
|
### Directory Structure
|
||||||
@@ -74,7 +74,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
|
- **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)
|
- **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
|
- **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
|
- **live-usb**: Temporary environment → only base + desktop roles, no persistent services
|
||||||
- **johno-macbookpro**: macOS work laptop → Darwin-specific configuration with development tools
|
- **johno-macbookpro**: macOS work laptop → Darwin-specific configuration with development tools
|
||||||
|
|
||||||
@@ -107,7 +106,6 @@ darwin-rebuild build --flake .#johno-macbookpro
|
|||||||
- `nix-book`: Compact laptop with storage constraints, uses `home/home-laptop-compact.nix`
|
- `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`
|
- `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`
|
- `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`
|
- `live-usb`: Bootable ISO configuration, uses `home/home-live-usb.nix`
|
||||||
- `johno-macbookpro`: macOS work laptop, uses `home/home-darwin-work.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"
|
"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": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
@@ -241,38 +225,18 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765472234,
|
"lastModified": 1767480499,
|
||||||
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
|
"narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
|
"rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -293,22 +257,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"plasma-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": [
|
"home-manager": [
|
||||||
@@ -364,8 +312,7 @@
|
|||||||
"jovian": "jovian",
|
"jovian": "jovian",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
|
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
|
||||||
"nixos-wsl": "nixos-wsl",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"plasma-manager": "plasma-manager",
|
"plasma-manager": "plasma-manager",
|
||||||
"plasma-manager-unstable": "plasma-manager-unstable"
|
"plasma-manager-unstable": "plasma-manager-unstable"
|
||||||
|
|||||||
18
flake.nix
18
flake.nix
@@ -4,8 +4,7 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
|
||||||
|
|
||||||
nix-darwin = {
|
nix-darwin = {
|
||||||
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
|
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-wsl, ... } @ inputs: let
|
outputs = { self, nixpkgs, nixpkgs-unstable, ... } @ inputs: let
|
||||||
nixosModules = [
|
nixosModules = [
|
||||||
./roles
|
./roles
|
||||||
] ++ [
|
] ++ [
|
||||||
@@ -176,19 +175,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosConfigurations.wixos = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = nixosModules ++ [
|
|
||||||
nixos-wsl.nixosModules.default
|
|
||||||
./machines/wixos/configuration.nix
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.users.johno = import ./home/home-desktop.nix;
|
|
||||||
home-manager.extraSpecialArgs = { inherit system; };
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations.zix790prors = nixpkgs.lib.nixosSystem rec {
|
nixosConfigurations.zix790prors = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = nixosModules ++ [
|
modules = nixosModules ++ [
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.home.roles.communication;
|
cfg = config.home.roles.communication;
|
||||||
isLinux = pkgs.stdenv.isLinux;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.home.roles.communication = {
|
options.home.roles.communication = {
|
||||||
@@ -13,14 +12,14 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
# For logging back into google chat (cross-platform)
|
# Communication apps
|
||||||
globalInputs.google-cookie-retrieval.packages.${system}.default
|
|
||||||
] ++ optionals isLinux [
|
|
||||||
# Linux-only communication apps (Electron apps don't build on Darwin)
|
|
||||||
pkgs.element-desktop
|
pkgs.element-desktop
|
||||||
# Re-enabled in 25.11 after security issues were resolved
|
# Re-enabled in 25.11 after security issues were resolved
|
||||||
pkgs.fluffychat
|
pkgs.fluffychat
|
||||||
pkgs.nextcloud-talk-desktop
|
pkgs.nextcloud-talk-desktop
|
||||||
|
|
||||||
|
# For logging back into google chat
|
||||||
|
globalInputs.google-cookie-retrieval.packages.${system}.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.home.roles.desktop;
|
cfg = config.home.roles.desktop;
|
||||||
isLinux = pkgs.stdenv.isLinux;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.home.roles.desktop = {
|
options.home.roles.desktop = {
|
||||||
@@ -13,63 +12,61 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Cross-platform desktop applications
|
# Desktop applications
|
||||||
bitwarden-desktop
|
bitwarden-desktop
|
||||||
keepassxc
|
|
||||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
|
||||||
] ++ optionals isLinux [
|
|
||||||
# Linux-only desktop applications
|
|
||||||
dunst
|
dunst
|
||||||
|
keepassxc
|
||||||
unstable.ghostty
|
unstable.ghostty
|
||||||
|
|
||||||
# Linux-only desktop utilities
|
# Desktop utilities
|
||||||
feh # Image viewer and wallpaper setter for X11
|
feh # Image viewer and wallpaper setter for X11
|
||||||
rofi # Application launcher for X11
|
rofi # Application launcher for X11
|
||||||
solaar # Logitech management software
|
solaar # Logitech management software
|
||||||
waybar
|
waybar
|
||||||
wofi # Application launcher for Wayland
|
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; })
|
(snapcast.override { pulseaudioSupport = true; })
|
||||||
|
|
||||||
# KDE tiling window management (Linux-only)
|
# KDE tiling window management
|
||||||
kdePackages.krohnkite # Dynamic tiling extension for KWin 6
|
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
|
||||||
kdePackages.kmail-account-wizard
|
kdePackages.kmail-account-wizard
|
||||||
kdePackages.kmailtransport
|
kdePackages.kmailtransport
|
||||||
kdePackages.korganizer
|
kdePackages.korganizer
|
||||||
kdePackages.kaddressbook
|
kdePackages.kaddressbook
|
||||||
kdePackages.kontact
|
kdePackages.kontact
|
||||||
|
|
||||||
# KDE System components needed for proper integration (Linux-only)
|
# KDE System components needed for proper integration
|
||||||
kdePackages.kded
|
kdePackages.kded
|
||||||
kdePackages.systemsettings
|
kdePackages.systemsettings
|
||||||
kdePackages.kmenuedit
|
kdePackages.kmenuedit
|
||||||
|
|
||||||
# Desktop menu support (Linux-only)
|
# Desktop menu support
|
||||||
kdePackages.plasma-desktop # Contains applications.menu
|
kdePackages.plasma-desktop # Contains applications.menu
|
||||||
|
|
||||||
# KDE Online Accounts support (Linux-only)
|
# KDE Online Accounts support
|
||||||
kdePackages.kaccounts-integration
|
kdePackages.kaccounts-integration
|
||||||
kdePackages.kaccounts-providers
|
kdePackages.kaccounts-providers
|
||||||
kdePackages.signond
|
kdePackages.signond
|
||||||
|
|
||||||
# KDE Mapping (Linux-only)
|
# KDE Mapping
|
||||||
kdePackages.marble # Virtual globe and world atlas
|
kdePackages.marble # Virtual globe and world atlas
|
||||||
|
|
||||||
# KDE Productivity (Linux-only)
|
# KDE Productivity
|
||||||
kdePackages.kate # Advanced text editor with syntax highlighting
|
kdePackages.kate # Advanced text editor with syntax highlighting
|
||||||
kdePackages.okular # Universal document viewer (PDF, ePub, etc.)
|
kdePackages.okular # Universal document viewer (PDF, ePub, etc.)
|
||||||
kdePackages.spectacle # Screenshot capture utility
|
kdePackages.spectacle # Screenshot capture utility
|
||||||
kdePackages.filelight # Visual disk usage analyzer
|
kdePackages.filelight # Visual disk usage analyzer
|
||||||
|
|
||||||
# KDE Multimedia (Linux-only)
|
# KDE Multimedia
|
||||||
kdePackages.gwenview # Image viewer and basic editor
|
kdePackages.gwenview # Image viewer and basic editor
|
||||||
kdePackages.elisa # Music player
|
kdePackages.elisa # Music player
|
||||||
|
|
||||||
# KDE System Utilities (Linux-only)
|
# KDE System Utilities
|
||||||
kdePackages.ark # Archive manager (zip, tar, 7z, etc.)
|
kdePackages.ark # Archive manager (zip, tar, 7z, etc.)
|
||||||
kdePackages.yakuake # Drop-down terminal emulator
|
kdePackages.yakuake # Drop-down terminal emulator
|
||||||
];
|
];
|
||||||
@@ -80,66 +77,61 @@ in
|
|||||||
|
|
||||||
programs.spotify-player.enable = true;
|
programs.spotify-player.enable = true;
|
||||||
|
|
||||||
# Linux-only: GNOME keyring service
|
services.gnome-keyring = {
|
||||||
services.gnome-keyring = mkIf isLinux {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Linux-only: systemd user services for rbw vault unlock
|
# rbw vault unlock on login and resume from suspend
|
||||||
systemd.user.services = mkIf isLinux {
|
systemd.user.services.rbw-unlock-on-login = {
|
||||||
# rbw vault unlock on login
|
Unit = {
|
||||||
rbw-unlock-on-login = {
|
Description = "Unlock rbw vault at login";
|
||||||
Unit = {
|
After = [ "graphical-session.target" ];
|
||||||
Description = "Unlock rbw vault at login";
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${pkgs.rbw}/bin/rbw unlock";
|
|
||||||
Environment = "RBW_AGENT=${pkgs.rbw}/bin/rbw-agent";
|
|
||||||
# KillMode = "process" prevents systemd from killing the rbw-agent daemon
|
|
||||||
# when this oneshot service completes. The agent is spawned by rbw unlock
|
|
||||||
# and needs to persist after the service exits.
|
|
||||||
KillMode = "process";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
Service = {
|
||||||
# rbw vault unlock on resume from suspend
|
Type = "oneshot";
|
||||||
rbw-unlock-on-resume = {
|
ExecStart = "${pkgs.rbw}/bin/rbw unlock";
|
||||||
Unit = {
|
Environment = "RBW_AGENT=${pkgs.rbw}/bin/rbw-agent";
|
||||||
Description = "Unlock rbw vault after resume from suspend";
|
# KillMode = "process" prevents systemd from killing the rbw-agent daemon
|
||||||
After = [ "suspend.target" ];
|
# when this oneshot service completes. The agent is spawned by rbw unlock
|
||||||
};
|
# and needs to persist after the service exits.
|
||||||
Service = {
|
KillMode = "process";
|
||||||
Type = "oneshot";
|
};
|
||||||
ExecStart = "${pkgs.rbw}/bin/rbw unlock";
|
Install = {
|
||||||
Environment = "RBW_AGENT=${pkgs.rbw}/bin/rbw-agent";
|
WantedBy = [ "graphical-session.target" ];
|
||||||
# KillMode = "process" prevents systemd from killing the rbw-agent daemon
|
|
||||||
# when this oneshot service completes. The agent is spawned by rbw unlock
|
|
||||||
# and needs to persist after the service exits.
|
|
||||||
KillMode = "process";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "suspend.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Linux-only: KDE environment variables for proper integration
|
systemd.user.services.rbw-unlock-on-resume = {
|
||||||
home.sessionVariables = mkIf isLinux {
|
Unit = {
|
||||||
|
Description = "Unlock rbw vault after resume from suspend";
|
||||||
|
After = [ "suspend.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.rbw}/bin/rbw unlock";
|
||||||
|
Environment = "RBW_AGENT=${pkgs.rbw}/bin/rbw-agent";
|
||||||
|
# KillMode = "process" prevents systemd from killing the rbw-agent daemon
|
||||||
|
# when this oneshot service completes. The agent is spawned by rbw unlock
|
||||||
|
# and needs to persist after the service exits.
|
||||||
|
KillMode = "process";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "suspend.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# KDE environment variables for proper integration
|
||||||
|
home.sessionVariables = {
|
||||||
QT_QPA_PLATFORMTHEME = "kde";
|
QT_QPA_PLATFORMTHEME = "kde";
|
||||||
KDE_SESSION_VERSION = "6";
|
KDE_SESSION_VERSION = "6";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Ensure desktop files are made available for discovery
|
# Ensure desktop files are made available for discovery
|
||||||
desktopEntries = {}; # This creates the desktop files directory structure
|
desktopEntries = {}; # This creates the desktop files directory structure
|
||||||
|
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
associations.added = {
|
associations.added = {
|
||||||
@@ -149,14 +141,13 @@ in
|
|||||||
"x-scheme-handler/https" = "firefox.desktop";
|
"x-scheme-handler/https" = "firefox.desktop";
|
||||||
};
|
};
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
# Web browsers (cross-platform)
|
# Web browsers
|
||||||
"text/html" = "firefox.desktop";
|
"text/html" = "firefox.desktop";
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
"x-scheme-handler/http" = "firefox.desktop";
|
||||||
"x-scheme-handler/https" = "firefox.desktop";
|
"x-scheme-handler/https" = "firefox.desktop";
|
||||||
"x-scheme-handler/about" = "firefox.desktop";
|
"x-scheme-handler/about" = "firefox.desktop";
|
||||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||||
} // optionalAttrs isLinux {
|
|
||||||
# Linux-only: KDE application associations
|
|
||||||
# Documents
|
# Documents
|
||||||
"application/pdf" = "okular.desktop";
|
"application/pdf" = "okular.desktop";
|
||||||
"text/plain" = "kate.desktop";
|
"text/plain" = "kate.desktop";
|
||||||
@@ -164,7 +155,7 @@ in
|
|||||||
"text/x-c" = "kate.desktop";
|
"text/x-c" = "kate.desktop";
|
||||||
"text/x-python" = "kate.desktop";
|
"text/x-python" = "kate.desktop";
|
||||||
"application/x-shellscript" = "kate.desktop";
|
"application/x-shellscript" = "kate.desktop";
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
"image/png" = "gwenview.desktop";
|
"image/png" = "gwenview.desktop";
|
||||||
"image/jpeg" = "gwenview.desktop";
|
"image/jpeg" = "gwenview.desktop";
|
||||||
@@ -173,25 +164,25 @@ in
|
|||||||
"image/bmp" = "gwenview.desktop";
|
"image/bmp" = "gwenview.desktop";
|
||||||
"image/tiff" = "gwenview.desktop";
|
"image/tiff" = "gwenview.desktop";
|
||||||
"image/webp" = "gwenview.desktop";
|
"image/webp" = "gwenview.desktop";
|
||||||
|
|
||||||
# Archives
|
# Archives
|
||||||
"application/zip" = "ark.desktop";
|
"application/zip" = "ark.desktop";
|
||||||
"application/x-tar" = "ark.desktop";
|
"application/x-tar" = "ark.desktop";
|
||||||
"application/x-compressed-tar" = "ark.desktop";
|
"application/x-compressed-tar" = "ark.desktop";
|
||||||
"application/x-7z-compressed" = "ark.desktop";
|
"application/x-7z-compressed" = "ark.desktop";
|
||||||
"application/x-rar" = "ark.desktop";
|
"application/x-rar" = "ark.desktop";
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
"audio/mpeg" = "elisa.desktop";
|
"audio/mpeg" = "elisa.desktop";
|
||||||
"audio/mp4" = "elisa.desktop";
|
"audio/mp4" = "elisa.desktop";
|
||||||
"audio/flac" = "elisa.desktop";
|
"audio/flac" = "elisa.desktop";
|
||||||
"audio/ogg" = "elisa.desktop";
|
"audio/ogg" = "elisa.desktop";
|
||||||
"audio/wav" = "elisa.desktop";
|
"audio/wav" = "elisa.desktop";
|
||||||
|
|
||||||
# Email
|
# Email
|
||||||
"message/rfc822" = "kmail.desktop";
|
"message/rfc822" = "kmail.desktop";
|
||||||
"x-scheme-handler/mailto" = "kmail.desktop";
|
"x-scheme-handler/mailto" = "kmail.desktop";
|
||||||
|
|
||||||
# Calendar
|
# Calendar
|
||||||
"text/calendar" = "korganizer.desktop";
|
"text/calendar" = "korganizer.desktop";
|
||||||
"application/x-vnd.akonadi.calendar.event" = "korganizer.desktop";
|
"application/x-vnd.akonadi.calendar.event" = "korganizer.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
|
# KDE still looks for applications.menu but Plasma 6 renamed it to plasma-applications.menu
|
||||||
xdg.configFile."menus/applications.menu" = mkIf isLinux {
|
xdg.configFile."menus/applications.menu".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||||
source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Note: modules must be imported at top-level home config
|
# Note: modules must be imported at top-level home config
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.home.roles.email;
|
cfg = config.home.roles.email;
|
||||||
isLinux = pkgs.stdenv.isLinux;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.home.roles.email = {
|
options.home.roles.email = {
|
||||||
@@ -90,38 +89,34 @@ in
|
|||||||
account default : proton
|
account default : proton
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Linux-only: Systemd service for mail sync (Darwin uses launchd instead)
|
# Systemd service for mail sync
|
||||||
systemd.user.services = mkIf isLinux {
|
systemd.user.services.mbsync = {
|
||||||
mbsync = {
|
Unit = {
|
||||||
Unit = {
|
Description = "Mailbox synchronization service";
|
||||||
Description = "Mailbox synchronization service";
|
After = [ "network-online.target" ];
|
||||||
After = [ "network-online.target" ];
|
Wants = [ "network-online.target" ];
|
||||||
Wants = [ "network-online.target" ];
|
};
|
||||||
};
|
Service = {
|
||||||
Service = {
|
Type = "oneshot";
|
||||||
Type = "oneshot";
|
ExecStart = "${pkgs.bash}/bin/bash -c 'mkdir -p ~/Mail && ${pkgs.isync}/bin/mbsync -a && (${pkgs.mu}/bin/mu info >/dev/null 2>&1 || ${pkgs.mu}/bin/mu init --maildir ~/Mail --personal-address=john@ogle.fyi) && ${pkgs.mu}/bin/mu index'";
|
||||||
ExecStart = "${pkgs.bash}/bin/bash -c 'mkdir -p ~/Mail && ${pkgs.isync}/bin/mbsync -a && (${pkgs.mu}/bin/mu info >/dev/null 2>&1 || ${pkgs.mu}/bin/mu init --maildir ~/Mail --personal-address=john@ogle.fyi) && ${pkgs.mu}/bin/mu index'";
|
Environment = "PATH=${pkgs.rbw}/bin:${pkgs.coreutils}/bin";
|
||||||
Environment = "PATH=${pkgs.rbw}/bin:${pkgs.coreutils}/bin";
|
StandardOutput = "journal";
|
||||||
StandardOutput = "journal";
|
StandardError = "journal";
|
||||||
StandardError = "journal";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Linux-only: Systemd timer for automatic sync
|
# Systemd timer for automatic sync
|
||||||
systemd.user.timers = mkIf isLinux {
|
systemd.user.timers.mbsync = {
|
||||||
mbsync = {
|
Unit = {
|
||||||
Unit = {
|
Description = "Mailbox synchronization timer";
|
||||||
Description = "Mailbox synchronization timer";
|
};
|
||||||
};
|
Timer = {
|
||||||
Timer = {
|
OnBootSec = "2min";
|
||||||
OnBootSec = "2min";
|
OnUnitActiveSec = "5min";
|
||||||
OnUnitActiveSec = "5min";
|
Unit = "mbsync.service";
|
||||||
Unit = "mbsync.service";
|
};
|
||||||
};
|
Install = {
|
||||||
Install = {
|
WantedBy = [ "timers.target" ];
|
||||||
WantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,15 +4,13 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.home.roles.kdeconnect;
|
cfg = config.home.roles.kdeconnect;
|
||||||
isLinux = pkgs.stdenv.isLinux;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.home.roles.kdeconnect = {
|
options.home.roles.kdeconnect = {
|
||||||
enable = mkEnableOption "Enable KDE Connect for device integration";
|
enable = mkEnableOption "Enable KDE Connect for device integration";
|
||||||
};
|
};
|
||||||
|
|
||||||
# KDE Connect services are Linux-only (requires D-Bus and systemd)
|
config = mkIf cfg.enable {
|
||||||
config = mkIf (cfg.enable && isLinux) {
|
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
enable = true;
|
enable = true;
|
||||||
indicator = true;
|
indicator = true;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.home.roles.sync;
|
cfg = config.home.roles.sync;
|
||||||
isLinux = pkgs.stdenv.isLinux;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.home.roles.sync = {
|
options.home.roles.sync = {
|
||||||
@@ -12,10 +11,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Linux-only: syncthingtray requires system tray support
|
home.packages = with pkgs; [
|
||||||
home.packages = optionals isLinux (with pkgs; [
|
|
||||||
syncthingtray
|
syncthingtray
|
||||||
]);
|
];
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,62 +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;
|
|
||||||
};
|
|
||||||
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";
|
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
mesa
|
|
||||||
libvdpau-va-gl
|
|
||||||
libva-vdpau-driver
|
|
||||||
];
|
|
||||||
};
|
|
||||||
environment.sessionVariables = {
|
|
||||||
LD_LIBRARY_PATH = [
|
|
||||||
"/usr/lib/wsl/lib"
|
|
||||||
"/run/opengl-driver/lib"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
nvidiaSettings = true;
|
|
||||||
open = true;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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?
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user