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-11-07 09:19:03 +00:00
|
|
|
shell = "zsh";
|
2023-09-10 17:07:11 +01:00
|
|
|
systemModules = [ ./system/hyprland.nix ];
|
2023-10-09 11:40:25 +01:00
|
|
|
homeModules = [
|
|
|
|
./home/accounts/default.nix
|
|
|
|
./home/emacs/default.nix
|
|
|
|
./home/hyprland/default.nix
|
2023-11-08 07:35:03 +00:00
|
|
|
./home/alacritty.nix
|
2023-11-11 19:22:34 +00:00
|
|
|
./home/btop.nix
|
2023-10-09 11:40:25 +01:00
|
|
|
./home/default.nix
|
2023-11-24 08:44:12 +00:00
|
|
|
./home/firefox.nix
|
2023-10-09 11:40:25 +01:00
|
|
|
./home/media.nix
|
|
|
|
./home/pass.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
|
2023-10-26 16:49:11 +01:00
|
|
|
, systemModules ? default.systemModules, 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"
|
2023-11-16 06:26:32 +00:00
|
|
|
"discord"
|
2023-10-15 12:27:16 +01:00
|
|
|
"nomachine-client"
|
2023-11-22 08:50:17 +00:00
|
|
|
"zoom"
|
2023-10-15 12:27:16 +01:00
|
|
|
];
|
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;
|
|
|
|
lightdm.enable = true;
|
|
|
|
};
|
2023-11-12 13:24:09 +00:00
|
|
|
image = ./wallpapers/tokyo-space.png;
|
2023-11-21 17:01:21 +00:00
|
|
|
base16Scheme =
|
|
|
|
"${pkgs.base16-schemes}/share/themes/tokyo-night-dark.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 {
|
|
|
|
emoji = {
|
|
|
|
name = "Noto Color Emoji";
|
|
|
|
package = pkgs.noto-fonts-emoji;
|
|
|
|
};
|
|
|
|
monospace = {
|
2023-11-12 13:24:09 +00:00
|
|
|
name = "FiraMono Nerd Font";
|
|
|
|
package =
|
|
|
|
(pkgs.nerdfonts.override { fonts = [ "FiraMono" ]; });
|
2023-10-18 06:57:42 +01:00
|
|
|
};
|
|
|
|
sansSerif = {
|
|
|
|
name = "Fira Sans";
|
|
|
|
package = pkgs.fira;
|
|
|
|
};
|
|
|
|
serif = sansSerif;
|
|
|
|
};
|
|
|
|
homeManagerIntegration.followSystem = true;
|
|
|
|
};
|
|
|
|
fonts = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
fira
|
|
|
|
fira-mono
|
|
|
|
fira-code
|
2023-11-01 08:37:30 +00:00
|
|
|
(nerdfonts.override {
|
2023-11-07 17:24:33 +00:00
|
|
|
fonts = [ "FiraCode" "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 = {
|
|
|
|
imports = [ ./home/default.nix ];
|
|
|
|
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
|
|
|
|
|
|
|
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;
|
2023-10-09 11:40:25 +01:00
|
|
|
systemModules = [ ./system/default.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
|
|
|
|
./services/matrix.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
|
|
|
};
|
|
|
|
|
|
|
|
Northstar = let
|
|
|
|
hostName = "Northstar";
|
|
|
|
user = "xenia";
|
|
|
|
system = "x86_64-linux";
|
2023-11-30 05:26:43 +00: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
|
|
|
|
|
|
|
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-10-20 22:01:07 +01:00
|
|
|
homeModules = default.homeModules ++ [ ./home/obs.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
|
|
|
}
|