NixOS configuration
Find a file
Julian Sutter 73de2bfb51 Fix deprecated NixOS options and migrate to new syntax
This commit resolves multiple deprecation warnings and errors that were
preventing the NixOS configuration from being built successfully.

## Changes Made

### 1. Git Configuration Options (Home Manager)
**Affected Files:**
- users/jsutter.nix
- users/isutter.nix
- users/aksutter.nix

**Changes:**
- Migrated from deprecated `userName` and `userEmail` options to new
  `settings.user.name` and `settings.user.email` syntax
- Migrated from deprecated `extraConfig` to inline `settings` format
- This aligns with Home Manager's new git configuration structure

**Before:**
```nix
programs.git = {
  userName  = "Julian Sutter";
  userEmail = "jsutter@symbiotip.com";
  extraConfig = { core.editor = "nano"; };
};
```

**After:**
```nix
programs.git = {
  settings = {
    user = {
      name = "Julian Sutter";
      email = "jsutter@symbiotip.com";
    };
    core.editor = "nano";
  };
};
```

### 2. Systemd Logind Options
**Affected File:** systems/framework.nix

**Changes:**
- Migrated from deprecated direct options to new nested settings syntax
- All logind power management options now use `settings.Login.*` format

**Before:**
```nix
services.logind = {
  lidSwitch = "suspend-then-hibernate";
  lidSwitchDocked = "ignore";
};
```

**After:**
```nix
services.logind = {
  settings = {
    Login = {
      HandleLidSwitch = "suspend-then-hibernate";
      HandleLidSwitchDocked = "ignore";
    };
  };
};
```

### 3. Display Manager Configuration
**Affected File:** desktop/plasma.nix

**Changes:**
- Removed deprecated `services.xserver.displayManager.gdm.enable`
- Configuration now uses `services.displayManager.gdm.enable` exclusively
- Added explanatory comment about the deprecation removal

### 4. Package Deprecations
**Affected Files:**
- users/aksutter.nix
- users/isutter.nix

**Changes:**
- Replaced deprecated `pinentry` package with `pinentry-gnome3`
- The generic `pinentry` package has been split into specific variants
- `pinentry-gnome3` was already in use elsewhere in plasma.nix

### 5. NixOS System Parameter
**Affected File:** flake.nix

**Changes:**
- Updated system parameter handling to address deprecation warning
- Changed from `inherit system` to `inherit (localSystem) system`
- Renamed `system` variable to `localSystem` with explicit system attribute

**Before:**
```nix
let
  system = "x86_64-linux";
  commonSpecialArgs = {
    pkgs-unstable = import nixpkgs-unstable {
      inherit system;
```

**After:**
```nix
let
  localSystem = {
    system = "x86_64-linux";
  };
  commonSpecialArgs = {
    pkgs-unstable = import nixpkgs-unstable {
      inherit (localSystem) system;
```

## Verification

### Build Status
 All three system configurations build successfully:
- framework
- aurora
- labrizor

### Flake Check Results
 `nix flake check` passes without errors
 Only remaining warning is from external flake-utils dependency
  in octofriend subflake, which does not affect functionality

### Framework Build Results
 `sudo nixos-rebuild build --flake .#framework` completed successfully
 New configuration path:
  /nix/store/6wci3m6qnzphw75b0j7lmx1gjqphry3n-nixos-system-framework-25.11.20260203.e576e3c

## Impact

### User Impact
- Git configuration behavior remains unchanged
- Logind power management behavior unchanged
- Login/logout experience identical
- No functional changes to user experience

### System Impact
- All configurations now use modern NixOS 25.11 syntax
- Future-proofed against upcoming deprecation removals
- Maintains consistency across all managed systems

## Testing Recommendations

Before deploying to production:
1. Test on non-critical systems first (labrizor)
2. Verify all services start correctly after switch
3. Confirm user git configurations work as expected
4. Test lid switch behavior on framework laptop
5. Verify GPG pinentry prompts work correctly

## Related NixOS Documentation

- Home Manager git options: https://nix-community.github.io/home-manager/options.xhtml#opt-programs.git.enable
- Systemd logind settings: https://search.nixos.org/options?query=services.logind
- NixOS 25.11 release notes for deprecation details
2026-02-03 22:18:15 -08:00
appflakes/octofriend getting zoom clipboard working 2026-01-02 09:44:41 -08:00
desktop Fix deprecated NixOS options and migrate to new syntax 2026-02-03 22:18:15 -08:00
docs Clean up user configuration and organize documentation 2025-07-30 23:25:24 -07:00
servers Refactor NixOS configuration: Move GUI apps to desktop modules and create headless config 2025-07-30 23:17:55 -07:00
systems Fix deprecated NixOS options and migrate to new syntax 2026-02-03 22:18:15 -08:00
users Fix deprecated NixOS options and migrate to new syntax 2026-02-03 22:18:15 -08:00
.clinerules agents.md 2025-11-27 12:57:50 -08:00
.gitignore initial commit from framework 2022-12-18 20:40:49 -08:00
flake.lock Update NixOS configurations across multiple modules 2026-02-03 22:13:06 -08:00
flake.nix Fix deprecated NixOS options and migrate to new syntax 2026-02-03 22:18:15 -08:00
README.md Update README.md 2025-11-12 17:26:39 +00:00

sudo parted /dev/nvme0n1 -- mklabel gpt
sudo parted /dev/nvme0n1 -- mkpart primary ext4 512MB 100%
sudo parted /dev/nvme0n1 -- mkpart ESP fat32 1MB 512MB
sudo parted /dev/nvme0n1 -- set 2 esp on
sleep 2
sudo mkfs.ext4 /dev/disk/by-partlabel/primary

sudo mount -o rw /dev/disk/by-partlabel/primary /mnt/
sudo mkdir /mnt/boot
sudo mkfs.vfat /dev/disk/by-partlabel/ESP
sudo mount -o rw /dev/disk/by-partlabel/ESP /mnt/boot/
sudo mkdir /mnt/root
sudo git clone https://jsutter:b9cf9383b20dc6efe4d0a732d659709097879b67@git.symbiotrip.com/jsutter/nixos /mnt/root/nixos

Then:

sudo -i
cd /mnt/root/nixos
nixos-install --flake .#<name> --no-root-password --impure

Finally:

nixos-enter --root '/mnt'
passwd jsutter