2021-12-21 21:48:41 +00:00
|
|
|
{
|
|
|
|
description = "My deploy-rs config for logos";
|
|
|
|
|
|
|
|
inputs = {
|
2021-12-21 23:02:15 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2021-12-21 21:48:41 +00:00
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
2021-12-21 23:02:15 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2021-12-21 21:48:41 +00:00
|
|
|
utils.url = "github:numtide/flake-utils";
|
2022-04-16 14:03:59 +00:00
|
|
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
2022-11-04 21:00:40 +00:00
|
|
|
|
2022-07-03 12:39:45 +00:00
|
|
|
nixpkgs-master.url = "nixpkgs/master";
|
2022-11-04 21:00:40 +00:00
|
|
|
akkoma.url = "github:illdefined/nixpkgs/akkoma";
|
2021-12-26 17:01:31 +00:00
|
|
|
|
2022-04-24 01:52:16 +00:00
|
|
|
wsl = {
|
|
|
|
url = "github:nix-community/NixOS-WSL";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "utils";
|
|
|
|
};
|
|
|
|
|
2021-12-26 17:01:31 +00:00
|
|
|
# my apps
|
2022-02-19 21:55:47 +00:00
|
|
|
printerfacts = {
|
2022-02-19 19:24:42 +00:00
|
|
|
url = "git+https://tulpa.dev/cadey/printerfacts.git?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "utils";
|
|
|
|
};
|
2022-02-19 21:55:47 +00:00
|
|
|
mara = {
|
2022-02-19 19:24:42 +00:00
|
|
|
url = "git+https://tulpa.dev/Xe/mara.git?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.utils.follows = "utils";
|
|
|
|
};
|
2022-02-19 20:30:02 +00:00
|
|
|
rhea = {
|
|
|
|
url = "github:Xe/rhea";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-02-19 20:43:12 +00:00
|
|
|
waifud = {
|
|
|
|
url = "github:Xe/waifud";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.utils.follows = "utils";
|
|
|
|
};
|
2022-04-30 01:53:51 +00:00
|
|
|
x = {
|
|
|
|
url = "github:Xe/x";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.utils.follows = "utils";
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
outputs = { self, nixpkgs, deploy-rs, home-manager, agenix, printerfacts, mara
|
2022-11-04 21:00:40 +00:00
|
|
|
, rhea, waifud, emacs-overlay, wsl, x, nixpkgs-master, akkoma, ... }:
|
2021-12-21 23:02:15 +00:00
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
2022-07-03 12:39:45 +00:00
|
|
|
pkgsMaster = nixpkgs-master.legacyPackages."x86_64-linux";
|
2022-05-09 11:39:47 +00:00
|
|
|
|
2021-12-21 23:02:15 +00:00
|
|
|
mkSystem = extraModules:
|
2021-12-26 17:01:31 +00:00
|
|
|
nixpkgs.lib.nixosSystem rec {
|
2021-12-21 23:02:15 +00:00
|
|
|
system = "x86_64-linux";
|
2021-12-21 23:59:45 +00:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.age
|
|
|
|
home-manager.nixosModules.home-manager
|
2022-02-19 21:55:47 +00:00
|
|
|
|
2021-12-22 00:02:15 +00:00
|
|
|
({ config, ... }: {
|
|
|
|
system.configurationRevision = self.sourceInfo.rev;
|
2021-12-22 16:57:09 +00:00
|
|
|
services.getty.greetingLine =
|
|
|
|
"<<< Welcome to NixOS ${config.system.nixos.label} @ ${self.sourceInfo.rev} - \\l >>>";
|
2021-12-22 17:26:40 +00:00
|
|
|
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2022-07-03 12:39:45 +00:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
emacs-overlay.overlay
|
2022-10-30 13:30:54 +00:00
|
|
|
(self: super: {
|
2022-11-04 21:00:40 +00:00
|
|
|
inherit (akkoma.legacyPackages.${super.system})
|
|
|
|
akkoma akkoma-frontends;
|
2022-10-29 18:00:59 +00:00
|
|
|
})
|
2022-07-03 12:39:45 +00:00
|
|
|
];
|
2021-12-22 00:02:15 +00:00
|
|
|
})
|
2022-02-01 01:20:26 +00:00
|
|
|
./common
|
2022-02-01 01:59:24 +00:00
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
printerfacts.nixosModules.${system}.printerfacts
|
|
|
|
mara.nixosModules.${system}.bot
|
|
|
|
rhea.nixosModule.${system}
|
2022-04-30 01:53:51 +00:00
|
|
|
x.nixosModules.${system}.robocadey
|
2022-02-19 21:55:47 +00:00
|
|
|
|
2021-12-21 23:59:45 +00:00
|
|
|
] ++ extraModules;
|
2021-12-21 23:02:15 +00:00
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
in {
|
2022-04-16 14:07:22 +00:00
|
|
|
devShells.x86_64-linux.default = pkgs.mkShell {
|
2021-12-21 23:56:26 +00:00
|
|
|
buildInputs = [
|
|
|
|
deploy-rs.packages.x86_64-linux.deploy-rs
|
|
|
|
agenix.packages.x86_64-linux.agenix
|
2022-07-03 12:39:45 +00:00
|
|
|
pkgsMaster.vim
|
2021-12-21 23:56:26 +00:00
|
|
|
];
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2022-12-09 20:26:14 +00:00
|
|
|
nixosModules = {
|
|
|
|
home-manager = import ./common/home-manager;
|
|
|
|
workVM = ({ pkgs, config, ... }: {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
|
|
|
|
nixpkgs.overlays = [ emacs-overlay.overlay ];
|
|
|
|
|
|
|
|
nix.package = pkgs.nixVersions.stable;
|
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
|
|
|
|
security.pam.loginLimits = [{
|
|
|
|
domain = "*";
|
|
|
|
type = "soft";
|
|
|
|
item = "nofile";
|
|
|
|
value = "unlimited";
|
|
|
|
}];
|
|
|
|
|
|
|
|
services.journald.extraConfig = ''
|
|
|
|
SystemMaxUse=100M
|
|
|
|
MaxFileSec=7day
|
|
|
|
'';
|
|
|
|
|
|
|
|
services.resolved = {
|
|
|
|
enable = true;
|
|
|
|
dnssec = "false";
|
|
|
|
};
|
|
|
|
|
|
|
|
users.groups.xe = { };
|
|
|
|
users.users.xe = {
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
"docker"
|
|
|
|
"audio"
|
|
|
|
"plugdev"
|
|
|
|
"libvirtd"
|
|
|
|
"adbusers"
|
|
|
|
"dialout"
|
|
|
|
"within"
|
|
|
|
];
|
|
|
|
shell = pkgs.fish;
|
|
|
|
isNormalUser = true;
|
|
|
|
group = "xe";
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.binfmt.emulatedSystems = [ "wasm32-wasi" ];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [ mosh flyctl ];
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
|
|
|
services.tailscale.enable = true;
|
|
|
|
|
|
|
|
home-manager.users.xe = { lib, ... }:
|
|
|
|
let
|
|
|
|
name = "Xe Iaso";
|
|
|
|
email = "xe@tailscale.com";
|
|
|
|
commitTemplate = pkgs.writeTextFile {
|
|
|
|
name = "xe-commit-template";
|
|
|
|
text = ''
|
|
|
|
Signed-off-by: ${name} <${email}>
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
imports = [ ./common/home-manager ];
|
|
|
|
|
|
|
|
within = {
|
|
|
|
emacs.enable = true;
|
|
|
|
fish.enable = true;
|
|
|
|
neofetch.enable = true;
|
|
|
|
vim.enable = true;
|
|
|
|
tmux.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.lorri.enable = true;
|
|
|
|
services.emacs.enable = lib.mkForce false;
|
|
|
|
programs.direnv.enable = true;
|
|
|
|
programs.direnv.nix-direnv.enable = true;
|
|
|
|
|
|
|
|
programs.git = {
|
|
|
|
package = pkgs.gitAndTools.gitFull;
|
|
|
|
enable = true;
|
|
|
|
userName = name;
|
|
|
|
userEmail = email;
|
|
|
|
ignores = [ "*~" "*.swp" "*.#" ];
|
|
|
|
delta.enable = true;
|
|
|
|
extraConfig = {
|
|
|
|
commit.template = "${commitTemplate}";
|
|
|
|
core.editor = "vim";
|
|
|
|
color.ui = "auto";
|
|
|
|
credential.helper = "store --file ~/.git-credentials";
|
|
|
|
format.signoff = true;
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
protocol.keybase.allow = "always";
|
|
|
|
pull.rebase = "true";
|
|
|
|
push.default = "current";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2021-12-22 16:57:09 +00:00
|
|
|
nixosConfigurations = {
|
2022-04-24 01:52:16 +00:00
|
|
|
# wsl
|
|
|
|
xatci = nixpkgs.lib.nixosSystem rec {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
wsl.nixosModules.wsl
|
|
|
|
|
|
|
|
({ config, ... }: {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
|
|
|
|
nixpkgs.overlays = [ emacs-overlay.overlay ];
|
|
|
|
|
|
|
|
networking.hostName = "xatci";
|
2022-04-24 02:23:55 +00:00
|
|
|
networking.nameservers = [ "100.100.100.100" ];
|
|
|
|
networking.search = [ "shark-harmonic.ts.net" ];
|
2022-04-24 01:52:16 +00:00
|
|
|
|
|
|
|
wsl = {
|
|
|
|
enable = true;
|
|
|
|
automountPath = "/mnt";
|
|
|
|
defaultUser = "cadey";
|
|
|
|
startMenuLaunchers = true;
|
|
|
|
};
|
|
|
|
|
2022-09-26 17:20:13 +00:00
|
|
|
nix.package = pkgs.nixVersions.stable;
|
2022-04-24 01:52:16 +00:00
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
|
|
|
|
users.users.cadey = {
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
"docker"
|
|
|
|
"audio"
|
|
|
|
"plugdev"
|
|
|
|
"libvirtd"
|
|
|
|
"adbusers"
|
|
|
|
"dialout"
|
|
|
|
"within"
|
|
|
|
];
|
|
|
|
shell = pkgs.fish;
|
|
|
|
};
|
|
|
|
|
2022-05-14 15:49:44 +00:00
|
|
|
environment.systemPackages = with pkgs; [ mosh flyctl ];
|
|
|
|
virtualisation.docker.enable = true;
|
2022-04-24 14:46:35 +00:00
|
|
|
|
2022-04-24 02:08:13 +00:00
|
|
|
home-manager.users.cadey = { lib, ... }:
|
2022-04-24 01:52:16 +00:00
|
|
|
let
|
|
|
|
name = "Xe Iaso";
|
2022-09-26 17:20:13 +00:00
|
|
|
email = "me@xeiaso.net";
|
2022-04-24 01:52:16 +00:00
|
|
|
commitTemplate = pkgs.writeTextFile {
|
|
|
|
name = "cadey-commit-template";
|
|
|
|
text = ''
|
|
|
|
Signed-off-by: ${name} <${email}>
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in {
|
2022-04-30 01:53:51 +00:00
|
|
|
imports = [ ./common/home-manager ];
|
2022-04-24 01:52:16 +00:00
|
|
|
|
|
|
|
within = {
|
2022-04-24 02:08:13 +00:00
|
|
|
emacs.enable = true;
|
2022-04-24 01:52:16 +00:00
|
|
|
fish.enable = true;
|
|
|
|
neofetch.enable = true;
|
|
|
|
vim.enable = true;
|
2022-04-24 02:08:13 +00:00
|
|
|
tmux.enable = true;
|
2022-04-24 01:52:16 +00:00
|
|
|
};
|
|
|
|
|
2022-04-24 02:08:13 +00:00
|
|
|
services.emacs.enable = lib.mkForce false;
|
2022-04-24 02:23:55 +00:00
|
|
|
programs.direnv.enable = true;
|
|
|
|
programs.direnv.nix-direnv.enable = true;
|
2022-04-30 01:53:51 +00:00
|
|
|
|
2022-04-24 01:52:16 +00:00
|
|
|
programs.git = {
|
|
|
|
package = pkgs.gitAndTools.gitFull;
|
|
|
|
enable = true;
|
|
|
|
userName = name;
|
|
|
|
userEmail = email;
|
|
|
|
ignores = [ "*~" "*.swp" "*.#" ];
|
|
|
|
delta.enable = true;
|
|
|
|
extraConfig = {
|
|
|
|
commit.template = "${commitTemplate}";
|
|
|
|
core.editor = "vim";
|
|
|
|
color.ui = "auto";
|
|
|
|
credential.helper = "store --file ~/.git-credentials";
|
|
|
|
format.signoff = true;
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
protocol.keybase.allow = "always";
|
|
|
|
pull.rebase = "true";
|
|
|
|
push.default = "current";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-12-24 03:57:09 +00:00
|
|
|
keitai = mkSystem [ ./hosts/keitai ./hardware/location/YOW ];
|
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
# avalon
|
2022-02-01 01:38:05 +00:00
|
|
|
chrysalis = mkSystem [ ./hosts/chrysalis ./hardware/location/YOW ];
|
2022-04-15 15:07:21 +00:00
|
|
|
|
2022-04-24 01:52:16 +00:00
|
|
|
itsuki = mkSystem [ ./hosts/itsuki ./hardware/location/YOW ];
|
2022-04-15 15:51:32 +00:00
|
|
|
|
2022-04-15 15:20:52 +00:00
|
|
|
kos-mos = mkSystem [
|
|
|
|
./hosts/kos-mos
|
|
|
|
./hardware/alrest
|
|
|
|
./hardware/location/YOW
|
|
|
|
waifud.nixosModules.x86_64-linux.waifud-runner
|
|
|
|
];
|
|
|
|
|
2022-02-19 21:00:43 +00:00
|
|
|
logos = mkSystem [
|
|
|
|
./hosts/logos
|
|
|
|
./hardware/alrest
|
|
|
|
./hardware/location/YOW
|
|
|
|
waifud.nixosModules.x86_64-linux.waifud-runner
|
|
|
|
];
|
2021-12-22 16:57:09 +00:00
|
|
|
|
2022-04-15 15:07:21 +00:00
|
|
|
ontos = mkSystem [
|
|
|
|
./hosts/ontos
|
|
|
|
./hardware/alrest
|
|
|
|
./hardware/location/YOW
|
|
|
|
waifud.nixosModules.x86_64-linux.waifud-runner
|
|
|
|
];
|
|
|
|
|
2022-04-15 15:26:19 +00:00
|
|
|
pneuma = mkSystem [
|
|
|
|
./hosts/pneuma
|
|
|
|
./hardware/alrest
|
|
|
|
./hardware/location/YOW
|
|
|
|
waifud.nixosModules.x86_64-linux.waifud-runner
|
|
|
|
];
|
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
# cloud
|
2022-11-04 21:00:40 +00:00
|
|
|
akko = mkSystem [
|
|
|
|
({ ... }: {
|
|
|
|
imports =
|
|
|
|
[ "${akkoma}/nixos/modules/services/web-apps/akkoma.nix" ];
|
|
|
|
})
|
|
|
|
./hosts/akko
|
|
|
|
./hardware/location/YYZ
|
|
|
|
];
|
|
|
|
|
2022-04-15 15:35:25 +00:00
|
|
|
firgu = mkSystem [ ./hosts/firgu ./hardware/location/YYZ ];
|
2022-02-19 21:55:47 +00:00
|
|
|
|
2021-12-22 16:57:09 +00:00
|
|
|
# vms
|
|
|
|
## logos
|
|
|
|
hugo = mkSystem [ ./hosts/vm/hugo ./hardware/libvirt-generic ];
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
|
2022-11-04 21:00:40 +00:00
|
|
|
deploy.nodes.akko = {
|
|
|
|
hostname = "akko.within.website";
|
2022-02-01 01:20:26 +00:00
|
|
|
sshUser = "root";
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
2022-11-04 21:00:40 +00:00
|
|
|
self.nixosConfigurations.akko;
|
2022-02-01 01:20:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-11-04 22:36:37 +00:00
|
|
|
deploy.nodes.firgu = {
|
|
|
|
hostname = "149.248.59.1";
|
|
|
|
sshUser = "root";
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.firgu;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes.chrysalis = {
|
|
|
|
hostname = "192.168.2.29";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.chrysalis;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes.itsuki = {
|
|
|
|
hostname = "192.168.2.174";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.itsuki;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes.logos = {
|
|
|
|
hostname = "192.168.2.35";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.logos;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes.kos-mos = {
|
|
|
|
hostname = "192.168.2.32";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.kos-mos;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes.ontos = {
|
|
|
|
hostname = "192.168.2.34";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.ontos;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes.pneuma = {
|
|
|
|
hostname = "192.168.2.33";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.pneuma;
|
|
|
|
};
|
|
|
|
};
|
2021-12-22 16:57:09 +00:00
|
|
|
|
2021-12-21 21:48:41 +00:00
|
|
|
# This is highly advised, and will prevent many possible mistakes
|
2022-11-04 22:36:37 +00:00
|
|
|
checks = builtins.mapAttrs
|
|
|
|
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
}
|