-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
156 lines (132 loc) · 4.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
description = "Your new nix config";
nixConfig = {
substituters = [ "https://cache.nixos.org" "https://devenv.cachix.org" ];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
];
extra-experimental-features = [ "nix-command" "flakes" ];
};
inputs = {
# Nixpkgs
# nixpkgs.url = "nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.11";
# home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hardware.url = "github:nixos/nixos-hardware";
flake-utils.url = "github:numtide/flake-utils";
tmux-conf = {
url = "github:gpakosz/.tmux";
flake = false;
};
# Delta is a syntax-highlighting pager for git, diff, and grep output.
# NOTE: Include just for "themes.gitconfig" file
delta = {
url = "github:dandavison/delta";
flake = false;
};
secrets = {
url =
"git+ssh://git@github.com/alizdavoodi/secrets.git?ref=main&shallow=1";
flake = false;
};
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
};
# Add the aichat flake
aichat.url = "path:flakes/aichat";
aichat.inputs.nixpkgs.follows = "nixpkgs";
aichat.inputs.flake-utils.follows = "flake-utils";
# Ghostty flake
# FIXME: Remove this flake when there is an official package for ghostty
ghostty = {
url = "github:ghostty-org/ghostty";
inputs.nixpkgs-stable.url = "nixpkgs";
};
# neovim-nightly = {
# url = "github:neovim/neovim?dir=contrib";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.flake-utils.follows = "flake-utils";
# };
#alacritty = {
# url = "path:./home-manager/alacritty/alacritty-nightly";
# inputs.nixpkgs.follows = "nixpkgs";
#};
};
outputs = { self, nixpkgs, home-manager, flake-utils, ... }@inputs:
let
inherit (self) outputs;
home-common = { lib, system, pkgs, ... }: {
nixpkgs = { config = { allowUnfree = true; }; };
programs.home-manager.enable = true;
home.stateVersion = "22.05";
nixpkgs.overlays =
[ (import ./home-manager/overlay/aider-overlay.nix) ];
imports = [ ./home-manager ];
};
work-macbook = { pkgs, ... }: {
home.username = "alirezadavoodi";
home.homeDirectory = "/Users/alirezadavoodi";
home.packages = with pkgs; [ fuse macfuse-stubs openssh docker ];
};
home-server = { pkgs, system, ... }: {
home.username = "alizdavoodi";
home.homeDirectory = "/home/alizdavoodi";
# packages specific for my home server
home.packages = with pkgs; [
gcc-arm-embedded
wally-cli
kubo
qmk
gtk3
marksman
stylua
libusb1
webkitgtk
inputs.ghostty.packages.${system}.default
];
};
in {
nixosConfigurations = {
"alizdavoodi@nixos" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
# nix.settings.experimental-features = [ "nix-command" "flakes" ];
# > Our main nixos configuration file <
modules = [ ./nixos/configuration.nix ];
};
"alizdavoodi-pc@nixos" = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
# nix.settings.experimental-features = [ "nix-command" "flakes" ];
modules = [ ./nixos/pc-alizdavoodi/configuration.nix ];
};
};
homeConfigurations = {
"alizdavoodi@nixos" = home-manager.lib.homeManagerConfiguration {
pkgs =
nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs;
system = "x86_64-linux";
};
# > Our main home-manager configuration file <
modules = [ home-common home-server ];
};
"alizdavoodi@work" = home-manager.lib.homeManagerConfiguration {
pkgs =
nixpkgs.legacyPackages.aarch64-darwin; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs;
system = "aarch64-darwin";
}; # Pass flake inputs to our config
# > Our main home-manager configuration file <
modules = [ home-common work-macbook ];
};
};
};
}