-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
64 lines (56 loc) · 1.35 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
{
description = "slwst NixOS configuration";
# https://dotfiles.slw.st
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
helix.url = "github:helix-editor/helix";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
inherit (self) outputs;
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowBroken = true;
allowUnfree = true;
tarball-ttl = 0;
};
};
in rec
{
inherit lib pkgs;
# modules
nixosModules = import ./modules/nixos;
# nixos configs
nixosConfigurations = import ./hosts {inherit inputs outputs;};
# dev shell for (direnv)
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
alejandra
git
nix-prefetch-github
];
name = "dotfiles";
};
# use alejandra as formatter
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
};
}