99 Commits

Author SHA1 Message Date
andromeda
580cbd1851 init nix-on-droid 2026-01-14 22:57:40 +01:00
andromeda
6fdcd13627 adjust brightness, disable touchpad sometimes 2026-01-14 20:18:25 +01:00
andromeda
6fb816f27c reenable ipv6; reconfigure browser 2026-01-14 05:31:48 +01:00
andromeda
c0e92a4ef3 typo 2026-01-13 10:55:24 +01:00
andromeda
b754a3d53f matrix-synapse? 2026-01-13 10:48:56 +01:00
andromeda
19d45ebd05 edit TODO.md 2026-01-13 06:29:18 +01:00
andromeda
312ee02d9e fix alias traversal 2026-01-13 06:21:08 +01:00
andromeda
c377598d5c conduit setup? 2026-01-13 06:16:27 +01:00
andromeda
dcb82ed361 add README, conduit 2026-01-13 05:53:57 +01:00
andromeda
b25ce469b6 persist zulip 2026-01-12 19:09:27 +01:00
andromeda
d2d370442b ssl port email? 2026-01-12 18:01:52 +01:00
andromeda
e05c9fe5a5 add tls (I don't know how this works) 2026-01-12 17:46:49 +01:00
andromeda
c1d8b4dff3 use non-tls ssl? [fix typo] 2026-01-12 17:37:55 +01:00
andromeda
a7e65a0943 use non-tls ssl? 2026-01-12 17:35:38 +01:00
andromeda
d2e95f2fb8 add EMAIL_HOST_USER? 2026-01-12 16:31:58 +01:00
andromeda
9b0944223f fix typo 2026-01-12 16:19:37 +01:00
andromeda
bea6414758 actually add zulip module 2026-01-12 15:45:38 +01:00
andromeda
90ad40e207 fix zulip? 2026-01-12 15:41:06 +01:00
andromeda
803bc95317 fix dkim perms? 2026-01-12 14:26:35 +01:00
andromeda
4bd6ddece1 declare dkim secrets 2026-01-12 13:30:25 +01:00
andromeda
3fa9a368bf update remote pub keys 2026-01-12 13:04:33 +01:00
andromeda
103ec86fc2 persist /etc/ssh 2026-01-12 13:03:02 +01:00
andromeda
d9a6791fa3 ready for new deployment 2026-01-12 12:55:20 +01:00
andromeda
70445c1c8c update ff search 2026-01-12 12:53:33 +01:00
andromeda
47aa29ba33 finally fix ipv6? 2026-01-12 10:06:28 +01:00
andromeda
0970f7d0ee fix finally? 2026-01-12 09:54:54 +01:00
andromeda
e5746332bb persist vpn conf 2026-01-12 09:49:13 +01:00
andromeda
e38e0b95dc disable ipv6 2026-01-12 09:36:48 +01:00
andromeda
e6669a9d88 add openvpn 2026-01-12 09:34:25 +01:00
andromeda
de911e358b disable forgejo as broken 2026-01-10 21:48:57 +01:00
andromeda
b76f6ba3d6 rekey 2026-01-10 20:51:27 +01:00
andromeda
45f5249165 fix ssh 2026-01-10 15:30:17 +01:00
andromeda
90dd0582b0 forgejo 2026-01-10 15:23:02 +01:00
andromeda
0781c8428d fix agenix boot problem on remote? 2026-01-10 10:33:06 +01:00
andromeda
2d1048b00f add roundcube persist 2026-01-10 10:21:04 +01:00
andromeda
58f011079c rekey 2026-01-10 10:08:40 +01:00
andromeda
d32f99baf5 persist acme, update public key 2026-01-10 10:07:01 +01:00
andromeda
13141933b4 enable roundcube, backup mailserver 2026-01-10 10:01:38 +01:00
andromeda
a57edbf3fd enable mailserver 2026-01-10 09:48:42 +01:00
andromeda
bf22a9de21 add /etc/ssh persist to remote 2026-01-10 09:02:24 +01:00
andromeda
411ee0c027 add remote disko and some other things 2026-01-10 08:59:54 +01:00
andromeda
aec328ce93 glide-browser, fix typo 2026-01-10 01:58:07 +01:00
andromeda
7cbd450c61 remove services 2026-01-10 00:57:41 +01:00
andromeda
97fca4cc7e fix up remote 109-199-104-83 2026-01-10 00:55:44 +01:00
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
andromeda
b86b5eae5e add global module for phoenix 2026-01-02 01:06:12 +01:00
andromeda
834472fe38 replace librewolf with stock ff 2026-01-02 00:47:58 +01:00
andromeda
122a7fa174 mb? 2026-01-01 20:21:14 +01:00
andromeda
49ba1149d8 mb? 2026-01-01 18:24:24 +01:00
andromeda
e8abf3ab16 reconfig ssh a bit? 2026-01-01 07:55:05 +01:00
andromeda
8ad0603114 remove useless lines 2026-01-01 07:23:03 +01:00
andromeda
7f4bac8208 new box 2026-01-01 07:20:43 +01:00
andromeda
92c4e1f7cf put user-level impermanence settings in users.nix 2025-12-31 14:04:44 +01:00
andromeda
51d9476042 fix ly complaint, move sway_config to its own file 2025-12-31 11:24:41 +01:00
andromeda
4b8882d82d change pub key management again, centralize users, start to modularize lenovo conf 2025-12-31 02:28:00 +01:00
andromeda
42a93f042e better machine conf, rework key/machines management 2025-12-31 01:14:37 +01:00
andromeda
07655e5135 add secret scheme 2025-12-30 19:47:50 +01:00
andromeda
9e402fdfa3 add server user password 2025-12-30 19:45:43 +01:00
andromeda
0468cf2621 use agenix 2025-12-30 17:45:01 +01:00
andromeda
e39747ae2e andromeda: add agenix; machines: start to add box 2025-12-30 13:47:08 +01:00
andromeda
89dfb0adb9 add README.md 2025-12-30 12:28:31 +01:00
andromeda
424e2015ae bug fixes 2025-12-30 11:34:27 +01:00
andromeda
9a089ea509 fix bugs with wallpaper and btrfs subvolume 2025-12-30 11:32:29 +01:00
andromeda
f53da44456 add btrfs root 2025-12-30 02:04:26 +01:00
andromeda
cba7b6b833 change machine specification 2025-12-30 01:40:54 +01:00
andromeda
8daeb01ea9 merge development onto master 2025-12-30 01:22:24 +01:00
andromeda
0179bbeb5c remove background as png, rather fetch from nix store 2025-12-30 01:08:44 +01:00
andromeda
1463a81e8c modularise, combine 2025-12-30 00:32:23 +01:00
andromeda
a7c4b7dcd1 works 2025-12-30 00:27:14 +01:00
andromeda
abab971ba6 modularise, combine 2025-12-30 00:21:26 +01:00
58 changed files with 2389 additions and 722 deletions

125
README.md Normal file
View File

@@ -0,0 +1,125 @@
see TODO.md for my aspirations
## usage
### install
note: I have not tested the following verbatim.
It *will* erase the contents of /dev/sdX. Use with caution.
1. create usb with minimal NixOS iso
2. boot from usb
3. create partitions
```console
$ #modern partition table
$ #WARNING all data on /dev/sdX will be erased. Make sure it is your target
$ parted /dev/sdX -- mklabel gpt
$ #make root partition
$ parted /dev/sdX -- mkpart ESP fat32 1MiB 512MiB
$ parted /dev/sdX -- set 1 esp on
$ #create store partition
$ parted /dev/sdX -- mkpart nix btrfs 512MiB 100GiB
$ #if your device is in english, use a period rather than a comma
$ parted /dev/sdX -- mkpart root btrfs 100GiB 199,5GiB
```
4. create filesystems
```console
$ #make sure not to get your subvolumes mixed up
$ #there should be 3, the first boot and the others 99,5GiB each
$ fdisk -l
$ #boot partition
$ mkfs.fat -F 32 /dev/sdX1
$ #store partition
$ mkfs.btrfs /dev/sdX2
$ #root partition
$ mkfs.btrfs /dev/sdX3
$ #create root subvolume
$ btrfs subvolume create /dev/sdX3/root
```
5. mount filesystems
```console
$ #note the uuid of your disks
$ #they will be symlinked to something recognisable
$ #don't get them mixed up
$ ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 Dez 30 11:31 0e586651-36f4-42b0-99b3-3f0704a894d6 -> ../../sdX2
lrwxrwxrwx 1 root root 15 Dez 30 11:31 16c93673-4f0e-4010-a7f4-7ccffb20edb7 -> ../../sdX3
lrwxrwxrwx 1 root root 15 Dez 30 11:31 F425-55BA -> ../../sdX1
$ #now mount the appropriate filesystems using your uuids; these are mine
$ mount -o subvol-root /dev/disk/by-uuid/16c93673-4f0e-4010-a7f4-7ccffb20edb7 /mnt
$ mkdir -p /mnt/{boot,nix}
$ mount -o umask=077 /dev/disk/by-uuid/F425-55BA /mnt/boot
$ mount /dev/disk/by-uuid/0e586651-36f4-42b0-99b3-3f0704a894d6 /mnt/nix
```
6. prepare for installation
```console
$ mkdir -p /mnt/etc/nixos
$ nixos-generate-config --root /mnt
$ cat /mnt/etc/nixos/hardware-configuration.nix
$ #note the random flags and stuff in hardware-configuration.nix; you might
$ #want to keep a copy around for the time being
$ rm /mnt/etc/nixos/*
$ #connect to the internet
$ nmtui
$ git clone https://git.mtgmonkey.net/andromeda/conf /mnt/etc/nixos
$ cd /mnt/etc/nixos
$ nix-shell -p tree --command tree
.
├── configuration.nix
├── flake.lock
├── flake.nix
├── machines
│   └── laptop
│   ├── hardware-configuration.nix
│   └── machine.nix
├── README.md
└── users
└── andromeda
├── home.nix
└── stylix.nix
5 directories, 8 files
$ #copy the `laptop` derivation and change all occurences of `laptop` with
$ #`your-machine` in `flake.nix`
$ cp machines/laptop machines/your-machine -r
$ #modify `machines/your-machine/hardware-configuration.nix` by changing the
$ #uuids to those of your drives
$ #also copy the flags and stuff from `hardware-configuration.nix` generated
$ #earlier
$ #change the hostname in `machines/your-machine/machine.nix` to your liking.
$ #If you want to pull request to my repo, `hostname` *must* be "your-machine"
$ #if you want a different user, edit `machines/your-machine/machine.nix` to
$ #reflect that. Create the file `users/your-user/home.nix` with your home
$ #manager configuration. Add your user's `impermanence` information in
$ #`configuration.nix`
$ #make sure to give your user an initalPassword, otherwise you won't be able
$ #to log in! Later, use a secrets scheme to have a real password
$ git add -A
```
7. install
```console
$ cd /mnt/etc/nixos
$ nix flake check
$ #resolve any errors. You may have forgotten to add things to git, users,
$ #machines...
$ nixos-install --no-root-password --flake .#your-machine
```
8. reboot
```console
$ systemctl reboot
```

20
TODO.md Normal file
View File

@@ -0,0 +1,20 @@
- add other remote
- fully automate remote provisioning (remote keys)
- fix ipv6 on remotes
- modularize home manager
- add services?
- 0x0
- forgejo
- matrix homeserver
- matrix webclient
- radicale
- tor relay
- wireguard as vpn
- add home functionality
- better term emulator
- switch browser?
- chromium: much better sandboxing
- ladybird: be an early tester, contribute
- glide: sexier tridactyl implementation
- browsh: the GOAT
- get mouse out of here

View File

@@ -1,80 +0,0 @@
{lib, ...}: {
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = 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"
];
files = [
"/etc/machine-id"
"/etc/shadow"
"/etc/shadow-"
"/etc/passwd"
"/etc/passwd-"
"/etc/ly/save.txt"
];
users."mtgmonkey" = {
directories = [
"conf"
"Downloads"
".backups"
".ssh"
];
};
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
i18n.defaultLocale = "de_DE.UTF-8";
networking = {
dhcpcd.enable = true;
firewall.enable = true;
hostName = "nixos";
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;
printing.enable = true;
};
system.stateVersion = "26.05";
time.timeZone = "Europe/Berlin";
users.users."mtgmonkey" = {
isNormalUser = true;
description = "mtgmonkey";
initialPassword = "password";
extraGroups = [
"networkmanager"
"wheel"
];
};
}

5
deploy.sh Executable file
View File

@@ -0,0 +1,5 @@
# usage:
# $ ./deploy.sh <hostname> <ip>
# example usage:
# $ ./deply.sh 109-199-104-83 109.199.104.83
nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config ./hardware-configuration.nix --flake .?ref=411ee0c#$1 --target-host root@$2

894
flake.lock generated
View File

@@ -1,5 +1,411 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1762618334,
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
"owner": "ryantm",
"repo": "agenix",
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1755819240,
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1765809053,
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1760703920,
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"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": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1744478979,
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1746728054,
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
"owner": "nix-community",
"repo": "disko",
"rev": "ff442f5d1425feb86344c028298548024f21256d",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "latest",
"repo": "disko",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1764724327,
"narHash": "sha256-OkFLrD3pFR952TrjQi1+Vdj604KLcMnkpa7lkW7XskI=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "66b7c635763d8e6eb86bd766de5a1e1fbfcc1047",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"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,
"narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=",
"ref": "refs/heads/main",
"rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1",
"revCount": 92,
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nvf",
"nixpkgs"
]
},
"locked": {
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1763759067,
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"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": {
"host": "gitlab.gnome.org",
"lastModified": 1764524476,
"narHash": "sha256-bTmNn3Q4tMQ0J/P0O5BfTQwqEnCiQIzOGef9/aqAZvk=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "c0e1ad9f0f703fd0519033b8f46c3267aab51a22",
"type": "gitlab"
},
"original": {
"host": "gitlab.gnome.org",
"owner": "GNOME",
"ref": "gnome-49",
"repo": "gnome-shell",
"type": "gitlab"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1745494811,
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766980997,
"narHash": "sha256-oegDNAvyQwaG3GqSi4U5jpKM7SYHGESGVIuKMRV/lbw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7a7b43c7231a439d248179ba8d561dd6cd81799b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709445365,
"narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4de84265d7ec7634a69ba75028696d74de9a44a7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": { "impermanence": {
"locked": { "locked": {
"lastModified": 1737831083, "lastModified": 1737831083,
@@ -15,6 +421,129 @@
"type": "github" "type": "github"
} }
}, },
"mnw": {
"locked": {
"lastModified": 1758834834,
"narHash": "sha256-Y7IvY4F8vajZyp3WGf+KaiIVwondEkMFkt92Cr9NZmg=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "cfbc7d1cc832e318d0863a5fc91d940a96034001",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "mnw",
"type": "github"
}
},
"ndg": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1765720983,
"narHash": "sha256-tWtukpABmux6EC/FuCJEgA1kmRjcRPtED44N+GGPq+4=",
"owner": "feel-co",
"repo": "ndg",
"rev": "f399ace8bb8e1f705dd8942b24d207aa4d75c936",
"type": "github"
},
"original": {
"owner": "feel-co",
"repo": "ndg",
"type": "github"
}
},
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": [
"nix-on-droid",
"nmd"
],
"nmt": "nmt"
},
"locked": {
"lastModified": 1705252799,
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": "home-manager_3",
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-docs": "nixpkgs-docs",
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd"
},
"locked": {
"lastModified": 1765031149,
"narHash": "sha256-4ZtlnCp4blhsjGnQIxAXDAj7nCJKy7tozoBRtklmwcU=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "55b6449b4582a4ba3ce712543c973360a026db7d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-on-droid",
"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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1766651565, "lastModified": 1766651565,
@@ -31,6 +560,92 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-docs": {
"locked": {
"lastModified": 1705957679,
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs-docs"
],
"scss-reset": "scss-reset"
},
"locked": {
"lastModified": 1705050560,
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=",
"owner": "~rycee",
"repo": "nmd",
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3",
"type": "sourcehut"
},
"original": {
"owner": "~rycee",
"repo": "nmd",
"type": "sourcehut"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"noshell": { "noshell": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -51,11 +666,288 @@
"type": "github" "type": "github"
} }
}, },
"nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1767026366,
"narHash": "sha256-TqJXPpEPYfeFCbraquNdrB1dJYuEqV474Npv8UcNxrs=",
"owner": "nix-community",
"repo": "NUR",
"rev": "1f8c02a96c58c0dd90f2de45440b9ef01571abc3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nur_2": {
"inputs": {
"flake-parts": [
"stylix",
"flake-parts"
],
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1764773531,
"narHash": "sha256-mCBl7MD1WZ7yCG6bR9MmpPO2VydpNkWFgnslJRIT1YU=",
"owner": "nix-community",
"repo": "NUR",
"rev": "1d9616689e98beded059ad0384b9951e967a17fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nvf": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"mnw": "mnw",
"ndg": "ndg",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1766596669,
"narHash": "sha256-9C72hpMDa99n4MbqZqsBkrBQZe+HEN9lnu7Sme67nmU=",
"owner": "notashelf",
"repo": "nvf",
"rev": "ef1f22efaf4aa37ba9382a7d1807fa8ac9c097fd",
"type": "github"
},
"original": {
"owner": "notashelf",
"repo": "nvf",
"type": "github"
}
},
"phoenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766543224,
"narHash": "sha256-96PBoNqh3sPU9t+IXxcB1OjjuQ8HOv42OOh9UtwFHbU=",
"owner": "celenityy",
"repo": "Phoenix",
"rev": "f09568c8a71af4fe42dd43c6f711c67daf605f1e",
"type": "github"
},
"original": {
"owner": "celenityy",
"repo": "Phoenix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"disko": "disko",
"home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"nix-on-droid": "nix-on-droid",
"nix-zulip": "nix-zulip",
"nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"noshell": "noshell" "noshell": "noshell",
"nur": "nur",
"nvf": "nvf",
"phoenix": "phoenix",
"stylix": "stylix"
}
},
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_3",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur_2",
"systems": "systems_3",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1766603026,
"narHash": "sha256-J2DDdRqSU4w9NNgkMfmMeaLIof5PXtS9RG7y6ckDvQE=",
"owner": "nix-community",
"repo": "stylix",
"rev": "551df12ee3ebac52c5712058bd97fd9faa4c3430",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1763914658,
"narHash": "sha256-Hju0WtMf3iForxtOwXqGp3Ynipo0EYx1AqMKLPp9BJw=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "0f6be815d258e435c9b137befe5ef4ff24bea32c",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1764465359,
"narHash": "sha256-lbSVPqLEk2SqMrnpvWuKYGCaAlfWFMA6MVmcOFJjdjE=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "edf89a780e239263cc691a987721f786ddc4f6aa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1764464512,
"narHash": "sha256-rCD/pAhkMdCx6blsFwxIyvBJbPZZ1oL2sVFrH07lmqg=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "907dbba5fb8cf69ebfd90b00813418a412d0a29a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
} }
} }
}, },

127
flake.nix
View File

@@ -1,28 +1,139 @@
{ {
inputs = { inputs = {
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence"; 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"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nix-on-droid = {
url = "github:nix-community/nix-on-droid";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-zulip = {
url = "git+https://git.afnix.fr/nix-zulip/nix-zulip";
flake = false;
};
noshell = { noshell = {
url = "github:viperML/noshell"; url = "github:viperML/noshell";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
phoenix = {
url = "github:celenityy/Phoenix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {
agenix,
disko,
home-manager,
impermanence, impermanence,
nixos-mailserver,
nixpkgs, nixpkgs,
nix-on-droid,
nix-zulip,
noshell, noshell,
self, nur,
nvf,
phoenix,
stylix,
... ...
}: let }: let
system = "x86_64-linux"; nix-zulip' = (import "${nix-zulip}/nix/default.nix" {}).output;
in { machines = import ./machines.nix;
nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem { configuration = machine: modules:
inherit system; nixpkgs.lib.nixosSystem {
modules = [ system = machine.system;
specialArgs = {inherit machine;};
modules =
modules
++ [
./users.nix
./secrets.nix
./modules/nixos/common.nix
agenix.nixosModules.default
disko.nixosModules.disko
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
nixos-mailserver.nixosModule
noshell.nixosModules.default noshell.nixosModules.default
./configuration.nix phoenix.nixosModules.default
./hardware-configuration.nix 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
{
home-manager.useGlobalPkgs = true;
home-manager.extraSpecialArgs = {inherit machine;};
home-manager.users =
builtins.mapAttrs
(name: value: value)
(
nixpkgs.legacyPackages.${machine.system}.lib.genAttrs
machine.users
(
name: {
imports = [
agenix.homeManagerModules.default
stylix.homeModules.stylix
nvf.homeManagerModules.default
./users/${name}/home.nix
];
}
)
);
}
]);
in {
nixosConfigurations =
builtins.mapAttrs
(hostname: value: configurationWithHomeManager value)
machines;
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = import nixpkgs {system = "aarch64-linux";};
modules = [
./modules/nix-on-droid/nix-on-droid.nix
{
home-manager.useGlobalPkgs = true;
home-manager.users."andromeda" = {
imports = [
./modules/nix-on-droid/home.nix
];
};
}
]; ];
}; };
}; };

View File

@@ -1,48 +1,24 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
config, imports =
lib, [ (modulesPath + "/profiles/qemu-guest.nix")
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "sdhci_pci"]; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
device = "none"; # (the default) this is the recommended approach. When using systemd-networkd it's
fsType = "tmpfs"; # still possible to use this option, but it's recommended to use it in conjunction
options = ["defaults" "size=25%" "mode=755"]; # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
}; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
fileSystems."/persist" = {
device = "/dev/disk/by-label/NIXPERSIST";
neededForBoot = true;
fsType = "btrfs";
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/NIXSTORE";
fsType = "btrfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/107D-CA99";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [
{device = "/dev/disk/by-uuid/18c2ef9b-1568-41e4-b67a-96155822ae02";}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

514
home/flake.lock generated
View File

@@ -1,514 +0,0 @@
{
"nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1755819240,
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1765809053,
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1760703920,
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1764724327,
"narHash": "sha256-OkFLrD3pFR952TrjQi1+Vdj604KLcMnkpa7lkW7XskI=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "66b7c635763d8e6eb86bd766de5a1e1fbfcc1047",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1751685974,
"narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=",
"ref": "refs/heads/main",
"rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1",
"revCount": 92,
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nvf",
"nixpkgs"
]
},
"locked": {
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1763759067,
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"host": "gitlab.gnome.org",
"lastModified": 1764524476,
"narHash": "sha256-bTmNn3Q4tMQ0J/P0O5BfTQwqEnCiQIzOGef9/aqAZvk=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "c0e1ad9f0f703fd0519033b8f46c3267aab51a22",
"type": "gitlab"
},
"original": {
"host": "gitlab.gnome.org",
"owner": "GNOME",
"ref": "gnome-49",
"repo": "gnome-shell",
"type": "gitlab"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766949189,
"narHash": "sha256-t4lRzHDaAvSNIPcZO4NrjnfeYv+Yvr2BUWkUnoCbuzs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "398bc87bc89fc05a3c3731884b16e819c52e2b00",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"mnw": {
"locked": {
"lastModified": 1758834834,
"narHash": "sha256-Y7IvY4F8vajZyp3WGf+KaiIVwondEkMFkt92Cr9NZmg=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "cfbc7d1cc832e318d0863a5fc91d940a96034001",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "mnw",
"type": "github"
}
},
"ndg": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1765720983,
"narHash": "sha256-tWtukpABmux6EC/FuCJEgA1kmRjcRPtED44N+GGPq+4=",
"owner": "feel-co",
"repo": "ndg",
"rev": "f399ace8bb8e1f705dd8942b24d207aa4d75c936",
"type": "github"
},
"original": {
"owner": "feel-co",
"repo": "ndg",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1766651565,
"narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766951014,
"narHash": "sha256-dchrhWyPL1AG6gpMeTraBSbw1gd4DfBELaPIsw3u+5U=",
"owner": "nix-community",
"repo": "NUR",
"rev": "c24321d523b2373f979d84f810864c33ee8b121b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nur_2": {
"inputs": {
"flake-parts": [
"stylix",
"flake-parts"
],
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1764773531,
"narHash": "sha256-mCBl7MD1WZ7yCG6bR9MmpPO2VydpNkWFgnslJRIT1YU=",
"owner": "nix-community",
"repo": "NUR",
"rev": "1d9616689e98beded059ad0384b9951e967a17fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nvf": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"mnw": "mnw",
"ndg": "ndg",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
},
"locked": {
"lastModified": 1766596669,
"narHash": "sha256-9C72hpMDa99n4MbqZqsBkrBQZe+HEN9lnu7Sme67nmU=",
"owner": "notashelf",
"repo": "nvf",
"rev": "ef1f22efaf4aa37ba9382a7d1807fa8ac9c097fd",
"type": "github"
},
"original": {
"owner": "notashelf",
"repo": "nvf",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur",
"nvf": "nvf",
"stylix": "stylix"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_3",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur_2",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1766603026,
"narHash": "sha256-J2DDdRqSU4w9NNgkMfmMeaLIof5PXtS9RG7y6ckDvQE=",
"owner": "danth",
"repo": "stylix",
"rev": "551df12ee3ebac52c5712058bd97fd9faa4c3430",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1763914658,
"narHash": "sha256-Hju0WtMf3iForxtOwXqGp3Ynipo0EYx1AqMKLPp9BJw=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "0f6be815d258e435c9b137befe5ef4ff24bea32c",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1764465359,
"narHash": "sha256-lbSVPqLEk2SqMrnpvWuKYGCaAlfWFMA6MVmcOFJjdjE=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "edf89a780e239263cc691a987721f786ddc4f6aa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1764464512,
"narHash": "sha256-rCD/pAhkMdCx6blsFwxIyvBJbPZZ1oL2sVFrH07lmqg=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "907dbba5fb8cf69ebfd90b00813418a412d0a29a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -1,43 +0,0 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
nixpkgs,
home-manager,
stylix,
nvf,
nur,
...
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations."mtgmonkey" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
stylix.homeModules.stylix
nvf.homeManagerModules.default
nur.modules.homeManager.default
./home.nix
];
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 MiB

93
machines.nix Normal file
View File

@@ -0,0 +1,93 @@
{
lenovo = {
hostname = "lenovo";
system = "x86_64-linux";
users = ["andromeda"];
modules = [
# impermanence
./modules/nixos/impermanence.nix
./modules/nixos/impermanence-ssh.nix
# hardware configuration
# includes `system.stateVersion`
./modules/nixos/machines/lenovo.nix
# boot process
# systemd-boot
./modules/nixos/boot/lenovo.nix
# networking
./modules/nixos/laptop.nix
# vpn
./modules/nixos/openvpn-client.nix
# ly display manager
./modules/nixos/ly.nix
# sway window manager
./modules/nixos/sway.nix
# apps
./modules/nixos/steam.nix
# substitutors
./substitutors.nix
];
};
"109-199-104-83" = {
hostname = "109-199-104-83";
system = "x86_64-linux";
users = [];
modules = [
# impermanence
./modules/nixos/impermanence.nix
./modules/nixos/impermanence-ssh.nix
# hardware configuration
# verbatim as `nixos-generate-config` AND `system.stateVersion`
./modules/nixos/machines/109-199-104-83.nix
./modules/nixos/disko/remote.nix
# boot process
# grub boot on /dev/sda
./modules/nixos/boot/109-199-104-83.nix
# networking
./modules/nixos/networking/domains/galaxious.de.nix
# uses cloud-init to network
./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];})
# simple-nixos-mailserver email server
# mail.domain
./modules/nixos/mailserver.nix
# roundcube webmail client
# webmail.domain
./modules/nixos/roundcube.nix
# matrix homeserver
# matrix.domain
# ./modules/nixos/matrix-conduit.nix
# matrix homeserver
./modules/nixos/matrix-synapse.nix
# BROKEN
# forgejo
# git.domain
# ./modules/nixos/forgejo.nix
# BROKEN
# zulip chat client
# chat.domain
./modules/nixos/zulip.nix
];
};
}

View File

@@ -1,42 +1,27 @@
{ {
pkgs,
lib,
config, config,
lib,
pkgs,
... ...
}: let }: {
HOSTNAME = "nixos";
in {
imports = [./stylix.nix];
xdg.configFile."shell".source = lib.getExe pkgs.brush;
xdg.configFile."sway/config".source = lib.mkForce ./sway_config;
wayland.windowManager.sway.enable = true;
home = { home = {
username = "mtgmonkey"; username = "andromeda";
homeDirectory = "/home/${config.home.username}"; homeDirectory = "/home/${config.home.username}";
stateVersion = "26.05"; stateVersion = "26.05";
packages = [ packages = [
pkgs.acpi
pkgs.alacritty
pkgs.anki
pkgs.brightnessctl
pkgs.brush pkgs.brush
pkgs.dust pkgs.dust
pkgs.element-desktop
pkgs.fzf pkgs.fzf
pkgs.glow pkgs.glow
pkgs.grim
pkgs.jmtpfs
pkgs.nix-output-monitor pkgs.nix-output-monitor
pkgs.ranger pkgs.ranger
pkgs.rip2 pkgs.rip2
pkgs.ripgrep pkgs.ripgrep
pkgs.slurp
pkgs.tree pkgs.tree
pkgs.zoxide pkgs.zoxide
]; ];
}; };
programs = { programs = {
alacritty.enable = true;
bash = { bash = {
enable = true; enable = true;
shellAliases = { shellAliases = {
@@ -83,23 +68,12 @@ in {
settings = { settings = {
user = { user = {
name = config.home.username; name = config.home.username;
email = "${config.home.username}@${HOSTNAME}"; email = "${config.home.username}@android";
}; };
init.defaultBranch = "master"; init.defaultBranch = "master";
http.postBuffer = 524288000;
}; };
}; };
gh.enable = true;
home-manager.enable = true; home-manager.enable = true;
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; lsd.enable = true;
nvf = { nvf = {
enable = true; enable = true;

View File

@@ -0,0 +1,5 @@
{pkgs, ...}: {
environment.packages = [pkgs.git];
system.stateVersion = "26.05";
nix.settings.experimentalFeatures = ["nix-command" "flakes"];
}

View File

@@ -0,0 +1,9 @@
{
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
age.identityPaths = [
"/persist/etc/ssh/ssh_host_ed25519_key"
];
}

View File

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

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

@@ -0,0 +1,26 @@
{
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"'';
# make users immutable
users.mutableUsers = false;
}

View File

@@ -0,0 +1,64 @@
{
disko.devices = {
disk = {
disk1 = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
# legacy boot
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
# efi boot
esp = {
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
# btrfs
# root is on nodev
root = {
size = "100%";
content = {
extraArgs = ["-f"]; # internet told me to, works
type = "btrfs";
subvolumes = {
# nix store
"/nix" = {
mountpoint = "/nix";
};
# persistant directory
"/persist" = {
mountpoint = "/persist";
};
};
};
};
};
};
};
};
nodev = {
# root
"/" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"mode=755" # stops security complaints
];
};
};
};
}

27
modules/nixos/forgejo.nix Normal file
View File

@@ -0,0 +1,27 @@
{config, ...}: {
services.nginx = {
virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M
'';
locations."/".proxyPass = "https://localhost:${builtins.toString config.services.forgejo.settings.server.HTTP_PORT}";
};
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
server = rec {
DOMAIN = "git.galaxious.de";
ROOT_URL = "https://${DOMAIN}";
HTTP_PORT = 4043;
SSH_PORT = 4022;
};
service.DISABLE_REGISTRATION = false;
};
};
services.openssh.ports = [config.services.forgejo.settings.server.SSH_PORT];
}

View File

@@ -0,0 +1,4 @@
{
# ONLY include this module AFTER a machine has been provisioned
environment.persistence."/persist".directories = ["/etc/ssh"];
}

View File

@@ -0,0 +1,15 @@
{
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
enable = true;
hideMounts = true;
directories = [
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
];
files = [
"/etc/machine-id"
];
};
}

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

@@ -0,0 +1,37 @@
{
# 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"
];
}

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,25 @@
# 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" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = "26.05";
}

View File

@@ -0,0 +1,73 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
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 = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7";
fsType = "btrfs";
options = ["subvol=root"];
};
boot.initrd.postResumeCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount ${config.fileSystems."/".device} /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:$M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
mkdir /btrfs_tmp/root/persist
mkdir /btrfs_tmp/root/etc
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
'';
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/0e586651-36f4-42b0-99b3-3f0704a894d6";
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";
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [];
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,57 @@
{config, ...}: {
mailserver = {
enable = true;
stateVersion = 3;
# domain bs
fqdn = "mail.${config.networking.domain}";
domains = ["${config.networking.domain}"];
x509.useACMEHost = config.mailserver.fqdn;
loginAccounts = {
# test acc
"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}"];
};
};
};
# put dkim key into /etc for declarability
mailserver.dkimKeyDirectory = "/etc/dkim";
environment.etc."dkim/${config.networking.domain}.${config.mailserver.dkimSelector}.key" = {
source = config.age.secrets."dkim-${config.networking.domain}.${config.mailserver.dkimSelector}.key".path;
mode = "600";
user = config.services.rspamd.user;
group = config.services.rspamd.group;
};
# does acme for me
services.nginx = {
enable = true;
virtualHosts = {
"mail.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
};
};
};
security.acme = {
acceptTerms = true;
defaults.email = "mtgmonket@gmail.com";
};
# persist directories per the backup guidelines
environment.persistence."/persist" = {
directories = [
# not needed bc the dkim dir is declared
# "/var/dkim"
"/var/vmail"
"/var/lib/redis-rspamd"
"/var/lib/acme"
];
};
}

View File

@@ -0,0 +1,82 @@
{
config,
pkgs,
...
}: let
well_known_server = pkgs.writeText "well-known-matrix-server" ''
{
"m.server": "matrix.${config.services.matrix-conduit.settings.global.server_name}"
}
'';
well_known_client = pkgs.writeText "well-known-matrix-client" ''
{
"m.homeserver": {
"base_url": "https://matrix.${config.services.matrix-conduit.settings.global.server_name}"
}
'';
in {
services.matrix-conduit = {
enable = true;
settings.global = {
server_name = "${config.networking.domain}";
};
};
services.nginx = {
enable = true;
virtualHosts = {
"matrix.${config.services.matrix-conduit.settings.global.server_name}" = {
forceSSL = true;
enableACME = true;
listen = [
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
{
addr = "0.0.0.0";
port = 8448;
ssl = true;
}
];
locations."/_matrix/" = {
proxyPass = "http://backend_conduit$request_uri";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_buffering off;
'';
};
extraConfig = ''
merge_slashes off;
'';
};
"${config.services.matrix-conduit.settings.global.server_name}" = {
forceSSL = true;
enableACME = true;
locations."/.well-known/matrix/server/" = {
alias = "${well_known_server}";
extraConfig = ''
default_type application/json;
'';
};
locations."/.well-known/matrix/client/" = {
alias = "${well_known_client}";
extraConfig = ''
default_type application/json;
add_header Access-Control-Allow-Origin "";
'';
};
};
};
upstreams = {
backend-conduit = {
servers = {
"localhost:${builtins.toString config.services.matrix-conduit.settings.global.port}" = {};
};
};
};
};
networking.firewall.allowedTCPPorts = [8448];
networking.firewall.allowedUDPPorts = [8448];
}

View File

@@ -0,0 +1,65 @@
{
pkgs,
lib,
config,
...
}: let
fqdn = "${config.networking.hostName}.${config.networking.domain}";
baseUrl = "https://${fqdn}";
clientConfig."m.homeserver".base_url = baseUrl;
serverConfig."m.server" = "${fqdn}:443";
mkWellKnown = data: ''
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON data}';
'';
in {
services.postgresql.enable = true;
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts = {
"${config.networking.domain}" = {
enableACME = true;
forceSSL = true;
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
};
"${fqdn}" = {
enableACME = true;
forceSSL = true;
locations."/".extraConfig = ''
return 404;
'';
locations."/_matrix".proxyPass = "http://[::1]:8008";
locations."/_synapse/client".proxyPass = "http://[::1]:8008";
};
};
};
services.matrix-synapse = {
enable = true;
settings.server_name = config.networking.domain;
settings.public_baseurl = baseUrl;
settings.listeners = [
{
port = 8008;
bind_addresses = ["::1"];
type = "http";
tls = false;
x_forwarded = true;
resources = [
{
names = [
"client"
"federation"
];
compress = true;
}
];
}
];
};
}

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,15 @@
{
networking = {
useDHCP = false;
hostName = "109-199-104-83";
firewall = {
enable = true;
allowedTCPPorts = [80 443];
allowedUDPPorts = [80 443];
};
};
services.cloud-init = {
enable = true;
network.enable = true;
};
}

View File

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

View File

@@ -0,0 +1,11 @@
{
services.openvpn.servers = {
"173.249.5.230" = {config = ''config /etc/openvpn-confs/173.249.5.230.ovpn'';};
};
environment.persistence."/persist".directories = ["/etc/openvpn-confs"];
# turns out disabling ipv6 is a bad idea; I'm just going to enable v6 on the remote xD
# networking.enableIPv6 = lib.mkForce false;
# workaround; NetworkManager reenables ipv6 without the following
# boot.kernelParams = ["ipv6.disable=1"];
}

View File

@@ -0,0 +1,16 @@
{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";
'';
};
environment.persistence."/persist".directories = [
"/var/lib/roundcube"
"/var/lib/postgresql"
];
}

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;
}

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

@@ -0,0 +1,54 @@
{config, ...}: {
services.zulip = {
enable = true;
# lets it set up my postgresql for me
enablePostgresqlLocally = true;
# host domain
host = "chat.${config.networking.domain}";
# secrets; head rolled on keyboard for all :)
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;
# TODO check for parity with `mailserver-acc-admin-pw.age`
extraSecrets.email_password = builtins.toString config.age.secrets.zulip-extraSecrets-email_password.path;
# settings
zulipSettings = rec {
# email users
ZULIP_ADMINISTRATOR = "admin@${config.networking.domain}";
EMAIL_HOST_USER = ZULIP_ADMINISTRATOR;
# configure mailserver port
EMAIL_HOST = config.mailserver.fqdn;
EMAIL_USE_SSL = true;
EMAIL_PORT = 465;
# setting to allow realm creation; probably unsafe, might delete later :3
OPEN_REALM_CREATION = true;
# send all noreply emails from `admin@galaxious.de`
# TODO configure admin to send from any address
ADD_TOKENS_TO_NOREPLY_ADDRESS = false;
NOREPLY_EMAIL_ADDRESS = ZULIP_ADMINISTRATOR;
# domain name
EXTERNAL_HOST = config.services.zulip.host;
};
};
# persist
environment.persistence."/persist".directories = [
# messages
"/var/lib/rabbitmq"
# uploads
"/var/lib/zulip"
# contrived, but in the store a couple layers down
# "/var/lib/redis-zulip"
];
}

11
modules/template.nix Normal file
View File

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

24
pub-keys.nix Normal file
View File

@@ -0,0 +1,24 @@
{
age.secrets = {
andromeda-pw.file = ./secrets/andromeda-pw.age;
conduit-secretFile.file = ./secrets/conduit-secretFile.age;
"dkim-galaxious.de.mail.key".file = ./secrets/dkim-galaxious.de.mail.key.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 = {
andromeda = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJy2VD362wUcu0lKj2d6OIU8dbAna0Lu/NaAYIj8gdIA andromeda@lenovo";
lenovo = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHG4eqsLTq2os2mxfwhys3BpVnowcJrqt2CbRFzN2pJb root@lenovo";
_109-199-104-83 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBH5TA6Br8K4xTjD5YcXQDh4UQSvuE0lEs1UxUytDiAn root@109-199-104-83";
};
};
}

10
secrets.nix Normal file
View File

@@ -0,0 +1,10 @@
{lib, ...}: {
imports = [./pub-keys.nix];
options = {
pub-keys.ssh = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = {};
description = "set of public keys as `name = key`";
};
};
}

8
secrets/andromeda-pw.age Normal file
View File

@@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg ixFM7swaItfNnTRVSdTm1wZJ8lHUv7tDOgSXo1OpgCc
lf8/ChfcpgYkK8mTS9Zk++toOu0KNh88S+Lqu4a0UIw
-> ssh-ed25519 UHxfvA hbsRwdzU1IP3K/gH0btUOQ8hZer8Kgq+RqzcEVrCqTE
iSVh+yeypHoalRhaRM2XMlBvtO8HCyatDnWgUyC3GWU
--- hcs6DJZRvjoKDPI/cjUXRfM7+06PNJvWqjkvJof/bSs
Bo<1A>p<EFBFBD>Qlg-<2D>\<5C>=ƙ ڼ <0B><><1E><>sv<13><>~<7E><>O<EFBFBD><4F>{Rx<1E>IErô<>s<EFBFBD>1<1F><>v<EFBFBD><76><EFBFBD>:<<3C>
i<EFBFBD><EFBFBD><EFBFBD>1<EFBFBD>v<0E><03>K<EFBFBD><4B><07><16><>*<2A> |<7C> <20><><EFBFBD><EFBFBD><EFBFBD>5[{<7B>\<5C>

View File

@@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg x0n1JToeD7bRsDYJpv0HFzQYB9YxxiSqt+dG6elG1Eg
vspLec9Vm6fvJnlDGjzezThc1qeIYyWncBxYwsE/6rg
-> ssh-ed25519 UHxfvA nOlZo53SINXJs8tt/vdoiGjMnIW/lYZVdI8TJfAFqxE
XlxvrHDFlm8c7odfNbBw0/QeYuCj5e4VValql5JNNgg
-> ssh-ed25519 yXDKAA Rf+obXBUKxOcMqrb6rlOSfZGyjkj1PnRvHUSDToj6Tw
XV/3FmC48Wcg9r3C5soRKBwOcBgat2ueAa8pU1MUYLE
--- l/eEq13iyiddR9Rgf47Mv8JxPfjINwCnU4pd3KyxMVQ
^P%<25>Ϧ<EFBFBD><CFA6>}<7D><>M<EFBFBD><4D><EFBFBD>ه<DFA2>Q<>?d^<04>Y<EFBFBD> <09>~<7E>Tu<54><75><EFBFBD>o<EFBFBD>f<EFBFBD><66><EFBFBD>7<>n<1D>'!'͓<><10><><EFBFBD>]d͇0>v<>ǟ<EFBFBD><12>.<2E><>E]<1D><>ԇ|<7C>>d<><64>*wDɏ<44><1A><><EFBFBD><EFBFBD><0E><>)cH<63><48><EFBFBD>@W<>v*<2A>Wk<57><6B><EFBFBD>N<EFBFBD><4E>R<EFBFBD>F I@<40><>;9=u<><75><EFBFBD><EFBFBD><7F><EFBFBD><EFBFBD>τ<EFBFBD>,<01><><EFBFBD>)<29>>b<><03>:O<>J<EFBFBD>=<3D>W

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg at6Q9eK1o8Mk0+fJh+mnIVrvV1tASV+PGuV8MXuwR2c
cm3wvsLAemeeTFok7yBocNlfwewKruPnymG+wsT5g+Y
-> ssh-ed25519 UHxfvA aaQqfrUfUnLzwUVT6nCRPIAVlIhIWAJcPyeg3J6BQUI
4sh8ZV14csafSs8yAtFZIccSkiz6YnseV3DJcuhw7dQ
-> ssh-ed25519 yXDKAA KmwRbJURujQhlqOIVxzlVjyvaYRfyuJAVGWMZdkFaAE
mX083o2XdnnYgqLs5NeppwMbFHDHTucMiHHZuYdzLvo
--- Ay/SP2CXGOhSzO4KoiXFQhJMMdHaecxXOtNkGBK/RO0
Z<11>?<14><0E><1A><><EFBFBD>B<EFBFBD><1E>F<EFBFBD>9_N`<60><>8<EFBFBD><38><EFBFBD>&<26><><1D>@<40><>)q<>7<EFBFBD>a<11>O

View File

@@ -0,0 +1,10 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg sRu0FIphSJVMBcC02mo1YuZdy3i2+/jMeN3ROvxp4kM
sEwx23t3IAauISKesq+110ZKRKxQv3Zesd0AJufYOLs
-> ssh-ed25519 UHxfvA +YaJGPRT7nX2CqVzw1ixNLpW7MfzEnj44pSwj4iUwhI
E2U6Q+4uesNCWK7uVSztrA84TU/n/xLFm3PJH0hO/EM
-> ssh-ed25519 yXDKAA V2kygl0BK/oYpKnnheslBO2YqXFdQWFgtqfmDNdgolc
NpJNN4nfrbgOav8Y38C9DwKFZH+QTRp/US/8kyo9m0o
--- LdqtfywtHOAy3AZ7AexZU0TJMU/ugq+ZYN07706rNxY
<EFBFBD>
U$<24>Ap<>nG<6E>Neɕ<65>u<EFBFBD>y`!<21>ʤ<EFBFBD><CAA4><EFBFBD>f;ipv<70>Y<EFBFBD><59>V_3<5F><33>N+<06><><EFBFBD>k#<23>{<7B><><EFBFBD><EFBFBD><EFBFBD>W<EFBFBD>*<2A>n(<28><0F><03><><14><>ջG6<47><36> ݈yc`<60><>q<EFBFBD>:$K]?͗b=<3D>'<27>^<5E>9

7
secrets/mtgmonkey-pw.age Normal file
View File

@@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg WZNwnBmikWIb4rlH89iIQHouM7cw07/E/KXz/AVv3V8
FxLaO1zM0aGztJAsq+lgrM8gFogKY76Wcs1vYxhA19g
-> ssh-ed25519 UHxfvA YIpS5r25kHVJtG3+kDVUvAPyTKDsRPG/jHwXmiD44SA
FKAmC669aQzSbjBjbQbzCixdqnCXnb/JJRQo2MgEZgw
--- xvwJ5oYHR3T1D44fl/aeAVjZglnKhq0JKZr9YecC3EE
<EFBFBD>ow<6F>M<EFBFBD><4D><EFBFBD><EFBFBD>{<7B>8<EFBFBD>m<EFBFBD>$/<2F>1<EFBFBD><1A>0<EFBFBD>ts<74><73><EFBFBD>X<EFBFBD><58><1D><><EFBFBD><EFBFBD><EFBFBD><43><D793><EFBFBD><EFBFBD>\<13>h<>-}<7D><>E,<2C> <20><><1E>,dxdX<>TAk<41><6B><18>

33
secrets/secrets.nix Normal file
View File

@@ -0,0 +1,33 @@
let
pub-keys = (import ../pub-keys.nix).pub-keys;
andromeda = pub-keys.ssh.andromeda;
lenovo = pub-keys.ssh.lenovo;
_109-199-104-83 = pub-keys.ssh._109-199-104-83;
in {
# user passwords
"andromeda-pw.age".publicKeys = [andromeda lenovo];
"mtgmonkey-pw.age".publicKeys = [andromeda lenovo];
# contains the following env
# CONDUIT_JWT_SECRET
# CONDUIT_TURN_SECRET
"conduit-secretFile.age".publicKeys = [andromeda lenovo _109-199-104-83];
# dkim private keys
"dkim-galaxious.de.mail.key.age".publicKeys = [andromeda lenovo _109-199-104-83];
# 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.

10
secrets/zulip-camoKey.age Normal file
View File

@@ -0,0 +1,10 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg 5ADzKAtycqfFpqW/dp71FTaK2gchzdWFNqxPyZ6deSY
+aISA4YwF1l9S0fmE84wOvAJpM221bwPDYvXELTVv9k
-> ssh-ed25519 UHxfvA uKYcpPbaXA4r1OmlkuiIu/EqQ3IiHR7JpItnVgTaW2g
LjySgI4mTlaZY81IJc6DmBh43l2qeGlQnZi+rOlbtb8
-> ssh-ed25519 yXDKAA TMwoM06ZJsjkZ7eLguxqYB05jcRn+tTgVzE7WQIf0mw
vKwCkWsywGsgVv6Y278Mi28MhCYBRRUnfg4+EouOw+0
--- CScrim9wya9AhElXBtKBR3XBZDL83/g3MTfdF258GJ8
K#<23>>8}c<><EFBFBD><7F>}8<><38>L<04>(<28><>c<EFBFBD><63>
<EFBFBD>w1<EFBFBD>"O<><4F>

View File

@@ -0,0 +1,10 @@
age-encryption.org/v1
-> ssh-ed25519 mT2fyg IOcD4r19Gx2AvjusnnJDHQXr/U4Ti6qKr01I9lNQDQE
fCwouMQPvhkyzehszuv0YhSfNh9zGKaFNDKaTZT0rD0
-> ssh-ed25519 UHxfvA e95raPehUz6T2FR/eT8kzfrxt/Ou6kKsqi7z/3BkfwU
uHymqnY3t7IwpxWkN8xen3Vsy6R7VMoj+fR0zPnPinY
-> ssh-ed25519 yXDKAA nlR1prGysW+k8gq2npEiboFqoo9jKQ5ISxRiiCFlb0s
kaGOvlQgO0nOAl12mMKvafa9ezmy8XdUC2tVPuBG4iw
--- MRFAGURoyediqNSjGxr57a0w6n9lH2zVjfyrUZcyAYw
z<EFBFBD>0

Binary file not shown.

BIN
secrets/zulip-secretKey.age Normal file

Binary file not shown.

Binary file not shown.

8
substitutors.nix Normal file
View File

@@ -0,0 +1,8 @@
{
# spectrum
nix.settings.substituters = ["https://cache.dataaturservice.se/spectrum/"];
nix.settings.trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"spectrum-os.org-2:foQk3r7t2VpRx92CaXb5ROyy/NBdRJQG2uX2XJMYZfU="
];
}

45
users.nix Normal file
View File

@@ -0,0 +1,45 @@
{
config,
lib,
machine,
...
}: let
machines = import ./machines.nix;
in {
users.users =
builtins.mapAttrs
(name: value: lib.mkIf (builtins.elem name machine.users) value)
{
"andromeda" = {
isNormalUser = true;
description = "andromeda";
hashedPasswordFile = builtins.toString config.age.secrets.andromeda-pw.path;
extraGroups = [
"networkmanager"
"wheel"
];
};
};
environment.persistence."/persist".users = lib.mkIf config.environment.persistence."/persist".enable (
builtins.mapAttrs
(name: value: lib.mkIf (builtins.elem name machine.users) value)
{
"andromeda" = {
directories = [
".backups"
".local/share/Anki2"
".local/share/chat.fluffy.fluffychat"
".local/share/zoxide"
".ssh"
"conf"
"Downloads"
"pp"
];
files = [
".bash_history"
".brush_history"
];
};
}
);
}

269
users/andromeda/home.nix Normal file
View File

@@ -0,0 +1,269 @@
{
config,
lib,
machine,
pkgs,
...
}: let
background-path = ".config/sway/background.png";
sway_config =
pkgs.substitute
{
src = ./sway_config;
substitutions = [
"--replace"
"@backgroundImagePath@"
"${config.home.homeDirectory}/${background-path}"
];
};
in {
imports = [./stylix.nix];
xdg.configFile."shell".source = lib.getExe pkgs.brush;
xdg.configFile."sway/config".source = lib.mkForce sway_config;
wayland.windowManager.sway.enable = true;
home = {
username = "andromeda";
homeDirectory = "/home/${config.home.username}";
stateVersion = "26.05";
packages = [
pkgs.acpi
pkgs.agenix
pkgs.alacritty
pkgs.anki
pkgs.brightnessctl
pkgs.brush
pkgs.dust
pkgs.fluffychat
pkgs.fzf
pkgs.glow
pkgs.grim
pkgs.jmtpfs
pkgs.nix-output-monitor
pkgs.ranger
pkgs.rip2
pkgs.ripgrep
pkgs.slurp
pkgs.tree
pkgs.zoxide
];
file.${background-path}.source = config.stylix.image;
};
programs = {
alacritty.enable = true;
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;
firefox = {
enable = true;
package = pkgs.firefox.override {
cfg.enableTridactylNative = true;
};
profiles.${config.home.username} = {
extensions.packages = [
pkgs.nur.repos.rycee.firefox-addons.tridactyl
];
search = {
default = "ddghtml";
privateDefault = "ddghtml";
order = [
"wiki"
"options"
"packages"
"repos"
];
engines = {
"packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
};
"options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
};
"wiki" = {
urls = [
{
template = "https://wiki.nixos.org/w/index.php";
params = [
{
name = "search";
value = "{searchTerms}";
}
];
}
];
};
};
};
settings = {
"extensions.autoDisableScopes" = 0;
};
};
};
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

@@ -10,7 +10,7 @@
# silk-light is light theme # silk-light is light theme
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
polarity = "dark"; polarity = "dark";
image = ./nix-wallpaper-gear.png; image = "${pkgs.nixos-artwork.wallpapers.gear}/share/backgrounds/nixos/nix-wallpaper-gear.png";
fonts = { fonts = {
monospace = { monospace = {
package = pkgs.miracode; package = pkgs.miracode;

View File

@@ -9,13 +9,12 @@ set $screenshot grim -g "$(slurp)"
floating_modifier $mod normal floating_modifier $mod normal
workspace_layout stacking workspace_layout stacking
output * bg /home/mtgmonkey/conf/home/nix-wallpaper-gear.png fill output * bg @backgroundImagePath@ fill
# launch programs
bindsym $mod+Shift+Return exec $term bindsym $mod+Shift+Return exec $term
bindsym $mod+Shift+d exec $menu bindsym $mod+Shift+d exec $menu
bindsym $mod+Shift+a exec anki bindsym $mod+Shift+a exec anki
bindsym $mod+Shift+q exec librewolf bindsym $mod+Shift+q exec firefox
bindsym $mod+Shift+s exec $screenshot bindsym $mod+Shift+s exec $screenshot
bindsym $mod+Shift+c kill bindsym $mod+Shift+c kill
@@ -56,6 +55,12 @@ bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9 bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 0 bindsym $mod+Shift+0 move container to workspace number 0
seat * hide_cursor 100
input type:touchpad events disabled
bindsym $mod+r exec 'swaymsg "seat * hide_cursor 100"; swaymsg "input type:touchpad events disabled"'
bindsym $mod+t exec 'swaymsg "seat * hide_cursor 0"; swaymsg "input type:touchpad events enabled"'
bindsym $mod+f fullscreen bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle bindsym $mod+Shift+space floating toggle
bindsym $mod+Shift+minus move scratchpad bindsym $mod+Shift+minus move scratchpad
@@ -65,8 +70,8 @@ bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume 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 XF86AudioMicMute exec pact set-source-mute \@DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- bindsym --locked XF86MonBrightnessDown exec brightnessctl set 2%-
bindsym --locked XF86MonbrightnessUp exec brightnessctl set 5%+ bindsym --locked XF86MonbrightnessUp exec brightnessctl set 2%+
default_border none default_border none
font pango:monospace 0.001 font pango:monospace 0.001