nixcfg/flake.nix

99 lines
3.2 KiB
Nix
Raw Normal View History

2024-02-29 17:06:55 -05:00
{
description = "Aly's NixOS configuration.";
inputs = {
2024-03-02 13:09:35 -05:00
# Unstable NixOS channel.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-03-02 09:35:58 -05:00
2024-03-02 13:09:35 -05:00
# Release NixOS channel.
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
2024-03-02 09:35:58 -05:00
2024-03-02 13:09:35 -05:00
# Declarative Flatpaks.
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.3.0";
# Home-manager, used for managing user configuration.
2024-02-29 17:06:55 -05:00
home-manager = {
2024-03-02 13:09:35 -05:00
url = "github:nix-community/home-manager/master";
2024-02-29 17:06:55 -05:00
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
# the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs";
};
2024-03-02 13:09:35 -05:00
# Home-manager, used for managing user configuration.
home-manager-stable = {
url = "github:nix-community/home-manager/release-23.11";
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
# the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs-stable";
};
2024-03-02 09:35:58 -05:00
# Pre-baked hardware support for various devices.
2024-02-29 17:06:55 -05:00
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
};
2024-03-02 13:09:35 -05:00
outputs = inputs@{ nixpkgs, nixpkgs-stable, nix-flatpak, home-manager, home-manager-stable, nixos-hardware, ... }: {
2024-02-29 17:06:55 -05:00
nixosConfigurations = {
# T440p with i5-4210M and 16GB RAM.
2024-02-29 17:06:55 -05:00
rustboro = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/rustboro
./system
2024-03-02 00:08:54 -05:00
./users/aly.nix
2024-02-29 17:06:55 -05:00
./desktop/gnome
2024-02-29 18:29:15 -05:00
./programs/podman
./programs/steam
./programs/via-qmk
2024-02-29 17:06:55 -05:00
# Add managed flatpak module.
2024-02-29 18:10:52 -05:00
nix-flatpak.nixosModules.nix-flatpak
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
home-manager.nixosModules.home-manager {
2024-02-29 17:06:55 -05:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aly = import ./home/aly;
}
2024-02-29 17:06:55 -05:00
# nixos-hardware configuration for t440p
nixos-hardware.nixosModules.lenovo-thinkpad-t440p
];
};
# Lenovo Yoga 9i with i7-1360P and 16GB RAM.
petalburg = nixpkgs.lib.nixosSystem {
2024-02-29 17:06:55 -05:00
system = "x86_64-linux";
modules = [
./hosts/petalburg
./system
2024-03-02 00:08:54 -05:00
./users/aly.nix
2024-02-29 17:06:55 -05:00
./desktop/gnome
./programs/podman
./programs/steam
./programs/via-qmk
2024-02-29 17:06:55 -05:00
# Add managed flatpak module.
2024-02-29 18:10:52 -05:00
nix-flatpak.nixosModules.nix-flatpak
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
home-manager.nixosModules.home-manager {
2024-02-29 17:06:55 -05:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2024-03-01 21:48:08 -05:00
home-manager.users.aly = import ./home/aly;
2024-02-29 17:06:55 -05:00
}
];
};
};
2024-03-02 16:05:24 -05:00
homeConfigurations.aly = home-manager.lib.homeManagerConfiguration {
2024-03-02 17:55:34 -05:00
pkgs = import nixpkgs { system = "x86_64-darwin"; };
2024-03-02 16:05:24 -05:00
modules = [
./home/aly
];
};
2024-02-29 17:06:55 -05:00
};
}