-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
86 lines (77 loc) · 2.28 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
{
description = "Nix configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
# Discord Krisp Patcher
sersorrel-discord = {
url = "github:sersorrel/sys";
flake = false;
};
# Neovim
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
vim-slime-cells = {
url = "github:klafyvel/vim-slime-cells";
flake = false;
};
};
outputs = inputs: let
system = "x86_64-linux";
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
specialArgs = {
inherit inputs;
inherit pkgs-unstable;
};
in {
nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem {
inherit system;
inherit specialArgs;
modules = [
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
{nix.registry.nixpkgs.flake = inputs.nixpkgs;}
./configuration.nix
inputs.agenix.nixosModules.default
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.dan = import ./home;
extraSpecialArgs = specialArgs;
backupFileExtension = ".bak";
};
}
];
};
homeConfigurations."dcolest" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
{nix.registry.nixpkgs.flake = inputs.nixpkgs;}
./home/work.nix
];
extraSpecialArgs = specialArgs;
};
formatter.${system} = pkgs.alejandra;
};
}