-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
134 lines (119 loc) · 3.72 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{
description = "Home Manager configuration of kirb";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# macOS Stuff
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-zsh-fzf-tab.url = "github:nixos/nixpkgs/8193e46376fdc6a13e8075ad263b4b5ca2592c03";
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
# Share same stuff here
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, spicetify-nix, nix-darwin, nix-doom-emacs, ... } @ inputs:
let
nixpkgsConfig = {
allowUnfree = true;
allowUnsupportedSystem = false;
};
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."kirb" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {inherit spicetify-nix;};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ./linux/home.nix ./linux/spicetify.nix ];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
# Build darwin flake using:
darwinConfigurations."twilightty" =
let
system = "aarch64-darwin";
user = "kirb";
hostname = "emladevops.local";
in
nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
inputs.nix-index-database.darwinModules.nix-index
./macos/darwin
({pkgs, inputs, ...}: {
nixpkgs.config = nixpkgsConfig;
system = {
stateVersion = 4;
};
users.users.kirb = {
home = "/Users/kirb";
shell = pkgs.zsh;
};
services.nix-daemon.enable = true;
programs.zsh.enable = true;
security = {
pam.enableSudoTouchIdAuth = true;
};
system.defaults = {
finder.AppleShowAllExtensions = true;
finder.FXPreferredViewStyle = "clmv";
NSGlobalDomain.AppleInterfaceStyle = "Dark";
};
nix = {
useDaemon = true;
package = pkgs.nixFlakes;
gc = {
automatic = true;
user = user;
};
settings = {
allowed-users = [ user ];
experimental-features = [ "nix-command" "flakes" ];
warn-dirty = false;
auto-optimise-store = true;
};
};
})
home-manager.darwinModule
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
};
users.kirb = { ... }: with inputs; {
imports = [
./macos/shell
./macos/shell/jankyborders.nix
./shared/nvim.nix
./macos/shell/ohmytmux.nix
./macos/shell/alacritty.nix
nix-doom-emacs.hmModule
];
programs.neovim.enable = true;
programs.doom-emacs = {
enable = false;
};
home.stateVersion = "23.05";
};
};
}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."emladevops".pkgs;
};
}