Upgrade nix channel and formatter

This commit is contained in:
Arnie 2024-10-03 08:47:33 +02:00
parent 36e60604e6
commit 638c9719a4
3 changed files with 46 additions and 31 deletions

View File

@ -1,4 +1,6 @@
{ system ? builtins.currentSystem }:
{
system ? builtins.currentSystem,
}:
let
flake-compat = builtins.fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/0f9255e01c2351cc7d116c072cb317785dd33b33.tar.gz";

View File

@ -22,16 +22,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"lastModified": 1727872001,
"narHash": "sha256-nZNSePIWw526864XBqsrWU1dbo4Ei8iJXpNHCubui28=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"rev": "e46dc3b8343f627532ba881965b053d3bbec4235",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,53 +2,66 @@
description = "Arnie's nix flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, devshell }:
outputs =
{
self,
nixpkgs,
devshell,
}:
let
systems = nixpkgs.lib.genAttrs [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
systems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
in
{
lib = {
forAllSystems = function: systems (system:
function (import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
config.allowUnfreePredicate = (pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ]);
})
);
forAllSystems =
function:
systems (
system:
function (
import nixpkgs {
inherit system;
overlays = [ devshell.overlays.default ];
config.allowUnfreePredicate = (pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ]);
}
)
);
golangci-config-file = ./.golangci.yml;
cd_root = "cd $PRJ_ROOT;";
control4_env = self.lib.forAllSystems (pkgs: pkgs.buildEnv {
name = "control4_env";
paths = [
pkgs.lua5_1
pkgs.lua51Packages.busted
pkgs.nodejs_22
];
});
control4_env = self.lib.forAllSystems (
pkgs:
pkgs.buildEnv {
name = "control4_env";
paths = [
pkgs.lua5_1
pkgs.lua51Packages.busted
pkgs.nodejs_22
];
}
);
};
formatter = self.lib.forAllSystems (pkgs: pkgs.nixpkgs-fmt);
formatter = self.lib.forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
devShells = self.lib.forAllSystems (pkgs: {
default = pkgs.devshell.mkShell {
name = "nix";
name = "c3c-nix";
packages = [
pkgs.nix-tree
pkgs.golangci-lint
];
packages = [ pkgs.nix-tree ];
commands = [
{