-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
101 lines (93 loc) · 3.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
description = "You new nix config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05";
hardware.url = "github:nixos/nixos-hardware";
# Home manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
nix-colors.url = "github:misterio77/nix-colors";
flake-utils.url = "github:numtide/flake-utils";
nur.url = "github:nix-community/NUR";
# yi-pkg.url = github:yilozt/nurpkg;
nix-index-database.url = "github:Mic92/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
nixpkgs,
nixpkgs-stable,
home-manager,
nix-index-database,
nur,
# yi-pkg,
...
} @ inputs: rec {
# This instantiates nixpkgs for each system listed
# Allowing you to configure it (e.g. allowUnfree)
# Our configurations will use these instances
overlays = import ./overlays/default.nix;
legacyPackages = nixpkgs.lib.genAttrs ["x86_64-linux" "x86_64-darwin"] (
system:
import inputs.nixpkgs {
inherit system;
# NOTE: Using `nixpkgs.config` in your NixOS config won't work
# Instead, you should set nixpkgs configs here
# (https://nixos.org/manual/nixpkgs/stable/#idm140737322551056)
config.allowUnfree = true;
}
);
legacyPackagesStable = nixpkgs-stable.lib.genAttrs ["x86_64-linux" "x86_64-darwin"] (
system:
import inputs.nixpkgs-stable {
inherit system;
# NOTE: Using `nixpkgs.config` in your NixOS config won't work
# Instead, you should set nixpkgs configs here
# (https://nixos.org/manual/nixpkgs/stable/#idm140737322551056)
config.allowUnfree = true;
}
);
nixosConfigurations = {
nara = nixpkgs.lib.nixosSystem {
pkgs = legacyPackages.x86_64-linux;
specialArgs = {inherit inputs;}; # Pass flake inputs to our config
modules = [
# ./nixos/configuration.nix
./nixos/nara-configuration.nix
];
};
albert = nixpkgs-stable.lib.nixosSystem {
pkgs = legacyPackagesStable.x86_64-linux;
specialArgs = {inherit inputs;}; # Pass flake inputs to our config
# > Our main nixos configuration file <
modules = [
# ./nixos/albert-configuration.nix
];
};
};
homeConfigurations = {
"anon@nara" = home-manager.lib.homeManagerConfiguration {
pkgs = legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs;}; # Pass flake inputs to our config
modules = [
./home-manager/home.nix
./home-manager/gui-pkgs.nix
./home-manager/gnome.nix
./home-manager/armcord.nix
];
};
"anon@albert" = home-manager.lib.homeManagerConfiguration {
pkgs = legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs;}; # Pass flake inputs to our config
modules = [
./home-manager/home.nix
./home-manager/albert.nix
./home-manager/rclone.nix
];
};
};
};
}