-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
executable file
·127 lines (110 loc) · 3.55 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
description = "NIX SAVE THE WORLD";
outputs =
inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [
./hosts/flake-module.nix
./nixos/flake-module.nix
./overlays/flake-module.nix
./home-manager/hm-standalone.nix
./hosts/deployment.nix
./lib/flake-module.nix
./lib/repl.nix
./templates/flake-module.nix
# inputs.treefmt-nix.flakeModule
];
perSystem =
{
inputs',
lib,
pkgs,
config,
system,
...
}:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
config = {
allowUnfree = true;
# allowBroken = true;
# allowInsecure = true;
# allowUnsupportedSystem = true;
android_sdk.accept_license = true;
};
};
# access pkgs from self & overlays
legacyPackages = pkgs;
packages =
lib.packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./pkgs;
}
// {
# nix run .
default = config.packages.ns-cli;
};
# nix fmt
formatter = pkgs.nixfmt-rfc-style;
# nix develop .#rust
devShells = import ./devshells.nix { inherit pkgs; };
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
# nixpkgs-temp.url = "github:NixOS/nixpkgs/5a8e9243812ba528000995b294292d3b5e120947";
# nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
# nixpkgs.url = "github:NixOS/nixpkgs/pull/213619/merge";
# nixpkgs.url = "git+file:///home/iab/dev/nixpkgs/?ref=pr-279683";
home-manager = {
url = "github:nix-community/home-manager";
# url = "git+file:///home/iab/dev/home-manager/?ref=fix/emacs";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
# lanzaboote = {
# url = "github:nix-community/lanzaboote";
# inputs.nixpkgs.follows = "nixpkgs";
# };
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# nixos-cosmic = {
# url = "github:lilyinstarlight/nixos-cosmic";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# nur.url = "github:nix-community/NUR";
# agenix.url = "github:ryantm/agenix";
sops-nix.url = "github:Mic92/sops-nix";
templates.url = "github:NixOS/templates";
treefmt-nix.url = "github:numtide/treefmt-nix";
flake-parts.url = "github:hercules-ci/flake-parts";
nixos-hardware.url = "github:NixOS/nixos-hardware";
};
# auto-fetch deps when `nix run/shell/develop`
nixConfig = {
# bash-prompt = "[nix]λ ";
# substituters = ["https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"];
# extra-substituters = ["https://nix-gaming.cachix.org"];
# extra-trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
}