171 lines
4.1 KiB
Nix
171 lines
4.1 KiB
Nix
# flake.nix
|
|
{
|
|
inputs = {
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch
|
|
|
|
yazi = {
|
|
url = "github:sxyazi/yazi";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
shikane = {
|
|
url = "git+https://gitlab.com/w0lff/shikane.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
|
|
|
nix-rice = {
|
|
url = "github:bertof/nix-rice";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
kmonad = {
|
|
url = "github:kmonad/kmonad?dir=nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
hyprlock = {
|
|
url = "github:hyprwm/hyprlock";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
hypridle = {
|
|
url = "github:hyprwm/hypridle";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
musnix = {
|
|
url = "github:musnix/musnix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
audio = {
|
|
url = "git+https://gt.emenel.ca/emenel/audio.nix.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
wezterm = {
|
|
url = "github:wez/wezterm?dir=nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
affinity-nix = {
|
|
url = "github:mrshmllow/affinity-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
isd = {
|
|
url = "github:isd-project/isd";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
paperwm = {
|
|
url = "github:paperwm/PaperWM";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
niri = {
|
|
url = "github:sodiboo/niri-flake";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
nixpkgs,
|
|
home-manager,
|
|
self,
|
|
...
|
|
}@inputs:
|
|
let
|
|
inherit (nixpkgs.lib) 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;
|
|
pkgs-stable = inputs.nixpkgs-stable {
|
|
config.allowUnfree = true;
|
|
};
|
|
};
|
|
modules = [
|
|
inputs.kmonad.nixosModules.default
|
|
inputs.musnix.nixosModules.musnix
|
|
inputs.niri.nixosModules.niri
|
|
|
|
./hosts/eddie/configuration.nix
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
backupFileExtension = "bak";
|
|
sharedModules = [
|
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
nix-config = self;
|
|
};
|
|
users.emenel = import ./homes/emenel/default.nix;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|