2023-06-21 17:41:35 +01:00
|
|
|
{
|
2023-06-21 20:49:28 +01:00
|
|
|
description = "Evie's machine configurations";
|
|
|
|
|
2024-03-02 16:57:02 +00:00
|
|
|
nixConfig = {
|
|
|
|
extra-substituters = ["https://nix.xenia.me.uk"];
|
|
|
|
extra-trusted-public-keys = ["nix.xenia.me.uk:VaQu+8hshk7aSbW3z91pgkKbYeAcO3Q0AomqP8RaaLc="];
|
|
|
|
};
|
|
|
|
|
2023-06-21 20:49:28 +01:00
|
|
|
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";
|
|
|
|
};
|
2024-03-03 21:16:22 +00:00
|
|
|
iosevka-custom.url = "git+https://git.xenia.me.uk/xenia/iosevka.git";
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
outputs = {
|
2024-02-26 08:12:26 +00:00
|
|
|
self,
|
2024-01-30 14:21:50 +00:00
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
|
|
|
stylix,
|
2024-03-03 21:16:22 +00:00
|
|
|
iosevka-custom,
|
2024-01-30 14:21:50 +00:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
systemConfig = {
|
2024-02-24 08:44:26 +00:00
|
|
|
hostName ? "Atlas",
|
2024-03-08 07:01:08 +00:00
|
|
|
user ? "pixelifytica",
|
2024-02-24 08:44:26 +00:00
|
|
|
system ? "x86_64-linux",
|
|
|
|
stateVersion ? "23.05",
|
2024-02-25 06:32:13 +00:00
|
|
|
systemModules ? [],
|
|
|
|
homeModules ? [],
|
2024-01-30 14:21:50 +00:00
|
|
|
}: let
|
2024-02-26 08:34:45 +00:00
|
|
|
defaultUserShell = "zsh";
|
2024-02-24 08:44:26 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit hostName user;
|
2024-02-29 15:29:19 +00:00
|
|
|
accentColour = "base07"; # catppuccin lavender
|
|
|
|
catppuccinVariant = "Mocha";
|
2024-02-24 08:44:26 +00:00
|
|
|
};
|
2024-01-30 14:21:50 +00:00
|
|
|
in
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system specialArgs;
|
|
|
|
modules =
|
|
|
|
[
|
2023-09-13 06:45:28 +01:00
|
|
|
home-manager.nixosModules.home-manager
|
2024-02-25 07:39:37 +00:00
|
|
|
stylix.nixosModules.stylix
|
2024-02-25 06:32:13 +00:00
|
|
|
./hosts/${hostName}/configuration.nix
|
|
|
|
./hosts/${hostName}/hardware-configuration.nix
|
|
|
|
./system/default.nix
|
2024-02-26 08:12:26 +00:00
|
|
|
({
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-01-19 09:47:14 +00:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
2024-03-02 13:45:52 +00:00
|
|
|
cores = 0; # Use max cores on system
|
|
|
|
max-jobs = 1; # No job concurrency
|
2024-01-30 14:21:50 +00:00
|
|
|
trusted-users = ["root" user];
|
|
|
|
experimental-features = ["nix-command" "flakes"];
|
2024-01-19 09:47:14 +00:00
|
|
|
auto-optimise-store = true;
|
2023-10-15 12:27:16 +01:00
|
|
|
};
|
2024-01-19 09:47:14 +00:00
|
|
|
channel.enable = true;
|
2024-02-17 08:44:26 +00:00
|
|
|
nixPath = ["nixpkgs=${pkgs.path}"];
|
2024-02-25 06:32:13 +00:00
|
|
|
registry.nixpkgs.flake = nixpkgs;
|
2024-01-19 09:47:14 +00:00
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
options = "--delete-older-than 7d";
|
2024-01-10 11:04:20 +00:00
|
|
|
};
|
2024-01-19 09:47:14 +00:00
|
|
|
optimise.automatic = true;
|
|
|
|
extraOptions = ''
|
2024-01-29 05:29:29 +00:00
|
|
|
keep-outputs = false
|
|
|
|
keep-derivations = false
|
2024-01-19 09:47:14 +00:00
|
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
|
|
'';
|
|
|
|
};
|
2024-02-09 14:08:42 +00:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-02-25 06:32:13 +00:00
|
|
|
networking = {inherit hostName;};
|
2024-02-26 08:34:45 +00:00
|
|
|
programs.${defaultUserShell}.enable = true;
|
2024-03-03 21:16:22 +00:00
|
|
|
stylix.fonts = let
|
|
|
|
font = name: {
|
|
|
|
name = iosevka-custom.outputs.names."iosevka-custom-${name}";
|
|
|
|
package = iosevka-custom.outputs.packages.${system}."iosevka-custom-${name}";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
serif = font "etoile";
|
|
|
|
sansSerif = font "aile";
|
|
|
|
monospace = font "nerdfont";
|
|
|
|
};
|
2024-02-26 08:12:26 +00:00
|
|
|
system = {
|
|
|
|
inherit stateVersion;
|
|
|
|
autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
flake = lib.mkDefault self.outPath;
|
|
|
|
flags = [
|
|
|
|
"--update-input"
|
|
|
|
"nixpkgs"
|
|
|
|
"--no-write-lock-file"
|
|
|
|
"-L" # print build logs
|
|
|
|
];
|
|
|
|
dates = "02:00";
|
|
|
|
};
|
|
|
|
};
|
2024-02-11 07:16:08 +00:00
|
|
|
users = {
|
2024-02-26 08:34:45 +00:00
|
|
|
defaultUserShell = pkgs.${defaultUserShell};
|
2024-02-11 07:16:08 +00:00
|
|
|
users = let
|
|
|
|
authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDOcgeR3hh23aTiXnyC37xdP8oXfTZbbjgWzkUyxhT9P root@Vanguard"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar"
|
|
|
|
];
|
|
|
|
in {
|
|
|
|
root.openssh = {inherit authorizedKeys;};
|
|
|
|
${user} = {
|
2024-02-24 08:44:26 +00:00
|
|
|
group = "users";
|
2024-02-11 07:16:08 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
description = "Evie Litherland-Smith";
|
|
|
|
extraGroups = ["networkmanager" "wheel" "video" "input" "uinput"];
|
|
|
|
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
|
|
|
openssh = {inherit authorizedKeys;};
|
|
|
|
};
|
2024-01-16 08:22:43 +00:00
|
|
|
};
|
2024-01-19 09:47:14 +00:00
|
|
|
};
|
|
|
|
home-manager = {
|
2024-02-15 07:15:19 +00:00
|
|
|
extraSpecialArgs = specialArgs;
|
2024-01-19 09:47:14 +00:00
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users = {
|
|
|
|
root = {
|
2024-01-30 14:21:50 +00:00
|
|
|
imports = [./home/default.nix];
|
2024-01-19 09:47:14 +00:00
|
|
|
home = {
|
|
|
|
inherit stateVersion;
|
|
|
|
username = "root";
|
|
|
|
homeDirectory = "/root";
|
2024-01-16 08:22:43 +00:00
|
|
|
};
|
2024-01-19 09:47:14 +00:00
|
|
|
programs.home-manager.enable = true;
|
|
|
|
};
|
|
|
|
${user} = let
|
|
|
|
username = user;
|
|
|
|
homeDirectory = "/home/${user}";
|
|
|
|
in {
|
|
|
|
imports =
|
2024-01-30 14:21:50 +00:00
|
|
|
[./hosts/${hostName}/home.nix ./home/default.nix]
|
2024-01-19 09:47:14 +00:00
|
|
|
++ homeModules;
|
2024-01-30 14:21:50 +00:00
|
|
|
home = {inherit username homeDirectory stateVersion;};
|
2024-01-19 09:47:14 +00:00
|
|
|
programs.home-manager.enable = true;
|
|
|
|
xdg.userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
extraConfig = {
|
|
|
|
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
|
2023-10-18 06:43:41 +01:00
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-01-19 09:47:14 +00:00
|
|
|
};
|
|
|
|
})
|
2024-01-30 14:21:50 +00:00
|
|
|
]
|
2024-02-24 08:44:26 +00:00
|
|
|
++ systemModules;
|
2024-01-30 14:21:50 +00:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
|
|
|
## Server
|
2024-01-07 12:44:16 +00:00
|
|
|
|
2024-03-08 07:01:08 +00:00
|
|
|
Legion = systemConfig {
|
2024-01-30 14:21:50 +00:00
|
|
|
hostName = "Legion";
|
2024-03-08 07:01:08 +00:00
|
|
|
systemModules = [
|
|
|
|
./services/nix-serve.nix
|
|
|
|
./services/caddy.nix
|
|
|
|
./services/gitea.nix
|
|
|
|
./services/grafana.nix
|
|
|
|
./services/minecraft.nix
|
|
|
|
./services/sshd.nix
|
|
|
|
./services/syncthing.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/default.nix
|
|
|
|
./home/emacs/default.nix
|
|
|
|
];
|
|
|
|
};
|
2023-09-10 17:07:11 +01:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
## Personal
|
2024-01-07 12:44:16 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
Northstar = let
|
|
|
|
hostName = "Northstar";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in
|
|
|
|
systemConfig {
|
2024-03-08 07:29:36 +00:00
|
|
|
inherit hostName system;
|
2024-02-25 06:32:13 +00:00
|
|
|
systemModules = [
|
|
|
|
./system/laptop.nix
|
|
|
|
./system/hyprland.nix
|
|
|
|
./system/games.nix
|
|
|
|
];
|
2024-02-26 08:12:26 +00:00
|
|
|
homeModules = [
|
|
|
|
./home/hyprland/default.nix
|
|
|
|
];
|
2024-01-22 06:44:42 +00:00
|
|
|
};
|
|
|
|
|
2024-03-08 07:30:18 +00:00
|
|
|
Vanguard = systemConfig {
|
2024-01-30 14:21:50 +00:00
|
|
|
hostName = "Vanguard";
|
2024-03-08 07:30:18 +00:00
|
|
|
systemModules = [
|
|
|
|
./services/sshd.nix
|
|
|
|
./system/hyprland.nix
|
|
|
|
./system/games.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/hyprland/default.nix
|
|
|
|
];
|
|
|
|
};
|
2024-01-22 06:44:42 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
## Work
|
2023-09-10 17:07:11 +01:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
Ronin = let
|
|
|
|
hostName = "Ronin";
|
|
|
|
user = "elitherl";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in
|
2024-02-25 06:32:13 +00:00
|
|
|
systemConfig {
|
|
|
|
inherit hostName user system;
|
|
|
|
systemModules = [
|
|
|
|
./system/laptop.nix
|
|
|
|
./system/hyprland.nix
|
|
|
|
];
|
2024-02-26 08:12:26 +00:00
|
|
|
homeModules = [
|
|
|
|
./home/hyprland/default.nix
|
|
|
|
];
|
2024-02-25 06:32:13 +00:00
|
|
|
};
|
2023-12-19 10:10:06 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
Scorch = let
|
|
|
|
hostName = "Scorch";
|
|
|
|
user = "elitherl";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in
|
2024-02-25 06:32:13 +00:00
|
|
|
systemConfig {
|
|
|
|
inherit hostName user system;
|
|
|
|
systemModules = [
|
|
|
|
./system/hyprland.nix
|
|
|
|
];
|
2024-02-26 08:12:26 +00:00
|
|
|
homeModules = [
|
|
|
|
./home/hyprland/default.nix
|
|
|
|
];
|
2024-02-25 06:32:13 +00:00
|
|
|
};
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2024-01-30 14:21:50 +00:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
}
|