-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
74 lines (64 loc) · 1.87 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
inputs = {
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
nixpkgs.url = "github:NixOS/nixpkgs/22.11";
};
outputs = { self, flake-compat, nixpkgs }: {
legacyPackages.x86_64-linux.mkContainer = { config, date }:
nixpkgs.legacyPackages.x86_64-linux.callPackage ./. {
inherit config date;
};
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
boot.isContainer = true;
environment.systemPackages = [
pkgs.bat
pkgs.crate2nix
pkgs.fd
pkgs.file
pkgs.gdb
pkgs.htop
pkgs.jq
pkgs.llvmPackages_12.clangUseLLVM
pkgs.llvmPackages_12.llvm
pkgs.man-pages
pkgs.nixfmt
(pkgs.python39.withPackages
(pypkgs: [ pypkgs.black pypkgs.ipython pypkgs.mypy ]))
pkgs.ripgrep
pkgs.shellcheck
pkgs.strace
pkgs.watchexec
pkgs.yj
];
nix = {
extraOptions = ''
# Enable Flakes and nix(1)
experimental-features = flakes nix-command
# Prevent direnv/nix-shell/nix develop environments from getting GC'd.
keep-derivations = true
keep-outputs = true
'';
nixPath = [ "nixpkgs=${nixpkgs}" ];
registry.nixpkgs.flake = nixpkgs;
settings = {
auto-optimise-store = true;
# TODO: Currently broken... fix me on Docker *and* Podman!
sandbox = false;
};
};
programs.git = {
enable = true;
package = pkgs.gitFull;
};
system.stateVersion = "22.11";
})
];
};
};
}