nixos/flake.nix

211 lines
6.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";
};
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
2023-06-27 22:03:15 +01:00
inputs.nixpkgs.follows = "nixpkgs";
};
};
2023-06-21 17:41:35 +01:00
outputs = {
2023-06-21 17:41:35 +01:00
nixpkgs,
home-manager,
wallpapers,
neovim-nightly-overlay,
...
}: let
home-config = {
imports = [home-manager.nixosModules.home-manager];
home-manager = {
useGlobalPkgs = true;
useUserPackages = false;
users.root = {
imports = [./home/env/bash.nix ./home/env/starship.nix];
home = {
username = "root";
homeDirectory = "/root";
stateVersion = "22.11";
};
};
};
};
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
./services/Legion.nix
{
home-manager.users.xenia = {
imports = [./home/personal.nix];
home = {
username = "xenia";
homeDirectory = "/home/xenia";
stateVersion = "22.11";
};
};
}
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 = [neovim-nightly-overlay.overlay];
};
2023-06-22 14:31:35 +01:00
modules = [
home-config
./hosts/Vanguard
./desktop/xfce-bspwm.nix
2023-06-22 14:31:35 +01:00
./services/sshd
2023-06-27 07:39:29 +01:00
./services/syncthing/Vanguard.nix
({pkgs, ...}: {
2023-07-02 17:18:32 +01:00
services.xserver.displayManager.autoLogin.user = "xenia";
hardware.steam-hardware.enable = true;
programs = {
xwayland.enable = true;
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
gamescopeSession.enable = true;
};
};
home-manager.users.xenia = {
imports = [
./home/personal.nix
./home/desktop/bspwm.nix
./home/gui
];
home = {
username = "xenia";
homeDirectory = "/home/xenia";
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
xsession.windowManager.bspwm.extraConfig = ''
${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${wallpapers.outputs.default}
'';
};
})
2023-06-22 14:31:35 +01:00
];
};
Ronin = nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
overlays = [neovim-nightly-overlay.overlay];
};
2023-06-21 21:23:51 +01:00
modules = [
home-config
./hosts/Ronin
./desktop/xfce-bspwm.nix
./services/syncthing/Ronin.nix
({pkgs, ...}: {
2023-07-02 17:18:32 +01:00
services.xserver.displayManager.autoLogin.user = "elitherl";
home-manager.users.elitherl = {
imports = [
./home/work.nix
./home/desktop/bspwm.nix
./home/gui
];
home = {
username = "elitherl";
homeDirectory = "/home/elitherl";
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
xsession.windowManager.bspwm.extraConfig = ''
if [[ "$(xrandr --query | grep -E '^DP-1-1 connected')" ]]; then
xrandr --output eDP-1 --off\
--output DP-1-1 --primary --mode 1920x1200 --pos 0x185 --rotate normal\
--output DP-1-2 --mode 1920x1080 --pos 1920x0 --rotate left
bspc monitor eDP-1 -r
bspc monitor DP-1-1 -g 1920x1200+0+185
bspc monitor DP-1-2 -g 1080x1920+1920+0
else
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal\
--output DP-1-1 --off\
--output DP-1-2 --off
bspc monitor eDP-1 -g 1920x1080+0+0
bspc monitor DP-1-1 -r
bspc monitor DP-1-2 -r
fi
for desktop in "dev" "browser" "files" "chat" "remote"; do
bspc desktop $desktop --to-monitor primary
done
bspc monitor primary -o dev browser files chat remote
bspc monitor primary -d dev browser files chat remote
bspc wm -o
${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${wallpapers.outputs.default}
'';
};
})
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 = [
({pkgs, ...}: {
imports = [./home/personal.nix ./home/gui/wezterm.nix];
home = {
username = "tux";
homeDirectory = "/Users/tux";
stateVersion = "23.05";
packages = [pkgs.gcc];
};
programs = {
home-manager.enable = true;
zsh = {
sessionVariables.CC = "${pkgs.gcc}/bin/gcc";
envExtra = ''
eval "$(/opt/homebrew/bin/brew shellenv)"
'';
};
};
services.syncthing.enable = true;
})
];
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 = [
{
imports = [./home/personal.nix];
home = {
username = "xenia";
homeDirectory = "/home/xenia";
stateVersion = "22.11";
};
programs = {
home-manager.enable = true;
bash.bashrcExtra = ''
source $HOME/.nix-profile/etc/profile.d/nix.sh
'';
};
services.syncthing.enable = true;
fonts.fontconfig.enable = true;
}
];
2023-06-21 21:23:51 +01:00
};
};
2023-06-21 17:41:35 +01:00
};
}