mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-12-18 10:52:18 +00:00
93 lines
3.2 KiB
Nix
93 lines
3.2 KiB
Nix
{
|
|
description = "A Very Flakey Home Manager";
|
|
|
|
# Initial layout shamelessly stolen from:
|
|
# - https://github.com/Misterio77/nix-starter-configs/
|
|
# - https://github.com/Misterio77/nix-config/
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
# You can access packages and modules from different nixpkgs revs
|
|
# at the same time. Here's a working example:
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
# Also see the 'stable-packages' overlay at 'nix/overlays/default.nix'.
|
|
|
|
# Home manager
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Hardware
|
|
hardware.url = "github:nixos/nixos-hardware";
|
|
|
|
# Firefox add-ons
|
|
firefox-addons = {
|
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, ... } @inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
lib = nixpkgs.lib // home-manager.lib;
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
forEachSystem = f: lib.genAttrs systems (sys: f pkgsFor.${sys});
|
|
pkgsFor = nixpkgs.legacyPackages;
|
|
in
|
|
{
|
|
inherit lib;
|
|
nixosModules = import ./modules/nixos;
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
overlays = import ./overlays { inherit inputs outputs; };
|
|
|
|
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
|
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
|
|
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
|
|
|
nixosConfigurations = {
|
|
# Pixelbook converted to NixOS
|
|
pixnix = lib.nixosSystem {
|
|
modules = [ ./hosts/pixnix ];
|
|
specialArgs = { inherit inputs outputs; };
|
|
};
|
|
};
|
|
|
|
# Standalone home-manager configuration entrypoint
|
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
|
homeConfigurations = {
|
|
"john@penguin-duet" = lib.homeManagerConfiguration {
|
|
modules = [ ./home/penguin-duet.nix ];
|
|
pkgs = pkgsFor.aarch64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
"john@penguin-fw" = lib.homeManagerConfiguration {
|
|
modules = [ ./home/penguin-fw.nix ];
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
"john@pixnix" = lib.homeManagerConfiguration {
|
|
modules = [ ./home/pixnix.nix ];
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
"john@volly" = lib.homeManagerConfiguration {
|
|
modules = [ ./home/generic.nix ];
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
"john@immich" = lib.homeManagerConfiguration {
|
|
modules = [ ./home/generic.nix ];
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
"john@doc" = lib.homeManagerConfiguration {
|
|
modules = [ ./home/generic.nix ];
|
|
pkgs = pkgsFor.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
};
|
|
};
|
|
};
|
|
}
|