1
1
Fork 0

nix: change nixpkgs-local dir

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-09-12 16:58:09 -05:00
parent 3a26b31226
commit d5141091bd
Signed by: myned
GPG key ID: C7224454F7881A34
2 changed files with 139 additions and 141 deletions

View file

@ -6,23 +6,20 @@
#?? nix run .#genflake flake.nix
# TODO: Remove flakegen hook when nix expressions are officially implemented
# https://github.com/NixOS/nix/issues/3966
{
# https://wiki.nixos.org/wiki/Flakes
# https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake.html
inputs =
let
flake = url: { inherit url; };
follows = input: { inputs.${input}.follows = input; };
stable = input: { inputs.${input}.follows = "${input}-stable"; };
unstable = input: { inputs.${input}.follows = "${input}-unstable"; };
inputs = let
flake = url: {inherit url;};
follows = input: {inputs.${input}.follows = input;};
stable = input: {inputs.${input}.follows = "${input}-stable";};
unstable = input: {inputs.${input}.follows = "${input}-unstable";};
source = url: {
inherit url;
flake = false;
};
in
{
in {
#?? branch = "git+https://REPO?ref=BRANCH"
#?? commit = "git+https://REPO?ref=BRANCH&rev=COMMIT"
#?? tag = "git+https://REPO?ref=refs/tags/TAG"
@ -88,8 +85,8 @@
nixpkgs-staging-next = flake "github:NixOS/nixpkgs/staging-next";
### Development
nixpkgs-local = flake "git+file:///home/myned/.dev/nixpkgs?ref=7849cd48822de4dc0515c787b20dc85de30acdca";
#// hyprland = flake "git+file:///home/myned/.dev/Hyprland?submodules=1";
nixpkgs-local = flake "git+file:///home/myned/SYNC/dev/repo/nixpkgs";
#// hyprland = flake "git+file:///home/myned/SYNC/dev/repo/Hyprland?submodules=1";
### Source code
firefox-gnome-theme = source "github:rafaelmardojai/firefox-gnome-theme/v128";
@ -106,15 +103,13 @@
# https://github.com/kamadorueda/alejandra/blob/main/STYLE.md
formatter.x86_64-linux = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.alejandra;
nixosConfigurations =
let
nixosConfigurations = let
# TODO: Use inline modules instead of specialArgs
# https://jade.fyi/blog/flakes-arent-real#nixos-modules
# Boilerplate systems with global imports
#!! There is no default nixpkgs, inputs.<nixpkgs|home-manager>-BRANCH must exist
#?? branch = common "BRANCH" "ARCHITECTURE" [ MODULES ]
common =
branch: arch: modules:
common = branch: arch: modules:
inputs."nixpkgs-${branch}".lib.nixosSystem {
system = arch;
@ -125,16 +120,20 @@
# TODO: Clean up optional attributes with each new release
#!! Options will diverge between branches over time
#?? with lib; optionalAttrs (versionAtLeast version "VERSION") { ... };
modules = modules ++ [
modules =
modules
++ [
./options
./configuration.nix
#!! Avoid globally importing modules that are not guarded by .enable
# https://github.com/NixOS/nixpkgs/issues/137168
(
{ config, inputs, ... }:
{
config,
inputs,
...
}: {
imports = [
inputs."aagl-gtk-on-nix-${branch}".nixosModules.default
inputs."home-manager-${branch}".nixosModules.home-manager
@ -157,8 +156,7 @@
#?? system = branch "ARCHITECTURE" [ MODULES ]
stable = arch: modules: common "stable" "${arch}-linux" modules;
unstable = arch: modules: common "unstable" "${arch}-linux" modules;
in
{
in {
### Stable
myarm = stable "aarch64" [
./profiles/server

View file

@ -113,7 +113,7 @@
url = "github:nix-community/nixd";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs-local.url = "git+file:///home/myned/.dev/nixpkgs?ref=7849cd48822de4dc0515c787b20dc85de30acdca";
nixpkgs-local.url = "git+file:///home/myned/SYNC/dev/repo/nixpkgs";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-staging-next.url = "github:NixOS/nixpkgs/staging-next";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";