2024-02-29 17:06:55 -05:00
|
|
|
{
|
|
|
|
description = "Aly's NixOS configuration.";
|
|
|
|
|
|
|
|
inputs = {
|
2024-03-05 17:54:51 -05:00
|
|
|
# Latest Stable NixOS, tracked by FlakeHub.
|
|
|
|
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
|
2024-03-02 13:09:35 -05:00
|
|
|
|
|
|
|
# Home-manager, used for managing user configuration.
|
2024-03-05 17:54:51 -05:00
|
|
|
# Tracks latest stable version using FlakeHub.
|
2024-02-29 17:06:55 -05:00
|
|
|
home-manager = {
|
2024-03-05 17:54:51 -05:00
|
|
|
url = "https://flakehub.com/f/nix-community/home-manager/0.*.*.tar.gz";
|
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-05 17:54:51 -05:00
|
|
|
|
|
|
|
# Unstable NixOS channel.
|
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
# Home-manager, used for managing user configuration.
|
|
|
|
home-manager-unstable = {
|
|
|
|
url = "github:nix-community/home-manager/master";
|
2024-03-02 13:09:35 -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.
|
2024-03-05 17:54:51 -05:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2024-03-02 13:09:35 -05:00
|
|
|
};
|
2024-03-05 17:54:51 -05:00
|
|
|
|
|
|
|
# Declarative Flatpaks.
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.3.0";
|
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-05 17:54:51 -05:00
|
|
|
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-unstable, home-manager-unstable, nix-flatpak, nixos-hardware, ... }: {
|
2024-03-02 13:09:35 -05:00
|
|
|
|
2024-02-29 17:06:55 -05:00
|
|
|
nixosConfigurations = {
|
2024-02-29 21:27:10 -05:00
|
|
|
|
|
|
|
# T440p with i5-4210M and 16GB RAM.
|
2024-03-05 17:54:51 -05:00
|
|
|
rustboro = nixpkgs-unstable.lib.nixosSystem {
|
2024-02-29 17:06:55 -05:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./hosts/rustboro
|
2024-03-01 21:38:19 -05:00
|
|
|
./system
|
2024-03-03 12:58:27 -05:00
|
|
|
./users/aly
|
2024-03-05 20:17:52 -05:00
|
|
|
./desktop/kde
|
2024-03-06 17:37:00 -05:00
|
|
|
./modules/virtualization
|
2024-03-03 12:58:27 -05:00
|
|
|
./modules/steam
|
|
|
|
./modules/via-qmk
|
2024-03-03 20:48:59 -05:00
|
|
|
./modules/logitech
|
2024-02-29 17:06:55 -05:00
|
|
|
|
2024-03-02 09:31:39 -05:00
|
|
|
# Add managed flatpak module.
|
2024-02-29 18:10:52 -05:00
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
2024-03-02 09:31:39 -05:00
|
|
|
|
|
|
|
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
|
2024-03-05 17:54:51 -05:00
|
|
|
home-manager-unstable.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-03-02 09:31:39 -05:00
|
|
|
|
2024-02-29 17:06:55 -05:00
|
|
|
# nixos-hardware configuration for t440p
|
|
|
|
nixos-hardware.nixosModules.lenovo-thinkpad-t440p
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 21:27:10 -05:00
|
|
|
|
|
|
|
# Lenovo Yoga 9i with i7-1360P and 16GB RAM.
|
2024-03-05 17:54:51 -05:00
|
|
|
petalburg = nixpkgs-unstable.lib.nixosSystem {
|
2024-02-29 17:06:55 -05:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
2024-02-29 21:27:10 -05:00
|
|
|
./hosts/petalburg
|
2024-03-01 21:38:19 -05:00
|
|
|
./system
|
2024-03-03 12:58:27 -05:00
|
|
|
./users/aly
|
2024-02-29 17:06:55 -05:00
|
|
|
./desktop/gnome
|
2024-03-06 17:37:00 -05:00
|
|
|
./modules/virtualization
|
2024-03-03 12:58:27 -05:00
|
|
|
./modules/steam
|
|
|
|
./modules/via-qmk
|
2024-03-03 20:48:59 -05:00
|
|
|
./modules/logitech
|
2024-02-29 17:06:55 -05:00
|
|
|
|
2024-03-02 09:31:39 -05:00
|
|
|
# Add managed flatpak module.
|
2024-02-29 18:10:52 -05:00
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
2024-03-02 09:31:39 -05:00
|
|
|
|
|
|
|
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
|
2024-03-05 17:54:51 -05:00
|
|
|
home-manager-unstable.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-03 21:51:21 -05:00
|
|
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
2024-02-29 17:06:55 -05:00
|
|
|
];
|
|
|
|
};
|
2024-03-03 21:42:59 -05:00
|
|
|
|
|
|
|
# Ryzen 5 2600 with 16GB RAM, RX 6700.
|
2024-03-05 17:54:51 -05:00
|
|
|
mauville = nixpkgs-unstable.lib.nixosSystem {
|
2024-03-03 21:42:59 -05:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./hosts/mauville
|
|
|
|
./system
|
|
|
|
./users/aly
|
|
|
|
./desktop/gnome
|
2024-03-06 17:37:00 -05:00
|
|
|
./modules/virtualization
|
2024-03-03 21:42:59 -05:00
|
|
|
./modules/steam
|
|
|
|
./modules/via-qmk
|
|
|
|
./modules/logitech
|
|
|
|
|
|
|
|
# Add managed flatpak module.
|
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
|
|
|
|
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
|
2024-03-05 17:54:51 -05:00
|
|
|
home-manager-unstable.nixosModules.home-manager {
|
2024-03-03 21:42:59 -05:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.aly = import ./home/aly;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-03-06 17:37:00 -05:00
|
|
|
|
2024-03-06 18:07:55 -05:00
|
|
|
live-gnome-unstable = nixpkgs-unstable.lib.nixosSystem {
|
2024-03-06 17:37:00 -05:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix")
|
|
|
|
./system
|
|
|
|
./desktop/gnome
|
|
|
|
./modules/via-qmk
|
|
|
|
./modules/logitech
|
|
|
|
|
|
|
|
# Add managed flatpak module.
|
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
|
|
|
|
# Add installer.
|
|
|
|
({ pkgs, ... }: {
|
2024-03-06 18:07:55 -05:00
|
|
|
environment.systemPackages = [ pkgs.calamares-nixos pkgs.calamares-nixos-extensions ];
|
2024-03-06 17:37:00 -05:00
|
|
|
})
|
2024-03-06 18:07:55 -05:00
|
|
|
# Add home-manager nixos module so home-manager config deploys on nixos-rebuild.
|
|
|
|
home-manager-unstable.nixosModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.nixos = import ./home/nixos;
|
|
|
|
}
|
2024-03-06 17:37:00 -05:00
|
|
|
];
|
|
|
|
};
|
2024-02-29 17:06:55 -05:00
|
|
|
};
|
2024-03-02 17:57:28 -05:00
|
|
|
|
2024-03-05 01:30:52 -05:00
|
|
|
packages.x86_64-linux.default = home-manager.defaultPackage.x86_64-linux;
|
2024-03-02 16:05:24 -05:00
|
|
|
homeConfigurations.aly = home-manager.lib.homeManagerConfiguration {
|
2024-03-05 17:54:51 -05:00
|
|
|
pkgs = import nixpkgs-unstable {
|
2024-03-02 18:10:15 -05:00
|
|
|
system = "x86_64-linux";
|
2024-03-02 18:12:22 -05:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
allowUnfreePredicate = (_: true);
|
2024-03-02 18:10:15 -05:00
|
|
|
};
|
2024-03-02 18:12:22 -05:00
|
|
|
};
|
2024-03-02 16:05:24 -05:00
|
|
|
modules = [
|
|
|
|
./home/aly
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 17:06:55 -05:00
|
|
|
};
|
|
|
|
}
|