-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
128 lines (104 loc) · 3.62 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
{
description = "A highly awesome system configuration.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.5.1";
#neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
rust-overlay.url = "github:oxalica/rust-overlay";
ags.url = "github:/Aylur/ags";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
#spicetify-nix = {
# url = "github:Gerg-L/spicetify-nix";
# inputs.nixpkgs.follows = "nixpkgs";
#};
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
flatpaks.url = "github:GermanBread/declarative-flatpak/stable-v3";
yazi-flavors.url = "github:yazi-rs/flavors";
yazi-flavors.flake = false;
yazi-plugins.url = "github:yazi-rs/plugins";
yazi-plugins.flake = false;
catppuccin.url = "github:catppuccin/nix";
#lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
#lix-module.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs@{
self,
nixpkgs,
utils,
home-manager,
...
}:
let
pkgs = self.pkgs.x86_64-linux.nixpkgs;
eachSystem = utils.lib.eachDefaultSystem;
hmModules = [
inputs.ags.homeManagerModules.default
inputs.catppuccin.homeManagerModules.catppuccin
#hyprlock.homeManagerModules.hyprlock
];
in
utils.lib.mkFlake {
inherit self inputs;
supportedSystems = [ "x86_64-linux" ];
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
location = "/home/wumpus/nixos";
# https://discourse.nixos.org/t/how-to-create-a-timestamp-in-a-nix-expression/30329
# seems to be behind an hour because of timezone fuckery and defaulting to utc but still does its job
my_timestamp = nixpkgs.lib.readFile "${pkgs.runCommandLocal "timestamp" { }
"echo -n `date -d @${toString builtins.currentTime} +%Y-%m-%d_%H-%M-%S` > $out"
}";
# Channel definitions.
channelsConfig.allowUnfree = true;
#sharedOverlays = [ neovim.overlay ];
# Modules shared between all hosts
hostDefaults.modules = [
inputs.flatpaks.nixosModules.default
inputs.catppuccin.nixosModules.catppuccin
./configuration.nix
home-manager.nixosModules.default
{ home-manager.sharedModules = [ { imports = hmModules; } ]; }
inputs.nix-index-database.nixosModules.nix-index
#inputs.spicetify-nix.nixosModules.default
];
### Hosts ###
hosts.laptop = {
modules = [
./hosts/laptop/configuration.nix
./hosts/laptop/hardware-configuration.nix
];
};
hosts.desktop = {
modules = [
./hosts/desktop/configuration.nix
./hosts/desktop/hardware-configuration.nix
];
};
formatter.x86_64-linux = pkgs.nixfmt-rfc-style;
homeConfigurations."wumpus" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ] ++ hmModules;
extraSpecialArgs = {
inherit inputs;
};
};
}
// eachSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
overlays = [ (import inputs.rust-overlay) ];
};
in
{
devShells = import ./devshells { inherit system pkgs; };
}
);
}