mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-10-05 01:16:02 +00:00
96 lines
3.2 KiB
Nix
96 lines
3.2 KiB
Nix
{
|
|
description = "A Very Flakey Home Manager";
|
|
|
|
inputs = {
|
|
# Nixpkgs
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
|
# You can access packages and modules from different nixpkgs revs
|
|
# at the same time. Here's a working example:
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
# Also see the 'unstable-packages' overlay at 'nix/overlays/default.nix'.
|
|
|
|
# Home manager
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-23.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# TODO: Add any other flake you might need
|
|
# hardware.url = "github.com/nixos/nixos-hardware";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
|
"aarch64-linux"
|
|
"x86_64-linux"
|
|
];
|
|
in
|
|
rec {
|
|
# Your custom packages
|
|
# Accessible through 'nix build', 'nix shell', etc
|
|
packages = forAllSystems (system:
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
in import ./nix/pkgs { inherit pkgs; }
|
|
);
|
|
# Devshell for bootstrapping
|
|
# Accessible through 'nix develop' or 'nix-shell' (legacy)
|
|
devShells = forAllSystems (system:
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
in import ./nix/shell.nix { inherit pkgs; }
|
|
);
|
|
|
|
# Your custom packages and modifications, exported as overlays
|
|
overlays = import ./nix/overlays { inherit inputs; };
|
|
# Reusable nixos modules you might want to export
|
|
# These are usually stuff you would upstream into nixpkgs
|
|
nixosModules = import ./nix/modules/nixos;
|
|
# Reusable home-manager modules you might want to export
|
|
# These are usually stuff you would upstream into home-manager
|
|
homeManagerModules = import ./nix/modules/home-manager;
|
|
|
|
# NixOS configuration entrypoint
|
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
nixosConfigurations = {
|
|
pixnix = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs outputs; };
|
|
modules = [
|
|
# > Our main nixos configuration file <
|
|
./nix/nixos/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
|
homeConfigurations = {
|
|
"john@penguin-fw" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
modules = [
|
|
./nix/home/penguin-fw.nix
|
|
{
|
|
home = {
|
|
username = "john";
|
|
homeDirectory = "/home/john";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
"john@penguin-duet" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.aarch64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
modules = [
|
|
./nix/home/penguin-duet.nix
|
|
{
|
|
home = {
|
|
username = "john";
|
|
homeDirectory = "/home/john";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|