nixos/flake.nix

114 lines
3.7 KiB
Nix
Raw Normal View History

2023-06-21 17:41:35 +01:00
{
description = "Evie's machine configurations";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
doom-emacs.url = "git+https://git.xenia.me.uk/xenia/emacs.git";
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
tokyonight = {
url = "github:folke/tokyonight.nvim";
flake = false;
};
};
2023-06-21 17:41:35 +01:00
outputs = { self, nixpkgs, home-manager, hyprland, doom-emacs, wallpapers
, tokyonight, }:
let shell = "zsh";
in {
nixosConfigurations = let
userConfig = {
isNormalUser = true;
description = "Evie Litherland-Smith";
group = "users";
extraGroups = [ "networkmanager" "wheel" "video" ];
shell = pkgs.${shell};
openssh.authorizedKeys.keys = import ./auth/authorized_keys.nix;
};
specialArgs = { inherit shell userConfig hyprland; };
waybar-experimental-overlay = final: prev: {
waybar = prev.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
};
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays =
[ waybar-experimental-overlay doom-emacs.outputs.overlay.default ];
};
in {
Legion = let hostname = "Legion";
in nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [ ./hosts/${hostname}/configuration.nix ];
};
Vanguard = let hostname = "Vanguard";
in nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [
./hosts/${hostname}/configuration.nix
doom-emacs.outputs.nixosModules.default
];
};
Ronin = let hostname = "Ronin";
in nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [
./hosts/${hostname}/configuration.nix
doom-emacs.outputs.nixosModules.default
];
};
};
homeConfigurations = let
extraSpecialArgs = {
inherit hyprland wallpapers tokyonight;
shellConfig = ./home/shell/${shell}.nix;
};
in {
# NixOS home configurations
"xenia@Vanguard" = let
hostname = "Vanguard";
pkgs = self.nixosConfigurations.${hostname}.pkgs;
in home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [ ./hosts/${hostname}/home.nix ];
};
"xenia@Legion" = let
hostname = "Legion";
pkgs = self.nixosConfigurations.${hostname}.pkgs;
in home-manager.lib.homeManagerConfiguration {
2023-07-16 18:51:45 +01:00
inherit pkgs extraSpecialArgs;
modules = [ ./hosts/${hostname}/home.nix ];
2023-07-16 18:51:45 +01:00
};
"elitherl@Ronin" = let
hostname = "Ronin";
pkgs = self.nixosConfigurations.${hostname}.pkgs;
in home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [
./hosts/${hostname}/home.nix
doom-emacs.outputs.homeManagerModules.default
];
};
# Legacy home configurations
"tux@Monarch" = let
hostname = "Monarch";
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [ ./hosts/${hostname}/home.nix ];
};
};
};
2023-06-21 17:41:35 +01:00
}