dotfiles/flake.nix

101 lines
3.4 KiB
Nix
Raw Permalink 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/
nixConfig = {
extra-substituters = [ "https://hyprland.cachix.org" ];
extra-trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
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-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2023-07-27 14:41:24 +00:00
# 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";
};
2023-07-27 14:41:24 +00:00
2023-09-26 01:20:43 +00:00
# Hyprland
hyprland.url = "github:hyprwm/Hyprland";
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";
};
};
2023-09-27 01:24:07 +00:00
outputs = { self, nixpkgs, home-manager, hyprland, ... } @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 {
2023-08-04 13:53:54 +00:00
modules = [ ./hosts/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-08-05 21:27:18 +00:00
"john@deb01" = lib.homeManagerConfiguration {
modules = [ ./home/deb01.nix ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
2023-07-28 22:15:33 +00:00
"john@penguin-duet" = lib.homeManagerConfiguration {
2023-08-04 13:53:54 +00:00
modules = [ ./home/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/penguin-fw.nix ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
2023-07-29 02:56:41 +00:00
"john@pixnix" = lib.homeManagerConfiguration {
2023-09-27 01:24:07 +00:00
modules = [
./home/pixnix.nix
hyprland.homeManagerModules.default
{wayland.windowManager.hyprland.enable = true;}
];
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/volly.nix ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
};
};
2023-07-27 14:41:24 +00:00
}