-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
64 lines (53 loc) · 1.97 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
{
# @see an intro to flakes:
# https://vtimofeenko.com/posts/practical-nix-flake-anatomy-a-guided-tour-of-flake.nix
description = "Shovel's nix config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
# You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
# Manage secrets
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
nix-colors.url = "github:misterio77/nix-colors";
catppuccin-bat.url = "github:catppuccin/bat";
catppuccin-bat.flake = false;
catppuccin-kitty.url = "github:catppuccin/kitty";
catppuccin-kitty.flake = false;
nvim.url = "github:shofel/nvim-flake";
# nvim.url = "path:///home/slava/workspaces-one/25-dotfiles/25.02-nvim-flake";
};
outputs = {
self,
nixpkgs,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" ];
in {
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Export reusable things
overlays = import ./overlays {inherit inputs;};
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
# To apply a nixos configuration: 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
e15 = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./nixos/configuration.nix
inputs.sops-nix.nixosModules.sops
];
};
};
};
}