This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config/flake.nix

139 lines
4.4 KiB
Nix
Raw Normal View History

2023-12-26 14:48:53 -06:00
{
description = "NixOS Homelab";
2023-12-26 14:48:53 -06:00
# This is the standard format for flake.nix.
# `inputs` are the dependencies of the flake,
# and `outputs` function will return all the build results of the flake.
# Each item in `inputs` will be passed as a parameter to
# the `outputs` function after being pulled and built.
inputs = {
# There are many ways to reference flake inputs.
# The most widely used is `github:owner/name/reference`,
# which represents the GitHub repository URL + branch/commit-id/tag.
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2024-02-20 21:58:32 -06:00
# Home Manager
home-manager-stable = {
2024-02-20 21:58:32 -06:00
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
home-manager-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
2023-12-26 14:48:53 -06:00
};
2024-02-23 12:29:48 -06:00
# sops-nix
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs-stable";
2024-02-23 12:29:48 -06:00
};
2024-02-23 14:02:08 -06:00
2024-02-28 22:38:27 -06:00
# atuin
atuin = {
url = "github:atuinsh/atuin";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
# hyprland official
hyprland-git = {
url = "github:hyprwm/hyprland/v0.36.0";
};
# hyprland plugin for an i3 / sway like manual tiling layout
hy3 = {
url = "github:outfoxxed/hy3/hl0.36.0";
};
# hyprland-xdg-portal
hyprland-xdph-git = {
url = "github:hyprwm/xdg-desktop-portal-hyprland";
};
# nixd language server
nixd-git = {
url = "github:nix-community/nixd";
};
# NixVirt for qemu & libvirt
nixvirt-git = {
url = "github:AshleyYakeley/NixVirt/v0.3.0";
2024-03-15 16:27:56 -05:00
inputs.nixpkgs.follows = "nixpkgs-stable";
};
2023-12-26 14:48:53 -06:00
};
2024-02-23 12:29:48 -06:00
2023-12-26 14:48:53 -06:00
# The `@` syntax here is used to alias the attribute set of the
# inputs's parameter, making it convenient to use inside the function.
2024-04-08 20:50:31 -05:00
outputs = { self, nixpkgs-stable, nixpkgs-unstable, home-manager-stable, home-manager-unstable, ... }@inputs:
2024-02-23 15:36:14 -06:00
let
inherit (self) outputs;
2024-02-23 15:36:14 -06:00
in
{
2023-12-26 14:48:53 -06:00
nixosConfigurations = {
"durincore" = nixpkgs-unstable.lib.nixosSystem {
2023-12-26 14:48:53 -06:00
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
2023-12-26 14:48:53 -06:00
modules = [
# Import the configuration.nix here, so that the
# old configuration file can still take effect.
# Note: configuration.nix itself is also a Nixpkgs Module,
./nixos/durincore/configuration.nix
2024-02-21 10:35:38 -06:00
./nixos/common.nix
2024-02-28 22:38:27 -06:00
# { nixpkgs.overlays = [ (self: super: { atuin = atuin.packages.${self.pkgs.system}.atuin; }) ]; }
home-manager-unstable.nixosModules.home-manager
2023-12-26 14:48:53 -06:00
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jahanson = import ./home-manager/durincore.nix;
home-manager.extraSpecialArgs = {inherit inputs outputs;};
}
];
};
"este" = nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
modules = [
./nixos/este/configuration.nix
2024-02-21 10:35:38 -06:00
./nixos/common.nix
home-manager-stable.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jahanson = import ./home-manager/este.nix;
}
];
};
"gandalf" = nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
modules = [
./nixos/gandalf/configuration.nix
2024-02-21 10:35:38 -06:00
./nixos/common.nix
home-manager-stable.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jahanson = import ./home-manager/gandalf.nix;
2023-12-26 14:48:53 -06:00
}
];
};
2024-04-29 10:49:52 -05:00
"telperion" = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {inherit inputs outputs;};
modules = [
./nixos/telperion/configuration.nix
./nixos/common.nix
2024-04-29 10:49:52 -05:00
home-manager-unstable.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jahanson = import ./home-manager/telperion.nix;
}
];
};
2023-12-26 14:48:53 -06:00
};
};
}