further reclassification and module implementation, but maybe went a bit too far and sacrified too much simplicity
This commit is contained in:
parent
1b98613591
commit
d946126e63
64
flake.lock
Normal file
64
flake.lock
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730837930,
|
||||
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730785428,
|
||||
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
20
flake.nix
20
flake.nix
@ -13,7 +13,6 @@
|
||||
# Add other inputs as needed, e.g.:
|
||||
# hardware.url = "github:nixos/nixos-hardware"; # If you need specific hardware support
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... } @ inputs: let
|
||||
lib = nixpkgs.lib.extend (
|
||||
final: prev: import ./lib {
|
||||
@ -27,28 +26,31 @@
|
||||
steamdeck = lib.mkHost "steamdeck" {
|
||||
username = "jeirmeister";
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "23.11"; # Adjust as needed
|
||||
stateVersion = "24.05"; # Updated version
|
||||
};
|
||||
|
||||
surface4 = lib.mkHost "surface4" {
|
||||
surface4 = lib.mkHost "surface" {
|
||||
username = "jeirmeister";
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "23.11"; # Adjust as needed
|
||||
stateVersion = "24.05"; # Updated version
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configurations
|
||||
homeConfigurations = {
|
||||
"jeirmeister@steamdeck" = lib.mkHome {
|
||||
inherit nixosConfigurations;
|
||||
"jeirmeister@steamdeck" = lib.mkHome "jeirmeister@steamdeck" {
|
||||
inherit (self) nixosConfigurations;
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
"jeirmeister@surface4" = lib.mkHome {
|
||||
inherit nixosConfigurations;
|
||||
"jeirmeister@surface" = lib.mkHome "jeirmeister@surface" {
|
||||
inherit (self) nixosConfigurations;
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Add basic overlays and packages outputs
|
||||
overlays = import ./overlays { inherit self; };
|
||||
# overlays = import ./overlays { inherit self; };
|
||||
packages = lib.forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||
};
|
||||
}
|
||||
|
@ -1,64 +1,44 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
|
||||
jovianNixos = builtins.fetchTarball {
|
||||
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
|
||||
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
|
||||
};
|
||||
|
||||
v4l2loopback-options = {
|
||||
options = {
|
||||
exclusive_caps = 1;
|
||||
video_nr = 0;
|
||||
card_label = "Immersed Virtual Camera";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/system
|
||||
../../modules/desktop
|
||||
(jovianNixos + "/modules")
|
||||
];
|
||||
|
||||
# Basic System Configuration
|
||||
system.stateVersion = "24.05";
|
||||
networking = {
|
||||
hostName = "steamnix";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
modules = {
|
||||
system = {
|
||||
enable = true;
|
||||
hostname = "steamnix";
|
||||
timeZone = "America/Los_Angeles";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
desktop = {
|
||||
enable = true;
|
||||
plasma6 = {
|
||||
enable = true;
|
||||
wayland = {
|
||||
enable = true;
|
||||
scaling = 1.5;
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
plasma-browser-integration
|
||||
kalendar
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Nix Package Manager Configuration
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(import (jovianNixos + "/overlay.nix"))
|
||||
];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "cache.nixos.org" ];
|
||||
allowed-users = [ "@wheel" "jeirmeister" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
# Steam Deck Specific Configuration
|
||||
# Steam Deck specific system configuration
|
||||
jovian = {
|
||||
hardware.has.amd.gpu = true;
|
||||
devices.steamdeck = {
|
||||
@ -77,26 +57,25 @@ in
|
||||
workarounds.ignoreMissingKernelModules = true;
|
||||
};
|
||||
|
||||
# Hardware and Display Configuration
|
||||
hardware.video = {
|
||||
displaylink.enable = true;
|
||||
# Host-specific Nix settings
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(import (jovianNixos + "/overlay.nix"))
|
||||
];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
# Desktop Environment and Display Configuration
|
||||
# Desktop Environment Configuration
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
videoDrivers = [ "displaylink" "modesetting" ];
|
||||
desktopManager.plasma6 = {
|
||||
enable = true;
|
||||
extraSessionCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0;
|
||||
'';
|
||||
};
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
wayland = {
|
||||
enable = true; # Fixed: proper wayland config
|
||||
};
|
||||
};
|
||||
sessionCommands = ''
|
||||
${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0
|
||||
@ -104,27 +83,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# System Services Configuration
|
||||
services = {
|
||||
# Audio Configuration
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Network Services
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
AllowUsers = [ "jeirmeister" ];
|
||||
};
|
||||
};
|
||||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
# Systemd Services
|
||||
# Steam Deck specific services
|
||||
systemd.services = {
|
||||
jupiter-fan-control = {
|
||||
path = [ pkgs.dmidecode ];
|
||||
@ -138,88 +98,20 @@ in
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
"systemd-modules-load" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = true;
|
||||
};
|
||||
};
|
||||
|
||||
# UDev Rules
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/pwm1"
|
||||
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/fan1_input"
|
||||
'';
|
||||
|
||||
# User Configuration
|
||||
users = {
|
||||
users.jeirmeister = {
|
||||
isNormalUser = true;
|
||||
description = "jeirmeister";
|
||||
group = "steamos";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"users"
|
||||
"wheel"
|
||||
"input"
|
||||
"video"
|
||||
"audio"
|
||||
"render"
|
||||
"gamepad"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
tailscale
|
||||
];
|
||||
};
|
||||
|
||||
groups = {
|
||||
steamos.gid = 1000;
|
||||
gamepad = {};
|
||||
render = {};
|
||||
};
|
||||
};
|
||||
|
||||
# System Programs and Packages
|
||||
programs = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
|
||||
# Steam Deck specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# System Tools
|
||||
# Steam Deck specific
|
||||
jupiter-fan-control
|
||||
linuxPackages.v4l2loopback
|
||||
v4l-utils
|
||||
|
||||
# System utilities
|
||||
pciutils
|
||||
usbutils
|
||||
lm_sensors
|
||||
dmidecode
|
||||
binutils
|
||||
|
||||
# Virtual Display
|
||||
linuxPackages.v4l2loopback
|
||||
v4l-utils
|
||||
|
||||
# Development Tools
|
||||
nixfmt-rfc-style
|
||||
git
|
||||
|
||||
# Network Tools
|
||||
wget
|
||||
curl
|
||||
|
||||
# Utilities
|
||||
tree
|
||||
];
|
||||
}
|
||||
# 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";
|
||||
# };
|
||||
# };
|
||||
}
|
@ -1,104 +1,54 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
jovianNixosRev = "f6423d86bec22c25a576b23262495c5536b0d069";
|
||||
jovianNixos = builtins.fetchTarball {
|
||||
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${jovianNixosRev}.tar.gz";
|
||||
sha256 = "sha256:1frd1dfqd97idwf1rj29ab0wvyfa2nx2h3bp9hkbmfa1m802avmb";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(jovianNixos + "/modules")
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
# Enable base system modules
|
||||
modules = lib.utils.enable [
|
||||
# Hardware support
|
||||
"bluetooth"
|
||||
"hardware-accel"
|
||||
|
||||
# Base system services
|
||||
"pipewire"
|
||||
"networkmanager"
|
||||
"openssh"
|
||||
"tailscale"
|
||||
|
||||
# Desktop environment
|
||||
"plasma6"
|
||||
];
|
||||
|
||||
# Steam Deck specific configuration
|
||||
jovian = {
|
||||
hardware.has.amd.gpu = true;
|
||||
devices.steamdeck = {
|
||||
enable = true;
|
||||
enableControllerUdevRules = true;
|
||||
enableDefaultStage1Modules = true;
|
||||
enablePerfControlUdevRules = true;
|
||||
enableOsFanControl = true;
|
||||
enableSoundSupport = true;
|
||||
enableXorgRotation = true;
|
||||
enableKernelPatches = true;
|
||||
enableFwupdBiosUpdates = false;
|
||||
autoUpdate = false;
|
||||
};
|
||||
steam.enable = false;
|
||||
workarounds.ignoreMissingKernelModules = true;
|
||||
};
|
||||
|
||||
# Basic system configuration
|
||||
networking.hostName = "steamnix";
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Nix settings
|
||||
nixpkgs = {
|
||||
overlays = [ (import (jovianNixos + "/overlay.nix")) ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "cache.nixos.org" ];
|
||||
allowed-users = [ "@wheel" "jeirmeister" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
# System services
|
||||
systemd.services = {
|
||||
jupiter-fan-control = {
|
||||
path = [ pkgs.dmidecode ];
|
||||
serviceConfig = lib.mkForce {
|
||||
Environment = "PYTHONUNBUFFERED=1";
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
ExecStart = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --run";
|
||||
ExecStopPost = "${pkgs.jupiter-fan-control}/share/jupiter-fan-control/fancontrol.py --stop";
|
||||
OOMScoreAdjust = -1000;
|
||||
Restart = "on-failure";
|
||||
# Hardware-specific settings
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "max";
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
kernelModules = [ "kvm-amd" "amdgpu" ];
|
||||
kernelParams = [
|
||||
"amd_pstate=active"
|
||||
"amdgpu.gttsize=8128"
|
||||
"spi_amd.speed_dev=1"
|
||||
];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
# UDev rules
|
||||
# Hardware-specific services
|
||||
hardware = {
|
||||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
opengl.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
# video.displaylink.enable = true;
|
||||
};
|
||||
|
||||
# Steam Deck specific udev rules
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/pwm1"
|
||||
SUBSYSTEM=="hwmon*", KERNEL=="hwmon*", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chmod a+rw /sys/%p/fan1_input"
|
||||
'';
|
||||
|
||||
# Essential system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
jupiter-fan-control
|
||||
pciutils
|
||||
usbutils
|
||||
lm_sensors
|
||||
dmidecode
|
||||
];
|
||||
}
|
||||
# File systems (retain your actual UUIDs)
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/...";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/...";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
}
|
@ -4,13 +4,22 @@ flake @ { inputs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
# Helper function to import and configure with lib
|
||||
importWith = file: args: import file ((args // { inherit lib; }));
|
||||
|
||||
# Import utilities with proper dependencies
|
||||
utilsLib = importWith ./utils.nix { };
|
||||
utilModsLib = importWith ./utilMods.nix { };
|
||||
|
||||
# Re-export inputs to make them available to all lib functions
|
||||
exports = {
|
||||
# Import functions for library with inherited inputs
|
||||
utilMods = import ./utilMods.nix { inherit lib; };
|
||||
utils = import ./utils.nix { inherit lib; };
|
||||
# Library functions
|
||||
utils = utilsLib;
|
||||
utilMods = utilModsLib;
|
||||
|
||||
# Core builders with flake inputs
|
||||
mkHost = import ./mkHost.nix (flake // { inherit lib; });
|
||||
mkHome = import ./mkHome.nix (flake // { inherit lib; });
|
||||
mkHome = import ./mkHome.nix (flake // { inherit lib utilsLib; });
|
||||
mkUnfreeNixpkgs = import ./mkUnfreeNixpkgs.nix;
|
||||
|
||||
# Helper function to enable modules based on host config
|
||||
@ -24,6 +33,10 @@ let
|
||||
enabledModules;
|
||||
in
|
||||
moduleImports;
|
||||
|
||||
# Export utility functions directly for convenience
|
||||
inherit (utilsLib) enable disable enableIf;
|
||||
inherit (utilModsLib) mkModule mkModule' mkEnabledModule mkEnabledModule';
|
||||
};
|
||||
in
|
||||
exports
|
||||
exports
|
@ -9,16 +9,16 @@ flake @ {
|
||||
atSignSplit = string:
|
||||
lib.splitString "@" string;
|
||||
|
||||
# Grab everything before the @ in "username@hostname", from llakala
|
||||
# Grab everything before the @ in "username@hostname"
|
||||
guessUsername = userhost:
|
||||
if lib.length (internals.atSignSplit userhost) == 2
|
||||
then lib.elemAt (internals.atSignSplit userhost) 0 # First value in list
|
||||
then lib.elemAt (internals.atSignSplit userhost) 0
|
||||
else throw "Invalid userhost format: ${userhost}. Expected format: username@hostname";
|
||||
|
||||
# Grab everything after the @ in "username@hostname", from llakala
|
||||
# Grab everything after the @ in "username@hostname"
|
||||
guessHostname = userhost:
|
||||
if lib.length (internals.atSignSplit userhost) == 2
|
||||
then lib.elemAt (internals.atSignSplit userhost) 1 # Second value in list
|
||||
then lib.elemAt (internals.atSignSplit userhost) 1
|
||||
else throw "Invalid userhost format: ${userhost}. Expected format: username@hostname";
|
||||
};
|
||||
|
||||
@ -27,13 +27,9 @@ flake @ {
|
||||
nixosConfigurations,
|
||||
username ? internals.guessUsername userhost,
|
||||
hostname ? internals.guessHostname userhost,
|
||||
#stateVersion ? lib.conds.defaultStateVersion,
|
||||
stateVersion ? "24.05",
|
||||
}:
|
||||
/*
|
||||
lib.homeManagerConfiguration {
|
||||
extraSpecialArgs = flake // {inherit username hostname stateVersion;};
|
||||
};
|
||||
*/
|
||||
nixosConfigurations.${hostname}.config.home-manager.users.${username}.home; # allows me to independently switch my home environment without rebuilding my entire system
|
||||
# Use the NixOS system configuration's home-manager setup
|
||||
nixosConfigurations.${hostname}.config.home-manager.users.${username}.home;
|
||||
in
|
||||
mkHome
|
||||
mkHome
|
@ -8,12 +8,19 @@ let
|
||||
mkHost = hostname: { username
|
||||
, system
|
||||
, stateVersion ? "24.05"
|
||||
,
|
||||
}:
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = flake // { inherit hostname username system stateVersion; };
|
||||
modules = [
|
||||
# Set up nixpkgs
|
||||
{
|
||||
nixpkgs.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
|
||||
# Core system configuration
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
@ -27,7 +34,12 @@ let
|
||||
# Host-specific configurations
|
||||
../hosts/${hostname}/configuration.nix
|
||||
../hosts/${hostname}/hardware-configuration.nix
|
||||
|
||||
# System modules
|
||||
../modules/core
|
||||
../modules/desktop
|
||||
../modules/system
|
||||
];
|
||||
};
|
||||
in
|
||||
mkHost
|
||||
mkHost
|
@ -1,4 +1,4 @@
|
||||
{lib, ...}: let
|
||||
{ lib, ... }: let
|
||||
internals = {
|
||||
# Helper for creating modules
|
||||
mkModuleWithOptions = {
|
||||
@ -8,28 +8,28 @@
|
||||
default ? false,
|
||||
extraOptions ? {},
|
||||
extraCondition ? true,
|
||||
}: let
|
||||
}: { config, lib, pkgs, ... }: let
|
||||
namePathList = lib.splitString "." name;
|
||||
|
||||
modulePath = ["modules"] ++ namePathList;
|
||||
enableOptionPath = modulePath ++ ["enable"];
|
||||
|
||||
moduleOptions = {
|
||||
enable = lib.mkOption {
|
||||
inherit default;
|
||||
type = lib.types.bool;
|
||||
description = "Enable [${name}] module";
|
||||
};
|
||||
} // extraOptions;
|
||||
|
||||
moduleOptions =
|
||||
{
|
||||
enable = lib.mkOption {
|
||||
inherit default;
|
||||
type = lib.types.bool;
|
||||
description = "Enable [${name}] module";
|
||||
};
|
||||
}
|
||||
// extraOptions;
|
||||
# Get the module configuration path
|
||||
cfg = lib.getAttrFromPath modulePath config;
|
||||
in {
|
||||
options = lib.setAttrByPath modulePath moduleOptions;
|
||||
|
||||
config =
|
||||
lib.mkIf
|
||||
config = lib.mkIf
|
||||
(lib.getAttrFromPath enableOptionPath config && extraCondition)
|
||||
moduleConfig;
|
||||
(if builtins.isFunction moduleConfig
|
||||
then moduleConfig { inherit config lib pkgs cfg; }
|
||||
else moduleConfig);
|
||||
};
|
||||
};
|
||||
|
||||
@ -39,7 +39,8 @@
|
||||
internals.mkModuleWithOptions {inherit config name extraOptions moduleConfig;};
|
||||
|
||||
# Function for creating modules.NAME modules, without extra options
|
||||
mkModule = config: name: moduleConfig: exports.mkModule' config name {} moduleConfig;
|
||||
mkModule = config: name: moduleConfig:
|
||||
exports.mkModule' config name {} moduleConfig;
|
||||
|
||||
# Function for creating modules.NAME modules that are enabled by default, with extra options
|
||||
mkEnabledModule' = config: name: extraOptions: moduleConfig:
|
||||
@ -52,5 +53,4 @@
|
||||
mkEnabledModule = config: name: moduleConfig:
|
||||
exports.mkEnabledModule' config name {} moduleConfig;
|
||||
};
|
||||
in
|
||||
exports
|
||||
in exports
|
@ -22,6 +22,21 @@
|
||||
then (exports.enable elems)
|
||||
else (exports.disable elems);
|
||||
|
||||
mkOptionStr = name: default: description: lib.mkOption {
|
||||
type = lib.types.str;
|
||||
inherit default description;
|
||||
};
|
||||
|
||||
mkOptionBool = name: default: description: lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
inherit default description;
|
||||
};
|
||||
|
||||
# Hardware configuration helpers
|
||||
isAmdCpu = config: config.hardware.cpu.manufacturer == "amd";
|
||||
isIntelCpu = config: config.hardware.cpu.manufacturer == "intel";
|
||||
|
||||
|
||||
# GPG command for checking if there is a hardware key present
|
||||
isGpgUnlocked = pkgs: "${pkgs.procps}/bin/pgrep 'gpg-agent' &> /dev/null && ${pkgs.gnupg}/bin/gpg-connect-agent 'scd getinfo card_list' /bye | ${pkgs.gnugrep}/bin/grep SERIALNO -q";
|
||||
|
||||
|
@ -1,10 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh.shellAliases = {
|
||||
ll = "ls -la";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
hm = "home-manager";
|
||||
hms = "home-manager switch";
|
||||
options.modules.core.aliases = {
|
||||
enable = lib.mkEnableOption "shell aliases";
|
||||
};
|
||||
}
|
||||
|
||||
config = lib.mkIf config.modules.core.aliases.enable {
|
||||
programs.zsh.shellAliases = {
|
||||
ll = "ls -la";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
hm = "home-manager";
|
||||
hms = "home-manager switch";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,22 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./aliases
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./ssh.nix
|
||||
./zsh.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
btop
|
||||
ripgrep
|
||||
fd
|
||||
jq
|
||||
tree
|
||||
xclip
|
||||
bat
|
||||
fzf
|
||||
neofetch
|
||||
];
|
||||
}
|
||||
|
||||
options.modules.core = {
|
||||
enable = lib.mkEnableOption "core configuration";
|
||||
};
|
||||
}
|
@ -1,9 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableZshIntegration = true;
|
||||
options.modules.core.direnv = {
|
||||
enable = lib.mkEnableOption "direnv configuration";
|
||||
};
|
||||
}
|
||||
|
||||
config = lib.mkIf config.modules.core.direnv.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,18 +1,21 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.git; # Explicitly specify git package
|
||||
lfs.enable = true;
|
||||
|
||||
# More explicit credential configuration
|
||||
credential = {
|
||||
helper = lib.mkForce "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
credentialStore = "plaintext";
|
||||
interactive = false;
|
||||
};
|
||||
safe.directory = "*";
|
||||
options.modules.core.git = {
|
||||
enable = lib.mkEnableOption "git configuration";
|
||||
};
|
||||
xdg.enable = true;
|
||||
}
|
||||
|
||||
config = lib.mkIf config.modules.core.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
lfs.enable = true;
|
||||
credential = {
|
||||
helper = "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
credentialStore = "plaintext";
|
||||
interactive = false;
|
||||
};
|
||||
safe.directory = "*";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,41 +1,41 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# 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";
|
||||
options.modules.core.gpg = {
|
||||
enable = lib.mkEnableOption "gpg configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.core.gpg.enable {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
trust-model = "tofu+pgp";
|
||||
tofu-default-policy = "auto";
|
||||
keyserver-options = "auto-key-retrieve";
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
defaultCacheTtl = 1800;
|
||||
maxCacheTtl = 7200;
|
||||
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
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
gnupg
|
||||
pinentry-qt
|
||||
paperkey
|
||||
pgpdump
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -1,20 +1,23 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
UseKeychain yes
|
||||
IdentitiesOnly yes
|
||||
HashKnownHosts yes
|
||||
'';
|
||||
|
||||
# For better security
|
||||
serverAliveInterval = 60;
|
||||
serverAliveCountMax = 2;
|
||||
|
||||
options.modules.core.ssh = {
|
||||
enable = lib.mkEnableOption "ssh configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.core.ssh.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
AddKeysToAgent yes
|
||||
UseKeychain yes
|
||||
IdentitiesOnly yes
|
||||
HashKnownHosts yes
|
||||
'';
|
||||
serverAliveInterval = 60;
|
||||
serverAliveCountMax = 2;
|
||||
};
|
||||
|
||||
home.file."${config.home.sessionVariables.XDG_DATA_HOME}/ssh/.keep".text = "";
|
||||
};
|
||||
home.file."${config.home.sessionVariables.XDG_DATA_HOME}/ssh/.keep".text = "";
|
||||
}
|
||||
|
@ -1,17 +1,18 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# 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
|
||||
'';
|
||||
options.modules.core.zsh = {
|
||||
enable = lib.mkEnableOption "zsh configuration";
|
||||
};
|
||||
|
||||
# Make zsh the default shell
|
||||
home.sessionVariables = {
|
||||
SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
config = lib.mkIf config.modules.core.zsh.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
export PATH=$HOME/.nix-profile/bin:$PATH
|
||||
'';
|
||||
};
|
||||
|
||||
home.sessionVariables.SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
}
|
||||
}
|
@ -1,13 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Required for AppImage support
|
||||
appimage-run
|
||||
|
||||
# Optional but useful tools for AppImage management
|
||||
zlib
|
||||
fuse
|
||||
fuse3
|
||||
];
|
||||
}
|
||||
options.modules.desktop.appimage = {
|
||||
enable = lib.mkEnableOption "appimage support";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.desktop.appimage.enable {
|
||||
home.packages = with pkgs; [
|
||||
appimage-run
|
||||
zlib
|
||||
fuse
|
||||
fuse3
|
||||
];
|
||||
};
|
||||
}
|
||||
|
20
modules/desktop/browsers/default.nix
Normal file
20
modules/desktop/browsers/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.modules.desktop.browsers = {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
enable = lib.mkEnableOption "browser support";
|
||||
|
||||
floorp.enable = lib.mkEnableOption "Floorp browser";
|
||||
chromium.enable = lib.mkEnableOption "Chromium browser";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.desktop.browsers.enable {
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf config.modules.desktop.browsers.floorp.enable floorp)
|
||||
(lib.mkIf config.modules.desktop.browsers.chromium.enable ungoogled-chromium)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,22 +1,32 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# Signal
|
||||
signal-cli
|
||||
signal-export
|
||||
signal-desktop
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
# Telegram
|
||||
telegram-desktop
|
||||
telegram-bot-api
|
||||
tg
|
||||
tdl
|
||||
options.modules.desktop.communication = {
|
||||
enable = lib.mkEnableOption "communication apps";
|
||||
};
|
||||
|
||||
# WhatsApp
|
||||
whatsapp-for-linux
|
||||
whatsapp-chat-exporter
|
||||
config = lib.mkIf config.modules.desktop.communication.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Signal
|
||||
signal-cli
|
||||
signal-export
|
||||
signal-desktop
|
||||
|
||||
# Video conferencing
|
||||
zoom-us
|
||||
];
|
||||
# Telegram
|
||||
telegram-desktop
|
||||
telegram-bot-api
|
||||
tg
|
||||
tdl
|
||||
|
||||
# WhatsApp
|
||||
whatsapp-for-linux
|
||||
whatsapp-chat-exporter
|
||||
|
||||
# Video conferencing
|
||||
zoom-us
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
19
modules/desktop/default.nix
Normal file
19
modules/desktop/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./browsers
|
||||
./communication
|
||||
./development
|
||||
# ./gaming
|
||||
./multiplexers
|
||||
./productivity
|
||||
./terminals
|
||||
./plasma6
|
||||
# ./appimage.nix
|
||||
];
|
||||
|
||||
options.modules.desktop = {
|
||||
enable = lib.mkEnableOption "desktop environment";
|
||||
};
|
||||
}
|
@ -1,10 +1,17 @@
|
||||
{ config, pkgs, ... }:
|
||||
# modules/desktop/development/default.nix
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./editors
|
||||
./env
|
||||
./tools.nix
|
||||
./docs.nix
|
||||
];
|
||||
}
|
||||
options.modules.desktop.development = {
|
||||
enable = lib.mkEnableOption "development tools";
|
||||
|
||||
vscode.enable = lib.mkEnableOption "VSCode";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.desktop.development.enable {
|
||||
# Base development packages will be configured in tools.nix
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
tldr
|
||||
];
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./sublime.nix
|
||||
./vscode.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
sublime4
|
||||
];
|
||||
}
|
@ -1,66 +1,61 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
config = lib.mkIf config.modules.desktop.development.vscode.enable {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
extensions = 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
|
||||
];
|
||||
|
||||
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";
|
||||
userSettings = {
|
||||
"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.enabled" = true;
|
||||
"git.autofetch" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.path" = "${pkgs.git}/bin/git";
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
|
||||
"gitlens.hovers.currentLine.over" = "line";
|
||||
"gitlens.currentLine.enabled" = true;
|
||||
"gitlens.hovers.enabled" = true;
|
||||
"gitlens.mode.active" = "zen";
|
||||
|
||||
"git.terminalAuthentication" = true;
|
||||
"git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
|
||||
|
||||
"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
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
nixpkgs-fmt
|
||||
nil
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -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
|
||||
];
|
||||
}
|
@ -1,7 +1,19 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vr
|
||||
./vr
|
||||
];
|
||||
|
||||
options.modules.desktop.gaming = {
|
||||
enable = lib.mkEnableOption "gaming support";
|
||||
steam.enable = lib.mkEnableOption "Steam gaming platform";
|
||||
vr.enable = lib.mkEnableOption "VR support";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.desktop.gaming.enable {
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf config.modules.desktop.gaming.steam.enable steam)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -1,42 +1,46 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
immersed
|
||||
];
|
||||
config = lib.mkIf config.modules.desktop.gaming.vr.enable {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
systemd.user.services.immersed = {
|
||||
Unit = {
|
||||
Description = "Immersed VR Client";
|
||||
After = [ "graphical-session.target" "network.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
Requires = [ "network.target" ];
|
||||
home.packages = with pkgs; [
|
||||
immersed
|
||||
];
|
||||
|
||||
systemd.user.services.immersed = {
|
||||
Unit = {
|
||||
Description = "Immersed VR Client";
|
||||
After = [ "graphical-session.target" "network.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
Requires = [ "network.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 2";
|
||||
ExecStart = "${pkgs.immersed}/bin/immersed";
|
||||
Environment = [
|
||||
"DISPLAY=:0"
|
||||
"XDG_CURRENT_DESKTOP=KDE"
|
||||
"QT_QPA_PLATFORM=xcb"
|
||||
"XDG_RUNTIME_DIR=/run/user/1000"
|
||||
"XDG_SESSION_TYPE=x11"
|
||||
];
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
DevicePolicy = "auto";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
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_RUNTIME_DIR=/run/user/1000"
|
||||
"XDG_SESSION_TYPE=x11" # Force X11 mode
|
||||
];
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
DevicePolicy = "auto";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
home.file.".local/share/immersed/.keep".text = "";
|
||||
home.file.".config/immersed/.keep".text = "";
|
||||
};
|
||||
|
||||
# Create required directories
|
||||
home.file.".local/share/immersed/.keep".text = "";
|
||||
home.file.".config/immersed/.keep".text = "";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./tmux.nix
|
||||
];
|
||||
}
|
||||
|
||||
options.modules.desktop.multiplexers = {
|
||||
enable = lib.mkEnableOption "terminal multiplexers";
|
||||
tmux.enable = lib.mkEnableOption "tmux";
|
||||
};
|
||||
}
|
@ -1,29 +1,29 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 0;
|
||||
terminal = "screen-256color";
|
||||
historyLimit = 10000;
|
||||
keyMode = "vi";
|
||||
customPaneNavigationAndResize = true;
|
||||
extraConfig = ''
|
||||
# Enable mouse support
|
||||
set -g mouse on
|
||||
config = lib.mkIf config.modules.desktop.multiplexers.tmux.enable {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
# Set prefix to Ctrl-a
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# Split panes using | and -
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
'';
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 0;
|
||||
terminal = "screen-256color";
|
||||
historyLimit = 10000;
|
||||
keyMode = "vi";
|
||||
customPaneNavigationAndResize = true;
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
108
modules/desktop/plasma6/default.nix
Normal file
108
modules/desktop/plasma6/default.nix
Normal file
@ -0,0 +1,108 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.desktop.plasma6;
|
||||
in {
|
||||
options.modules.desktop.plasma6 = {
|
||||
enable = lib.mkEnableOption "KDE Plasma 6 desktop environment";
|
||||
|
||||
wayland = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable Wayland support for Plasma";
|
||||
};
|
||||
|
||||
scaling = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
default = 1.0;
|
||||
description = "Global scaling factor for Wayland";
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [];
|
||||
description = "Additional KDE/Plasma packages to install";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland = {
|
||||
enable = cfg.wayland.enable; # Fixed: wayland is an attribute set
|
||||
};
|
||||
};
|
||||
defaultSession = "plasma";
|
||||
};
|
||||
|
||||
desktopManager.plasma6.enable = true;
|
||||
};
|
||||
environment.sessionVariables = lib.mkIf cfg.wayland.enable {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
GDK_BACKEND = "wayland,x11";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
QT_SCALE_FACTOR = toString cfg.wayland.scaling;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
kate
|
||||
konsole
|
||||
dolphin
|
||||
ark
|
||||
okular
|
||||
spectacle
|
||||
plasma-pa
|
||||
plasma-nm
|
||||
kdeconnect
|
||||
wayland
|
||||
plasma5Packages.kwayland
|
||||
plasma5Packages.kwayland-integration
|
||||
qt6.qtwayland
|
||||
] ++ cfg.extraPackages;
|
||||
|
||||
services = {
|
||||
power-profiles-daemon.enable = true;
|
||||
upower.enable = true;
|
||||
accounts-daemon.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
polkit.enable = true;
|
||||
pam.services.sddm.enableKwallet = true;
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-kde
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,8 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
bitwarden-desktop
|
||||
bitwarden-cli
|
||||
];
|
||||
config = lib.mkIf config.modules.desktop.productivity.bitwarden.enable {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
home.packages = with pkgs; [
|
||||
bitwarden-desktop
|
||||
bitwarden-cli
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./obsidian.nix
|
||||
# ./obsidian.nix
|
||||
./bitwarden.nix
|
||||
./todoist.nix
|
||||
# ./todoist.nix
|
||||
];
|
||||
}
|
||||
|
||||
options.modules.desktop.productivity = {
|
||||
enable = lib.mkEnableOption "productivity tools";
|
||||
# obsidian.enable = lib.mkEnableOption "Obsidian";
|
||||
bitwarden.enable = lib.mkEnableOption "Bitwarden";
|
||||
# todoist.enable = lib.mkEnableOption "Todoist";
|
||||
};
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
obsidian
|
||||
];
|
||||
config = lib.mkIf config.modules.desktop.productivity.obsidian.enable {
|
||||
home.packages = with pkgs; [
|
||||
obsidian
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
todoist
|
||||
todoist-electron
|
||||
];
|
||||
}
|
||||
config = lib.mkIf config.modules.desktop.productivity.todoist.enable {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
home.packages = with pkgs; [
|
||||
todoist
|
||||
todoist-electron
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,7 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./kitty.nix
|
||||
];
|
||||
|
||||
options.modules.desktop.terminals = {
|
||||
enable = lib.mkEnableOption "terminal emulators";
|
||||
kitty.enable = lib.mkEnableOption "kitty terminal";
|
||||
};
|
||||
}
|
||||
|
@ -1,61 +1,52 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 12;
|
||||
window_padding_width = 4;
|
||||
background_opacity = "0.95";
|
||||
hide_window_decorations = "yes";
|
||||
tab_bar_style = "powerline";
|
||||
|
||||
# Dracula theme colors
|
||||
foreground = "#F8F8F2";
|
||||
background = "#282A36";
|
||||
selection_foreground = "#ffffff";
|
||||
selection_background = "#44475a";
|
||||
url_color = "#8be9fd";
|
||||
cursor = "#f8f8f2";
|
||||
config = lib.mkIf config.modules.desktop.terminals.kitty.enable {
|
||||
home-manager.users.${config.user.name} = { # Use home-manager.users path
|
||||
|
||||
# black
|
||||
color0 = "#21222c";
|
||||
color8 = "#6272a4";
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 12;
|
||||
window_padding_width = 4;
|
||||
background_opacity = "0.95";
|
||||
hide_window_decorations = "yes";
|
||||
tab_bar_style = "powerline";
|
||||
|
||||
# Dracula theme colors
|
||||
foreground = "#F8F8F2";
|
||||
background = "#282A36";
|
||||
selection_foreground = "#ffffff";
|
||||
selection_background = "#44475a";
|
||||
url_color = "#8be9fd";
|
||||
cursor = "#f8f8f2";
|
||||
|
||||
# red
|
||||
color1 = "#ff5555";
|
||||
color9 = "#ff6e6e";
|
||||
# Colors
|
||||
color0 = "#21222c";
|
||||
color8 = "#6272a4";
|
||||
color1 = "#ff5555";
|
||||
color9 = "#ff6e6e";
|
||||
color2 = "#50fa7b";
|
||||
color10 = "#69ff94";
|
||||
color3 = "#f1fa8c";
|
||||
color11 = "#ffffa5";
|
||||
color4 = "#bd93f9";
|
||||
color12 = "#d6acff";
|
||||
color5 = "#ff79c6";
|
||||
color13 = "#ff92df";
|
||||
color6 = "#8be9fd";
|
||||
color14 = "#a4ffff";
|
||||
color7 = "#f8f8f2";
|
||||
color15 = "#ffffff";
|
||||
|
||||
# green
|
||||
color2 = "#50fa7b";
|
||||
color10 = "#69ff94";
|
||||
|
||||
# yellow
|
||||
color3 = "#f1fa8c";
|
||||
color11 = "#ffffa5";
|
||||
|
||||
# blue
|
||||
color4 = "#bd93f9";
|
||||
color12 = "#d6acff";
|
||||
|
||||
# magenta
|
||||
color5 = "#ff79c6";
|
||||
color13 = "#ff92df";
|
||||
|
||||
# cyan
|
||||
color6 = "#8be9fd";
|
||||
color14 = "#a4ffff";
|
||||
|
||||
# white
|
||||
color7 = "#f8f8f2";
|
||||
color15 = "#ffffff";
|
||||
|
||||
# tab bar
|
||||
active_tab_foreground = "#282a36";
|
||||
active_tab_background = "#f8f8f2";
|
||||
inactive_tab_foreground = "#282a36";
|
||||
inactive_tab_background = "#6272a4";
|
||||
# Tab bar
|
||||
active_tab_foreground = "#282a36";
|
||||
active_tab_background = "#f8f8f2";
|
||||
inactive_tab_foreground = "#282a36";
|
||||
inactive_tab_background = "#6272a4";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
148
modules/system/default.nix
Normal file
148
modules/system/default.nix
Normal file
@ -0,0 +1,148 @@
|
||||
# modules/system/default.nix
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.system;
|
||||
in {
|
||||
options.modules.system = {
|
||||
# Base system options
|
||||
enable = lib.mkEnableOption "system configuration";
|
||||
|
||||
# System identification
|
||||
stateVersion = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "24.05";
|
||||
description = "The NixOS state version for this system";
|
||||
};
|
||||
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The hostname of this system";
|
||||
};
|
||||
|
||||
# Locale and time
|
||||
timeZone = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "America/Los_Angeles";
|
||||
description = "The timezone for this system";
|
||||
};
|
||||
|
||||
# Nix specific options
|
||||
nix = {
|
||||
autoGc = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable automatic garbage collection";
|
||||
};
|
||||
|
||||
gcDays = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 7;
|
||||
description = "Days between automatic garbage collection";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
description = "Additional Nix settings";
|
||||
};
|
||||
};
|
||||
|
||||
# Security options
|
||||
security = {
|
||||
sudo.askPass = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether sudo should ask for a password";
|
||||
};
|
||||
|
||||
polkit.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable polkit for privilege escalation";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Basic system configuration
|
||||
system.stateVersion = cfg.stateVersion;
|
||||
networking.hostName = cfg.hostname;
|
||||
time.timeZone = cfg.timeZone;
|
||||
|
||||
# Locale settings
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
supportedLocales = [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
"C.UTF-8/UTF-8"
|
||||
];
|
||||
};
|
||||
|
||||
# Nix configuration
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
allowed-users = [ "@wheel" ];
|
||||
auto-optimise-store = true;
|
||||
warn-dirty = false;
|
||||
} // cfg.nix.extraOptions;
|
||||
|
||||
gc = lib.mkIf cfg.nix.autoGc {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than ${toString cfg.nix.gcDays}d";
|
||||
};
|
||||
};
|
||||
|
||||
# Security configuration
|
||||
security = {
|
||||
sudo.wheelNeedsPassword = cfg.security.sudo.askPass;
|
||||
polkit.enable = cfg.security.polkit.enable;
|
||||
rtkit.enable = true;
|
||||
};
|
||||
|
||||
# Essential system packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Basic utilities
|
||||
coreutils
|
||||
curl
|
||||
wget
|
||||
git
|
||||
vim
|
||||
|
||||
# System utilities
|
||||
htop
|
||||
lsof
|
||||
tree
|
||||
file
|
||||
which
|
||||
|
||||
# Hardware utilities
|
||||
pciutils
|
||||
usbutils
|
||||
lshw
|
||||
];
|
||||
|
||||
# Basic system services
|
||||
services = {
|
||||
# Time synchronization
|
||||
timesyncd.enable = true;
|
||||
|
||||
# USB device management
|
||||
udev.enable = true;
|
||||
|
||||
# DBus
|
||||
dbus = {
|
||||
enable = true;
|
||||
packages = with pkgs; [ dconf ];
|
||||
};
|
||||
};
|
||||
|
||||
# System-wide environment settings
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1"; # For Electron apps
|
||||
XDG_SESSION_TYPE = lib.mkDefault "wayland";
|
||||
};
|
||||
};
|
||||
}
|
@ -2,20 +2,12 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
./config # User-specific configurations
|
||||
./config
|
||||
];
|
||||
|
||||
# Language support configuration
|
||||
languages = {
|
||||
enable = true;
|
||||
python.enable = true;
|
||||
rust.enable = false;
|
||||
go.enable = false;
|
||||
javascript.enable = false;
|
||||
};
|
||||
|
||||
# Module configuration
|
||||
# Steam Deck specific user configuration
|
||||
modules = {
|
||||
# Core modules
|
||||
core = {
|
||||
enable = true;
|
||||
git.enable = true;
|
||||
@ -25,8 +17,10 @@
|
||||
direnv.enable = true;
|
||||
};
|
||||
|
||||
# Desktop environment
|
||||
desktop = {
|
||||
enable = true;
|
||||
plasma6.enable = true;
|
||||
browsers = {
|
||||
enable = true;
|
||||
floorp.enable = true;
|
||||
@ -46,24 +40,39 @@
|
||||
};
|
||||
gaming = {
|
||||
enable = true;
|
||||
steam.enable = true;
|
||||
vr.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# User-specific packages
|
||||
# Language support
|
||||
languages = {
|
||||
enable = true;
|
||||
python.enable = true;
|
||||
rust.enable = false;
|
||||
go.enable = false;
|
||||
javascript.enable = false;
|
||||
};
|
||||
|
||||
# Steam Deck specific packages
|
||||
home.packages = with pkgs; [
|
||||
# Development tools
|
||||
# Gaming
|
||||
steam
|
||||
mangohud
|
||||
jupiter-fan-control
|
||||
|
||||
# Development
|
||||
git
|
||||
nixfmt-rfc-style
|
||||
|
||||
# Virtual Display
|
||||
linuxPackages.v4l2loopback
|
||||
v4l-utils
|
||||
|
||||
# CLI utilities
|
||||
wget
|
||||
curl
|
||||
tree
|
||||
|
||||
# Virtual Display tools
|
||||
linuxPackages.v4l2loopback
|
||||
v4l-utils
|
||||
];
|
||||
}
|
||||
}
|
@ -1,15 +1,11 @@
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, username
|
||||
, inputs
|
||||
, ...
|
||||
}: {
|
||||
{ config, lib, pkgs, username, ... }:
|
||||
|
||||
{
|
||||
# User account configuration
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
description = "Jeremiah Coenen";
|
||||
description = "jeirmeister";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
@ -19,46 +15,43 @@
|
||||
"render"
|
||||
"gamepad"
|
||||
];
|
||||
group = "steamos";
|
||||
};
|
||||
|
||||
# System-wide configuration
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# User groups
|
||||
users.groups = {
|
||||
steamos.gid = 1000;
|
||||
gamepad = {};
|
||||
render = {};
|
||||
};
|
||||
|
||||
# System-wide packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
curl
|
||||
wget
|
||||
tree
|
||||
];
|
||||
# Host-independent user settings
|
||||
home-manager.users.${username} = {
|
||||
home.stateVersion = config.system.stateVersion;
|
||||
|
||||
# Enable core modules
|
||||
modules = {
|
||||
core = {
|
||||
enable = true;
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
gpg.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# System-wide services
|
||||
# System-wide services configuration
|
||||
services = {
|
||||
# Network services
|
||||
openssh.enable = true;
|
||||
tailscale.enable = true;
|
||||
|
||||
# Audio
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = true;
|
||||
settings.AllowUsers = [ username ];
|
||||
};
|
||||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
# Global settings for X/Wayland
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
};
|
||||
|
||||
# System-level Nix settings
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
allowed-users = [ "@wheel" username ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user