Use unstable home-manager for unstable machines

This commit is contained in:
Simon Bruder 2023-04-16 11:26:09 +02:00
parent 02a77c5cb2
commit 5e9d9181b7
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 40 additions and 6 deletions

View file

@ -100,6 +100,26 @@
"type": "github"
}
},
"home-manager-unstable": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1681586243,
"narHash": "sha256-vdP79IZuDZVNSl4RN1LgEuab1Tkbv4gCxiE8VLdRf7U=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "40ebb62101c83de81e5fd7c3cfe5cea2ed21b1ad",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"infinisilSystem": {
"flake": false,
"locked": {
@ -354,6 +374,7 @@
"bang-evaluator": "bang-evaluator",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"infinisilSystem": "infinisilSystem",
"krops": "krops",
"nix-pre-commit-hooks": "nix-pre-commit-hooks",

View file

@ -10,6 +10,8 @@
home-manager.url = "github:nix-community/home-manager/release-22.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
krops.url = "github:Mic92/krops";
krops.inputs.flake-utils.follows = "flake-utils";
@ -196,7 +198,8 @@
};
})
] ++ (with inputs; [
home-manager.nixosModules.home-manager
# Use newest home-manager for hosts that use unstable, otherwise there are conflicts
(if nixpkgs == inputs.nixpkgs-unstable then home-manager-unstable else home-manager).nixosModules.home-manager
sops-nix.nixosModules.sops
bang-evaluator.nixosModules.bang-evaluator

View file

@ -56,7 +56,15 @@ in
enable = true;
};
};
exa.enable = true;
exa = {
enable = true;
} // lib.optionalAttrs (pkgs.lib.versionAtLeast (pkgs.lib.substring 0 5 pkgs.lib.version) "23.05") {
# FIXME: remove condition with 23.05
git = true;
extraOptions = [
"--binary" # prefer MiB over MB etc.
];
};
nix-index.enable = true;
starship = {
enable = true;
@ -82,16 +90,18 @@ in
dcauto = dcauto;
dcsd = "dynamic-colors switch solarized-dark";
dcsl = "dynamic-colors switch solarized-light";
exa = "exa --git --binary";
ip = "ip --color=auto";
ipy = "ipython3";
userctl = "systemctl --user";
vim = "nvim";
vimdiff = "nvim -d";
} // lib.optionalAttrs (pkgs.lib.versionOlder (pkgs.lib.substring 0 5 pkgs.lib.version) "23.05") {
# FIXME: remove with 23.05
exa = "exa --git --binary";
l = "exa -l";
la = "exa -la";
ll = "exa -l";
ls = "exa";
userctl = "systemctl --user";
vim = "nvim";
vimdiff = "nvim -d";
};
initExtra = lib.mkMerge [
(lib.mkBefore ''