-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
44 lines (43 loc) · 1.73 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
# how to add an overlay to a flake in here
# https://nixos.wiki/wiki/Overlays#In_a_Nix_flake
{
inputs = {
#nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixstable.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = github:numtide/flake-utils;
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# use hyprland flake input so i can lock it
# dont want to update unless something isn't working
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
#secrets
agenix.url = "github:ryantm/agenix";
};
# and refactor flake for multiple machines
# including nix-darwin
# inspired by https://gitlab.com/rprospero/dotfiles/-/blob/master/flake.nix
#outputs = { self, nixpkgs, flake-utils, home-manager, sops-nix, hyprland }: {
outputs = { nixpkgs, agenix, ... } @inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
# use flake-input here? to add aarch64 support
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
#stolen from https://rycee.gitlab.io/home-manager/index.html#sec-flakes-nixos-module
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.watashi = import ./conf/home.nix;
}
agenix.nixosModules.default
{
# use a version of nixpkgs taking from flake-utils? so i can do it against various systems
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
}
];
};
};
}