forked from holman/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
81 lines (66 loc) · 2.33 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
{
description = "home-manager config";
nixConfig.extra-experimental-features = "nix-command flakes";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
# Utilities for building our flake
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
# Use system packages list where available
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix";
};
outputs = { self, nixpkgs, home-manager, flake-utils, stylix, ... }@inputs:
let
# inherit (builtins) attrValues;
inherit (flake-utils.lib) eachSystemMap defaultSystems;
inherit (nixpkgs.lib) nixosSystem;
inherit (home-manager.lib) homeManagerConfiguration;
eachDefaultSystemMap = eachSystemMap defaultSystems;
in rec {
# Home configurations
# Accessible via 'home-manager'
homeConfigurations = {
drenfer = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
stylix.homeManagerModules.stylix
{ imports = [ ./machines/vavirl-pw0bwnq8/home-for-flake.nix ]; }
];
};
deck = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
stylix.homeManagerModules.stylix
{ imports = [ ./machines/steamdeck/home-for-flake.nix ]; }
];
};
duck = homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
stylix.homeManagerModules.stylix
{ imports = [ ./machines/powerspecnix/home-for-flake.nix ]; }
];
};
};
nixosConfigurations = {
powerspecnix = nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
stylix.nixosModules.stylix
./machines/powerspecnix/configuration.nix
];
# Make our inputs available to the config (for importing modules)
specialArgs = { inherit inputs; };
};
};
packages =
eachDefaultSystemMap (system: import nixpkgs { inherit system; });
devShells = eachDefaultSystemMap (system: {
default = import ./shell.nix { pkgs = packages.${system}; };
});
};
}