Large change on folder structure AND used of import-tree.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
description = "NixOS files config";
|
||||
|
||||
inputs = {
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
@@ -12,51 +15,34 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
inputs@{
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
import-tree,
|
||||
home-manager,
|
||||
nixpkgs-unstable,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
systems = [ "x86_64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
|
||||
apps = import ./modules/apps;
|
||||
home = import ./modules/home;
|
||||
nixos = import ./modules/nixos;
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
inputs.self.overlays.additions
|
||||
inputs.self.overlays.modifications
|
||||
inputs.self.overlays.unstable-packages
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "nvidia-x11" ];
|
||||
}
|
||||
)
|
||||
./nixos/configuration.nix
|
||||
]
|
||||
++ [
|
||||
{}
|
||||
home-manager.nixosModules.home-manager
|
||||
./home/configuration.nix
|
||||
];
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
||||
{ ... }:
|
||||
{
|
||||
systems = [ "x86_64-linux" ];
|
||||
flake = {
|
||||
nixosConfigurations = {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
(import-tree ./modules/system)
|
||||
./modules/hardware-configuration.nix
|
||||
(import ./modules/overlays.nix { inherit nixpkgs nixpkgs-unstable; })
|
||||
]
|
||||
++ [
|
||||
home-manager.nixosModules.home-manager
|
||||
(import ./modules/overlays.nix { inherit nixpkgs nixpkgs-unstable; })
|
||||
(import ./modules/users/home.nix { inherit import-tree home-manager; })
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user