feat(limontozu): update system
Add structured `nix` config (instead of `nix.extraOptions`) Update `home-manager` `stateVersion`: `22.11` -> `23.05` (Try to) add `NIX_PATH`, based on the flake inputs
This commit is contained in:
parent
9305fbc2ff
commit
ebe68e37ee
2 changed files with 133 additions and 18 deletions
|
@ -31,21 +31,97 @@
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
nix.package = pkgs.nixFlakes;
|
environment.variables = {
|
||||||
|
NIX_PATH =
|
||||||
|
lib.mkForce
|
||||||
|
(builtins.concatStringsSep
|
||||||
|
":"
|
||||||
|
(lib.mapAttrsToList
|
||||||
|
(name: input:
|
||||||
|
"${name}=${input.sourceInfo.outPath}")
|
||||||
|
(lib.filterAttrs
|
||||||
|
(name: input:
|
||||||
|
builtins.hasAttr "_type" input &&
|
||||||
|
builtins.getAttr "_type" input == "flake")
|
||||||
|
inputs)));
|
||||||
|
};
|
||||||
|
|
||||||
nix.extraOptions = ''
|
nix = {
|
||||||
experimental-features = nix-command flakes repl-flake
|
# Ensure we can work with flakes
|
||||||
keep-outputs = true
|
package = pkgs.nixUnstable;
|
||||||
keep-derivations = true
|
|
||||||
'';
|
|
||||||
|
|
||||||
# NIX_PATH =
|
# extraOptions = ''
|
||||||
# builtins.concatStringsSep
|
# # Enable flakes and new 'nix' command
|
||||||
# ":"
|
# experimental-features = nix-command flakes repl-flake
|
||||||
# (lib.mapAttrsToList
|
# # Allow building multiple derivations in parallel
|
||||||
# (name: input:
|
# max-jobs = auto
|
||||||
# "${name}=${input.url}?rev=${input.locked.rev}")
|
# # Deduplicate and optimize nix store
|
||||||
# inputs);
|
# auto-optimise-store = true
|
||||||
|
# # Keep outputs and derivations
|
||||||
|
# keep-outputs = true
|
||||||
|
# keep-derivations = true
|
||||||
|
# '';
|
||||||
|
|
||||||
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||||
|
# registry =
|
||||||
|
# lib.mapAttrs'
|
||||||
|
# (name: value:
|
||||||
|
# {
|
||||||
|
# name = name;
|
||||||
|
# value = { flake = value; };
|
||||||
|
# })
|
||||||
|
# inputs;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
# Enable flakes and new 'nix' command
|
||||||
|
experimental-features = [
|
||||||
|
# "nix-command"
|
||||||
|
# "flakes"
|
||||||
|
# "repl-flake"
|
||||||
|
|
||||||
|
# "no-url-literals" # Disabling URL literals
|
||||||
|
"ca-derivations" # Content-Addressable Derivations
|
||||||
|
"recursive-nix" # Recursive Nix
|
||||||
|
"flakes" # Flakes and related commands
|
||||||
|
"nix-command" # Experimental Nix commands
|
||||||
|
"auto-allocate-uids" # Automatic allocation of UIDs
|
||||||
|
"cgroups" # Cgroup support
|
||||||
|
# "daemon-trust-override" # Overriding daemon trust settings
|
||||||
|
# "dynamic-derivations" # Dynamic derivation support
|
||||||
|
# "discard-references" # Discarding build output references
|
||||||
|
"fetch-closure" # builtins.fetchClosure
|
||||||
|
"impure-derivations" # Impure derivations
|
||||||
|
"repl-flake" # Passing installables to nix repl
|
||||||
|
];
|
||||||
|
|
||||||
|
# Allow building multiple derivations in parallel
|
||||||
|
max-jobs = "auto";
|
||||||
|
|
||||||
|
# Deduplicate and optimize nix store
|
||||||
|
auto-optimise-store = false;
|
||||||
|
|
||||||
|
# Keep outputs and derivations
|
||||||
|
keep-outputs = true;
|
||||||
|
keep-derivations = true;
|
||||||
|
|
||||||
|
trusted-users = [
|
||||||
|
"root"
|
||||||
|
"pavelatanasov"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Add nix-community and rix101 cachix caches
|
||||||
|
substituters = [
|
||||||
|
"https://rix101.cachix.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://lean4.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"rix101.cachix.org-1:2u9ZGi93zY3hJXQyoHkNBZpJK+GiXQyYf9J5TLzCpFY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"lean4.cachix.org-1:mawtxSxcaiWE24xCXXgh3qnvlTkyU7evRRnGeAhD4Wk="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
programs.zsh.enable = true; # default shell on catalina
|
programs.zsh.enable = true; # default shell on catalina
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
home = {
|
home = {
|
||||||
username = lib.mkForce "pavelatanasov";
|
username = lib.mkForce "pavelatanasov";
|
||||||
homeDirectory = lib.mkForce "/Users/pavelatanasov";
|
homeDirectory = lib.mkForce "/Users/pavelatanasov";
|
||||||
stateVersion = "22.11";
|
stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
|
@ -12,9 +12,39 @@
|
||||||
|
|
||||||
# Use this flake's version of nixpkgs
|
# Use this flake's version of nixpkgs
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
|
# NIX_PATH = "nixpkgs=${inputs.nixpkgs}";
|
||||||
|
NIX_PATH =
|
||||||
|
builtins.concatStringsSep
|
||||||
|
":"
|
||||||
|
(lib.mapAttrsToList
|
||||||
|
(name: input:
|
||||||
|
"${name}=${input.sourceInfo.outPath}")
|
||||||
|
inputs);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# {
|
||||||
|
# _type = "flake";
|
||||||
|
# inputs = <CODE>;
|
||||||
|
# lastModified = 1686838567;
|
||||||
|
# lastModifiedDate = "20230615141607";
|
||||||
|
# narHash = "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=";
|
||||||
|
# nixosModules = <CODE>;
|
||||||
|
# outPath = "/nix/store/mf3nazm479fkbh9n3v7n73yrcvr8avi6-source";
|
||||||
|
# outputs = {
|
||||||
|
# nixosModules = <CODE>;
|
||||||
|
# };
|
||||||
|
# rev = "429f232fe1dc398c5afea19a51aad6931ee0fb89";
|
||||||
|
# shortRev = "429f232";
|
||||||
|
# sourceInfo = {
|
||||||
|
# lastModified = 1686838567;
|
||||||
|
# lastModifiedDate = "20230615141607";
|
||||||
|
# narHash = "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=";
|
||||||
|
# outPath = "/nix/store/mf3nazm479fkbh9n3v7n73yrcvr8avi6-source";
|
||||||
|
# rev = "429f232fe1dc398c5afea19a51aad6931ee0fb89";
|
||||||
|
# shortRev = "429f232";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# WM
|
# WM
|
||||||
yabai
|
yabai
|
||||||
|
@ -26,12 +56,17 @@
|
||||||
|
|
||||||
# Neovim
|
# Neovim
|
||||||
neovim
|
neovim
|
||||||
|
fennel
|
||||||
fennel-language-server
|
fennel-language-server
|
||||||
|
|
||||||
# Dhall
|
# Dhall
|
||||||
dhall
|
dhall
|
||||||
dhall-lsp-server
|
dhall-lsp-server
|
||||||
|
|
||||||
|
# Circom
|
||||||
|
circom
|
||||||
|
circom-lsp
|
||||||
|
|
||||||
# Nix
|
# Nix
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
nil
|
nil
|
||||||
|
@ -51,9 +86,8 @@
|
||||||
zigpkgs.master
|
zigpkgs.master
|
||||||
inputs.zls-overlay.packages.x86_64-darwin.default
|
inputs.zls-overlay.packages.x86_64-darwin.default
|
||||||
|
|
||||||
# Polkadot
|
# Android
|
||||||
srtool-cli
|
android-tools
|
||||||
pest-ide-tools
|
|
||||||
];
|
];
|
||||||
|
|
||||||
reo101 = {
|
reo101 = {
|
||||||
|
@ -62,6 +96,11 @@
|
||||||
atuin = true;
|
atuin = true;
|
||||||
direnv = true;
|
direnv = true;
|
||||||
zoxide = true;
|
zoxide = true;
|
||||||
|
extraConfig = ''
|
||||||
|
function take() {
|
||||||
|
mkdir -p "''$''\{@''\}" && cd "''$''\{@''\}"
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
wezterm = {
|
wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue