nixos-config/flake.nix

89 lines
2.5 KiB
Nix

{
description = "Nix config entry point";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Managing flatpak apps
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
# hyprland, plugins and related utils
hyprland.url = "github:hyprwm/Hyprland";
hyprgrass = {
url = "github:horriblename/hyprgrass";
inputs.hyprland.follows = "hyprland"; # IMPORTANT
};
hyprland-virtual-desktops.url = "github:levnikmyskin/hyprland-virtual-desktops";
walker.url = "github:abenz1267/walker";
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
};
outputs = {
self,
nixpkgs,
home-manager,
hyprgrass,
hyprland-virtual-desktops,
hyprpanel,
...
} @ inputs:
let
overlays = [
inputs.hyprpanel.overlay
];
in
{
## NixOS configurations are the main output of this flake
# HP Spectre x360 2018
nixosConfigurations.spectre = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/spectre-x360-2018
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.remy.imports = [
./users/remy.nix
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.walker.homeManagerModules.default
];
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
# _module.args = { inherit inputs; };
}
];
};
# nixosConfigurations.raspberry-pi = nixpkgs.lib.nixosSystem {
# system = "aarch64-linux";
# modules = [
# ./hosts/raspberry-pi/configuration.nix
# ];
# };
## Home Manager configurations here?
## Useful nix build tools
# iso builder TODO
nixosConfigurations.bcachefs-iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
({ lib, pkgs, ... }: {
boot.supportedFilesystems = [ "bcachefs" ];
boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
})
];
};
};
}