Jafner.net/nix/flake.nix
Joey Hafner bcb50ace24
Some checks failed
SSH and echo to file / ssh (push) Failing after 3s
Update from joey@joey-laptop: Modularize home-manager
2024-09-17 13:56:38 -07:00

97 lines
2.5 KiB
Nix

{
description = "Joey's Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak";
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-conf-editor = {
url = "github:snowfallorg/nixos-conf-editor";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = inputs@{
nixpkgs,
nixpkgs-unstable,
hyprland,
home-manager,
nix-flatpak,
stylix,
plasma-manager,
...
}:
let
systemSettings = {
system = "x86_64-linux";
hostname = "joey-laptop";
};
userSettings = {
user = "joey";
theme = "gruvbox-warm";
wm = "plasma";
};
lib = nixpkgs.lib;
pkgs = import inputs.nixpkgs {
system = systemSettings.system;
config = { allowUnfreePredicate = (_: true); };
};
pkgs-unstable = nixpkgs-unstable.legacyPackages.${systemSettings.system};
in {
nixosConfigurations = {
${systemSettings.hostname} = lib.nixosSystem {
modules = [
./nixos/configuration.nix
inputs.hyprland.nixosModules.default
inputs.stylix.nixosModules.stylix
inputs.nix-flatpak.nixosModules.nix-flatpak
];
system = systemSettings.system;
specialArgs = {
inherit pkgs;
inherit pkgs-unstable;
inherit systemSettings;
inherit userSettings;
inherit inputs;
};
};
};
homeConfigurations = {
${userSettings.user} = home-manager.lib.homeManagerConfiguration {
modules = [
./home-manager/home.nix
inputs.stylix.homeManagerModules.stylix
inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
inherit pkgs;
extraSpecialArgs = {
inherit pkgs;
inherit pkgs-unstable;
inherit systemSettings;
inherit userSettings;
inherit inputs;
};
};
};
};
}