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-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
|
2023-11-21 17:01:21 +00:00
|
|
|
outputs = { nixpkgs, home-manager, stylix, ... }:
|
2023-08-31 12:22:29 +01:00
|
|
|
let
|
2023-09-10 17:07:11 +01:00
|
|
|
default = {
|
|
|
|
hostName = "Atlas";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
|
|
|
group = "users";
|
2023-12-26 08:06:29 +00:00
|
|
|
shell = "zsh";
|
2023-09-10 17:07:11 +01:00
|
|
|
systemModules = [ ./system/hyprland.nix ];
|
2024-01-07 12:44:16 +00:00
|
|
|
serviceModules = [ ];
|
2023-10-09 11:40:25 +01:00
|
|
|
homeModules = [
|
2024-01-05 15:26:30 +00:00
|
|
|
./home/default.nix
|
|
|
|
./home/emacs.nix
|
2023-10-09 11:40:25 +01:00
|
|
|
./home/accounts/default.nix
|
|
|
|
./home/hyprland/default.nix
|
2023-12-15 13:13:01 +00:00
|
|
|
./home/nyxt/default.nix
|
2023-10-09 11:40:25 +01:00
|
|
|
];
|
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
|
2024-01-07 12:44:16 +00:00
|
|
|
, systemModules ? default.systemModules
|
|
|
|
, serviceModules ? default.serviceModules
|
2023-09-10 17:07:11 +01:00
|
|
|
, homeModules ? default.homeModules, stateVersion ? default.stateVersion
|
|
|
|
}:
|
2023-11-21 17:01:21 +00:00
|
|
|
let specialArgs = { inherit hostName user; };
|
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-10-15 12:27:16 +01:00
|
|
|
({ config, lib, pkgs, ... }: {
|
2023-10-09 14:48:40 +01:00
|
|
|
boot.loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
2023-10-23 08:29:58 +01:00
|
|
|
programs = {
|
|
|
|
${shell}.enable = true;
|
|
|
|
nano = {
|
|
|
|
enable = true;
|
|
|
|
syntaxHighlight = true;
|
|
|
|
nanorc = ''
|
|
|
|
set nowrap
|
|
|
|
set tabstospaces
|
|
|
|
set tabsize 2
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-10-15 12:27:16 +01:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
2023-11-14 11:43:47 +00:00
|
|
|
channel.enable = true;
|
2023-10-15 12:27:16 +01:00
|
|
|
registry = {
|
|
|
|
nixpkgs.to = {
|
|
|
|
type = "path";
|
|
|
|
path = pkgs.path;
|
|
|
|
};
|
|
|
|
};
|
2023-11-27 15:19:26 +00:00
|
|
|
nixPath = [ "nixpkgs=${nixpkgs}" ];
|
2023-10-15 12:27:16 +01:00
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
};
|
|
|
|
optimise.automatic = true;
|
|
|
|
extraOptions = ''
|
|
|
|
keep-outputs = true
|
|
|
|
keep-derivations = true
|
|
|
|
min-free = ${toString (100 * 1024 * 1024)}
|
|
|
|
max-free = ${toString (1024 * 1024 * 1024)}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"steam"
|
|
|
|
"steam-original"
|
|
|
|
"steam-run"
|
|
|
|
"nomachine-client"
|
|
|
|
];
|
2023-10-09 11:40:25 +01:00
|
|
|
system = { inherit stateVersion; };
|
2023-11-20 08:19:13 +00:00
|
|
|
networking = {
|
|
|
|
inherit hostName;
|
|
|
|
firewall.enable = true;
|
|
|
|
};
|
2023-10-18 06:57:42 +01:00
|
|
|
stylix = {
|
2023-11-12 13:24:09 +00:00
|
|
|
autoEnable = false;
|
2023-11-12 14:35:23 +00:00
|
|
|
targets = {
|
2023-11-13 11:15:54 +00:00
|
|
|
chromium.enable = true;
|
2023-11-12 14:13:03 +00:00
|
|
|
console.enable = true;
|
2023-12-18 08:34:16 +00:00
|
|
|
lightdm.enable = true;
|
2023-11-12 14:13:03 +00:00
|
|
|
};
|
2023-12-18 08:50:43 +00:00
|
|
|
image = ./wallpapers/space.png;
|
2023-11-21 17:01:21 +00:00
|
|
|
base16Scheme =
|
2023-12-18 08:15:18 +00:00
|
|
|
"${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
2023-10-18 06:57:42 +01:00
|
|
|
polarity = "dark";
|
|
|
|
opacity = {
|
2023-11-21 17:01:21 +00:00
|
|
|
popups = 0.5;
|
2023-10-18 06:57:42 +01:00
|
|
|
terminal = 0.8;
|
|
|
|
};
|
|
|
|
fonts = rec {
|
2023-12-28 11:37:22 +00:00
|
|
|
sizes.terminal = 14;
|
2023-10-18 06:57:42 +01:00
|
|
|
emoji = {
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
package = pkgs.noto-fonts-emoji;
|
|
|
|
};
|
|
|
|
monospace = {
|
2023-12-18 13:20:01 +00:00
|
|
|
name = "JetBrainsMono Nerd Font";
|
|
|
|
package = (pkgs.nerdfonts.override {
|
|
|
|
fonts = [ "JetBrainsMono" ];
|
|
|
|
});
|
2023-10-18 06:57:42 +01:00
|
|
|
};
|
|
|
|
sansSerif = {
|
2023-12-18 13:20:01 +00:00
|
|
|
name = "Noto Sans";
|
|
|
|
package = pkgs.noto-fonts;
|
2023-10-18 06:57:42 +01:00
|
|
|
};
|
|
|
|
serif = sansSerif;
|
|
|
|
};
|
|
|
|
homeManagerIntegration.followSystem = true;
|
|
|
|
};
|
|
|
|
fonts = {
|
|
|
|
packages = with pkgs; [
|
2023-12-18 13:20:01 +00:00
|
|
|
noto-fonts
|
|
|
|
noto-fonts-emoji
|
|
|
|
jetbrains-mono
|
2023-11-01 08:37:30 +00:00
|
|
|
(nerdfonts.override {
|
2023-12-18 13:20:01 +00:00
|
|
|
fonts = [ "JetBrainsMono" "NerdFontsSymbolsOnly" ];
|
2023-11-01 08:37:30 +00:00
|
|
|
})
|
|
|
|
emacs-all-the-icons-fonts
|
|
|
|
weather-icons
|
2023-10-18 06:57:42 +01:00
|
|
|
noto-fonts
|
|
|
|
noto-fonts-cjk
|
|
|
|
noto-fonts-emoji
|
|
|
|
liberation_ttf
|
|
|
|
];
|
2023-11-08 09:53:41 +00:00
|
|
|
fontconfig.enable = true;
|
2023-10-18 06:57:42 +01:00
|
|
|
};
|
2023-10-22 06:52:38 +01:00
|
|
|
users.users = let
|
|
|
|
authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANfkqd5lPTsSPU3SRYnAa1UjCYDmDeBTyzq5McmWlm6 xenia@Vanguard"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar"
|
|
|
|
];
|
|
|
|
in {
|
2023-11-10 07:18:13 +00:00
|
|
|
root.openssh = { inherit authorizedKeys; };
|
2023-10-22 06:38:40 +01:00
|
|
|
${user} = {
|
|
|
|
inherit group;
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Evie Litherland-Smith";
|
2023-11-10 07:18:13 +00:00
|
|
|
extraGroups =
|
|
|
|
[ "networkmanager" "wheel" "video" "input" "uinput" ];
|
2023-10-22 06:38:40 +01:00
|
|
|
shell = pkgs.${shell};
|
|
|
|
initialHashedPassword =
|
|
|
|
"$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
2023-10-22 06:52:38 +01:00
|
|
|
openssh = { inherit authorizedKeys; };
|
2023-10-22 06:38:40 +01:00
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
2023-10-18 06:43:41 +01:00
|
|
|
users = {
|
|
|
|
root = {
|
2023-12-31 13:20:31 +00:00
|
|
|
imports = [ ./home/default.nix ];
|
2023-10-18 06:43:41 +01:00
|
|
|
home = {
|
|
|
|
inherit stateVersion;
|
|
|
|
username = "root";
|
|
|
|
homeDirectory = "/root";
|
|
|
|
};
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
};
|
|
|
|
${user} = let
|
|
|
|
username = user;
|
|
|
|
homeDirectory = "/home/${user}";
|
|
|
|
in {
|
|
|
|
imports =
|
|
|
|
[ ./hosts/${hostName}/home.nix ./home/default.nix ]
|
|
|
|
++ homeModules;
|
|
|
|
home = { inherit username homeDirectory stateVersion; };
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
xdg.userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
extraConfig = {
|
|
|
|
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
|
|
|
|
};
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
2023-09-10 17:07:11 +01:00
|
|
|
] ++ 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
|
|
|
|
2024-01-07 12:44:16 +00:00
|
|
|
## Server
|
|
|
|
|
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;
|
2024-01-07 12:44:16 +00:00
|
|
|
systemModules = [ ./system/default.nix ./system/autoupgrade.nix ];
|
2023-10-26 16:49:11 +01:00
|
|
|
serviceModules = [
|
2023-11-20 08:19:13 +00:00
|
|
|
./services/adguardhome.nix
|
2023-11-23 08:40:32 +00:00
|
|
|
./services/caddy.nix
|
2023-11-20 08:19:13 +00:00
|
|
|
./services/gitea.nix
|
2023-11-23 08:40:32 +00:00
|
|
|
./services/grafana.nix
|
2023-11-20 08:19:13 +00:00
|
|
|
./services/nextcloud.nix
|
|
|
|
./services/ntfy-sh.nix
|
|
|
|
./services/sshd.nix
|
|
|
|
./services/syncthing.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
];
|
2023-11-14 10:16:49 +00:00
|
|
|
homeModules = [ ./home/default.nix ];
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
|
|
|
|
2024-01-07 12:44:16 +00:00
|
|
|
## Laptops
|
|
|
|
|
2023-09-10 17:07:11 +01:00
|
|
|
Northstar = let
|
|
|
|
hostName = "Northstar";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
2023-12-16 22:44:24 +00:00
|
|
|
in systemConfig { inherit hostName user system; };
|
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
|
|
|
|
2024-01-07 12:44:16 +00:00
|
|
|
## Desktops
|
|
|
|
|
2023-12-19 10:10:06 +00:00
|
|
|
Scorch = let
|
|
|
|
hostName = "Scorch";
|
|
|
|
user = "elitherl";
|
|
|
|
system = "x86_64-linux";
|
2024-01-07 12:44:16 +00:00
|
|
|
in systemConfig {
|
|
|
|
inherit hostName user system;
|
|
|
|
systemModules = default.systemModules ++ [ ./system/autoupgrade.nix ];
|
|
|
|
};
|
2023-12-19 10:10:06 +00:00
|
|
|
|
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;
|
2024-01-07 12:44:16 +00:00
|
|
|
systemModules = default.systemModules
|
|
|
|
++ [ ./system/autoupgrade.nix ./system/steam.nix ];
|
2024-01-06 11:07:18 +00:00
|
|
|
homeModules = default.homeModules ++ [ ./home/games/default.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
|
|
|
}
|