refactor(home-manager): separate configuration.nix and home.nix by adding home-manager as a module
This commit is contained in:
35
flake.nix
35
flake.nix
@@ -1,41 +1,35 @@
|
||||
{
|
||||
description = "0x29a NixOS flake config";
|
||||
description = "0x29a ecosystem NixOS flake";
|
||||
|
||||
inputs = {
|
||||
|
||||
# the main nix package collection
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
# home manager for dotfiles
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# noctalia shell
|
||||
noctalia = {
|
||||
url = "github:noctalia-dev/noctalia-shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
outputs = inputs@{self, nixpkgs, home-manager, ... }: let
|
||||
lib = nixpkgs.lib;
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
|
||||
# default config
|
||||
default = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
# import host specific configs
|
||||
./hosts/default/configuration.nix
|
||||
@@ -47,9 +41,9 @@
|
||||
# laptop neon
|
||||
neon = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
# import host specific configs
|
||||
./hosts/neon/configuration.nix
|
||||
@@ -57,9 +51,16 @@
|
||||
./hosts/neon/hardware-configuration.nix
|
||||
# import noctalia shell configs
|
||||
./hosts/neon/noctalia.nix
|
||||
# Add home-manager form my user as a module
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.aaron = import ./hosts/neon/home.nix;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user