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