Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
let
hmConfig = import ../config { inherit inputs; };
packages = import ./packages { inherit pkgs inputs; };
misc = import ./misc;
modules = import ./modules;
programs = import ./programs {
inherit config lib pkgs;
Expand All @@ -22,7 +21,7 @@ in
{
imports =
hmConfig
++ misc
++ [ ./nix ]
++ modules
++ programs
++ services
Expand Down
3 changes: 0 additions & 3 deletions home-manager/misc/default.nix

This file was deleted.

10 changes: 0 additions & 10 deletions home-manager/misc/nix/default.nix

This file was deleted.

37 changes: 37 additions & 0 deletions home-manager/nix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
pkgs,
inputs,
...
}:
{
nix = {
package = lib.mkDefault pkgs.lixPackageSets.latest.lix;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify lix-related inputs in flake.nix
echo "=== Checking for lix input in flake.nix ==="
rg -n "lix" flake.nix || echo "No lix references found in flake.nix"

echo ""
echo "=== Checking for lixPackageSets usage in codebase ==="
rg -n "lixPackageSets" --type nix

Repository: shunkakinoki/dotfiles

Length of output: 291


🏁 Script executed:

#!/bin/bash
# Examine home-manager/nix/default.nix to understand pkgs instantiation
echo "=== Content of home-manager/nix/default.nix ==="
cat home-manager/nix/default.nix

echo ""
echo "=== Checking flake.nix for any overlays ==="
head -100 flake.nix

echo ""
echo "=== Searching for any overlay or lixPackageSets definition ==="
rg -n "overlay|lixPackageSets" --type nix | head -20

Repository: shunkakinoki/dotfiles

Length of output: 4979


🏁 Script executed:

#!/bin/bash
# Examine overlays/default.nix to see if lixPackageSets is provided
echo "=== Content of overlays/default.nix ==="
cat overlays/default.nix

echo ""
echo "=== Search for lixPackageSets definition or provision anywhere ==="
rg -n "lixPackageSets" . --type nix

Repository: shunkakinoki/dotfiles

Length of output: 2606


Add lix input to flake.nix or use standard pkgs.nix.

Line 9 references pkgs.lixPackageSets.latest.lix, but lixPackageSets is not available. The flake.nix inputs do not include any lix-related input, and the overlays do not provide this package set. This will fail evaluation with an attribute error.

To fix:

  1. Add the lix-module input to flake.nix and apply its overlay, OR
  2. Use pkgs.nix instead:
-    package = lib.mkDefault pkgs.lixPackageSets.latest.lix;
+    package = lib.mkDefault pkgs.nix;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@home-manager/nix/default.nix` at line 9, The nix expression sets package =
lib.mkDefault pkgs.lixPackageSets.latest.lix but lixPackageSets isn't provided;
either add the lix-module input and apply its overlay in flake.nix so
pkgs.lixPackageSets exists, or change the reference to use a standard package
(e.g., replace pkgs.lixPackageSets.latest.lix with pkgs.nix) so package
resolves; update the flake inputs and overlays if choosing the lix-module
approach and ensure the overlay exposes lixPackageSets, or simply point package
at pkgs.nix via lib.mkDefault to fix the attribute error.

enable = true;
registry.nixpkgs.flake = inputs.nixpkgs;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
use-xdg-base-directories = true;
substituters = [
"https://cache.nixos.org"
"https://cache.garnix.io"
"https://cloudtide.cachix.org"
"https://nix-community.cachix.org"
"https://yazi.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"cloudtide.cachix.org-1:9NZ1Mah2+u8cd/CmVffFV23z5uFNpZSrhfgTt5fuN/4="
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
];
};
gc = {
automatic = true;
};
};
}
2 changes: 2 additions & 0 deletions home-manager/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let
sshAgent = import ./ssh-agent {
inherit config lib pkgs;
};
syncthing = import ./syncthing { inherit lib pkgs; };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To allow the syncthing module to be conditionally enabled based on host properties, please pass the config attribute here. This change is related to the suggestion on home-manager/services/syncthing/default.nix.

  syncthing = import ./syncthing { inherit config lib pkgs; };

tmuxSessionLogger = import ./tmux-session-logger { inherit pkgs; };
in
[
Expand All @@ -30,5 +31,6 @@ in
neversslKeepalive
ollama
sshAgent
syncthing
tmuxSessionLogger
]
6 changes: 6 additions & 0 deletions home-manager/services/syncthing/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ pkgs, lib, ... }:
{
services.syncthing = lib.mkIf pkgs.stdenv.isLinux {
enable = true;
};

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module enables Syncthing for every Linux Home Manager config by default. That doesn’t match the PR description/test plan which are scoped to matic, and it can have unintended operational/security impact on other Linux hosts (background service, ports, state/config dirs). Consider gating it behind a host flag (e.g. inputs.host.isDesktop / inputs.host.isMatic) or making it opt-in (leave default services.syncthing.enable = false and enable it in the specific host config).

Copilot uses AI. Check for mistakes.
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Enabling syncthing for all Linux hosts might be too broad, as it could be unintentionally enabled on headless servers. It would be more robust to enable it only on desktop systems by checking config.isDesktop.

To implement this, you'll also need to pass config to this module from home-manager/services/default.nix.

{ pkgs, lib, config, ... }:
{
  services.syncthing = lib.mkIf (pkgs.stdenv.isLinux && config.isDesktop) {
    enable = true;
  };
}

13 changes: 6 additions & 7 deletions named-hosts/matic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,19 @@ inputs.nixpkgs.lib.nixosSystem {
zlib
];

# Nix settings
# NixOS-level nix settings (complements home-manager nix/)

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment still refers to home-manager misc/nix, but this PR flattens that to home-manager/nix. Updating the comment will avoid confusion when tracking where nix.conf settings come from.

Suggested change
# NixOS-level nix settings (complements home-manager nix/)
# NixOS-level nix settings (complements home-manager/nix)

Copilot uses AI. Check for mistakes.
nix = {
channel.enable = false;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

experimental-features (flakes + nix-command) was removed from this host’s NixOS nix.settings. Other NixOS configs in this repo still explicitly set these (e.g. hosts/nixos/default.nix), and without them nixos-rebuild --flake / flake-based nix commands can fail depending on the Nix version. Consider restoring nix.settings.experimental-features = [ "nix-command" "flakes" ]; here (or explicitly switching the system nix.package to one where flakes are enabled by default).

Suggested change
nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
experimental-features = [ "nix-command" "flakes" ];

Copilot uses AI. Check for mistakes.
trusted-users = [
"root"
username
"@wheel"
"root"
];
};
package = pkgs.nixVersions.stable;
};
environment.etc."nix/inputs/nixpkgs".source = "${inputs.nixpkgs}";

system.stateVersion = "24.11";
}
Expand Down
Loading