nixos/flake.nix

135 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";
};
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
};
2023-06-21 17:41:35 +01:00
outputs = {
2023-06-21 17:41:35 +01:00
nixpkgs,
home-manager,
hyprland,
wallpapers,
...
}: let
home-config = {
imports = [home-manager.nixosModules.home-manager];
home-manager = {
useGlobalPkgs = true;
useUserPackages = false;
};
};
hyprland-config = {
imports = [hyprland.homeManagerModules.default];
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default}
'';
};
waybar-experimental = self: super: {waybar = super.waybar.overrideAttrs (oldAttrs: {mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];});};
in {
2023-06-21 21:23:51 +01:00
nixosConfigurations = {
2023-06-22 09:03:42 +01:00
Legion = nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
2023-06-22 09:03:42 +01:00
modules = [
home-config
./hosts/common.nix
2023-06-22 09:03:42 +01:00
./hosts/Legion/configuration.nix
./services/Legion.nix
2023-06-22 09:03:42 +01:00
];
};
2023-06-22 14:31:35 +01:00
Vanguard = nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
overlays = [waybar-experimental];
};
2023-06-22 14:31:35 +01:00
modules = [
home-config
hyprland.nixosModules.default
./hosts/common.nix
2023-06-22 14:31:35 +01:00
./hosts/Vanguard/configuration.nix
./services/sshd
{
security.pam.services.swaylock = {};
programs.hyprland.enable = true;
home-manager.users.xenia = {
imports = [
hyprland-config
./hosts/Vanguard/users/xenia.nix
./home/personal.nix
./home/gui
./home/desktop/hyprland.nix
];
};
}
2023-06-22 14:31:35 +01:00
];
};
2023-06-21 21:23:51 +01:00
N0245 = nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
overlays = [waybar-experimental];
};
2023-06-21 21:23:51 +01:00
modules = [
home-config
hyprland.nixosModules.default
./hosts/common.nix
./hosts/N0245/configuration.nix
./services/syncthing/N0245.nix
{
hardware.bluetooth.enable = true;
security.pam.services.swaylock = {};
programs.hyprland.enable = true;
home-manager.users.elitherl = {
imports = [
hyprland-config
./hosts/N0245/users/elitherl.nix
./home/work.nix
./home/gui
./home/desktop/hyprland.nix
];
};
}
2023-06-21 21:23:51 +01:00
];
};
2023-06-21 17:41:35 +01:00
};
2023-06-21 21:23:51 +01:00
homeConfigurations = {
"tux@Monarch" = home-manager.lib.homeManagerConfiguration {
pkgs =
import nixpkgs
{
system = "aarch64-darwin";
config.allowUnfree = true;
}
.legacyPackages
."aarch64-darwin";
modules = [./hosts/Monarch/home.nix];
2023-06-21 21:23:51 +01:00
};
"xenia@Northstar" = home-manager.lib.homeManagerConfiguration {
pkgs =
import nixpkgs
{
system = "aarch64-linux";
config.allowUnfree = true;
}
.legacyPackages
."aarch64-linux";
modules = [./hosts/Northstar/home.nix];
2023-06-21 21:23:51 +01:00
};
};
2023-06-21 17:41:35 +01:00
};
}