nixos/flake.nix
Evie Litherland-Smith 55e72cb9cc Move doom flake contents back in
Doom emacs config is still separate repo, but flake contents are back

Remove work firefox profile, switched to chromium instead for Teams fix
2023-07-26 15:45:24 +01:00

102 lines
3.4 KiB
Nix

{
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";
};
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
tokyonight = {
url = "github:folke/tokyonight.nvim";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, hyprland, 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 ];
};
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 ];
};
Ronin = let hostname = "Ronin";
in nixpkgs.lib.nixosSystem {
inherit pkgs specialArgs;
modules = [ ./hosts/${hostname}/configuration.nix ];
};
};
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 {
inherit pkgs extraSpecialArgs;
modules = [ ./hosts/${hostname}/home.nix ];
};
"elitherl@Ronin" = let
hostname = "Ronin";
pkgs = self.nixosConfigurations.${hostname}.pkgs;
in home-manager.lib.homeManagerConfiguration {
inherit pkgs extraSpecialArgs;
modules = [ ./hosts/${hostname}/home.nix ];
};
# 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 ];
};
};
};
}