Upgrade nix channel and formatter
This commit is contained in:
parent
36e60604e6
commit
638c9719a4
@ -1,4 +1,6 @@
|
|||||||
{ system ? builtins.currentSystem }:
|
{
|
||||||
|
system ? builtins.currentSystem,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
flake-compat = builtins.fetchTarball {
|
flake-compat = builtins.fetchTarball {
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/0f9255e01c2351cc7d116c072cb317785dd33b33.tar.gz";
|
url = "https://github.com/edolstra/flake-compat/archive/0f9255e01c2351cc7d116c072cb317785dd33b33.tar.gz";
|
||||||
|
|||||||
@ -22,16 +22,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727348695,
|
"lastModified": 1727872001,
|
||||||
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
|
"narHash": "sha256-nZNSePIWw526864XBqsrWU1dbo4Ei8iJXpNHCubui28=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
|
"rev": "e46dc3b8343f627532ba881965b053d3bbec4235",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
47
flake.nix
47
flake.nix
@ -2,53 +2,66 @@
|
|||||||
description = "Arnie's nix flake";
|
description = "Arnie's nix flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
devshell = {
|
devshell = {
|
||||||
url = "github:numtide/devshell";
|
url = "github:numtide/devshell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, devshell }:
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
devshell,
|
||||||
|
}:
|
||||||
let
|
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
|
in
|
||||||
{
|
{
|
||||||
lib = {
|
lib = {
|
||||||
forAllSystems = function: systems (system:
|
forAllSystems =
|
||||||
function (import nixpkgs {
|
function:
|
||||||
|
systems (
|
||||||
|
system:
|
||||||
|
function (
|
||||||
|
import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [
|
overlays = [ devshell.overlays.default ];
|
||||||
devshell.overlays.default
|
|
||||||
];
|
|
||||||
config.allowUnfreePredicate = (pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ]);
|
config.allowUnfreePredicate = (pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "terraform" ]);
|
||||||
})
|
}
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
golangci-config-file = ./.golangci.yml;
|
golangci-config-file = ./.golangci.yml;
|
||||||
|
|
||||||
cd_root = "cd $PRJ_ROOT;";
|
cd_root = "cd $PRJ_ROOT;";
|
||||||
|
|
||||||
control4_env = self.lib.forAllSystems (pkgs: pkgs.buildEnv {
|
control4_env = self.lib.forAllSystems (
|
||||||
|
pkgs:
|
||||||
|
pkgs.buildEnv {
|
||||||
name = "control4_env";
|
name = "control4_env";
|
||||||
paths = [
|
paths = [
|
||||||
pkgs.lua5_1
|
pkgs.lua5_1
|
||||||
pkgs.lua51Packages.busted
|
pkgs.lua51Packages.busted
|
||||||
pkgs.nodejs_22
|
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: {
|
devShells = self.lib.forAllSystems (pkgs: {
|
||||||
default = pkgs.devshell.mkShell {
|
default = pkgs.devshell.mkShell {
|
||||||
name = "nix";
|
name = "c3c-nix";
|
||||||
|
|
||||||
packages = [
|
packages = [ pkgs.nix-tree ];
|
||||||
pkgs.nix-tree
|
|
||||||
pkgs.golangci-lint
|
|
||||||
];
|
|
||||||
|
|
||||||
commands = [
|
commands = [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user