nixos/flake.nix

128 lines
3.5 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 ./users/root];
home-manager = {
useGlobalPkgs = true;
useUserPackages = false;
users.root.imports = [./home/env/bash.nix ./home/env/starship.nix];
};
};
hyprland-config = {
imports = [hyprland.nixosModules.default];
security.pam.services.swaylock = {};
programs.hyprland.enable = true;
services.greetd = {
enable = true;
settings = rec {
initial_session.command = "Hyprland";
default_session = initial_session;
};
};
};
hyprland-home-config = {pkgs, ...}: {
imports = [
hyprland.homeManagerModules.default
./home/desktop/hyprland.nix
./home/gui
];
programs.firefox.package = pkgs.firefox-wayland;
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/Legion
./users/xenia
./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-config
./hosts/Vanguard
./users/xenia
2023-06-22 14:31:35 +01:00
./services/sshd
{home-manager.users.xenia.imports = [hyprland-home-config];}
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-config
./hosts/N0245
./users/elitherl/N0245.nix
./services/syncthing/N0245.nix
{home-manager.users.elitherl.imports = [hyprland-home-config];}
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
};
}