Adding options for overlays, pkgs, internal library etc, checkout flake outputs to see interactions
This commit is contained in:
parent
da5147903b
commit
15fb0cfd17
|
@ -0,0 +1,24 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
# use path relative to the root of the project
|
||||
relativeToRoot = lib.path.append ../.;
|
||||
scanPaths = path:
|
||||
builtins.map
|
||||
(f: (path + "/${f}"))
|
||||
(builtins.attrNames
|
||||
(lib.attrsets.filterAttrs
|
||||
(
|
||||
path: _type:
|
||||
(_type == "directory") # include directories
|
||||
|| (
|
||||
# FIXME this barfs when child directories don't contain a default.nix
|
||||
# example:
|
||||
# error: getting status of '/nix/store/mx31x8530b758ap48vbg20qzcakrbc8 (see hosts/common/core/services/default.nix)a-source/hosts/common/core/services/default.nix': No such file or directory
|
||||
# I created a blank default.nix in hosts/common/core/services to work around
|
||||
(path != "default.nix") # ignore default.nix
|
||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||
)
|
||||
)
|
||||
(builtins.readDir path)));
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
||||
# These should be stuff you would like to share with others, not your personal configurations.
|
||||
{
|
||||
# List your module files here
|
||||
# my-module = import ./my-module.nix;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
|
||||
# These should be stuff you would like to share with others, not your personal configurations.
|
||||
{
|
||||
# List your module files here
|
||||
# my-module = import ./my-module.nix;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# This file defines overlays/custom modifications to upstream packages
|
||||
#
|
||||
|
||||
{ inputs, ... }: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
# https://nixos.wiki/wiki/Overlays
|
||||
modifications = final: prev: {
|
||||
# example = prev.example.overrideAttrs (oldAttrs: let ... in {
|
||||
# ...
|
||||
# });
|
||||
};
|
||||
|
||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
# You can build these directly using 'nix build .#example'
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }: rec {
|
||||
|
||||
#################### Packages with external source ####################
|
||||
|
||||
# name = pkgs.callPackage ./name { };
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ inputs, lib }:
|
||||
{
|
||||
username = "laozi";
|
||||
#domain = inputs.nix-secrets.domain;
|
||||
#userFullName = inputs.nix-secrets.full-name;
|
||||
#handle = "madmin";
|
||||
#userEmail = inputs.nix-secrets.user-email;
|
||||
#gitEmail = "madmin@noreply.codeberg.org";
|
||||
#workEmail = inputs.nix-secrets.work-email;
|
||||
#networking = import ./networking.nix { inherit lib; };
|
||||
persistFolder = "/persist";
|
||||
isMinimal = false; # Used to indicate nixos-installer build
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
{ ... }:
|
||||
{}
|
Loading…
Reference in New Issue