Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
14 changes: 14 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ The Nix config in `nix/` is organized as hosts, profiles, and atomic modules. Ho

Nix flake inputs and source files must be tracked by git to be evaluated; remember to `git add` new files before evaluation/checks.

### Environment variables

- Every user on one machine:
- NixOS: use `environment.sessionVariables`.
- nix-darwin: use `environment.variables`.
- One user's login environment: use `home.sessionVariables`.
- One service:
- systemd:
- System service: use `systemd.services.<name>.environment`. System services are not available in Home Manager.
- User service: use `systemd.user.services.<name>.Service.Environment`.
- launchd:
- System daemon: use `launchd.daemons.<name>.serviceConfig.EnvironmentVariables`. System daemons are not available in Home Manager.
- User agent: use `launchd.agents.<name>.config.EnvironmentVariables`.

Style constraints:

- If a Nix module needs no arguments, use a plain attribute set. Omit `{ ... }:` and `_:`.
Expand Down
35 changes: 1 addition & 34 deletions nix/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ in
cfg.modules.nixos.user-primary
cfg.modules.nixos.agent-browser-shared
cfg.modules.nixos.nvidia-graphics
cfg.modules.nixos.windows-vm
cfg.modules.nixos.xremap
cfg.modules.nixos.steam
cfg.modules.nixos.prismlauncher
Expand Down Expand Up @@ -163,10 +164,6 @@ in
loader.systemd-boot = {
enable = true;
edk2-uefi-shell.enable = true;
windows."11-pro" = {
title = "Windows 11 Pro";
efiDeviceHandle = "HD0d";
};
};
loader.efi.canTouchEfiVariables = true;
kernelPackages = pkgs.linuxPackages_latest;
Expand All @@ -184,36 +181,6 @@ in
"dmask=0077"
];
};
"/mnt/windows" = {
device = "/dev/disk/by-uuid/0EA45F71A45F59F3";
fsType = "ntfs3";
options = [
"rw"
"uid=1000"
"umask=022"
"iocharset=utf8"
"windows_names"
"nofail"
"x-systemd.automount"
"x-systemd.idle-timeout=10min"
];
};
};
# Samba keeps its own password database. After rebuilding, check for an
# existing login with `sudo pdbedit -L -u rafiq`; if absent, set one
# with `sudo smbpasswd -a rafiq` (the same login password can be used).
services.samba = {
enable = true;
openFirewall = true;
settings = {
global."security" = "user";
windows-profile = {
path = "/mnt/windows/Users/rafiq";
"valid users" = "rafiq";
"guest ok" = "no";
"read only" = "no";
};
};
};
}
)
Expand Down
2 changes: 1 addition & 1 deletion nix/modules/quickshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in
cp -r ${../../quickshell/nemesis-shell} "$out"
chmod -R u+w "$out"
substituteInPlace "$out/BarHost.qml" \
--replace-fail "@systemctl@" "${lib.getExe' pkgs.systemd "systemctl"}"
--replace-fail "@rebootToWindows@" "/run/current-system/sw/bin/reboot-to-windows"
'';
in
{
Expand Down
Loading
Loading