init
This commit is contained in:
commit
c610a3e284
4 changed files with 84 additions and 0 deletions
6
.envrc
Normal file
6
.envrc
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
if [[ $(type -t use_flake) != function ]]; then
|
||||||
|
echo "ERROR: direnv's use_flake function missing. update direnv to v2.30.0 or later." && exit 1
|
||||||
|
fi
|
||||||
|
use flake
|
||||||
|
dotenv
|
||||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
.direnv
|
||||||
|
result
|
||||||
25
flake.lock
generated
Normal file
25
flake.lock
generated
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1771848320,
|
||||||
|
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||||
|
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||||
|
"revCount": 953160,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.953160%2Brev-2fc6539b481e1d2569f25f8799236694180c0993/019c8e05-d2f6-7c7e-9ead-612154b18bfb/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
51
flake.nix
Normal file
51
flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
|
||||||
|
outputs =
|
||||||
|
{ self, nixpkgs }:
|
||||||
|
let
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
#packages = forAllSystems (pkgs: {
|
||||||
|
# default = pkgs.callPackage ./package.nix { };
|
||||||
|
#});
|
||||||
|
|
||||||
|
checks = forAllSystems (pkgs: {
|
||||||
|
# todo add tests
|
||||||
|
devShell = self.devShells.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
}
|
||||||
|
# future nixos test
|
||||||
|
# // pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||||
|
# nixos-module = pkgs.testers.runNixOSTest (import ./nixos-test.nix self);
|
||||||
|
# }
|
||||||
|
);
|
||||||
|
|
||||||
|
devShells = forAllSystems (pkgs: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
# TODO populate devshell for the project
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
# TODO export module
|
||||||
|
# nixosModules = {
|
||||||
|
# default =
|
||||||
|
# {
|
||||||
|
# config,
|
||||||
|
# lib,
|
||||||
|
# pkgs,
|
||||||
|
# ...
|
||||||
|
# }:
|
||||||
|
# {
|
||||||
|
# imports = [ ./nixos-module.nix ];
|
||||||
|
# services.TODSERVICENAME.package =
|
||||||
|
# lib.mkDefault
|
||||||
|
# self.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue