dotfiles/flake.nix

106 lines
3.5 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 = {
2024-12-20 01:00:00 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
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:
2024-12-20 01:00:00 +00:00
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
2023-07-27 14:41:24 +00:00
# Home manager
home-manager = {
2024-12-20 01:00:00 +00:00
url = "github:nix-community/home-manager/release-24.11";
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 = {
2024-12-20 01:00:00 +00:00
url = "github:nix-community/nixvim/nixos-24.11";
2024-12-03 04:07:49 +00:00
inputs.nixpkgs.follows = "nixpkgs";
};
2024-12-20 01:08:24 +00:00
# NixGL
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-12-20 23:25:48 +00:00
};
outputs = { self, nixpkgs, home-manager, ... }@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;
2024-12-20 01:30:06 +00:00
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
}