-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
89 lines (74 loc) · 2.1 KB
/
flake.nix
File metadata and controls
89 lines (74 loc) · 2.1 KB
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
alejandra = {
url = "github:kamadorueda/alejandra/3.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
};
outputs = inputs @ {self, ...}:
inputs.flake-parts.lib.mkFlake {inherit inputs;} (toplevel @ {withSystem, ...}: let
getPackages = system:
import inputs.nixpkgs {
localSystem = system;
config = {
allowUnfree = true;
allowAliases = true;
};
overlays = [
];
};
in {
systems = ["aarch64-linux" "aarch64-linux" "x86_64-linux"];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}: {
_module.args.pkgs = getPackages system;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [inputs'.home-manager.packages.default];
};
formatter = inputs'.alejandra.packages.default;
};
flake = {
lib = import ./lib;
homeConfigurations.default = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = getPackages "x86_64-linux";
modules = [
self.homeModules.default
self.homeModules.nvim
self.homeModules.graphical
{
home = {
username = "foehammer";
uid = 1000;
homeDirectory = "/home/foehammer";
stateVersion = "24.11";
};
}
];
};
homeModules = {
default = {...}: {
imports = self.lib.utils.findNixFiles ./common;
};
nvim = {...}: {
imports = [./nvim/default.nix];
};
graphical = {...}: {
imports = self.lib.utils.findNixFiles ./graphical;
};
};
};
});
}