Initial commit
This commit is contained in:
commit
cfcc57a8bd
353 changed files with 18756 additions and 0 deletions
21
flake/den/templates/bogus/.github/workflows/test.yml
vendored
Normal file
21
flake/den/templates/bogus/.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
flake-check:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
name: Nix flake check
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: wimpysworld/nothing-but-nix@main
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- uses: actions/checkout@v5
|
||||
- run: nix flake metadata
|
||||
- run: nix flake check
|
||||
17
flake/den/templates/bogus/README.md
Normal file
17
flake/den/templates/bogus/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Bug Reproduction den
|
||||
|
||||
Use this small template to reproduce bugs in den.
|
||||
|
||||
Create a **minimal** bug reproduction at [`modules/bug.nix`](modules/bug.nix)
|
||||
|
||||
Then run tests:
|
||||
|
||||
```console
|
||||
nix flake check
|
||||
```
|
||||
|
||||
Format code with:
|
||||
|
||||
```console
|
||||
nix fmt
|
||||
```
|
||||
222
flake/den/templates/bogus/flake.lock
generated
Normal file
222
flake/den/templates/bogus/flake.lock
generated
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
{
|
||||
"nodes": {
|
||||
"den": {
|
||||
"locked": {
|
||||
"lastModified": 1763285091,
|
||||
"narHash": "sha256-F2OsALSm86dfNA2grd5MVRPpAWZf4ZuuCzpYG7H0P9g=",
|
||||
"owner": "vic",
|
||||
"repo": "den",
|
||||
"rev": "227451c9a99fb084bc6b66878c7f6f3e75f625d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"ref": "main",
|
||||
"repo": "den",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-aspects": {
|
||||
"locked": {
|
||||
"lastModified": 1763284357,
|
||||
"narHash": "sha256-mPMHkhpOIsj2lg+KIcapFd4uj2N/9mZZ6RZBo/p5O1c=",
|
||||
"owner": "vic",
|
||||
"repo": "flake-aspects",
|
||||
"rev": "6a6d47f531ad57ac854cee689e84f2e28861ec49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "flake-aspects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-file": {
|
||||
"locked": {
|
||||
"lastModified": 1762466468,
|
||||
"narHash": "sha256-OTAbN2Vmdn6Km2AYN+G6QrCdQUtbqaJKAJATP0tGkB8=",
|
||||
"owner": "vic",
|
||||
"repo": "flake-file",
|
||||
"rev": "6a7da81583a42ba339a06aed2d0f3ee4a164f265",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "flake-file",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs-lib"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762440070,
|
||||
"narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762463325,
|
||||
"narHash": "sha256-33YUsWpPyeBZEWrKQ2a1gkRZ7i0XCC/2MYpU6BVeQSU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0562fef070a1027325dd4ea10813d64d2c967b39",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"import-tree": {
|
||||
"locked": {
|
||||
"lastModified": 1762327901,
|
||||
"narHash": "sha256-AJ96FNj50DU0bTyIzAPkPOjCZTHqjURVjok8qoXvmqM=",
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"rev": "90fa129798be99cde036b78658e89475710966a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-auto-follow": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754073254,
|
||||
"narHash": "sha256-CQp/v2HQ7AtGJQqFGRZLHt4MZAK3NF94I6GDaRyhbsc=",
|
||||
"owner": "fzakaria",
|
||||
"repo": "nix-auto-follow",
|
||||
"rev": "5baa00b79d4cc46523da0b8b3532c5163d151be4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "fzakaria",
|
||||
"repo": "nix-auto-follow",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-unit": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"treefmt-nix": [
|
||||
"treefmt-nix"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762507096,
|
||||
"narHash": "sha256-dE3CbZR8KRDdb3b4fhMnpvhEl6XB+UnrLezuFekQ2ME=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-unit",
|
||||
"rev": "0d7230bc54783b812a5817398885aec660a93051",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-unit",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1762361079,
|
||||
"narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"den": "den",
|
||||
"flake-aspects": "flake-aspects",
|
||||
"flake-file": "flake-file",
|
||||
"flake-parts": "flake-parts",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"nix-auto-follow": "nix-auto-follow",
|
||||
"nix-unit": "nix-unit",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-lib": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762410071,
|
||||
"narHash": "sha256-aF5fvoZeoXNPxT0bejFUBXeUjXfHLSL7g+mjR/p5TEg=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "97a30861b13c3731a84e09405414398fbf3e109f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
77
flake/den/templates/bogus/flake.nix
Normal file
77
flake/den/templates/bogus/flake.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
# DO-NOT-EDIT. This file was auto-generated using github:vic/flake-file.
|
||||
# Use `nix run .#write-flake` to regenerate it.
|
||||
{
|
||||
|
||||
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
|
||||
|
||||
inputs = {
|
||||
den = {
|
||||
url = "github:vic/den/main";
|
||||
};
|
||||
flake-aspects = {
|
||||
url = "github:vic/flake-aspects";
|
||||
};
|
||||
flake-file = {
|
||||
url = "github:vic/flake-file";
|
||||
};
|
||||
flake-parts = {
|
||||
inputs = {
|
||||
nixpkgs-lib = {
|
||||
follows = "nixpkgs-lib";
|
||||
};
|
||||
};
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
home-manager = {
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
url = "github:nix-community/home-manager";
|
||||
};
|
||||
import-tree = {
|
||||
url = "github:vic/import-tree";
|
||||
};
|
||||
nix-auto-follow = {
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
url = "github:fzakaria/nix-auto-follow";
|
||||
};
|
||||
nix-unit = {
|
||||
inputs = {
|
||||
flake-parts = {
|
||||
follows = "flake-parts";
|
||||
};
|
||||
nixpkgs = {
|
||||
follows = "nixpkgs";
|
||||
};
|
||||
treefmt-nix = {
|
||||
follows = "treefmt-nix";
|
||||
};
|
||||
};
|
||||
url = "github:nix-community/nix-unit";
|
||||
};
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
nixpkgs-lib = {
|
||||
follows = "nixpkgs";
|
||||
};
|
||||
systems = {
|
||||
url = "github:nix-systems/default";
|
||||
};
|
||||
treefmt-nix = {
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
27
flake/den/templates/bogus/modules/bug.nix
Normal file
27
flake/den/templates/bogus/modules/bug.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
den.hosts.x86_64-linux.igloo.users.tux = { };
|
||||
den.hosts.aarch64-darwin.apple.users.tim = { };
|
||||
|
||||
# Use aspects to create a **minimal** bug reproduction
|
||||
den.aspects.igloo.nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.tux.packages = [ pkgs.hello ];
|
||||
};
|
||||
|
||||
# rename "it works", evidently it has bugs
|
||||
flake.tests."test it works" =
|
||||
let
|
||||
tux = inputs.self.nixosConfigurations.igloo.config.users.users.tux;
|
||||
|
||||
expr.len = lib.length tux.packages;
|
||||
expr.names = map lib.getName tux.packages;
|
||||
|
||||
expected.len = 1;
|
||||
expected.names = [ "hello" ];
|
||||
in
|
||||
{
|
||||
inherit expr expected;
|
||||
};
|
||||
}
|
||||
7
flake/den/templates/bogus/modules/dendritic.nix
Normal file
7
flake/den/templates/bogus/modules/dendritic.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
flake-file.inputs.flake-file.url = lib.mkDefault "github:vic/flake-file";
|
||||
imports = [
|
||||
inputs.flake-file.flakeModules.dendritic
|
||||
];
|
||||
}
|
||||
33
flake/den/templates/bogus/modules/flakes.nix
Normal file
33
flake/den/templates/bogus/modules/flakes.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# DO-NOT-CHANGE. Keep your reproduction minimalistic!
|
||||
#
|
||||
# try not adding new inputs
|
||||
# but if you have no options (pun intended)
|
||||
# here's the place.
|
||||
#
|
||||
# IF you make any change to this file, use:
|
||||
# `nix run .#write-flake`
|
||||
#
|
||||
# We provide nix-unit and home-manager for common
|
||||
# usage.
|
||||
{ inputs, ... }:
|
||||
{
|
||||
# change "main" with a commit where bug is present
|
||||
flake-file.inputs.den.url = "github:vic/den/main";
|
||||
|
||||
flake-file.inputs.nix-unit = {
|
||||
url = "github:nix-community/nix-unit";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-parts.follows = "flake-parts";
|
||||
inputs.treefmt-nix.follows = "treefmt-nix";
|
||||
};
|
||||
|
||||
flake-file.inputs.home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.nix-unit.modules.flake.default
|
||||
];
|
||||
|
||||
}
|
||||
12
flake/den/templates/bogus/modules/formatter.nix
Normal file
12
flake/den/templates/bogus/modules/formatter.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
perSystem = {
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
programs.nixfmt.excludes = [ ".direnv" ];
|
||||
programs.deadnix.enable = true;
|
||||
programs.mdformat.enable = true;
|
||||
programs.yamlfmt.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
flake/den/templates/bogus/modules/nix-unit.nix
Normal file
8
flake/den/templates/bogus/modules/nix-unit.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# DO-NOT-EDIT: nix-unit configuration.
|
||||
{ lib, inputs, ... }:
|
||||
{
|
||||
perSystem.nix-unit = {
|
||||
allowNetwork = lib.mkDefault true;
|
||||
inputs = lib.mkDefault inputs;
|
||||
};
|
||||
}
|
||||
17
flake/den/templates/bogus/modules/test-base.nix
Normal file
17
flake/den/templates/bogus/modules/test-base.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ den, ... }:
|
||||
{
|
||||
den.default.nixos.system.stateVersion = "25.11";
|
||||
den.default.homeManager.home.stateVersion = "25.11";
|
||||
den.default.darwin.system.stateVersion = 6;
|
||||
|
||||
den.default.includes = [
|
||||
den._.home-manager
|
||||
den._.define-user
|
||||
den.aspects.no-boot
|
||||
];
|
||||
|
||||
den.aspects.no-boot.nixos = {
|
||||
boot.loader.grub.enable = false;
|
||||
fileSystems."/".device = "/dev/fake";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue