nixos/flake.nix

277 lines
8.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";
};
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-07-07 17:25:04 +01:00
hyprland.url = "github:hyprwm/Hyprland";
};
2023-06-21 17:41:35 +01:00
outputs = {
2023-06-21 17:41:35 +01:00
nixpkgs,
home-manager,
wallpapers,
neovim-nightly-overlay,
2023-07-07 17:25:04 +01:00
hyprland,
...
}: let
2023-07-07 17:25:04 +01:00
home-manager-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";
};
};
};
};
2023-07-07 17:25:04 +01:00
services = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
gsettings-desktop-schemas
pavucontrol
pamixer
pulseaudio
grim
slurp
];
security.pam.services.swaylock = {};
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services = {
blueman.enable = true;
gvfs.enable = true;
tumbler.enable = true;
};
};
2023-07-11 08:30:29 +01:00
chromium = {
programs.chromium = {
enable = true;
extensions = [
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"fnaicdffflnofjppbagibeoednhnbjhg" # Floccus
"nngceckbapebfimnlniiiahkandclblb" # Bitwarden
"dphilobhebphkdjbpfohgikllaljmgbn" # Simplelogin
];
extraOpts = {
"BrowserSignin" = 0;
"SyncDisabled" = true;
"PasswordManagerEnabled" = false;
"SpellcheckEnabled" = true;
"SpellcheckLanguage" = ["en-GB"];
};
2023-07-12 09:06:33 +01:00
defaultSearchProviderSearchURL = "https://duckduckgo.com/?q={searchTerms}";
2023-07-11 08:30:29 +01:00
defaultSearchProviderEnabled = true;
};
};
2023-07-07 17:25:04 +01:00
waybar-experimental-overlay = final: prev: {
waybar = prev.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 = [
2023-07-07 17:25:04 +01:00
home-manager-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 = [
waybar-experimental-overlay
neovim-nightly-overlay.overlay
];
};
2023-06-22 14:31:35 +01:00
modules = [
2023-07-07 17:25:04 +01:00
home-manager-config
services
2023-07-11 08:30:29 +01:00
chromium
hyprland.nixosModules.default
./hosts/Vanguard
2023-06-22 14:31:35 +01:00
./services/sshd
2023-06-27 07:39:29 +01:00
./services/syncthing/Vanguard.nix
({pkgs, ...}: {
hardware.steam-hardware.enable = true;
programs = {
xwayland.enable = true;
hyprland.enable = true;
gamescope = {
enable = true;
capSysNice = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
gamescopeSession.enable = true;
};
};
home-manager.users.xenia = {
imports = [
hyprland.homeManagerModules.default
./home/personal.nix
./home/desktop/hyprland
./home/desktop/waybar/main.nix
./home/gui
];
home = {
username = "xenia";
homeDirectory = "/home/xenia";
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default}
'';
xdg.configFile."hypr/display.conf".text = ''
monitor=DP-1,highrr,auto,1
monitor=DP-2,highrr,auto,1
monitor=HDMI-1,highres,auto,2
monitor=HDMI-2,highres,auto,2
monitor=,preferred,auto,auto
2023-07-11 13:32:35 +01:00
exec-once=gamescope -w 1920 -h 1080 -W 3840 -H 2160 -U -f --hdr-enabled -e -- steam -gamepadui
'';
};
})
2023-06-22 14:31:35 +01:00
];
};
Ronin = nixpkgs.lib.nixosSystem {
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
2023-07-07 17:25:04 +01:00
overlays = [
waybar-experimental-overlay
neovim-nightly-overlay.overlay
];
};
2023-06-21 21:23:51 +01:00
modules = [
2023-07-07 17:25:04 +01:00
home-manager-config
services
2023-07-11 08:30:29 +01:00
chromium
2023-07-07 17:25:04 +01:00
hyprland.nixosModules.default
./hosts/Ronin
./services/syncthing/Ronin.nix
({pkgs, ...}: {
2023-07-07 17:25:04 +01:00
programs.hyprland.enable = true;
home-manager.users.elitherl = {
imports = [
2023-07-07 17:25:04 +01:00
hyprland.homeManagerModules.default
./home/work.nix
./home/desktop/hyprland
2023-07-10 11:24:42 +01:00
./home/desktop/waybar/main.nix
./home/desktop/waybar/laptop.nix
./home/desktop/waybar/vertical.nix
./home/gui
];
home = {
username = "elitherl";
homeDirectory = "/home/elitherl";
stateVersion = "22.11";
};
programs.neovim.package = pkgs.neovim-nightly;
2023-07-07 17:52:12 +01:00
programs.waybar.settings = {
main."output" = "DP-5";
2023-07-10 11:24:42 +01:00
laptop."output" = "eDP-1";
vertical."output" = "DP-3";
2023-07-07 17:52:12 +01:00
};
2023-07-07 17:25:04 +01:00
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${wallpapers.outputs.default}
wallpaper = ,${wallpapers.outputs.default}
'';
2023-07-07 17:41:22 +01:00
xdg.configFile."hypr/display.conf".text = ''
monitor=desc:Iiyama North America PLB2403WS 0574281251316,1920x1200@60,0x185,1
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,1920x1080@60,1920x0,1,transform,1
monitor=eDP-1,1920x1080@60,640x1385,1.5
2023-07-07 17:25:04 +01:00
monitor=,preferred,auto,auto
'';
};
})
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
};
}