blob: f692d314eb2c75b22af646d38125090b58df97c2 (
plain)
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
|
{ config, lib, pkgs, symlinkRoot, username, ... }:
let
inherit (config.lib.file) mkOutOfStoreSymlink;
inherit (lib) flatten flip map mergeAttrsList;
pipe = flip lib.pipe;
flatMerge = pipe [flatten mergeAttrsList];
toSrcFile = name: "${symlinkRoot}/${name}";
link = pipe [toSrcFile mkOutOfStoreSymlink];
linkFile = name: {${name}.source = link name;};
linkDir = name: {
${name} = {
source = link name;
recursive = true;
};
};
linkConfFiles = map linkFile;
linkConfDirs = map linkDir;
confFiles = linkConfFiles [
"starship.toml"
];
confDirs = linkConfDirs [
"foot"
"fortune"
"hypr"
"nvim"
"quickshell"
"tmux"
"yazi"
];
links = flatMerge [confFiles confDirs];
in {
xdg.configFile = links;
home.username = username;
home.homeDirectory = "/home/${username}";
home.stateVersion = "25.05";
home.packages = with pkgs; [
devenv
];
home.file = {
".bashrc".text = ''
bash_starship_init_code=$(starship init bash)
STARSHIP_DEV_MODE=1
eval "$bash_starship_init_code"
'';
};
home.sessionVariables = {
EDITOR = "nvim";
};
programs.home-manager.enable = true;
}
|