Compare commits

..

3 Commits

Author SHA1 Message Date
Sam W a0b452def4 Allow unfree, fix weird nix error when using home in nixos config 2023-01-07 13:47:13 +00:00
Sam W 1529fda04d flake: update inputs 2023-01-05 01:21:00 +00:00
Sam W 6f688efc96 zsh: add dr alias 2023-01-05 01:19:16 +00:00
3 changed files with 30 additions and 11 deletions

View File

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1667210711,
"narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=",
"lastModified": 1671489820,
"narHash": "sha256-qoei5HDJ8psd1YUPD7DhbHdhLIT9L2nadscp4Qk37uk=",
"owner": "numtide",
"repo": "devshell",
"rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7",
"rev": "5aa3a8039c68b4bf869327446590f4cdf90bb634",
"type": "github"
},
"original": {
@ -46,11 +46,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1670253003,
"narHash": "sha256-/tJIy4+FbsQyslq1ipyicZ2psOEd8dvl4OJ9lfisjd0=",
"lastModified": 1672244468,
"narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0e8125916b420e41bf0d23a0aa33fadd0328beb3",
"rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706",
"type": "github"
},
"original": {
@ -62,11 +62,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1672102598,
"narHash": "sha256-7fzlPrDEpej/8ORSk7V4H4W6koOMD0juQ/M7whewNpk=",
"lastModified": 1672844754,
"narHash": "sha256-o26WabuHABQsaHxxmIrR3AQRqDFUEdLckLXkVCpIjSU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "93c0d5dcf02409fe705500e90af38b33d3a259d3",
"rev": "e9ade2c8240e00a4784fac282a502efff2786bdc",
"type": "github"
},
"original": {

View File

@ -32,7 +32,10 @@
username ? "samw",
}:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${system};
pkgs = (import inputs.nixpkgs {
inherit system;
config.allowUnfree = true; # Yes I know it's bad for me
});
modules = [
{ home = {
inherit username;
@ -41,7 +44,18 @@
then "/Users/${username}"
else "/home/${username}";
stateVersion = "21.11";
};}] ++ profiles ++ [{nixpkgs.overlays = overlays;}];
};}] ++ profiles ++ [
{nixpkgs.overlays = overlays;}
# See comment in home/default.nix.
({ pkgs, ... }: {
nix = {
enable = true;
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
settings.max-jobs = "auto"; # Gotta go fast (build derivations in parallel)
};
})
];
extraSpecialArgs = {inherit system;};
};
};

View File

@ -11,12 +11,16 @@ in {
"EDITOR" = "vim";
"WORDCHARS" = "\${WORDCHARS//[\\/.=]/}"; # ctrl-w on paths without make angery
};
/*
# For some reason this doesn't play nice when using home manager config from inside
# a nixos configuration.
nix = {
enable = true;
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
settings.max-jobs = "auto"; # Gotta go fast (build derivations in parallel)
};
*/
programs = {
home-manager.enable = true;
@ -37,6 +41,7 @@ in {
hmswitch = ''home-manager switch --flake ".#$(hostname -s)"'';
nrswitch = "nixos-rebuild --use-remote-sudo switch --flake '.#'";
da = "direnv allow .";
dr = "direnv reload";
};
# Extra .zshrc stuff
initExtra = ''