30 Commits

Author SHA1 Message Date
andromeda
243d7f3fc3 fix a couple mistakes 2026-01-10 00:32:55 +01:00
andromeda
3f1b2d8789 disable sudo lecture 2026-01-09 23:38:21 +01:00
andromeda
0658c5d898 modularise lenovo? 2026-01-09 23:23:07 +01:00
andromeda
8b79f4e825 add new settings 2026-01-06 22:29:05 +01:00
andromeda
7fa3c698ed fix email password zulip 2026-01-06 22:22:28 +01:00
andromeda
d3b6e8ed47 add email password zulip 2026-01-06 22:16:24 +01:00
andromeda
55a87d3d02 open 2026-01-06 21:50:17 +01:00
andromeda
4c9b42ecc7 remove goofy zulip acc 2026-01-06 21:25:34 +01:00
andromeda
446ff7b960 add mail alias 2026-01-06 21:15:20 +01:00
andromeda
0f2367c4b5 change zulip+admin password 2026-01-06 21:05:25 +01:00
andromeda
b174863576 use local postgresql for zulip 2026-01-06 20:46:21 +01:00
andromeda
cf25c67849 unify hosts 2026-01-06 20:35:46 +01:00
andromeda
5424bfc493 fix stupid mistake 2026-01-06 20:22:46 +01:00
andromeda
1412004174 add pub ssh key to remote xD 2026-01-06 20:15:04 +01:00
andromeda
beaceffff0 init 2026-01-06 18:30:12 +01:00
andromeda
c9a5c521db stash 2026-01-06 14:52:34 +01:00
andromeda
0a7e0c699e merge secrets from development 2026-01-05 15:07:41 +01:00
andromeda
0e93982125 merge new secrets 2026-01-05 15:06:43 +01:00
andromeda
2114c6c347 rename secrets 2026-01-05 14:35:42 +01:00
andromeda
b0da60cdab evaluates 2026-01-05 13:48:06 +01:00
andromeda
0fee255cbf add mailserver to devline 2026-01-02 22:22:06 +01:00
andromeda
3fc40529c8 remove user on server 2026-01-02 22:14:04 +01:00
andromeda
2ed0cade4d use mkpasswd -s rather than mkpasswd? 2026-01-02 21:06:04 +01:00
andromeda
1d17664e7a reset mail password 2026-01-02 20:48:50 +01:00
andromeda
c632cd20c6 roundcube? 2026-01-02 20:33:21 +01:00
andromeda
5366c48991 use nginx for acme 2026-01-02 20:21:46 +01:00
andromeda
6db05df6a7 add firewall xD 2026-01-02 18:37:27 +01:00
andromeda
52a906919d change cert email to a real email :'( 2026-01-02 18:24:00 +01:00
andromeda
e665bb0b14 attempt mailserver? 2026-01-02 18:05:01 +01:00
andromeda
33814b565d add tridactyl to ff 2026-01-02 01:10:56 +01:00
40 changed files with 583 additions and 447 deletions

141
flake.lock generated
View File

@@ -91,6 +91,22 @@
"type": "github"
}
},
"blobs": {
"flake": false,
"locked": {
"lastModified": 1604995301,
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"type": "gitlab"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@@ -130,6 +146,22 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1761588595,
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1751685974,
@@ -224,6 +256,54 @@
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"nixos-mailserver",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixos-mailserver",
"nixpkgs"
]
},
"locked": {
"lastModified": 1763988335,
"narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixos-mailserver",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
@@ -332,6 +412,45 @@
"type": "github"
}
},
"nix-zulip": {
"flake": false,
"locked": {
"lastModified": 1764583012,
"narHash": "sha256-6ht4dtI1TBDAaB/Tatq+FcPexaZTBWuRiJGnioCDx5c=",
"ref": "refs/heads/main",
"rev": "a9dd0f80d775745f1d88055f24d944562db97c5e",
"revCount": 67,
"type": "git",
"url": "https://git.afnix.fr/nix-zulip/nix-zulip"
},
"original": {
"type": "git",
"url": "https://git.afnix.fr/nix-zulip/nix-zulip"
}
},
"nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat",
"git-hooks": "git-hooks",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766321686,
"narHash": "sha256-icOWbnD977HXhveirqA10zoqvErczVs3NKx8Bj+ikHY=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "7d433bf89882f61621f95082e90a4ab91eb0bdd3",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1766651565,
@@ -432,7 +551,7 @@
},
"nvf": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"mnw": "mnw",
"ndg": "ndg",
@@ -462,17 +581,17 @@
]
},
"locked": {
"lastModified": 1767512451,
"narHash": "sha256-ig5p+D8ruePISv0bbU3XUhMg4mOtpvpxYXZBKwanh2g=",
"ref": "refs/heads/home-manager",
"rev": "5b227c1bd23728d57376fe9009c6e1c5569593e1",
"revCount": 2515,
"type": "git",
"url": "file:///home/andromeda/pp/forks/phoenix"
"lastModified": 1766543224,
"narHash": "sha256-96PBoNqh3sPU9t+IXxcB1OjjuQ8HOv42OOh9UtwFHbU=",
"owner": "celenityy",
"repo": "Phoenix",
"rev": "f09568c8a71af4fe42dd43c6f711c67daf605f1e",
"type": "github"
},
"original": {
"type": "git",
"url": "file:///home/andromeda/pp/forks/phoenix"
"owner": "celenityy",
"repo": "Phoenix",
"type": "github"
}
},
"root": {
@@ -480,6 +599,8 @@
"agenix": "agenix",
"home-manager": "home-manager_2",
"impermanence": "impermanence",
"nix-zulip": "nix-zulip",
"nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs",
"noshell": "noshell",
"nur": "nur",

View File

@@ -9,7 +9,15 @@
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nix-zulip = {
url = "git+https://git.afnix.fr/nix-zulip/nix-zulip";
flake = false;
};
noshell = {
url = "github:viperML/noshell";
inputs.nixpkgs.follows = "nixpkgs";
@@ -23,7 +31,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
phoenix = {
url = "git+file:///home/andromeda/pp/forks/phoenix";
url = "github:celenityy/Phoenix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
@@ -35,7 +43,9 @@
agenix,
home-manager,
impermanence,
nixos-mailserver,
nixpkgs,
nix-zulip,
noshell,
nur,
nvf,
@@ -43,6 +53,7 @@
stylix,
...
}: let
nix-zulip' = (import "${nix-zulip}/nix/default.nix" {}).output;
machines = import ./machines.nix;
configuration = machine: modules:
nixpkgs.lib.nixosSystem {
@@ -51,22 +62,28 @@
modules =
modules
++ [
./machines/${machine.hostname}/configuration.nix
./users.nix
./secrets.nix
impermanence.nixosModules.impermanence
agenix.nixosModules.default
];
nixos-mailserver.nixosModule
noshell.nixosModules.default
phoenix.nixosModules.default
nix-zulip'.nixosModules.zulip
{
nixpkgs.overlays = [
agenix.overlays.default
nur.overlays.default
nix-zulip'.overlays.default
];
}
]
++ machine.modules;
};
configurationWithHomeManager = machine: (configuration machine
[
home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
agenix.overlays.default
nur.overlays.default
phoenix.overlays.default
];
home-manager.useGlobalPkgs = true;
home-manager.extraSpecialArgs = {inherit machine;};
home-manager.users =
@@ -79,7 +96,6 @@
name: {
imports = [
agenix.homeManagerModules.default
phoenix.homeModules.default
stylix.homeModules.stylix
nvf.homeManagerModules.default
./users/${name}/home.nix
@@ -88,7 +104,6 @@
)
);
}
noshell.nixosModules.default
]);
in {
nixosConfigurations =

View File

@@ -2,16 +2,79 @@
lenovo = {
hostname = "lenovo";
system = "x86_64-linux";
users = [
"andromeda"
"mtgmonkey"
users = ["andromeda"];
modules = [
# impermanence
./modules/nixos/impermanence.nix
# hardware configuration
# includes `system.stateVersion`
./machines/lenovo.nix
# boot process
# systemd-boot
./modules/nixos/boot/lenovo.nix
# networking
./modules/nixos/laptop.nix
# boilerplate settings
./modules/nixos/common.nix
# ly display manager
./modules/nixos/ly.nix
# sway window manager
./modules/nixos/sway.nix
# apps
./modules/nixos/steam.nix
];
};
"109-199-104-83" = {
hostname = "109-199-104-83";
system = "x86_64-linux";
users = [
"mtgmonkey"
users = [];
modules = [
# impermanence
./modules/nixos/impermanence.nix
# hardware configuration
# verbatim as `nixos-generate-config` AND `system.stateVersion`
./machines/109-199-104-83.nix
# boot process
# grub boot on /dev/sda
./modules/nixos/boot/109-199-104-83.nix
# networking
./modules/nixos/networking/domains/galaxious.de.nix
./modules/nixos/networking/networks/109-199-104-83.nix
# ssh through port 5522 among other things
# andromeda@lenovo is the only user allowed access
./modules/nixos/networking/hard-ssh.nix
./modules/nixos/networking/ssh-as-root.nix
({config, ...}: {users.users.root.openssh.authorizedKeys.keys = [config.pub-keys.ssh.andromeda];})
# boilerplate settings
./modules/nixos/common.nix
# simple-nixos-mailserver email server
# mail.domain
./modules/nixos/mailserver.nix
# roundcube webmail client
# webmail.domain
./modules/nixos/roundcube.nix
# zulip chat client
# chat.domain
# zulip chat server
# zulip.domain
./modules/nixos/zulip.nix
{
}
];
};
}

View File

@@ -0,0 +1,35 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/159e6a69-b4e2-49c3-a6f0-5fcba0ea6a59";
fsType = "ext4";
};
fileSystems."/efi" = {
device = "systemd-1";
fsType = "autofs";
};
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = "25.11";
}

View File

@@ -1,45 +0,0 @@
{
config,
modulesPath,
machine,
...
}: {
system.stateVersion = "25.11";
nix.settings.experimental-features = ["flakes" "nix-command"];
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
boot.loader.grub.device = "/dev/sda";
boot.loader.timeout = 30;
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
boot.initrd.kernelModules = ["nvme"];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking = {
useNetworkd = true;
usePredictableInterfaceNames = true;
hostName = machine.hostname;
domain = "galaxious.de";
};
systemd.network = {
enable = true;
networks."40-wan" = {
matchConfig.Name = "enx0050565f4fff";
address = ["2a02:c207:2299:8419::1/64" "109.199.104.83/20"];
routes = [
{
Gateway = "109.199.96.1";
GatewayOnLink = true;
}
{Gateway = "fe80::1";}
];
dns = ["2620:fe::fe" "9.9.9.9"];
};
};
services.openssh.enable = true;
users.mutableUsers = false;
users.users.root.openssh.authorizedKeys.keys = [config.pub-keys.ssh.andromeda];
programs.noshell.enable = true;
}

View File

@@ -1,70 +1,17 @@
{
config,
lib,
pkgs,
modulesPath,
machine,
...
}: {
imports = [
./impermanence.nix
(modulesPath + "/installer/scan/not-detected.nix")
];
age.secrets = {
secret0.file = ../../secrets/secret0.age;
secret1.file = ../../secrets/secret1.age;
};
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
i18n.defaultLocale = "de_DE.UTF-8";
networking = {
dhcpcd.enable = true;
firewall.enable = true;
hostName = machine.hostname;
networkmanager.enable = true;
};
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
];
programs = {
noshell.enable = true;
steam.enable = true;
sway.enable = true;
};
services = {
blueman.enable = true;
displayManager = {
enable = true;
ly.enable = true;
};
libinput.enable = true;
openssh.enable = true;
printing.enable = true;
};
system.stateVersion = "26.05";
time.timeZone = "Europe/Berlin";
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
#device = "none";
#fsType = "tmpfs";
#options = ["defaults" "size=60%" "mode=755"];
device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7";
fsType = "btrfs";
options = ["subvol=root"];
@@ -92,12 +39,12 @@
done
btrfs subvolume create /btrfs_tmp/root
mkdir /btrfs_tmp/root/nix
mkdir /btrfs_tmp/root/persist
mkdir /btrfs_tmp/root/etc
mount ${config.fileSystems."/nix".device} /btrfs_tmp/root/nix
cp /btrfs_tmp/root/nix/persist/etc/ssh /btrfs_tmp/root/etc/ssh -r
umount /btrfs_tmp/root/nix
rm -r /btrfs_tmp/root/nix
mount ${config.fileSystems."/persist".device} /btrfs_tmp/root/persist -o subvol=persist
cp /btrfs_tmp/root/persist/etc/ssh /btrfs_tmp/root/etc/ssh -r
umount /btrfs_tmp/root/persist
rm -r /btrfs_tmp/root/persist
umount /btrfs_tmp
'';
@@ -106,6 +53,12 @@
fsType = "btrfs";
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7";
fsType = "btrfs";
options = ["subvol=persist"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/F425-55BA";
fsType = "vfat";
@@ -116,4 +69,5 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
system.stateVersion = "26.05";
}

View File

@@ -0,0 +1,3 @@
{
boot.loader.grub.device = "/dev/sda";
}

View File

@@ -0,0 +1,6 @@
{
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
}

23
modules/nixos/common.nix Normal file
View File

@@ -0,0 +1,23 @@
{
config,
lib,
...
}: {
# flakes usage
nix.settings.experimental-features = [
"flakes"
"nix-command"
];
# allows users to customize shell in `$XDG_CONFIG_HOME/shell` rather than
# needing /etc/shells. Useful for home-manager. Falls back.
programs.noshell.enable = true;
# cleans /tmp to maintain a tidy system
boot.tmp.cleanOnBoot = true;
networking.domain = lib.mkDefault config.networking.hostName;
# disable lecture
security.sudo.extraConfig = ''Defaults lecture="never"'';
}

View File

@@ -1,19 +1,15 @@
{
environment.persistence."/nix/persist" = {
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
enable = true;
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
"/etc/ssh"
"/etc/ly/custom-sessions"
];
files = [
"/etc/machine-id"
"/etc/ly/save.txt"
];
};
}

39
modules/nixos/laptop.nix Normal file
View File

@@ -0,0 +1,39 @@
{
# bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
# locale
i18n.defaultLocale = "de_DE.UTF-8";
time.timeZone = "Europe/Berlin";
# networking
networking = {
firewall.enable = true;
networkmanager.enable = true;
};
# misc
services = {
printing.enable = true;
# trackpad
libinput.enable = true;
# ssh
openssh.enable = true;
};
# impermanence
environment.persistence."/persist".directories = [
# bluetooth
"/var/lib/bluetooth"
# wifi connections
"/etc/NetworkManager/system-connections"
# machine ssh keys
"/etc/ssh"
];
}

11
modules/nixos/ly.nix Normal file
View File

@@ -0,0 +1,11 @@
{
services.displayManager = {
enable = true;
ly.enable = true;
};
# TODO needs to be manually updated when new users added
environment.persistence."/persist" = {
directories = ["/etc/ly/custom-sessions"];
files = ["/etc/ly/save.txt"];
};
}

View File

@@ -0,0 +1,31 @@
{config, ...}: {
mailserver = {
enable = true;
stateVersion = 3;
fqdn = "mail.${config.networking.domain}";
domains = ["${config.networking.domain}"];
x509.useACMEHost = config.mailserver.fqdn;
loginAccounts = {
"test@${config.networking.domain}" = {
hashedPasswordFile = builtins.toString config.age.secrets.mailserver-acc-test-pw.path;
};
"admin@${config.networking.domain}" = {
hashedPasswordFile = builtins.toString config.age.secrets.mailserver-acc-admin-pw.path;
aliases = ["@${config.networking.domain}"];
};
};
};
services.nginx = {
enable = true;
virtualHosts = {
"mail.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
};
};
};
security.acme = {
acceptTerms = true;
defaults.email = "mtgmonket@gmail.com";
};
}

View File

@@ -0,0 +1,3 @@
{
networking.domain = "galaxious.de";
}

View File

@@ -0,0 +1,19 @@
{
services.openssh = {
enable = true;
allowSFTP = false;
ports = [5522];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = true;
};
extraConfig = ''
AllowTcpForwarding no
AllowAgentForwarding no
MaxAuthTries 3
MaxSessions 4
TCPKeepAlive no
'';
};
}

View File

@@ -0,0 +1,27 @@
{
networking = {
useNetworkd = true;
usePredictableInterfaceNames = true;
hostName = "109-199-104-83";
firewall = {
enable = true;
allowedTCPPorts = [80 443];
allowedUDPPorts = [80 443];
};
};
systemd.network = {
enable = true;
networks."40-wan" = {
matchConfig.Name = "enx0050565f4fff";
address = ["2a02:c207:2299:8419::1/64" "109.199.104.83/20"];
routes = [
{
Gateway = "109.199.96.1";
GatewayOnLink = true;
}
{Gateway = "fe80::1";}
];
dns = ["2620:fe::fe" "9.9.9.9"];
};
};
}

View File

@@ -0,0 +1,3 @@
{lib, ...}: {
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
}

View File

@@ -0,0 +1,12 @@
{config, ...}: {
services.roundcube = {
enable = true;
hostName = "webmail.${config.networking.domain}";
extraConfig = ''
$config['imap_host'] = "ssl://${config.mailserver.fqdn}";
$config['smtp_host'] = "ssl://${config.mailserver.fqdn}";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
};
}

10
modules/nixos/steam.nix Normal file
View File

@@ -0,0 +1,10 @@
{lib, ...}: {
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
];
programs.steam.enable = true;
}

3
modules/nixos/sway.nix Normal file
View File

@@ -0,0 +1,3 @@
{
programs.sway.enable = true;
}

32
modules/nixos/zulip.nix Normal file
View File

@@ -0,0 +1,32 @@
{config, ...}: {
services.zulip = {
enable = true;
# lets it set up my postgresql for me
enablePostgresqlLocally = true;
# host domain
host = "chat.${config.networking.domain}";
# secrets
camoKeyFile = builtins.toString config.age.secrets.zulip-camoKey.path;
rabbitmqPasswordFile = builtins.toString config.age.secrets.zulip-rabbitmqPassword.path;
secretKeyFile = builtins.toString config.age.secrets.zulip-secretKey.path;
sharedSecretKeyFile = builtins.toString config.age.secrets.zulip-sharedSecretKey.path;
avatarSaltKeyFile = builtins.toString config.age.secrets.zulip-avatarSaltKey.path;
extraSecrets = {
email_password = builtins.toString config.age.secrets.zulip-extraSecrets-email_password.path;
};
# settings
zulipSettings = rec {
EMAIL_USE_TLS = true;
EMAIL_PORT = 587;
ADD_TOKENS_TO_NOREPLY_ADDRESS = false;
NOREPLY_EMAIL_ADDRESS = ZULIP_ADMINISTRATOR;
OPEN_REALM_CREATION = true;
EXTERNAL_HOST = config.services.zulip.host;
ZULIP_ADMINISTRATOR = "admin@${config.networking.domain}";
};
};
}

11
modules/template.nix Normal file
View File

@@ -0,0 +1,11 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [];
options = {};
config = {};
}

View File

@@ -1,8 +1,16 @@
{
age.secrets = {
secret0.file = ./secrets/secret0.age;
secret1.file = ./secrets/secret1.age;
secret2.file = ./secrets/secret2.age;
andromeda-pw.file = ./secrets/andromeda-pw.age;
mtgmonkey-pw.file = ./secrets/mtgmonkey-pw.age;
mailserver-acc-test-pw.file = ./secrets/mailserver-acc-test-pw.age;
mailserver-acc-admin-pw.file = ./secrets/mailserver-acc-admin-pw.age;
"mailserver-acc-zulip+admin-pw".file = ./secrets + "/mailserver-acc-zulip+admin-pw.age";
zulip-avatarSaltKey.file = ./secrets/zulip-avatarSaltKey.age;
zulip-camoKey.file = ./secrets/zulip-camoKey.age;
zulip-extraSecrets-email_password.file = ./secrets/zulip-extraSecrets-email_password.age;
zulip-rabbitmqPassword.file = ./secrets/zulip-rabbitmqPassword.age;
zulip-secretKey.file = ./secrets/zulip-secretKey.age;
zulip-sharedSecretKey.file = ./secrets/zulip-sharedSecretKey.age;
};
pub-keys = {
ssh = {

View File

@@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg Lt6EG5R9iQWuD/eDXM+vsablwqCn7wUBKFuNO3qcq04
07jSpN+5/CJFCaBAEVB5TYqLEnGj8Fbt6z3qIVSijqU
-> ssh-ed25519 UHxfvA 8iIyIoZxJUYrvL9DFmleATVYs0TSZvPjSFqxSWYnVFs
XDQQGlQXJqjjAqslyfJerVATPIO4vCxTPRWOcBuF7f8
-> ssh-ed25519 Xoin5w tE8Tx9cSJH+4eJoEpG8CVf9+C1WrurERvGG0kOLatG4
YUUPvg6Ev3+7idthbcUeLeRZ+iE8yp+uirJojSt1gVg
--- FamPgM9+DjHiHQBkCmPaHe9aLLXIL3ZPCUtmtEtNOAI
Ց<EFBFBD><EFBFBD>}<7D>_rT6<54>Uwz<77>|<7C><<3C>_<EFBFBD><0F><><EFBFBD><EFBFBD>5<><35><EFBFBD>!~<>N<EFBFBD><18>i<>*<2A>E<10>M?H?<3F>QSb<53><62><EFBFBD><EFBFBD><EFBFBD>\<5C>۝<EFBFBD><DB9D>z<>K ?z<><7A>;<1C><>R<EFBFBD>Jp<4A>Ҷ<><D2B6>ɴs<C9B4><EFBFBD>y<EFBFBD><79>

View File

@@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg slLOkD/9TAYOuZ/g5U4NvPWUlmYZeie12xzggioviw0
E0uAj4RMgv7DTJpvtEO54G9XHNLFOgFflR54Cl6/X8g
-> ssh-ed25519 UHxfvA xHFujOdegur0PLNHZP+h5RxHhVD2K906NZx7nprMkUs
PdDxzD5QBdE/yWPMnF+CDGROEpE4nYvg12v1G3QK9XI
-> ssh-ed25519 Xoin5w YWsO9HtEFB79+aKr6eWi5Sg5geKfzT+IrDy2L5qEmx4
sXLRmcRDyAv64nSGs8QXcHmKYO+F11Pzea1EVGmpEys
--- Sjg8SqkkEEL4X0G1GOUoHO702ZtrM0hMniIdS7yIsDA
'<27>B<EFBFBD><42>(<28><>7Dϓ=<3D><>h<EFBFBD><10><>h f<>ɮ<13>xT<78><54>!K.<2E><1D><><>,<2C>ߓ<>D|<7C><>+p<><70><EFBFBD>"<22>t<EFBFBD><74>G<EFBFBD>y<EFBFBD>Q<EFBFBD><51>RcP<63>Q<EFBFBD><51>Q<><51>

View File

@@ -0,0 +1,10 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg JsKjySZOoC/xK6HFjgBSYumrg/Ak7EBjYCqa9uszXGo
daQvoxsqkxA4OClbWm4YHes5zkky8wikEKg94ceeNWw
-> ssh-ed25519 UHxfvA yDtvX6SqI9HFN3v1teeRfVicMXpS0fYLiyxe391kIHY
xpYokiMmAlFbZHuOIqxKeGXtgiB9yOvRquI8OY5mdqE
-> ssh-ed25519 Xoin5w 9ND7dZoaaLXVu7VN3fYF6bZa23QpCr29b4DNIOSRi2Q
L6oOEQ8XSZZuQyfxPwgGYycMqAKfslEtFRJbBHbomoY
--- ewcxsNTgXUy+wlZ3MiSC2KYO0BowGOAn/JvvV7x3pBc
<08>V<EFBFBD>5a<35><61><EFBFBD>.<2E>B'K<><4B>7<EFBFBD><37><17>LR9h`<60><>€<EFBFBD>շ<>I<EFBFBD><18><>
8c<EFBFBD>%)<29>ۣ<EFBFBD>5<EFBFBD><35><EFBFBD><1C><1E><><EFBFBD><EFBFBD>KLR<4C><52>y<EFBFBD>199Y?<3F>v<EFBFBD><1E><16><><EFBFBD>2<EFBFBD> ЖK<D096>f<02><>ԏ!<21><>{3<>)<29>,

Binary file not shown.

View File

@@ -4,7 +4,22 @@ let
lenovo = pub-keys.ssh.lenovo;
_109-199-104-83 = pub-keys.ssh._109-199-104-83;
in {
"secret0.age".publicKeys = [andromeda lenovo];
"secret1.age".publicKeys = [andromeda lenovo];
"secret2.age".publicKeys = [andromeda lenovo _109-199-104-83];
# user passwords
"andromeda-pw.age".publicKeys = [andromeda lenovo];
"mtgmonkey-pw.age".publicKeys = [andromeda lenovo];
# mail account passwords
"mailserver-acc-test-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
"mailserver-acc-admin-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
"mailserver-acc-zulip+admin-pw.age".publicKeys = [andromeda lenovo _109-199-104-83];
# zulip keys
"zulip-avatarSaltKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
"zulip-camoKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
"zulip-rabbitmqPassword.age".publicKeys = [andromeda lenovo _109-199-104-83];
"zulip-secretKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
"zulip-sharedSecretKey.age".publicKeys = [andromeda lenovo _109-199-104-83];
# zulip-secrets.conf values
"zulip-extraSecrets-email_password.age".publicKeys = [andromeda lenovo _109-199-104-83];
}

Binary file not shown.

BIN
secrets/zulip-camoKey.age Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg N+K4UqHYGQTzqq5wMhEs5ijh8a8uXarYy2BpWH2GAUY
7mWlRNsudiBCr34QMXkzwkyRZa9K6pAPLX0phQBIH1A
-> ssh-ed25519 UHxfvA i5e8E+FMsG+n+jl5ASBYbPvnME7X58sMMAlYelZAm3A
ARlV+vWRRsFVAsjdk+JgUMgp49muyGFF5g+iyzpyJQY
-> ssh-ed25519 Xoin5w 0EH6bLW0DwwVi8GMjq4ZjlBak1QQ0cxh/+KK/e1rPTY
yIpSegzmBeJ86jApt23Kv9vZ2sVLC8dFYa9t43/x8MM
--- c4PhDnZ271mJc2sc7DSIRqVF503JSsZhBj2ANwcT2po
PK<EFBFBD>F <0C><0E>!"<22><08><><EFBFBD>Mgo<67>/<2F><><EFBFBD>gF<67><46>0@<19><><EFBFBD>gA<15><>΄<EFBFBD>P<EFBFBD><50><EFBFBD>m+u<><75>Lo<4C>

BIN
secrets/zulip-secretKey.age Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -13,7 +13,7 @@ in {
"andromeda" = {
isNormalUser = true;
description = "andromeda";
hashedPasswordFile = builtins.toString config.age.secrets.secret0.path;
hashedPasswordFile = builtins.toString config.age.secrets.andromeda-pw.path;
extraGroups = [
"networkmanager"
"wheel"
@@ -22,7 +22,7 @@ in {
"mtgmonkey" = {
isNormalUser = true;
description = "mtgmonkey";
hashedPasswordFile = builtins.toString config.age.secrets.secret1.path;
hashedPasswordFile = builtins.toString config.age.secrets.mtgmonkey-pw.path;
extraGroups = [
(lib.mkIf
(machine == machines.lenovo)
@@ -36,7 +36,7 @@ in {
];
};
};
environment.persistence."/nix/persist".users = lib.mkIf config.environment.persistence."/nix/persist".enable (
environment.persistence."/persist".users = lib.mkIf config.environment.persistence."/persist".enable (
builtins.mapAttrs
(name: value: lib.mkIf (builtins.elem name machine.users) value)
{
@@ -56,16 +56,6 @@ in {
".brush_history"
];
};
"mtgmonkey" = {
directories = [
".local/share/zoxide"
".ssh"
];
files = [
".bash_history"
".brush_history"
];
};
}
);
}

View File

@@ -16,82 +16,6 @@
"${config.home.homeDirectory}/${background-path}"
];
};
sway_config' = builtins.toFile "sway_config" ''
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term alacritty
set $menu wmenu-run
set $screenshot grim -g "$(slurp)"
floating_modifier $mod normal
workspace_layout stacking
output * bg ${config.home.homeDirectory}/${background-path} fill
# launch programs
bindsym $mod+Shift+Return exec $term
bindsym $mod+Shift+d exec $menu
bindsym $mod+Shift+a exec anki
bindsym $mod+Shift+q exec librewolf
bindsym $mod+Shift+s exec $screenshot
bindsym $mod+Shift+c kill
bindsym $mod+Shift+r reload
bindsym $mod+Shift+Alt+q exit
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 0
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 0
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pact set-source-mute \@DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonbrightnessUp exec brightnessctl set 5%+
default_border none
font pango:monospace 0.001
titlebar_border_thickness 0
titlebar_padding 0
'';
in {
imports = [./stylix.nix];
xdg.configFile."shell".source = lib.getExe pkgs.brush;
@@ -181,22 +105,13 @@ in {
home-manager.enable = true;
firefox = {
enable = true;
profiles."andromeda".name = "andromeda";
package = pkgs.withPhoenix pkgs.firefox;
package = pkgs.firefox.override {
cfg.enableTridactylNative = true;
};
profiles.${config.home.username}.extensions.packages = [
pkgs.nur.repos.rycee.firefox-addons.tridactyl
];
};
firefox.phoenix = {
enable = true;
profiles = ["andromeda"];
};
# librewolf = {
# enable = true;
# package = pkgs.librewolf.override {
# cfg.enableTridactylNative = true;
# };
# profiles.${config.home.username}.extensions.packages = [
# pkgs.nur.repos.rycee.firefox-addons.tridactyl
# ];
# };
lsd.enable = true;
nvf = {
enable = true;

View File

@@ -1,172 +0,0 @@
{
config,
lib,
machine,
pkgs,
...
}: {
imports = [./stylix.nix];
xdg.configFile."shell".source = lib.getExe pkgs.brush;
home = {
username = "mtgmonkey";
homeDirectory = "/home/${config.home.username}";
stateVersion = "26.05";
packages = [
pkgs.acpi
pkgs.brightnessctl
pkgs.brush
pkgs.dust
pkgs.fzf
pkgs.glow
pkgs.jmtpfs
pkgs.nix-output-monitor
pkgs.ranger
pkgs.rip2
pkgs.ripgrep
pkgs.tree
pkgs.zoxide
];
};
programs = {
bash = {
enable = true;
shellAliases = {
neofetch = "fastfetch";
ls = lib.mkForce "lsd";
ll = lib.mkForce "lsd -l";
l = "lsd -la";
cd = "z";
gg = "git log --oneline --abbrev-commit --all --graph --decorate --color";
md = "glow";
};
bashrcExtra = ''
PS1="\u@\h:\w$"
eval "$(zoxide init bash)"
'';
};
btop = {
enable = true;
settings = {
theme_background = false;
vim_keys = true;
rounded_corners = false;
graph_symbol = "braille";
update_ms = 150;
proc_sorting = "cpu lazy";
proc_gradient = false;
proc_left = true;
cpu_single_graph = true;
cpu_bottom = true;
clock_format = "/user@/host:/uptime@%H:%M";
background_update = true;
mem_graphs = false;
mem_below_net = true;
show_swap = false;
only_physical = true;
show_io_stat = true;
io_mode = false;
io_graph_combined = false;
};
};
fastfetch.enable = true;
git = {
enable = true;
settings = {
user = {
name = config.home.username;
email = "${config.home.username}@${machine.hostname}";
};
init.defaultBranch = "master";
};
};
gh.enable = true;
home-manager.enable = true;
lsd.enable = true;
nvf = {
enable = true;
settings.vim = {
autocomplete.nvim-cmp.enable = false;
formatter.conform-nvim = {
enable = true;
setupOpts.format_on_save = {
lsp_format = "fallback";
timeout_ms = 5000;
};
};
lsp.otter-nvim.enable = true;
git.enable = true;
keymaps = [
{
key = "<Down>";
mode = ["i" "n" "v" "c"];
action = "<NOP>";
}
{
key = "<Up>";
mode = ["i" "n" "v" "c"];
action = "<NOP>";
}
{
key = "<Left>";
mode = ["i" "n" "v" "c"];
action = "<NOP>";
}
{
key = "<Right>";
mode = ["i" "n" "v" "c"];
action = "<NOP>";
}
{
key = "jj";
mode = ["i"];
action = "<Esc>";
}
{
key = "kk";
mode = ["i"];
action = "<Esc>";
}
{
key = "jk";
mode = ["i"];
action = "<Esc>";
}
{
key = "kj";
mode = ["i"];
action = "<Esc>";
}
{
key = "<Esc>";
mode = ["i"];
action = "<Nop>";
}
];
languages = {
nix = {
enable = true;
format.enable = true;
lsp.enable = true;
};
haskell = {
enable = true;
lsp.enable = true;
};
};
lineNumberMode = "relative";
options = {
tabstop = 2;
shiftwidth = 2;
expandtab = true;
smarttab = true;
foldmethod = "indent";
number = true;
colorcolumn = "80";
};
statusline.lualine.enable = true;
syntaxHighlighting = true;
};
};
ssh.enable = true;
};
}

View File

@@ -1,29 +0,0 @@
{
pkgs,
config,
...
}: {
stylix = {
enable = true;
# rebecca has lavener bkg
# tube has dark gray bkg
# silk-light is light theme
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
polarity = "dark";
fonts = {
monospace = {
package = pkgs.miracode;
name = "Miracode";
};
serif = config.stylix.fonts.sansSerif;
emoji = {
package = pkgs.noto-fonts-color-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 12;
terminal = 10;
};
};
};
}