-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
127 lines (109 loc) · 3.03 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";
auto-cpufreq = {
url = "github:AdnanHodzic/auto-cpufreq";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-colors.url = "github:misterio77/nix-colors";
};
outputs =
{
self,
nixpkgs,
home-manager,
nixvim,
treefmt-nix,
...
}@inputs:
let
pkgs = nixpkgs.legacyPackages."x86_64-linux";
username = "dennis";
stateVersion = "24.05";
treefmt-config = (
treefmt-nix.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true; # nix
shfmt.enable = true; # shell files
};
}
);
modules = [
./config
# install home manager
(
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.home-manager
];
}
)
###########################
# desktop environment #
###########################
# if you have not yet built cosmic, run nixos-rebuild test with only
# the cache added
# ./desktop-environment/cosmic
# do not forget to enable the hyprland home-manager config
# ./desktop-environment/hyprland
# ./desktop-environment/gnome
./desktop-environment/gnome-cosmic
];
in
{
formatter."x86_64-linux" = treefmt-config.config.build.wrapper;
checks."x86_64-linux".formatting = treefmt-config.config.build.check self;
nixosConfigurations = {
kraken = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit username stateVersion inputs;
};
modules = [
./host/kraken
] ++ modules;
};
squid = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit username stateVersion inputs;
};
modules = [
./host/squid
] ++ modules;
};
};
homeConfigurations.default = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit username stateVersion inputs;
};
modules = [
nixvim.homeManagerModules.default
./home-manager
##########################
# change files if needed #
##########################
# hyprland rice
# ./desktop-environment/hyprland/home-manager
# gnome rice
./desktop-environment/gnome/home-manager
];
};
};
}