mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:59:23 +08:00
Compare commits
2 Commits
411a276d34
...
debug-nfs
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f596ba8a2 | |||
| 76f326fb3a |
@@ -27,6 +27,8 @@ inputs:
|
|||||||
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
|
plugins = [ "git" "colored-man-pages" "extract" "history-substring-search" "autojump" ];
|
||||||
theme = inputs.lib.mkDefault "clean";
|
theme = inputs.lib.mkDefault "clean";
|
||||||
};
|
};
|
||||||
|
# ensure ~/.zlogin exists
|
||||||
|
loginExtra = " ";
|
||||||
};
|
};
|
||||||
# set bash history file path, avoid overwriting zsh history
|
# set bash history file path, avoid overwriting zsh history
|
||||||
bash = { enable = true; historyFile = "${home-inputs.config.xdg.dataHome}/bash/bash_history"; };
|
bash = { enable = true; historyFile = "${home-inputs.config.xdg.dataHome}/bash/bash_history"; };
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ inputs:
|
|||||||
config = inputs.lib.mkMerge
|
config = inputs.lib.mkMerge
|
||||||
[
|
[
|
||||||
# for cluster master, export NFS
|
# for cluster master, export NFS
|
||||||
(inputs.lib.mkIf (inputs.config.nixos.model.cluster.nodeType or null == "master")
|
(inputs.lib.mkIf true
|
||||||
{ nixos.services.nfs = { root = "/"; exports = [ "/nix/persistent/home" ]; accessLimit = "192.168.178.0/24"; }; })
|
{ nixos.services.nfs = { root = "/"; exports = [ "/nix/persistent/home" ]; accessLimit = "127.0.0.0/8"; }; })
|
||||||
# for cluster worker, mount nfs, disable some home manager files
|
# for cluster worker, mount nfs, disable some home manager files
|
||||||
(inputs.lib.mkIf (inputs.config.nixos.model.cluster.nodeType or null == "worker")
|
(inputs.lib.mkIf (inputs.config.nixos.model.cluster.nodeType or null == "worker")
|
||||||
{
|
{
|
||||||
@@ -23,21 +23,18 @@ inputs:
|
|||||||
[ ".zshrc" ".zshenv" ".profile" ".bashrc" ".bash_profile" ".zlogin" ]);
|
[ ".zshrc" ".zshenv" ".profile" ".bashrc" ".bash_profile" ".zlogin" ]);
|
||||||
})
|
})
|
||||||
inputs.config.nixos.user.users);
|
inputs.config.nixos.user.users);
|
||||||
systemd.mounts = builtins.filter (mount: mount != null) (builtins.concatLists (builtins.map
|
systemd.mounts = builtins.concatLists (builtins.map
|
||||||
(user: builtins.map
|
(user: builtins.map
|
||||||
(file:
|
(file:
|
||||||
let f = inputs.config.home-manager.users.${user}.config.home.file.${file}.source or null;
|
{
|
||||||
in if f == null then null else
|
what = "${inputs.config.home-manager.users.${user}.home.file.${file}.source}";
|
||||||
{
|
where = "/home/${user}/${file}";
|
||||||
what = "${f}";
|
options = "bind";
|
||||||
where = "/home/${user}/${file}";
|
wantedBy = [ "local-fs.target" ];
|
||||||
options = [ "bind" ];
|
})
|
||||||
wantedBy = [ "local-fs.target" ];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
[ ".zshrc" ".zshenv" ".profile" ".bashrc" ".bash_profile" ".zlogin" ]
|
[ ".zshrc" ".zshenv" ".profile" ".bashrc" ".bash_profile" ".zlogin" ]
|
||||||
)
|
)
|
||||||
inputs.config.nixos.user.users));
|
inputs.config.nixos.user.users);
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,12 @@ inputs:
|
|||||||
"/nix/rootfs/current" =
|
"/nix/rootfs/current" =
|
||||||
{
|
{
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [ { directory = "/var/lib/docker"; mode = "0710"; } "/var/lib/flatpak" ]
|
directories =
|
||||||
|
[
|
||||||
|
# dummy option to make /nix/rootfs/current/home with correct permission
|
||||||
|
"/home"
|
||||||
|
{ directory = "/var/lib/docker"; mode = "0710"; } "/var/lib/flatpak"
|
||||||
|
]
|
||||||
++ builtins.map (f: "/var/lib/systemd/${f}") [ "linger" "coredump" "backlight" ];
|
++ builtins.map (f: "/var/lib/systemd/${f}") [ "linger" "coredump" "backlight" ];
|
||||||
};
|
};
|
||||||
"/nix/nodatacow" =
|
"/nix/nodatacow" =
|
||||||
|
|||||||
Reference in New Issue
Block a user