-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
85 lines (80 loc) · 3 KB
/
flake.nix
File metadata and controls
85 lines (80 loc) · 3 KB
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
{
description = "My current dotfiles";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nfsm-flake = {
url = "github:gvolpe/nfsm";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia-colorschemes = {
url = "github:noctalia-dev/noctalia-colorschemes";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, nixpkgs-unstable, ...}@inputs:
let
# path to this repository. I use this to symlink config files to the
# existing ones in this folder.
symlinkRoot = "/home/labellson/.dotfiles";
# set of helper functions I pass to other modules
dlsFuncs = {
# make helper functions to link files
toSrcFile = name: "${symlinkRoot}/${name}";
# I have not found a better name to this make* functions
# this functions create attrSets to files outside of the nix store
makeLink = mkOutOfStoreSymlink: (name: mkOutOfStoreSymlink (dlsFuncs.toSrcFile name));
makeLinkFile = mkOutOfStoreSymlink: (name: {
${name}.source = (dlsFuncs.makeLink mkOutOfStoreSymlink) name;
});
makeLinkDir = mkOutOfStoreSymlink: (name: {
${name} = {
source = (dlsFuncs.makeLink mkOutOfStoreSymlink) name;
recursive = true;
};
});
};
pkgs-unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
in
{
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"labellson@nostromo" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [./home-manager/.config/home-manager/nostromo/home.nix];
extraSpecialArgs = {
inherit inputs symlinkRoot pkgs-unstable dlsFuncs;
};
};
# work laptop
"labellson@lelypop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [./home-manager/.config/home-manager/lelypop/home.nix];
extraSpecialArgs = {
inherit inputs symlinkRoot pkgs-unstable dlsFuncs;
};
};
# motherbase pc
"labellson@sulaco" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [./home-manager/.config/home-manager/sulaco/home.nix];
};
};
};
nixConfig = {
extra-substituters = [ "https://noctalia.cachix.org" ];
extra-trusted-public-keys = [ "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" ];
};
}