dotfiles/flake.nix

100 lines
3.4 KiB
Nix
Raw Normal View History

{
description = "A Very Flakey Home Manager";
2023-07-28 22:15:33 +00:00
# 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";
2023-07-27 14:41:24 +00:00
# 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'.
2023-07-27 14:41:24 +00:00
# Home manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-27 14:41:24 +00:00
2023-07-28 22:15:33 +00:00
# Hardware
hardware.url = "github:nixos/nixos-hardware";
2023-07-29 02:44:49 +00:00
# Firefox add-ons
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-12-03 04:07:49 +00:00
# nixvim
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2024-12-04 03:54:36 +00:00
outputs = { self, nixpkgs, home-manager, nixvim, ... } @inputs:
let
inherit (self) outputs;
2023-07-28 22:15:33 +00:00
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
2023-07-28 22:15:33 +00:00
{
inherit lib;
2023-08-04 13:53:54 +00:00
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
2023-08-04 13:53:54 +00:00
overlays = import ./overlays { inherit inputs outputs; };
2023-07-28 22:15:33 +00:00
2023-08-04 13:53:54 +00:00
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
2023-07-28 22:15:33 +00:00
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
nixosConfigurations = {
2023-07-28 22:15:33 +00:00
# Pixelbook converted to NixOS
pixnix = lib.nixosSystem {
2024-12-04 03:58:58 +00:00
modules = [ ./nixos/pixnix ];
specialArgs = { inherit inputs outputs; };
};
};
2023-07-27 14:41:24 +00:00
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
2023-07-28 22:15:33 +00:00
"john@penguin-duet" = lib.homeManagerConfiguration {
modules = [ ./home/hosts/penguin-duet.nix ];
2023-07-28 22:15:33 +00:00
pkgs = pkgsFor.aarch64-linux;
2023-07-27 14:41:24 +00:00
extraSpecialArgs = { inherit inputs outputs; };
};
2023-08-05 22:02:46 +00:00
"john@penguin-fw" = lib.homeManagerConfiguration {
modules = [ ./home/hosts/penguin-fw.nix ];
2023-08-05 22:02:46 +00:00
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
2023-07-29 02:56:41 +00:00
"john@pixnix" = lib.homeManagerConfiguration {
modules = [ ./home/hosts/pixnix.nix ];
2023-07-29 02:56:41 +00:00
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
2023-08-05 22:04:36 +00:00
"john@volly" = lib.homeManagerConfiguration {
modules = [ ./home/hosts/generic.nix ];
2024-05-03 15:34:12 +00:00
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
"john@immich" = lib.homeManagerConfiguration {
modules = [ ./home/hosts/generic.nix ];
2023-08-05 22:04:36 +00:00
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
2024-01-25 22:58:06 +00:00
"john@doc" = lib.homeManagerConfiguration {
modules = [ ./home/hosts/generic.nix ];
2024-01-25 22:58:06 +00:00
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
};
};
2023-07-27 14:41:24 +00:00
}