feat: out-of-store symlink options, start readme tweaks, bring back pa alias
All checks were successful
/ check (push) Successful in 4m24s

This commit is contained in:
Daniel Flanagan 2025-03-18 14:41:11 -05:00
parent fe1f698391
commit 878129d2c9
5 changed files with 31 additions and 36 deletions

View file

@ -2,10 +2,11 @@
outputs = outputs =
inputs: inputs:
let let
lib = import ./lib inputs; flakeLib = import ./lib inputs;
uGenPkgs = lib.genPkgs inputs.nixpkgs-unstable; uGenPkgs = flakeLib.genPkgs inputs.nixpkgs-unstable;
in in
{ {
inherit flakeLib;
packages = uGenPkgs (import ./packages); packages = uGenPkgs (import ./packages);
nixosConfigurations = import ./packages/hosts inputs; nixosConfigurations = import ./packages/hosts inputs;
@ -33,10 +34,7 @@
TODO: nixos ISO? TODO: nixos ISO?
*/ */
} }
// (import ./lib/constants.nix inputs) // (import ./lib/constants.nix inputs);
// {
flakeLib = lib;
};
inputs = { inputs = {
# stable inputs # stable inputs

View file

@ -18,5 +18,12 @@ rec {
pkgsFor = nixpkgs: system: (import nixpkgs { inherit system; }).extend forSelfOverlay; pkgsFor = nixpkgs: system: (import nixpkgs { inherit system; }).extend forSelfOverlay;
genPkgs = nixpkgs: func: (forSystems nixpkgs (system: func (pkgsFor nixpkgs system))); genPkgs = nixpkgs: func: (forSystems nixpkgs (system: func (pkgsFor nixpkgs system)));
conditionalOutOfStoreSymlink =
config: outOfStoreSymlink: relPath:
if config.lyte.useOutOfStoreSymlinks.enable then
config.lib.file.mkOutOfStoreSymlink outOfStoreSymlink
else
relPath;
inherit (import ./host.nix inputs) host stableHost; inherit (import ./host.nix inputs) host stableHost;
} }

View file

@ -2,6 +2,7 @@
let let
inherit (self) outputs; inherit (self) outputs;
inherit (outputs) homeManagerModules style; inherit (outputs) homeManagerModules style;
inherit (self.flakeLib) conditionalOutOfStoreSymlink;
in in
{ {
default = default =
@ -52,6 +53,9 @@ in
{ {
options = { options = {
lyte = { lyte = {
useOutOfStoreSymlinks = {
enable = lib.mkEnableOption "Enable the use of mkOutOfStoreSymlink for certain configuration files for faster editing, but means /etc/nixos and /etc/nix/flake must point to this flake in order to work";
};
shell = { shell = {
enable = lib.mkEnableOption "Enable home-manager shell configuration for the user"; enable = lib.mkEnableOption "Enable home-manager shell configuration for the user";
learn-jujutsu-not-git = { learn-jujutsu-not-git = {
@ -206,17 +210,6 @@ in
}; };
}; };
eww =
{ config, ... }:
{
# programs.eww = {
# enable = true;
# };
home.file.".config/eww".source =
config.lib.file.mkOutOfStoreSymlink /etc/nixos/modules/home-manager/eww;
};
cargo = cargo =
{ config, ... }: { config, ... }:
{ {
@ -675,7 +668,7 @@ in
disks = "df -h && lsblk"; disks = "df -h && lsblk";
sctl = "sudo systemctl"; sctl = "sudo systemctl";
bt = "bluetoothctl"; bt = "bluetoothctl";
pa = "pulsemixer"; pa = "nix run nixpkgs#pulsemixer";
sctlu = "systemctl --user"; sctlu = "systemctl --user";
}; };
@ -767,7 +760,7 @@ in
]; ];
home.file."${config.xdg.configHome}/ghostty" = { home.file."${config.xdg.configHome}/ghostty" = {
source = config.lib.file.mkOutOfStoreSymlink /etc/nix/flake/lib/modules/home/ghostty; source = conditionalOutOfStoreSymlink config /etc/nix/flake/lib/modules/home/ghostty ./ghostty;
}; };
}; };
}; };

View file

@ -51,9 +51,12 @@
lyte.desktop.enable = true; lyte.desktop.enable = true;
home-manager.users.daniel = { home-manager.users.daniel = {
lyte.shell = { lyte = {
enable = true; useOutOfStoreSymlinks.enable = true;
learn-jujutsu-not-git.enable = true; shell = {
enable = true;
learn-jujutsu-not-git.enable = true;
};
}; };
lyte.desktop.enable = true; lyte.desktop.enable = true;
slippi-launcher = { slippi-launcher = {

View file

@ -10,21 +10,15 @@ Nix for <code>lytedev</code>
</div> </div>
My grand, declarative, and unified application, service, environment, and My Nix monorepo and main Flake.
machine configuration, secret, and package management in a single flake. ❤️ ❄️
**NOTE**: Everything in here is highly specific to my personal preference. I - Desktop configurations
can't recommend you actually use this in any way, but hopefully some stuff in - Laptop configurations
here is useful inspiration. - Home server configurations
- Remote server configurations
**NOTE**: I use some out-of-store symlinks for quicker configuration iteration, - Home router configurations
so you will ultimately want to clone this repo somewhere and create the - Packages
following symlinks: - Fonts
```shell
ln -s $REPO /etc/nix/flake
ln -s $REPO /etc/nixos # only for nixos systems
```
# Quick Start # Quick Start