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-10-14 20:49:30 +01:00
|
|
|
watershot = {
|
|
|
|
url = "github:Kirottu/watershot";
|
|
|
|
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-10-12 07:21:40 +01:00
|
|
|
tokyonight-folke = {
|
|
|
|
url = "github:folke/tokyonight.nvim";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-21 20:49:28 +01:00
|
|
|
};
|
2023-06-21 17:41:35 +01:00
|
|
|
|
2023-10-11 07:13:44 +01:00
|
|
|
outputs = { self, nixpkgs, home-manager, stylix, ... }@inputs:
|
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";
|
|
|
|
shell = "zsh";
|
|
|
|
systemModules = [ ./system/hyprland.nix ];
|
|
|
|
serviceModules =
|
|
|
|
[ ./services/sshd/default.nix ./services/syncthing/default.nix ];
|
2023-10-09 11:40:25 +01:00
|
|
|
homeModules = [
|
|
|
|
./home/accounts/default.nix
|
|
|
|
./home/emacs/default.nix
|
|
|
|
./home/ferdium/default.nix
|
|
|
|
./home/hyprland/default.nix
|
|
|
|
./home/alacritty.nix
|
|
|
|
./home/default.nix
|
|
|
|
./home/firefox.nix
|
|
|
|
./home/kdeconnect.nix
|
|
|
|
./home/media.nix
|
|
|
|
./home/pass.nix
|
|
|
|
./home/zathura.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-10-09 11:40:25 +01:00
|
|
|
specialArgs = {
|
2023-10-11 07:13:44 +01:00
|
|
|
inherit hostName user;
|
2023-10-14 20:49:30 +01:00
|
|
|
inherit (inputs) anyrun watershot;
|
2023-10-09 11:40:25 +01:00
|
|
|
};
|
2023-09-13 06:45:28 +01:00
|
|
|
extraSpecialArgs = specialArgs // {
|
2023-10-12 07:21:40 +01:00
|
|
|
inherit (inputs) doom-emacs gitui tokyonight-folke;
|
2023-09-13 06:45:28 +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-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-09 11:40:25 +01:00
|
|
|
programs.${shell}.enable = true;
|
2023-10-15 12:27:16 +01:00
|
|
|
nix = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
channel.enable = false;
|
|
|
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
|
|
registry = {
|
|
|
|
nixpkgs.to = {
|
|
|
|
type = "path";
|
|
|
|
path = pkgs.path;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
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; };
|
|
|
|
networking = { inherit hostName; };
|
|
|
|
users.users.${user} = {
|
|
|
|
inherit group;
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Evie Litherland-Smith";
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "video" ];
|
|
|
|
shell = pkgs.${shell};
|
|
|
|
initialHashedPassword =
|
|
|
|
"$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
|
|
|
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 = {
|
|
|
|
inherit extraSpecialArgs;
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users.${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-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-09-10 17:07:11 +01:00
|
|
|
serviceModules = [
|
2023-10-09 08:39:46 +01:00
|
|
|
# ./services/adguardhome/default.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
./services/gitea/default.nix
|
|
|
|
./services/nextcloud/default.nix
|
|
|
|
./services/sshd/default.nix
|
|
|
|
./services/syncthing/default.nix
|
2023-10-09 08:39:46 +01:00
|
|
|
# ./services/terraria/windy_limbo_of_melancholy.nix
|
|
|
|
# ./services/traefik/adguardhome.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
./services/traefik/gitea.nix
|
|
|
|
./services/traefik/nextcloud.nix
|
2023-10-09 08:39:46 +01:00
|
|
|
# ./services/traefik/qbittorrent.nix
|
2023-09-10 17:07:11 +01:00
|
|
|
];
|
2023-10-09 11:40:25 +01:00
|
|
|
homeModules = [ ./home/default.nix ];
|
2023-09-10 17:07:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
}
|