major refactor and reorg
This commit is contained in:
parent
f43b32286c
commit
e91cca9aeb
13 changed files with 614 additions and 591 deletions
86
flake.nix
86
flake.nix
|
@ -3,11 +3,10 @@
|
|||
inputs = {
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.11";
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -32,6 +31,8 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||
|
||||
kmonad = {
|
||||
url = "github:kmonad/kmonad?dir=nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -88,23 +89,70 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, home-manager, self, ... } @ inputs: {
|
||||
nixosConfigurations = {
|
||||
eddie = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit self inputs;
|
||||
outputs = {nixpkgs, home-manager, self, ... } @ inputs:
|
||||
let
|
||||
inherit (nixpkgs.lib) nixosSystem genAttrs replaceStrings;
|
||||
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
|
||||
|
||||
forAllSystems =
|
||||
function:
|
||||
genAttrs [
|
||||
"x86_64-linux"
|
||||
] (system: function nixpkgs.legacyPackages.${system});
|
||||
|
||||
nameOf = path: replaceStrings [ ".nix" ] [ "" ] (baseNameOf (toString path));
|
||||
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
pkgs:
|
||||
packagesFromDirectoryRecursive {
|
||||
inherit (pkgs) callPackage;
|
||||
|
||||
directory = ./packages;
|
||||
}
|
||||
);
|
||||
|
||||
nixosModules = genAttrs (map nameOf (listFilesRecursive ./modules/system)) (
|
||||
name: import ./modules/system/${name}.nix
|
||||
);
|
||||
|
||||
homeModules = genAttrs (map nameOf (listFilesRecursive ./modules/home)) (name: import ./modules/home/${name}.nix);
|
||||
|
||||
overlays = genAttrs (map nameOf (listFilesRecursive ./overlays)) (
|
||||
name: import ./overlays/${name}.nix
|
||||
);
|
||||
|
||||
nixosConfigurations = {
|
||||
eddie = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
nix-config = self;
|
||||
};
|
||||
modules = [
|
||||
inputs.kmonad.nixosModules.default
|
||||
inputs.musnix.nixosModules.musnix
|
||||
./hosts/eddie/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
"emenel" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
nix-config = self;
|
||||
};
|
||||
|
||||
modules = [
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
./homes/emenel/default.nix
|
||||
];
|
||||
};
|
||||
modules = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
inputs.kmonad.nixosModules.default
|
||||
inputs.musnix.nixosModules.musnix
|
||||
home-manager.nixosModules.home-manager
|
||||
./hosts/eddie
|
||||
./homes/emenel/default.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue