-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
87 lines (73 loc) · 2.62 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
{
description = "My NixOS Configuration";
inputs = {
#nix.url = "https://flakehub.com/f/DeterminateSystems/nix/2.*";
nix = {
url = "https://flakehub.com/f/DeterminateSystems/nix/2.*";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz";
nixpkgs-stable.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2405.636292.tar.gz";
nix-flatpak.url = "https://flakehub.com/f/gmodena/nix-flatpak/*.tar.gz";
magic-nix-cache.url = "https://flakehub.com/f/DeterminateSystems/magic-nix-cache/*.tar.gz";
fenix = {
url = "https://flakehub.com/f/nix-community/fenix/0.1.2064.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "https://flakehub.com/f/nix-community/home-manager/0.1.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{
fenix,
nix-flatpak,
home-manager,
nix,
nixpkgs,
nixpkgs-stable,
self,
...
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
lib = nixpkgs.lib;
username = "rick";
name = "Rick";
in {
packages.x86_64-linux.default = fenix.packages.x86_64-linux.minimal.toolchain;
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
inherit system;
inherit lib;
modules = [
#==> Nix <==#
./system/configuration.nix
nix.nixosModules.default
#==> Flatpak <==#
nix-flatpak.nixosModules.nix-flatpak
#==> Home-Manager <==#
home-manager.nixosModules.home-manager
{
nixpkgs.config.allowUnfree = true;
_module.args = { inherit inputs; };
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home-manager/home.nix;
home-manager.extraSpecialArgs = {
inherit username;
inherit inputs;
inherit self;
};
}
];
specialArgs = {
inherit inputs;
inherit pkgs-stable;
inherit username;
inherit name;
inherit self;
};
};
};
}