mirror of
https://github.com/gytis-ivaskevicius/flake-utils-plus.git
synced 2024-10-05 20:47:49 +03:00
Compare commits
6 Commits
3542fe9126
...
e5f2a9feed
Author | SHA1 | Date | |
---|---|---|---|
|
e5f2a9feed | ||
|
daacb1458b | ||
|
b94830b4c2 | ||
|
462e36f1cd | ||
|
f2a6c2a04a | ||
|
ae0c3ab5b3 |
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: nixbuild/nix-quick-install-action@v26
|
||||
- uses: nixbuild/nix-quick-install-action@v28
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
# Quick eval
|
||||
@ -23,12 +23,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: nixbuild/nix-quick-install-action@v26
|
||||
- uses: nixbuild/nix-quick-install-action@v28
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
# Execute /tests/*
|
||||
- run: nix develop --command check-derivation-outputs
|
||||
- run: nix develop --command check-channel-patching
|
||||
#- run: nix develop --command check-channel-patching
|
||||
- run: nix develop --command check-overlays-flow
|
||||
- run: nix develop --command check-hosts-config
|
||||
|
||||
@ -36,11 +36,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: nixbuild/nix-quick-install-action@v26
|
||||
- uses: nixbuild/nix-quick-install-action@v28
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
# Build /examples/*
|
||||
- run: nix develop --command build-home-manager+nur+neovim-Rick
|
||||
#- run: nix develop --command build-home-manager+nur+neovim-Rick
|
||||
- run: nix develop --command build-minimal-multichannel-Hostname1
|
||||
- run: nix develop --command build-minimal-multichannel-Hostname2
|
||||
- run: nix develop --command build-exporters-Morty
|
||||
|
@ -1,15 +1,12 @@
|
||||
|
||||
[![Discord](https://img.shields.io/discord/568306982717751326.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.com/invite/RbvHtGa)
|
||||
|
||||
Need help? Create an issue or ping @Gytis#0001 in the above Discord Server.
|
||||
Need help? Create an issue or ping @Gytis.iva in the above Discord Server.
|
||||
|
||||
# Changing branching policy #
|
||||
From now on `master` serves as a development branch (previously `staging` was used for such purposes). Please use tags for stable releases of flake-utils-plus.
|
||||
In general, with the improvements in test harness, releases might happen more frequently. Sticking with a tagged release might offer better trade-offs going forward.
|
||||
|
||||
Please note, while 1.2.0 retains backwards compatibility, [1.3.0](https://github.com/gytis-ivaskevicius/flake-utils-plus/releases/tag/v1.3.0) is the same version with all backwards compatibility removed.
|
||||
|
||||
|
||||
# What is this flake? #
|
||||
|
||||
Flake-utils-plus exposes a library abstraction to *painlessly* generate NixOS flake configurations.
|
||||
@ -29,9 +26,7 @@ The biggest design goal is to keep down the fluff. The library is meant to be ea
|
||||
We recommend referring to people's examples below when setting up your system.
|
||||
|
||||
- [Gytis Dotfiles (Author of this project)](https://github.com/gytis-ivaskevicius/nixfiles/blob/master/flake.nix)
|
||||
- [Fufexan Dotfiles](https://github.com/fufexan/dotfiles/blob/main/flake.nix)
|
||||
- [Bobbbay Dotfiles](https://github.com/Bobbbay/dotfiles/blob/master/flake.nix)
|
||||
- [Charlotte Dotfiles](https://github.com/chvp/nixos-config/blob/master/flake.nix)
|
||||
- [Random projects on Github](https://github.com/search?q=path%3A**%2Fflake.nix+flake-utils-plus&type=code)
|
||||
|
||||
# Features of the flake #
|
||||
|
||||
|
16
devShell.nix
16
devShell.nix
@ -1,17 +1,17 @@
|
||||
{ system ? builtins.currentSystem }:
|
||||
let
|
||||
# nixpkgs / devshell is only used for development. Don't add it to the flake.lock.
|
||||
nixpkgsGitRev = "15de3b878a1fab784ddeae4c33cbc56381748505";
|
||||
devshellGitRev = "cd4e2fda3150dd2f689caeac07b7f47df5197c31";
|
||||
nixpkgsGitRev = "4670114d91b4631a673cac508185b47b394f6fd8";
|
||||
devshellGitRev = "1ebbe68d57457c8cae98145410b164b5477761f4";
|
||||
|
||||
nixpkgsSrc = fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsGitRev}.tar.gz";
|
||||
sha256 = "1nb53mycxj3hqcxg1vwbz76rkbmzkp84jgljqv6q2rby5v9k8cwc";
|
||||
sha256 = "1pxm0kr5rlq8565kncsnnghqck9s5xi8zd2va8jkpd66s60ai3z1";
|
||||
};
|
||||
|
||||
devshellSrc = fetchTarball {
|
||||
url = "https://github.com/numtide/devshell/archive/${devshellGitRev}.tar.gz";
|
||||
sha256 = "02h3j2wqxsgf8sfl476q070ss86palxba48i497kh69nrvhqgz84";
|
||||
sha256 = "0mm1kallhn9zvprnb1b1ln204iadwgd4bkqkdmdzdrdplwb88hs3";
|
||||
};
|
||||
|
||||
pkgs = import nixpkgsSrc { inherit system; };
|
||||
@ -75,17 +75,17 @@ devshell.mkShell {
|
||||
command = "nix build ${rootDir}/examples/darwin#darwinConfigurations.Hostname1.system --no-write-lock-file --dry-run";
|
||||
}
|
||||
|
||||
(test "channel-patching")
|
||||
#(test "channel-patching")
|
||||
(test "derivation-outputs")
|
||||
(test "hosts-config")
|
||||
(test "overlays-flow")
|
||||
(test "all" // { command = "check-channel-patching && check-derivation-outputs && check-hosts-config && check-overlays-flow"; })
|
||||
(test "all" // { command = "check-derivation-outputs && check-hosts-config && check-overlays-flow"; })
|
||||
|
||||
(dry-nixos-build "minimal-multichannel" "Hostname1")
|
||||
(dry-nixos-build "minimal-multichannel" "Hostname2")
|
||||
(dry-nixos-build "home-manager+nur+neovim" "Rick")
|
||||
#(dry-nixos-build "home-manager+nur+neovim" "Rick")
|
||||
(dry-nixos-build "exporters" "Morty")
|
||||
(withCategory "dry-build" { name = "build-all"; command = "build-exporters-Morty && build-home-manager+nur+neovim-Rick && build-minimal-multichannel-Hostname1 && build-minimal-multichannel-Hostname2"; })
|
||||
(withCategory "dry-build" { name = "build-all"; command = "build-exporters-Morty && build-minimal-multichannel-Hostname1 && build-minimal-multichannel-Hostname2"; })
|
||||
|
||||
];
|
||||
|
||||
|
@ -11,9 +11,9 @@ writeShellScriptBin "repl" ''
|
||||
;;
|
||||
*)
|
||||
if [ -z "$1" ]; then
|
||||
nix repl ${./repl.nix}
|
||||
nix repl --file ${./repl.nix}
|
||||
else
|
||||
nix repl --arg flakePath $(${coreutils}/bin/readlink -f $1 | ${gnused}/bin/sed 's|/flake.nix||') ${./repl.nix}
|
||||
nix repl --arg flakePath $(${coreutils}/bin/readlink -f $1 | ${gnused}/bin/sed 's|/flake.nix||') --file ${./repl.nix}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@ -5,7 +5,7 @@ let
|
||||
|
||||
selfFlake =
|
||||
if pathExists registryPath
|
||||
then filter (it: it.from.id == "self") (fromJSON (readFile registryPath)).flakes
|
||||
then filter (it: it.from.id == "self") (fromJSON (builtins.unsafeDiscardStringContext (readFile registryPath))).flakes
|
||||
else [ ];
|
||||
|
||||
flakePath' = toString
|
||||
@ -21,7 +21,7 @@ let
|
||||
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
|
||||
nixpkgs = flake.pkgs.${currentSystem}.nixpkgs or (if nixpkgsFromInputsPath != "" then import nixpkgsFromInputsPath { } else { });
|
||||
|
||||
nixpkgsOutput = (removeAttrs (nixpkgs // nixpkgs.lib or { }) [ "options" "config" ]);
|
||||
nixpkgsOutput = removeAttrs (nixpkgs // nixpkgs.lib or { }) [ "options" "config" ];
|
||||
in
|
||||
{ inherit flake; }
|
||||
// flake
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
inputs.utils.url = path:../../;
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/3c4a65f323dd;
|
||||
inputs.nixpkgs.url = github:NixOS/nixpkgs/;
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, utils }:
|
||||
utils.lib.mkFlake {
|
||||
|
Loading…
Reference in New Issue
Block a user