update to 24.05

This commit is contained in:
2024-06-29 14:37:35 +00:00
parent 289d35a051
commit c743f49838
12 changed files with 104 additions and 164 deletions

View File

@@ -1,62 +1,33 @@
{
description = "";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ];
perSystem = { config, pkgs, system, ... }:
let
version = "0.0.1";
name = "develnixos";
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
version = "0.0.1";
name = "develnixos";
space = rec {
config = import ./config { nixpkgs = pkgs; };
playground = import ./playground/example { config = space.config; };
};
updateLockScript = pkgs.writeShellScriptBin "update_flake_lock.sh" ''
nix --experimental-features 'nix-command flakes' flake lock --update-input nixpkgs
nix --experimental-features 'nix-command flakes' build
'';
in
{
packages = rec {
playground = space.playground.package;
default = playground;
};
apps = rec {
playground = flake-utils.lib.mkApp { drv = space.playground.package; exePath = ""; };
default = playground;
};
autoTag = pkgs.writeScript "auto_tag.sh" ''
git tag --force v${version}
git push origin v${version}
'';
space = rec {
config = import ./config { nixpkgs = pkgs; };
playground = import ./playground/example { config = space.config; };
};
foo = pkgs.runCommand "linter" ''
echo the_linter
'';
in {
packages.default = space.playground.package;
apps = {
default = space.playground.app;
updateFlakeLock = {
type = "app";
program = "${updateLockScript}/bin/update_flake_lock.sh";
};
autoTag = {
type = "app";
program = "${autoTag}";
};
};
devShells.default = pkgs.mkShell {
name = "dev-shell";
packages = [ pkgs.nixfmt ];
shellHook = ''
. ./alias.sh
'';
};
checks = {
package = space.playground.package;
};
};
};
devShells.default = pkgs.mkShell {
packages = [ pkgs.nixpkgs-fmt pkgs.nixpkgs-lint ];
};
});
}