fix: nix.settings.auto-optimise-store, and add command 'fhs'

This commit is contained in:
Ryan Yin
2023-06-11 16:35:58 +08:00
parent de1d6fbf4c
commit 408d7dfd95
3 changed files with 13 additions and 2 deletions

View File

@@ -87,3 +87,4 @@ Other configurations that inspired me:
- [fufexan/dotfiles](https://github.com/fufexan/dotfiles)
- [davidtwco/veritas](https://github.com/davidtwco/veritas)
- [NixOS-CN/NixOS-CN-telegram](https://github.com/NixOS-CN/NixOS-CN-telegram)
- [Tips&Tricks for NixOS Desktop](https://discourse.nixos.org/t/tips-tricks-for-nixos-desktop/28488/2)

View File

@@ -13,7 +13,7 @@
# Manual optimise storage: nix-store --optimise
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
auto-optimise-store = true;
nix.settings.auto-optimise-store = true;
# enable flakes globally
nix.settings.experimental-features = [ "nix-command" "flakes" ];
@@ -141,6 +141,16 @@
});
version = "latest";
}))
# create a fhs environment by command `fhs`, so we can run non-nixos packages in nixos!
(let base = pkgs.appimageTools.defaultFhsEnvArgs; in
pkgs.buildFHSUserEnv (base // {
name = "fhs";
targetPkgs = pkgs: (base.targetPkgs pkgs) ++ [pkgs.pkg-config];
profile = "export FHS=1";
runScript = "bash";
extraOutputsToInstall = ["dev"];
}))
];
# replace default editor with neovim

View File

@@ -13,7 +13,7 @@
# Manual optimise storage: nix-store --optimise
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
auto-optimise-store = true;
nix.settings.auto-optimise-store = true;
# enable flakes globally
nix.settings.experimental-features = [ "nix-command" "flakes" ];