.hive/flake.nix

142 lines
4.3 KiB
Nix

{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
};
outputs = {
nixpkgs,
nixpkgs-unstable,
nixos-hardware,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
in {
nixosConfigurations = {
comfy-station = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];})
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
./hosts/comfy-station/configuration.nix
];
};
harbor = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];})
inputs.sops-nix.nixosModules.sops
./hosts/harbor/configuration.nix
];
};
vm = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
./hosts/vm/configuration.nix
];
};
};
homeConfigurations."jonas@comfy-station" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];})
({...}: {nixpkgs.config.allowUnfree = true;})
inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.sops-nix.homeManagerModules.sops
(./home + "/jonas@comfy-station.nix")
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {inherit inputs;};
};
homeConfigurations."jonas@harbor" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];})
({...}: {nixpkgs.config.allowUnfree = true;})
(./home + "/jonas@harbor.nix")
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {inherit inputs;};
};
homeConfigurations."jroeger" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];})
({...}: {nixpkgs.config.allowUnfree = true;})
./home/jroeger.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {inherit inputs;};
};
templates = {
rust = {
path = ./templates/rust;
description = "A simple rust binary template";
welcomeText = ''
# Rust template
This is a simple rust binary template.
To build the project run `cargo build`.
To run the project run `cargo run`.
Before running nix build, make sure to run `cargo generate-lockfile` first.
'';
};
};
};
}