-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
88 lines (83 loc) · 2.47 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
{
description = "john's nix config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
pkgs23.url = "github:NixOs/nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager";
stylix.url = "github:danth/stylix";
sops-nix.url = "github:Mic92/sops-nix";
nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
scls.url = "github:estin/simple-completion-language-server";
# my stuff
my-nixvim.url = "github:jbotwell/nixvim";
my-bash-it = {
url = "github:jbotwell/my_bash_it";
flake = false;
};
};
outputs =
{
nixpkgs,
home-manager,
stylix,
nix-bitcoin,
...
}@inputs:
{
nixosConfigurations =
let
bitcoinConfig = import ./modules/nixos/bitcoin.nix;
specialArgs = {
inherit inputs;
};
xtxHome = ./hosts/xtx/john.nix;
xtxNixos = ./hosts/xtx/configuration.nix;
fwHome = ./hosts/fw/john.nix;
fwNixos = ./hosts/fw/configuration.nix;
miniHome = ./hosts/mini/john.nix;
miniNixos = ./hosts/mini/configuration.nix;
mkSystem =
hm-module: otherModules:
nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.john = import hm-module;
}
] ++ otherModules;
};
in
{
fw = mkSystem fwHome [
fwNixos
stylix.nixosModules.stylix
];
mini = mkSystem miniHome [
miniNixos
nix-bitcoin.nixosModules.default
bitcoinConfig
];
xtx = mkSystem xtxHome [
xtxNixos
stylix.nixosModules.stylix
];
};
homeConfigurations = {
"john@work" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
system = "aarch64-darwin";
config.allowUnfree = true;
};
extraSpecialArgs = {
inherit inputs;
};
modules = [ ./hosts/work/john.nix ];
};
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
};
}