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"];
|
2024-04-17 18:04:43 +01:00
|
|
|
extra-trusted-public-keys = ["nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI="];
|
2024-03-02 16:57:02 +00:00
|
|
|
};
|
|
|
|
|
2023-06-21 20:49:28 +01:00
|
|
|
inputs = {
|
2024-03-31 12:59:24 +01:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
2023-06-21 20:49:28 +01:00
|
|
|
home-manager = {
|
2024-03-31 12:59:24 +01:00
|
|
|
url = "github:nix-community/home-manager/release-23.11";
|
2023-07-13 12:41:00 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-03-12 05:46:32 +00:00
|
|
|
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
|
2024-03-31 12:59:24 +01:00
|
|
|
base16.url = "github:SenchoPens/base16.nix";
|
|
|
|
tt-schemes = {
|
|
|
|
url = "github:tinted-theming/schemes";
|
|
|
|
flake = false;
|
|
|
|
};
|
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 = {
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
2024-03-03 21:16:22 +00:00
|
|
|
iosevka-custom,
|
2024-03-31 12:59:24 +01:00
|
|
|
base16,
|
|
|
|
tt-schemes,
|
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-03-31 12:59:24 +01:00
|
|
|
fonts = with import nixpkgs {inherit system;};
|
|
|
|
with iosevka-custom.outputs; rec {
|
|
|
|
sizes = {
|
2024-04-17 13:39:18 +01:00
|
|
|
applications = 14;
|
2024-04-21 13:08:25 +01:00
|
|
|
desktop = 12;
|
|
|
|
popups = 20;
|
2024-04-17 13:39:18 +01:00
|
|
|
terminal = 14;
|
2024-03-31 12:59:24 +01:00
|
|
|
};
|
|
|
|
serif = sansSerif;
|
|
|
|
sansSerif = {
|
|
|
|
name = names."iosevka-custom-aile";
|
|
|
|
package = packages.${system}."iosevka-custom-aile";
|
|
|
|
};
|
|
|
|
monospace = {
|
|
|
|
name = names."iosevka-custom-nerdfont";
|
|
|
|
package = packages.${system}."iosevka-custom-nerdfont";
|
|
|
|
};
|
|
|
|
emoji = {
|
2024-04-02 17:32:56 +01:00
|
|
|
name = "Noto Color Emoji";
|
|
|
|
package = noto-fonts-emoji;
|
2024-03-31 12:59:24 +01:00
|
|
|
};
|
|
|
|
};
|
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-03-31 12:59:24 +01:00
|
|
|
base16.nixosModule
|
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
|
|
|
({
|
2024-03-31 12:59:24 +01:00
|
|
|
config,
|
2024-02-26 08:12:26 +00:00
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-03-31 12:59:24 +01:00
|
|
|
catppuccinVariant ? "Mocha",
|
2024-02-26 08:12:26 +00:00
|
|
|
...
|
|
|
|
}: {
|
2024-03-31 12:59:24 +01:00
|
|
|
scheme = "${tt-schemes}/base16/catppuccin-${lib.strings.toLower catppuccinVariant}.yaml";
|
2024-01-19 09:47:14 +00:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
2024-04-19 10:53:09 +01:00
|
|
|
package = pkgs.nixVersions.unstable;
|
2024-01-19 09:47:14 +00:00
|
|
|
settings = {
|
2024-03-13 07:03:49 +00:00
|
|
|
cores = 0;
|
|
|
|
max-jobs = "auto";
|
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-08 08:03:03 +00:00
|
|
|
system = {inherit stateVersion;};
|
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"
|
2024-04-20 17:31:44 +01:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4M1zV3yLMMI1tYwdY9QDXJDlOBugm7UXKC+Xk89yHq pixelifytica@Vanguard"
|
2024-04-20 13:06:48 +01:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN3fRij9Tm6davrSQOPYEZP7CdZdZ0D9ogWXWjpTs40e pixelifytica@Northstar"
|
2024-02-11 07:16:08 +00:00
|
|
|
];
|
|
|
|
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-03-31 12:59:24 +01:00
|
|
|
extraSpecialArgs = {inherit (config) scheme;} // 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 {
|
2024-04-12 21:17:54 +01:00
|
|
|
nixosConfigurations = {
|
2024-01-30 14:21:50 +00:00
|
|
|
## 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/caddy.nix
|
2024-03-31 18:06:01 +01:00
|
|
|
./services/forgejo.nix
|
2024-03-08 07:01:08 +00:00
|
|
|
./services/grafana.nix
|
|
|
|
./services/minecraft.nix
|
2024-04-16 06:58:21 +01:00
|
|
|
./services/nix-serve.nix
|
|
|
|
./services/radicale.nix
|
2024-03-08 07:01:08 +00:00
|
|
|
./services/sshd.nix
|
|
|
|
./services/syncthing.nix
|
|
|
|
];
|
2024-03-17 11:03:59 +00:00
|
|
|
homeModules = [./home/default.nix];
|
2024-03-08 07:01:08 +00:00
|
|
|
};
|
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-03-08 08:01:13 +00:00
|
|
|
Northstar = systemConfig {
|
2024-01-30 14:21:50 +00:00
|
|
|
hostName = "Northstar";
|
2024-04-12 21:17:54 +01:00
|
|
|
systemModules = [
|
|
|
|
./system/laptop.nix
|
|
|
|
./system/sway.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/sway/default.nix
|
2024-04-17 09:01:59 +01:00
|
|
|
./home/email/work.nix
|
2024-04-12 21:17:54 +01:00
|
|
|
];
|
2024-03-08 08:01:13 +00:00
|
|
|
};
|
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-04-12 21:17:54 +01:00
|
|
|
systemModules = [
|
2024-04-13 07:28:53 +01:00
|
|
|
./system/desktop.nix
|
2024-04-12 21:17:54 +01:00
|
|
|
./system/games.nix
|
|
|
|
./system/sway.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/sway/default.nix
|
2024-04-17 09:01:59 +01:00
|
|
|
./home/email/work.nix
|
2024-04-12 21:17:54 +01:00
|
|
|
];
|
2024-03-08 07:30:18 +00:00
|
|
|
};
|
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-03-08 08:01:13 +00:00
|
|
|
Ronin = systemConfig {
|
2024-01-30 14:21:50 +00:00
|
|
|
hostName = "Ronin";
|
|
|
|
user = "elitherl";
|
2024-04-12 21:17:54 +01:00
|
|
|
systemModules = [
|
|
|
|
./system/laptop.nix
|
|
|
|
./system/sway.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/sway/default.nix
|
|
|
|
./home/email/work.nix
|
|
|
|
];
|
2024-03-08 08:01:13 +00:00
|
|
|
};
|
2023-12-19 10:10:06 +00:00
|
|
|
|
2024-03-08 08:01:13 +00:00
|
|
|
Scorch = systemConfig {
|
2024-01-30 14:21:50 +00:00
|
|
|
hostName = "Scorch";
|
|
|
|
user = "elitherl";
|
2024-04-12 21:17:54 +01:00
|
|
|
systemModules = [
|
|
|
|
./system/desktop.nix
|
|
|
|
./system/sway.nix
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./home/sway/default.nix
|
|
|
|
./home/email/work.nix
|
|
|
|
];
|
2024-03-08 08:01: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
|
|
|
}
|