nixos-config/flake.nix

159 lines
3.9 KiB
Nix
Raw Normal View History

2024-09-22 01:04:11 -04:00
# flake.nix
{
inputs = {
2024-12-21 15:35:54 -05:00
nixos-hardware.url = "github:NixOS/nixos-hardware";
2024-09-24 16:11:23 -04:00
2025-02-04 13:13:24 -05:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-09-22 01:04:11 -04:00
2024-10-05 12:36:08 -04:00
home-manager = {
2025-02-04 13:13:24 -05:00
url = "github:nix-community/home-manager";
2024-10-05 12:36:08 -04:00
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-23 23:35:58 -04:00
2024-12-31 12:05:58 -05:00
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch
2024-09-25 23:50:11 -04:00
stylix = {
url = "github:donovanglover/stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
yazi = {
url = "github:sxyazi/yazi";
inputs.nixpkgs.follows = "nixpkgs";
};
shikane = {
url = "git+https://gitlab.com/w0lff/shikane";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-02-04 13:13:24 -05:00
emacs-overlay.url = "github:nix-community/emacs-overlay";
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprpicker = {
url = "github:hyprwm/hyprpicker";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprlock = {
url = "github:hyprwm/hyprlock";
inputs.nixpkgs.follows = "nixpkgs";
};
hypridle = {
url = "github:hyprwm/hypridle";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-28 21:03:16 -04:00
musnix = {
url = "github:musnix/musnix";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-10-02 12:11:23 -04:00
2024-12-21 15:35:54 -05:00
wezterm = {
url = "github:wez/wezterm?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-01-01 13:18:25 -05:00
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-01-03 23:23:35 -05:00
affinity-nix = {
url = "github:mrshmllow/affinity-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-01-19 16:00:05 -05:00
isd = {
url = "github:isd-project/isd";
inputs.nixpkgs.follows = "nixpkgs";
};
paperwm = {
url = "github:paperwm/PaperWM";
inputs.nixpkgs.follows = "nixpkgs";
};
2025-01-27 15:34:15 -05:00
niri = {
url = "github:YaLTeR/niri";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-22 01:04:11 -04:00
};
2025-02-04 13:13:24 -05:00
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
];
2024-12-31 12:05:58 -05:00
};
};
2024-09-22 01:15:13 -04:00
};
2024-09-22 01:04:11 -04:00
}