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";
|
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-04-30 01:53:51 +00:00
|
|
|
, rhea, waifud, emacs-overlay, wsl, x, ... }:
|
2021-12-21 23:02:15 +00:00
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
|
|
|
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-04-24 02:23:55 +00:00
|
|
|
nixpkgs.overlays = [ emacs-overlay.overlay ];
|
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
|
|
|
|
];
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
nix.package = pkgs.nixFlakes;
|
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
|
|
|
|
users.users.cadey = {
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
"docker"
|
|
|
|
"audio"
|
|
|
|
"plugdev"
|
|
|
|
"libvirtd"
|
|
|
|
"adbusers"
|
|
|
|
"dialout"
|
|
|
|
"within"
|
|
|
|
];
|
|
|
|
shell = pkgs.fish;
|
|
|
|
};
|
|
|
|
|
2022-04-24 14:46:35 +00:00
|
|
|
environment.systemPackages = with pkgs; [ mosh ];
|
|
|
|
|
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";
|
|
|
|
email = "me@christine.website";
|
|
|
|
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-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-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-02-01 01:20:26 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-15 15:37:12 +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;
|
|
|
|
};
|
|
|
|
};
|
2022-02-19 22:26:43 +00:00
|
|
|
|
2022-04-15 15:51:32 +00:00
|
|
|
deploy.nodes.itsuki = {
|
2022-04-15 16:00:28 +00:00
|
|
|
hostname = "192.168.2.174";
|
2022-04-15 15:51:32 +00:00
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.itsuki;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-12-21 22:02:29 +00:00
|
|
|
deploy.nodes.logos = {
|
2021-12-21 21:48:41 +00:00
|
|
|
hostname = "192.168.2.35";
|
2021-12-21 22:02:29 +00:00
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.logos;
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 15:20:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-15 15:07:21 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-15 15:26:19 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-03-16 18:20:45 +00:00
|
|
|
# deploy.nodes.hugo = {
|
|
|
|
# hostname = "10.77.129.6";
|
|
|
|
# sshUser = "root";
|
|
|
|
# fastConnection = true;
|
2021-12-22 16:57:09 +00:00
|
|
|
|
2022-03-16 18:20:45 +00:00
|
|
|
# profiles.system = {
|
|
|
|
# user = "root";
|
|
|
|
# path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
# self.nixosConfigurations.hugo;
|
|
|
|
# };
|
|
|
|
# };
|
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
|
|
|
|
checks = builtins.mapAttrs
|
|
|
|
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
|
|
};
|
|
|
|
}
|