105 lines
2.8 KiB
Nix
105 lines
2.8 KiB
Nix
# flake.nix
|
|
{
|
|
description = "My Home Manager configuration";
|
|
|
|
inputs = {
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager-unstable.url = "github:nix-community/home-manager";
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch
|
|
|
|
kmonad = {
|
|
url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
musnix = {
|
|
url = "github:musnix/musnix";
|
|
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";
|
|
};
|
|
|
|
ghostty = {
|
|
url = "github:ghostty-org/ghostty";
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
affinity-nix = {
|
|
url = "github:mrshmllow/affinity-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {nixpkgs, home-manager, sops-nix, nix-flatpak, kmonad, musnix, self, ... } @ inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
# Supported systems for your flake packages, shell, etc.
|
|
systems = [
|
|
"aarch64-linux"
|
|
"i686-linux"
|
|
"x86_64-linux"
|
|
"aarch64-darwin"
|
|
"x86_64-darwin"
|
|
];
|
|
# This is a function that generates an attribute by calling a function you
|
|
# pass to it, with each system as an argument
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (system: import ./packages nixpkgs.legacyPackages.${system});
|
|
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
overlays = import ./overlays {inherit inputs;};
|
|
|
|
nixosConfigurations = {
|
|
eddie = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs outputs;
|
|
};
|
|
modules = [
|
|
sops-nix.nixosModules.sops
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
kmonad.nixosModules.default
|
|
musnix.nixosModules.musnix
|
|
./system/eddie/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
|
|
homeConfigurations = {
|
|
"emenel" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
extraSpecialArgs = {
|
|
inherit inputs outputs;
|
|
};
|
|
|
|
modules = [
|
|
nix-flatpak.homeManagerModules.nix-flatpak
|
|
sops-nix.homeManagerModules.sops
|
|
./home/home.nix
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|