Use home-manager as flake

This commit is contained in:
Marko Korhonen 2024-09-17 22:51:08 +03:00
parent 122bbc2236
commit 720f6496f8
3 changed files with 20 additions and 28 deletions

View file

@ -1,6 +0,0 @@
.PHONY: update clean
update:
home-manager switch --flake .#functionalhacker
clean:
nix-collect-garbage -d

View file

@ -11,24 +11,21 @@
};
outputs = { nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./common.nix
./hosts/Mirkwood/configuration.nix
];
};
./nixos_common.nix
homeConfigurations = {
functionalhacker = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./users/functionalhacker/home.nix ];
};
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.functionalhacker =
import ./users/functionalhacker/home.nix;
}
];
};
};
}

View file

@ -64,16 +64,17 @@
enable = true;
nativeMessagingHosts.packages = [ pkgs.browserpass ];
};
zsh = { enable = true; };
zsh.enable = true;
};
environment.systemPackages = with pkgs; [
git
gnumake
home-manager
neovim
telegram-desktop
usbutils
wl-clipboard
];
environment = {
shells = [ pkgs.zsh ];
systemPackages = with pkgs;
[
neovim
telegram-desktop
usbutils
wl-clipboard
];
};
}