feature(modules): split configuration into nix modules and home-manager modules #2
79
flake.nix
79
flake.nix
@@ -1,74 +1,59 @@
|
|||||||
{
|
{
|
||||||
description = "0x29a ecosystem NixOS flake";
|
description = "0x29a ecosystem NixOS flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# the main nix package collection
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs = {
|
|
||||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
# home manager for dotfiles
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# noctalia shell
|
|
||||||
noctalia = {
|
noctalia = {
|
||||||
url = "github:noctalia-dev/noctalia-shell";
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# nixvim
|
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim";
|
url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{self, nixpkgs, home-manager, nixvim, ... }: let
|
outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: {
|
||||||
lib = nixpkgs.lib;
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in {
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# default config
|
|
||||||
default = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
# import host specific configs
|
|
||||||
./hosts/default/configuration.nix
|
|
||||||
# import host specific hardware configs
|
|
||||||
./hosts/default/hardware-configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# laptop neon
|
default = nixpkgs.lib.nixosSystem {
|
||||||
neon = nixpkgs.lib.nixosSystem {
|
system = "x86_64-linux";
|
||||||
inherit system;
|
specialArgs = { inherit inputs; };
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
modules = [
|
modules = [
|
||||||
# import host specific configs
|
./hosts/default/hardware-configuration.nix
|
||||||
./hosts/neon/configuration.nix
|
./hosts/default/configuration.nix
|
||||||
# import host specific hardware configs
|
|
||||||
./hosts/neon/hardware-configuration.nix
|
|
||||||
# import noctalia shell configs
|
|
||||||
./hosts/neon/noctalia.nix
|
|
||||||
# import home-manager as a module
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
# User specific inputs
|
home-manager.users.aaron.imports = [
|
||||||
home-manager.users.aaron = {
|
nixvim.homeModules.nixvim
|
||||||
imports = [
|
./users/aaron/home.nix
|
||||||
nixvim.homeModules.nixvim
|
];
|
||||||
./hosts/neon/home.nix
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
neon = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./hosts/neon/hardware-configuration.nix
|
||||||
|
./hosts/neon/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.aaron.imports = [
|
||||||
|
nixvim.homeModules.nixvim
|
||||||
|
./users/aaron/home.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user