2023-06-21 17:41:35 +01:00
|
|
|
{
|
2023-06-21 20:49:28 +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";
|
|
|
|
};
|
2023-09-26 19:03:50 +01:00
|
|
|
stylix = {
|
|
|
|
url = "github:danth/stylix";
|
2023-07-13 12:41:00 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-23 18:31:08 +01:00
|
|
|
anyrun = {
|
|
|
|
url = "github:Kirottu/anyrun";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-09-12 06:24:56 +01:00
|
|
|
|
|
|
|
# Non-flake inputs
|
2023-09-12 08:33:05 +01:00
|
|
|
doom-emacs = {
|
|
|
|
url = "github:doomemacs/doomemacs";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-17 08:57:08 +01:00
|
|
|
gitui = {
|
|
|
|
url = "github:extrawurst/gitui";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-26 19:03:50 +01:00
|
|
|
catppuccin-base16 = {
|
|
|
|
url = "github:catppuccin/base16";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-07 08:48:42 +01:00
|
|
|
catppuccin-alacritty = {
|
|
|
|
url = "github:catppuccin/alacritty";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
catppuccin-bat = {
|
|
|
|
url = "github:catppuccin/bat";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
catppuccin-fish = {
|
|
|
|
url = "github:catppuccin/fish";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
catppuccin-gitui = {
|
|
|
|
url = "github:catppuccin/gitui";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-07 09:22:22 +01:00
|
|
|
catppuccin-hyprland = {
|
|
|
|
url = "github:catppuccin/hyprland";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-24 10:08:25 +01:00
|
|
|
catppuccin-prismlauncher = {
|
|
|
|
url = "github:catppuccin/prismlauncher";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
catppuccin-qbittorrent = {
|
|
|
|
url = "github:catppuccin/qbittorrent";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-15 07:13:52 +01:00
|
|
|
catppuccin-starship = {
|
|
|
|
url = "github:catppuccin/starship";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-07 08:48:42 +01:00
|
|
|
catppuccin-zathura = {
|
|
|
|
url = "github:catppuccin/zathura";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
catppuccin-zsh = {
|
|
|
|
url = "github:catppuccin/zsh-syntax-highlighting";
|
2023-07-24 13:27:05 +01:00
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
|
2023-09-26 19:03:50 +01:00
|
|
|
outputs = { self, nixpkgs, home-manager, stylix, anyrun, ... }@inputs:
|
2023-08-31 12:22:29 +01:00
|
|
|
let
|
2023-09-10 17:23:24 +01:00
|
|
|
flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
|
2023-09-07 08:48:42 +01:00
|
|
|
catppuccin-themes = with inputs; {
|
2023-09-11 17:22:14 +01:00
|
|
|
alacritty = "${catppuccin-alacritty}/catppuccin-macchiato.yml";
|
|
|
|
bat = "${catppuccin-bat}/Catppuccin-macchiato.tmTheme";
|
|
|
|
fish = "${catppuccin-fish}/themes/Catppuccin Macchiato.theme";
|
|
|
|
gitui = "${catppuccin-gitui}/theme/macchiato.ron";
|
|
|
|
hyprland = "${catppuccin-hyprland}/themes/macchiato.conf";
|
2023-09-24 10:08:25 +01:00
|
|
|
prismlauncher =
|
|
|
|
"${catppuccin-prismlauncher}/themes/Macchiato/Catppuccin-Macchiato.zip";
|
|
|
|
qbittorrent = "${catppuccin-qbittorrent}/macchiato.qbtheme";
|
2023-09-15 07:13:52 +01:00
|
|
|
starship = "${catppuccin-starship}/palettes/macchiato.toml";
|
2023-09-11 17:22:14 +01:00
|
|
|
zathura = "${catppuccin-zathura}/src/catppuccin-macchiato";
|
2023-09-07 08:48:42 +01:00
|
|
|
zsh =
|
2023-09-11 17:22:14 +01:00
|
|
|
"${catppuccin-zsh}/themes/catppuccin_macchiato-zsh-syntax-highlighting.zsh";
|
2023-09-07 08:48:42 +01:00
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
default = {
|
|
|
|
hostName = "Atlas";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
group = "users";
|
|
|
|
shell = "zsh";
|
|
|
|
systemModules = [ ./system/hyprland.nix ];
|
|
|
|
serviceModules =
|
|
|
|
[ ./services/sshd/default.nix ./services/syncthing/default.nix ];
|
2023-09-15 07:13:52 +01:00
|
|
|
homeModules = [ ./home/default.nix ];
|
2023-09-10 17:07:11 +01:00
|
|
|
stateVersion = "23.05";
|
|
|
|
};
|
|
|
|
systemConfig = { hostName ? default.hostName, user ? default.user
|
|
|
|
, system ? default.system, group ? default.group, shell ? default.shell
|
|
|
|
, systemModules ? default.systemModules
|
|
|
|
, serviceModules ? default.serviceModules
|
|
|
|
, homeModules ? default.homeModules, stateVersion ? default.stateVersion
|
|
|
|
}:
|
2023-08-31 12:22:29 +01:00
|
|
|
let
|
2023-09-26 19:03:50 +01:00
|
|
|
specialArgs = { inherit hostName user group anyrun; };
|
2023-09-13 06:45:28 +01:00
|
|
|
extraSpecialArgs = specialArgs // {
|
2023-09-26 19:03:50 +01:00
|
|
|
inherit catppuccin-themes;
|
|
|
|
inherit (inputs) doom-emacs gitui;
|
2023-09-13 06:45:28 +01:00
|
|
|
};
|
2023-09-26 07:36:57 +01:00
|
|
|
commonModule = { lib, pkgs, ... }: {
|
2023-09-26 19:03:50 +01:00
|
|
|
stylix = {
|
|
|
|
autoEnable = false;
|
|
|
|
image = ./wallpapers/waves/cat-waves.png;
|
|
|
|
base16Scheme =
|
|
|
|
"${inputs.catppuccin-base16}/base16/macchiato.yaml";
|
2023-10-07 10:19:56 +01:00
|
|
|
fonts = {
|
|
|
|
emoji = {
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
package = pkgs.noto-fonts-emoji;
|
|
|
|
};
|
|
|
|
monospace = {
|
2023-10-07 10:25:55 +01:00
|
|
|
name = "Fira Mono";
|
2023-10-07 10:19:56 +01:00
|
|
|
package = pkgs.fira-mono;
|
|
|
|
};
|
|
|
|
sansSerif = {
|
|
|
|
name = "Fira Sans";
|
|
|
|
package = pkgs.fira;
|
|
|
|
};
|
|
|
|
serif = {
|
|
|
|
name = "Fira Sans";
|
|
|
|
package = pkgs.fira;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
homeManagerIntegration.followSystem = true;
|
2023-09-28 08:27:03 +01:00
|
|
|
targets = {
|
2023-10-07 10:19:56 +01:00
|
|
|
chromium.enable = true;
|
2023-09-28 08:27:03 +01:00
|
|
|
console.enable = true;
|
2023-10-07 10:19:56 +01:00
|
|
|
grub = {
|
|
|
|
enable = true;
|
|
|
|
useImage = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
fonts = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
fira
|
|
|
|
fira-mono
|
|
|
|
fira-code
|
|
|
|
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
|
|
|
dejavu_fonts
|
|
|
|
noto-fonts-emoji
|
|
|
|
font-awesome
|
|
|
|
material-symbols
|
|
|
|
emacs-all-the-icons-fonts
|
|
|
|
material-design-icons
|
|
|
|
weather-icons
|
|
|
|
vscode-extensions.file-icons.file-icons
|
|
|
|
];
|
|
|
|
fontconfig = {
|
|
|
|
enable = true;
|
|
|
|
defaultFonts = {
|
|
|
|
serif = [ "Fira Sans" "DejaVu Sans" ];
|
|
|
|
sansSerif = [ "Fira Sans" "DejaVu Sans" ];
|
|
|
|
monospace = [ "Fira Mono" "DejaVu Sans Mono" ];
|
|
|
|
emoji = [ "Noto Color Emoji" ];
|
|
|
|
};
|
2023-09-28 08:27:03 +01:00
|
|
|
};
|
2023-09-26 19:03:50 +01:00
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
|
|
|
extraOptions = ''
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
|
|
'';
|
|
|
|
};
|
2023-09-26 07:36:57 +01:00
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"steam"
|
|
|
|
"steam-original"
|
|
|
|
"steam-run"
|
|
|
|
"discord"
|
|
|
|
"nomachine-client"
|
|
|
|
];
|
2023-09-10 17:07:11 +01:00
|
|
|
networking = {
|
|
|
|
inherit hostName;
|
|
|
|
networkmanager.enable = true;
|
2023-09-23 08:07:36 +01:00
|
|
|
nameservers = [ "9.9.9.9" ];
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
|
|
|
environment = {
|
2023-09-30 09:27:43 +01:00
|
|
|
systemPackages = with pkgs; [ libsecret git neofetch nitch ];
|
2023-09-10 17:07:11 +01:00
|
|
|
localBinInPath = true;
|
2023-09-24 11:45:09 +01:00
|
|
|
shellAliases.nou =
|
2023-09-24 12:05:52 +01:00
|
|
|
''sudo nixos-rebuild switch --flake "${flakeURL}" --refresh'';
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
2023-09-30 09:56:44 +01:00
|
|
|
services.power-profiles-daemon.enable = true;
|
2023-09-10 17:07:11 +01:00
|
|
|
virtualisation.podman.enable = true;
|
|
|
|
time.timeZone = "Europe/London";
|
|
|
|
i18n = let locale = "en_GB.UTF-8";
|
|
|
|
in {
|
|
|
|
# Select internationalisation properties.
|
|
|
|
defaultLocale = locale;
|
|
|
|
extraLocaleSettings = {
|
|
|
|
LC_ADDRESS = locale;
|
|
|
|
LC_IDENTIFICATION = locale;
|
|
|
|
LC_MEASUREMENT = locale;
|
|
|
|
LC_MONETARY = locale;
|
|
|
|
LC_NAME = locale;
|
|
|
|
LC_NUMERIC = locale;
|
|
|
|
LC_PAPER = locale;
|
|
|
|
LC_TELEPHONE = locale;
|
|
|
|
LC_TIME = locale;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
programs.${shell}.enable = true;
|
|
|
|
system = {
|
|
|
|
inherit stateVersion;
|
2023-09-24 12:09:08 +01:00
|
|
|
autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
dates = "02:00";
|
|
|
|
allowReboot = false;
|
|
|
|
flake = flakeURL;
|
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
|
|
|
users.users.${user} = {
|
|
|
|
inherit group;
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Evie Litherland-Smith";
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "video" ];
|
|
|
|
shell = pkgs.${shell};
|
2023-09-24 12:05:19 +01:00
|
|
|
initialHashedPassword =
|
|
|
|
"$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
2023-09-10 17:07:11 +01:00
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMVEXJTqWkrpmvinPJGsSvome9bCd0CM4iu13aVG6UZ elitherl@Ronin"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
home-manager = {
|
2023-09-13 06:45:28 +01:00
|
|
|
inherit extraSpecialArgs;
|
2023-09-10 17:07:11 +01:00
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
2023-09-11 07:37:08 +01:00
|
|
|
users.${user} = let
|
|
|
|
username = user;
|
|
|
|
homeDirectory = "/home/${user}";
|
|
|
|
in {
|
2023-09-20 09:00:22 +01:00
|
|
|
imports = [ ./hosts/${hostName}/home.nix ./home/default.nix ]
|
|
|
|
++ homeModules;
|
2023-09-11 07:37:08 +01:00
|
|
|
home = { inherit username homeDirectory stateVersion; };
|
2023-09-10 17:07:11 +01:00
|
|
|
programs.home-manager.enable = true;
|
2023-09-28 08:27:03 +01:00
|
|
|
stylix.targets.xresources.enable = true;
|
2023-09-11 07:37:08 +01:00
|
|
|
xdg.userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
extraConfig = {
|
|
|
|
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
|
|
|
|
};
|
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-07-25 16:14:50 +01:00
|
|
|
in nixpkgs.lib.nixosSystem {
|
2023-09-21 08:51:07 +01:00
|
|
|
inherit system specialArgs;
|
2023-08-31 12:22:29 +01:00
|
|
|
modules = [
|
|
|
|
./hosts/${hostName}/configuration.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
./hosts/${hostName}/hardware-configuration.nix
|
2023-09-13 06:45:28 +01:00
|
|
|
home-manager.nixosModules.home-manager
|
2023-09-26 19:03:50 +01:00
|
|
|
stylix.nixosModules.stylix
|
2023-09-10 17:07:11 +01:00
|
|
|
commonModule
|
|
|
|
] ++ systemModules ++ serviceModules;
|
2023-07-16 17:35:36 +01:00
|
|
|
};
|
2023-08-31 12:22:29 +01:00
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
2023-09-10 17:07:11 +01:00
|
|
|
|
|
|
|
Legion = let
|
2023-08-31 12:22:29 +01:00
|
|
|
hostName = "Legion";
|
2023-08-31 12:33:10 +01:00
|
|
|
user = "xenia";
|
2023-08-31 12:22:29 +01:00
|
|
|
system = "x86_64-linux";
|
2023-09-10 17:07:11 +01:00
|
|
|
in systemConfig {
|
|
|
|
inherit hostName user system;
|
|
|
|
systemModules = [ ];
|
|
|
|
serviceModules = [
|
|
|
|
./services/adguardhome/default.nix
|
|
|
|
./services/gitea/default.nix
|
|
|
|
./services/nextcloud/default.nix
|
|
|
|
./services/sshd/default.nix
|
|
|
|
./services/syncthing/default.nix
|
|
|
|
./services/terraria/windy_limbo_of_melancholy.nix
|
|
|
|
./services/traefik/adguardhome.nix
|
|
|
|
./services/traefik/gitea.nix
|
|
|
|
./services/traefik/nextcloud.nix
|
|
|
|
./services/traefik/qbittorrent.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/git/default.nix
|
|
|
|
./home/ssh/default.nix
|
|
|
|
./home/tui/default.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Northstar = let
|
|
|
|
hostName = "Northstar";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
2023-09-16 17:58:43 +01:00
|
|
|
in systemConfig {
|
|
|
|
inherit hostName user system;
|
|
|
|
systemModules = default.systemModules ++ [ ./system/steam.nix ];
|
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
|
|
|
|
Ronin = let
|
2023-08-31 12:22:29 +01:00
|
|
|
hostName = "Ronin";
|
|
|
|
user = "elitherl";
|
|
|
|
system = "x86_64-linux";
|
2023-09-11 10:31:55 +01:00
|
|
|
in systemConfig { inherit hostName user system; };
|
2023-09-10 17:07:11 +01:00
|
|
|
|
2023-10-03 13:15:32 +01:00
|
|
|
Scorch = let
|
|
|
|
hostName = "Scorch";
|
|
|
|
user = "elitherl";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in systemConfig { inherit hostName user system; };
|
|
|
|
|
2023-09-10 17:07:11 +01:00
|
|
|
Vanguard = let
|
2023-08-31 12:22:29 +01:00
|
|
|
hostName = "Vanguard";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
2023-09-10 17:07:11 +01:00
|
|
|
in systemConfig {
|
|
|
|
inherit hostName user system;
|
2023-09-23 18:05:51 +01:00
|
|
|
systemModules = default.systemModules ++ [ ./system/steam.nix ];
|
2023-07-16 17:35:36 +01:00
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
|
2023-08-31 12:22:29 +01:00
|
|
|
};
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
}
|