-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
88 lines (83 loc) · 2.36 KB
/
Copy pathflake.nix
File metadata and controls
88 lines (83 loc) · 2.36 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
{
description = "Shared Configuration for MacOS and NixOS, initially based on https://github.com/dustinlyons/nixos-config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:LnL7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
darwin,
home-manager,
nixpkgs,
fenix,
}@inputs:
let
user = "nohehf";
email = "nohe.hinniger.foray@gmail.com";
in
{
nixpkgs = {
config = {
allowUnfree = true;
allowBroken = true;
allowInsecure = false;
allowUnsupportedSystem = true;
};
};
apps = import ./apps.nix { inherit nixpkgs self; };
# ARM OSX
# TODO: move this out of the flake root
darwinConfigurations =
let
system = "aarch64-darwin";
overlays = (import ./darwin/overlays) ++ [ fenix.overlays.default ];
pkgs = import nixpkgs { inherit system overlays; config = { allowUnfree = true; }; };
in
{
${system} = darwin.lib.darwinSystem {
inherit system pkgs;
specialArgs = {
inherit
user
email
inputs
; # Pass user, email, and inputs to the module
};
modules = [
home-manager.darwinModules.home-manager
./darwin/host.nix
];
};
};
# non nix OS linux home manager
homeConfigurations =
let
system = "x86_64-linux";
overlays = [ fenix.overlays.default ];
pkgs = import nixpkgs { inherit system overlays; config = { allowUnfree = true; }; };
in
{
"${system}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./linux/home.nix ];
extraSpecialArgs = {
inherit inputs user email;
headless = builtins.getEnv "DISPLAY" == "";
};
};
# headfull should be added here when necessary (to enable GUI apps)
};
};
}