mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-05 20:56:33 +05:30
97 lines
2.9 KiB
Nix
Executable File
97 lines
2.9 KiB
Nix
Executable File
{
|
|
description = "tux's NixOS Flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixos-wsl = {
|
|
url = "github:nix-community/nixos-wsl";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
astronvim = {
|
|
url = "github:AstroNvim/AstroNvim/v3.36.7";
|
|
flake = false;
|
|
};
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
nixpkgs-f2k.url = "github:moni-dz/nixpkgs-f2k";
|
|
nur.url = "github:nix-community/nur";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, ... } @ inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
|
"x86_64-linux"
|
|
];
|
|
username = "tux";
|
|
in
|
|
{
|
|
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
|
|
|
# Custom packages and modifications, exported as overlays
|
|
overlays = import ./overlays { inherit inputs; };
|
|
|
|
# NixOS configuration entrypoint
|
|
# 'nixos-rebuild switch --flake .#your-hostname'
|
|
nixosConfigurations = {
|
|
canopus = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs outputs username; };
|
|
modules = [
|
|
./hosts/canopus
|
|
|
|
./modules/nixos/desktop/awesome
|
|
./modules/nixos/virtualisation
|
|
./modules/nixos/steam.nix
|
|
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = { inherit inputs outputs username; };
|
|
home-manager.users.${username} = {
|
|
imports = [
|
|
./modules/home-manager
|
|
./home/tux
|
|
];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
wsl = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs outputs username; };
|
|
modules = [
|
|
./hosts/wsl
|
|
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = { inherit inputs outputs username; };
|
|
home-manager.users.${username} = {
|
|
imports = [
|
|
./modules/home-manager
|
|
./home/tux
|
|
];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
# home-manager switch --flake .#your-username@your-hostname'
|
|
homeConfigurations = {
|
|
"${username}@canopus" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs username; };
|
|
modules = [
|
|
./modules/home-manager
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|