-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
80 lines (72 loc) · 2.05 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
#
# This file is auto-generated from "README.org"
#
{
description = "Nix Organized with Emacs";
inputs = {
# Change it to stable, if you want stable channel (23.05)
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# For Adblocking and making internet usable
hosts.url = "github:StevenBlack/hosts";
# nix index to locate package/path
nix-index-db = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home to manage all user configs
# You can you use normal config files,
# just use an org heading and create block and tangle it directly to ~/.config/tool/file path.
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay.url = "github:nix-community/emacs-overlay";
};
outputs =
{ nixpkgs, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.x86_64-linux;
vars = {
username = "idlip";
editor = "emacs";
};
in
{
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [
alejandra
deadnix
git
statix
nixd
];
name = "dots";
DIRENV_LOG_FORMAT = "";
};
nixosConfigurations = {
gdk = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./gdk/core.nix
inputs.hosts.nixosModule
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs vars;
};
users.${vars.username} = import ./gdk/home.nix;
};
}
];
specialArgs = {
inherit inputs;
inherit vars system;
};
};
};
};
}