Skip to content

Commit 7364159

Browse files
chore: update nix flake
- use flake utils - update flake.lock
1 parent 45f2e08 commit 7364159

2 files changed

Lines changed: 55 additions & 33 deletions

File tree

flake.lock

Lines changed: 40 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
{
22
description = "Development environment for cpplings";
33

4-
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
6-
};
4+
inputs.flake-utils.url = "github:numtide/flake-utils";
75

8-
outputs =
9-
{ self, nixpkgs }:
10-
let
11-
supportedSystems = [
12-
"x86_64-linux"
13-
"aarch64-linux"
14-
"x86_64-darwin"
15-
"aarch64-darwin"
16-
];
17-
forEachSupportedSystem =
18-
f: nixpkgs.lib.genAttrs supportedSystems (system: f { pkgs = import nixpkgs { inherit system; }; });
19-
in
20-
{
6+
outputs = { self, nixpkgs, flake-utils }:
7+
flake-utils.lib.eachDefaultSystem (system:
8+
let
9+
pkgs = import nixpkgs {
10+
inherit system;
2111

22-
devShells = forEachSupportedSystem (
23-
{ pkgs }:
24-
{
12+
config = { allowUnfree = true; };
13+
};
14+
in {
15+
devShells = {
2516
default = pkgs.mkShell {
2617
packages = with pkgs; [
2718
# formatters & linters
@@ -30,7 +21,7 @@
3021
beautysh
3122
clang-tools
3223
deadnix
33-
dockerfile-language-server-nodejs
24+
dockerfile-language-server
3425
marksman
3526
nil
3627
nixd
@@ -62,12 +53,11 @@
6253
];
6354

6455
shellHook = ''
65-
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"
66-
cat .ascii-art.txt | fastfetch --raw - --logo-width 15 --logo-height 7 --logo-padding-right 25 --logo-padding-top 10
56+
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"
57+
cat .ascii-art.txt | fastfetch --raw - --logo-width 15 --logo-height 7 --logo-padding-right 25 --logo-padding-top 10
6758
'';
6859

6960
};
70-
}
71-
);
72-
};
61+
};
62+
});
7363
}

0 commit comments

Comments
 (0)