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

View file

@ -18,5 +18,12 @@ rec {
pkgsFor = nixpkgs: system: (import nixpkgs { inherit system; }).extend forSelfOverlay;
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;
}

View file

@ -2,6 +2,7 @@
let
inherit (self) outputs;
inherit (outputs) homeManagerModules style;
inherit (self.flakeLib) conditionalOutOfStoreSymlink;
in
{
default =
@ -52,6 +53,9 @@ in
{
options = {
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 = {
enable = lib.mkEnableOption "Enable home-manager shell configuration for the user";
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 =
{ config, ... }:
{
@ -675,7 +668,7 @@ in
disks = "df -h && lsblk";
sctl = "sudo systemctl";
bt = "bluetoothctl";
pa = "pulsemixer";
pa = "nix run nixpkgs#pulsemixer";
sctlu = "systemctl --user";
};
@ -767,7 +760,7 @@ in
];
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;
home-manager.users.daniel = {
lyte.shell = {
enable = true;
learn-jujutsu-not-git.enable = true;
lyte = {
useOutOfStoreSymlinks.enable = true;
shell = {
enable = true;
learn-jujutsu-not-git.enable = true;
};
};
lyte.desktop.enable = true;
slippi-launcher = {

View file

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