nixos/flake.nix

141 lines
3.9 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";
};
2023-06-27 22:03:15 +01:00
newm = {
url = "sourcehut:~atha/newm-atha";
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 = {pkgs, ...}: {
imports = [hyprland.nixosModules.default];
environment.systemPackages = with pkgs; [
gsettings-desktop-schemas
pavucontrol
pamixer
pulseaudio
pipewire
wireplumber
wl-clipboard
swayimg
hyprpaper
grim
slurp
];
security.pam.services.swaylock = {};
programs = {
hyprland.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman];
};
};
services = {
gvfs.enable = true; # Mount, trash, and other functionalities
tumbler.enable = true; # Thumbnail support for images
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
];
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/Vanguard.nix
2023-06-22 14:31:35 +01:00
./services/sshd
2023-06-27 07:39:29 +01:00
./services/syncthing/Vanguard.nix
{home-manager.users.xenia.imports = [hyprland-home-config];}
2023-06-22 14:31:35 +01:00
];
};
Ronin = 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/Ronin
./users/elitherl/Ronin.nix
./services/syncthing/Ronin.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 {
2023-06-28 18:26:37 +01:00
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
modules = [./hosts/Monarch/home.nix];
2023-06-21 21:23:51 +01:00
};
"xenia@Northstar" = home-manager.lib.homeManagerConfiguration {
2023-06-28 18:26:37 +01:00
pkgs = nixpkgs.legacyPackages."aarch64-linux";
modules = [./hosts/Northstar/home.nix];
2023-06-21 21:23:51 +01:00
};
};
2023-06-21 17:41:35 +01:00
};
}