flake-ify home-manager config with NUR and overlays

This commit is contained in:
Trolli Schmittlauch 2023-04-14 01:56:52 +02:00
parent 823500e981
commit c568b8dc24
3 changed files with 45 additions and 23 deletions

View file

@ -1,8 +1,7 @@
{
description = "NixOS system flake";
inputs =
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
@ -10,21 +9,48 @@
url = "github:nix-community/home-manager/release-22.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
# TODO: possible make this a flake as well
mysecrets = {
flake = false;
url = "git+ssh://gitea@git.orlives.de:2342/schmittlauch/home-manager_secrets.git";
};
};
outputs =
{ self, nixpkgs, ... }@inputs:
#let
# system = "x86_64-linux";
#in
{ self, nixpkgs, nur, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
nixosConfigurations.thinknix = nixpkgs.lib.nixosSystem {
#inherit system;
system = "x86_64-linux";
inherit system;
modules = [ ./nixos/configuration.nix ];
# necessary to make the top-level inputs available to system configuration
specialArgs = { inherit inputs; };
};
homeConfigurations.spiollinux = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
{
imports = [
nur.hmModules.nur
./home/home.nix
];
# extends the home config
home.username = "spiollinux";
home.homeDirectory = "/home/spiollinux";
}
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs;
};
};
};
}