Compare commits
94 Commits
8daeb01ea9
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
580cbd1851 | ||
|
|
6fdcd13627 | ||
|
|
6fb816f27c | ||
|
|
c0e92a4ef3 | ||
|
|
b754a3d53f | ||
|
|
19d45ebd05 | ||
|
|
312ee02d9e | ||
|
|
c377598d5c | ||
|
|
dcb82ed361 | ||
|
|
b25ce469b6 | ||
|
|
d2d370442b | ||
|
|
e05c9fe5a5 | ||
|
|
c1d8b4dff3 | ||
|
|
a7e65a0943 | ||
|
|
d2e95f2fb8 | ||
|
|
9b0944223f | ||
|
|
bea6414758 | ||
|
|
90ad40e207 | ||
|
|
803bc95317 | ||
|
|
4bd6ddece1 | ||
|
|
3fa9a368bf | ||
|
|
103ec86fc2 | ||
|
|
d9a6791fa3 | ||
|
|
70445c1c8c | ||
|
|
47aa29ba33 | ||
|
|
0970f7d0ee | ||
|
|
e5746332bb | ||
|
|
e38e0b95dc | ||
|
|
e6669a9d88 | ||
|
|
de911e358b | ||
|
|
b76f6ba3d6 | ||
|
|
45f5249165 | ||
|
|
90dd0582b0 | ||
|
|
0781c8428d | ||
|
|
2d1048b00f | ||
|
|
58f011079c | ||
|
|
d32f99baf5 | ||
|
|
13141933b4 | ||
|
|
a57edbf3fd | ||
|
|
bf22a9de21 | ||
|
|
411ee0c027 | ||
|
|
aec328ce93 | ||
|
|
7cbd450c61 | ||
|
|
97fca4cc7e | ||
|
|
243d7f3fc3 | ||
|
|
3f1b2d8789 | ||
|
|
0658c5d898 | ||
|
|
8b79f4e825 | ||
|
|
7fa3c698ed | ||
|
|
d3b6e8ed47 | ||
|
|
55a87d3d02 | ||
|
|
4c9b42ecc7 | ||
|
|
446ff7b960 | ||
|
|
0f2367c4b5 | ||
|
|
b174863576 | ||
|
|
cf25c67849 | ||
|
|
5424bfc493 | ||
|
|
1412004174 | ||
|
|
beaceffff0 | ||
|
|
c9a5c521db | ||
|
|
0a7e0c699e | ||
|
|
0e93982125 | ||
|
|
2114c6c347 | ||
|
|
b0da60cdab | ||
|
|
0fee255cbf | ||
|
|
3fc40529c8 | ||
|
|
2ed0cade4d | ||
|
|
1d17664e7a | ||
|
|
c632cd20c6 | ||
|
|
5366c48991 | ||
|
|
6db05df6a7 | ||
|
|
52a906919d | ||
|
|
e665bb0b14 | ||
|
|
33814b565d | ||
|
|
b86b5eae5e | ||
|
|
834472fe38 | ||
|
|
122a7fa174 | ||
|
|
49ba1149d8 | ||
|
|
e8abf3ab16 | ||
|
|
8ad0603114 | ||
|
|
7f4bac8208 | ||
|
|
92c4e1f7cf | ||
|
|
51d9476042 | ||
|
|
4b8882d82d | ||
|
|
42a93f042e | ||
|
|
07655e5135 | ||
|
|
9e402fdfa3 | ||
|
|
0468cf2621 | ||
|
|
e39747ae2e | ||
|
|
89dfb0adb9 | ||
|
|
424e2015ae | ||
|
|
9a089ea509 | ||
|
|
f53da44456 | ||
|
|
cba7b6b833 |
125
README.md
Normal file
125
README.md
Normal 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
20
TODO.md
Normal 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
|
||||
@@ -1,88 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
machine,
|
||||
...
|
||||
}: {
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
environment.persistence."/nix/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/ly/save.txt"
|
||||
];
|
||||
users."andromeda" = {
|
||||
directories = [
|
||||
".backups"
|
||||
".local/share/Anki2"
|
||||
".local/share/chat.fluffy.fluffychat"
|
||||
".local/share/zoxide"
|
||||
".ssh"
|
||||
"conf"
|
||||
"Downloads"
|
||||
"pp"
|
||||
];
|
||||
files = [
|
||||
".bash_history"
|
||||
".brush_history"
|
||||
];
|
||||
};
|
||||
};
|
||||
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;
|
||||
printing.enable = true;
|
||||
};
|
||||
system.stateVersion = "26.05";
|
||||
time.timeZone = "Europe/Berlin";
|
||||
users.users."andromeda" = {
|
||||
isNormalUser = true;
|
||||
description = "andromeda";
|
||||
initialPassword = "password";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
}
|
||||
5
deploy.sh
Executable file
5
deploy.sh
Executable 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
|
||||
413
flake.lock
generated
413
flake.lock
generated
@@ -1,5 +1,28 @@
|
||||
{
|
||||
"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"
|
||||
@@ -68,6 +91,65 @@
|
||||
"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": {
|
||||
@@ -85,6 +167,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,
|
||||
@@ -179,6 +277,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": {
|
||||
@@ -199,6 +345,27 @@
|
||||
}
|
||||
},
|
||||
"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"
|
||||
@@ -218,6 +385,27 @@
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1737831083,
|
||||
@@ -266,6 +454,96 @@
|
||||
"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": {
|
||||
"locked": {
|
||||
"lastModified": 1766651565,
|
||||
@@ -282,6 +560,38 @@
|
||||
"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,
|
||||
@@ -298,6 +608,44 @@
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -366,14 +714,14 @@
|
||||
},
|
||||
"nvf": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"mnw": "mnw",
|
||||
"ndg": "ndg",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766596669,
|
||||
@@ -389,17 +737,59 @@
|
||||
"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": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"agenix": "agenix",
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager_2",
|
||||
"impermanence": "impermanence",
|
||||
"nix-on-droid": "nix-on-droid",
|
||||
"nix-zulip": "nix-zulip",
|
||||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"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",
|
||||
@@ -413,7 +803,7 @@
|
||||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur_2",
|
||||
"systems": "systems_2",
|
||||
"systems": "systems_3",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
@@ -464,6 +854,21 @@
|
||||
"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": {
|
||||
|
||||
99
flake.nix
99
flake.nix
@@ -1,11 +1,31 @@
|
||||
{
|
||||
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";
|
||||
nixos-mailserver = {
|
||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
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 = {
|
||||
url = "github:viperML/noshell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -18,43 +38,76 @@
|
||||
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 = {
|
||||
agenix,
|
||||
disko,
|
||||
home-manager,
|
||||
impermanence,
|
||||
nixos-mailserver,
|
||||
nixpkgs,
|
||||
nix-on-droid,
|
||||
nix-zulip,
|
||||
noshell,
|
||||
nur,
|
||||
nvf,
|
||||
phoenix,
|
||||
stylix,
|
||||
...
|
||||
}: let
|
||||
laptop = import ./machines/laptop.nix;
|
||||
in {
|
||||
nixosConfigurations.${laptop.hostname} = nixpkgs.lib.nixosSystem {
|
||||
system = laptop.system;
|
||||
specialArgs = {machine = laptop;};
|
||||
modules = [
|
||||
nix-zulip' = (import "${nix-zulip}/nix/default.nix" {}).output;
|
||||
machines = import ./machines.nix;
|
||||
configuration = machine: modules:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
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
|
||||
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 = [nur.overlays.default];
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
machine = laptop;
|
||||
};
|
||||
home-manager.extraSpecialArgs = {inherit machine;};
|
||||
home-manager.users =
|
||||
builtins.mapAttrs
|
||||
(name: value: value)
|
||||
(
|
||||
nixpkgs.legacyPackages.${laptop.system}.lib.genAttrs
|
||||
laptop.usernames
|
||||
nixpkgs.legacyPackages.${machine.system}.lib.genAttrs
|
||||
machine.users
|
||||
(
|
||||
name: {
|
||||
imports = [
|
||||
agenix.homeManagerModules.default
|
||||
stylix.homeModules.stylix
|
||||
nvf.homeManagerModules.default
|
||||
./users/${name}/home.nix
|
||||
@@ -63,10 +116,24 @@
|
||||
)
|
||||
);
|
||||
}
|
||||
impermanence.nixosModules.impermanence
|
||||
noshell.nixosModules.default
|
||||
./configuration.nix
|
||||
./hardware-configuration.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
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,41 +1,24 @@
|
||||
# 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, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "sdhci_pci"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "none";
|
||||
fsType = "tmpfs";
|
||||
options = ["defaults" "size=25%" "mode=755"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/0e586651-36f4-42b0-99b3-3f0704a894d6";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/F425-55BA";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
93
machines.nix
Normal file
93
machines.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
hostname = "lenovo";
|
||||
usernames = ["andromeda"];
|
||||
system = "x86_64-linux";
|
||||
}
|
||||
165
modules/nix-on-droid/home.nix
Normal file
165
modules/nix-on-droid/home.nix
Normal file
@@ -0,0 +1,165 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
username = "andromeda";
|
||||
homeDirectory = "/home/${config.home.username}";
|
||||
stateVersion = "26.05";
|
||||
packages = [
|
||||
pkgs.brush
|
||||
pkgs.dust
|
||||
pkgs.fzf
|
||||
pkgs.glow
|
||||
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}@android";
|
||||
};
|
||||
init.defaultBranch = "master";
|
||||
};
|
||||
};
|
||||
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;
|
||||
};
|
||||
}
|
||||
5
modules/nix-on-droid/nix-on-droid.nix
Normal file
5
modules/nix-on-droid/nix-on-droid.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
environment.packages = [pkgs.git];
|
||||
system.stateVersion = "26.05";
|
||||
nix.settings.experimentalFeatures = ["nix-command" "flakes"];
|
||||
}
|
||||
9
modules/nixos/boot/109-199-104-83.nix
Normal file
9
modules/nixos/boot/109-199-104-83.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
age.identityPaths = [
|
||||
"/persist/etc/ssh/ssh_host_ed25519_key"
|
||||
];
|
||||
}
|
||||
6
modules/nixos/boot/lenovo.nix
Normal file
6
modules/nixos/boot/lenovo.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
}
|
||||
26
modules/nixos/common.nix
Normal file
26
modules/nixos/common.nix
Normal 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;
|
||||
}
|
||||
64
modules/nixos/disko/remote.nix
Normal file
64
modules/nixos/disko/remote.nix
Normal 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
27
modules/nixos/forgejo.nix
Normal 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];
|
||||
}
|
||||
4
modules/nixos/impermanence-ssh.nix
Normal file
4
modules/nixos/impermanence-ssh.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
# ONLY include this module AFTER a machine has been provisioned
|
||||
environment.persistence."/persist".directories = ["/etc/ssh"];
|
||||
}
|
||||
15
modules/nixos/impermanence.nix
Normal file
15
modules/nixos/impermanence.nix
Normal 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
37
modules/nixos/laptop.nix
Normal 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
11
modules/nixos/ly.nix
Normal 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"];
|
||||
};
|
||||
}
|
||||
25
modules/nixos/machines/109-199-104-83.nix
Normal file
25
modules/nixos/machines/109-199-104-83.nix
Normal 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";
|
||||
}
|
||||
73
modules/nixos/machines/lenovo.nix
Normal file
73
modules/nixos/machines/lenovo.nix
Normal 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";
|
||||
}
|
||||
57
modules/nixos/mailserver.nix
Normal file
57
modules/nixos/mailserver.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
||||
82
modules/nixos/matrix-conduit.nix
Normal file
82
modules/nixos/matrix-conduit.nix
Normal 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];
|
||||
}
|
||||
65
modules/nixos/matrix-synapse.nix
Normal file
65
modules/nixos/matrix-synapse.nix
Normal 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;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
3
modules/nixos/networking/domains/galaxious.de.nix
Normal file
3
modules/nixos/networking/domains/galaxious.de.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
networking.domain = "galaxious.de";
|
||||
}
|
||||
19
modules/nixos/networking/hard-ssh.nix
Normal file
19
modules/nixos/networking/hard-ssh.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
||||
15
modules/nixos/networking/networks/109-199-104-83.nix
Normal file
15
modules/nixos/networking/networks/109-199-104-83.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
3
modules/nixos/networking/ssh-as-root.nix
Normal file
3
modules/nixos/networking/ssh-as-root.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{lib, ...}: {
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
|
||||
}
|
||||
11
modules/nixos/openvpn-client.nix
Normal file
11
modules/nixos/openvpn-client.nix
Normal 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"];
|
||||
}
|
||||
16
modules/nixos/roundcube.nix
Normal file
16
modules/nixos/roundcube.nix
Normal 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
10
modules/nixos/steam.nix
Normal 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
3
modules/nixos/sway.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
programs.sway.enable = true;
|
||||
}
|
||||
54
modules/nixos/zulip.nix
Normal file
54
modules/nixos/zulip.nix
Normal 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
11
modules/template.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [];
|
||||
options = {};
|
||||
config = {};
|
||||
}
|
||||
24
pub-keys.nix
Normal file
24
pub-keys.nix
Normal 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
10
secrets.nix
Normal 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
8
secrets/andromeda-pw.age
Normal 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>
|
||||
9
secrets/conduit-secretFile.age
Normal file
9
secrets/conduit-secretFile.age
Normal 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
|
||||
BIN
secrets/dkim-galaxious.de.mail.key.age
Normal file
BIN
secrets/dkim-galaxious.de.mail.key.age
Normal file
Binary file not shown.
BIN
secrets/mailserver-acc-admin-pw.age
Normal file
BIN
secrets/mailserver-acc-admin-pw.age
Normal file
Binary file not shown.
9
secrets/mailserver-acc-test-pw.age
Normal file
9
secrets/mailserver-acc-test-pw.age
Normal 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
|
||||
10
secrets/mailserver-acc-zulip+admin-pw.age
Normal file
10
secrets/mailserver-acc-zulip+admin-pw.age
Normal 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
7
secrets/mtgmonkey-pw.age
Normal 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>Cד<43><D793><EFBFBD><EFBFBD>\<13>h<>-}<7D><>E,<2C> <20><><1E>,dxdX<>TAk<41><6B><18>
|
||||
33
secrets/secrets.nix
Normal file
33
secrets/secrets.nix
Normal 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];
|
||||
}
|
||||
BIN
secrets/zulip-avatarSaltKey.age
Normal file
BIN
secrets/zulip-avatarSaltKey.age
Normal file
Binary file not shown.
10
secrets/zulip-camoKey.age
Normal file
10
secrets/zulip-camoKey.age
Normal 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>
|
||||
10
secrets/zulip-extraSecrets-email_password.age
Normal file
10
secrets/zulip-extraSecrets-email_password.age
Normal 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
|
||||
BIN
secrets/zulip-rabbitmqPassword.age
Normal file
BIN
secrets/zulip-rabbitmqPassword.age
Normal file
Binary file not shown.
BIN
secrets/zulip-secretKey.age
Normal file
BIN
secrets/zulip-secretKey.age
Normal file
Binary file not shown.
BIN
secrets/zulip-sharedSecretKey.age
Normal file
BIN
secrets/zulip-sharedSecretKey.age
Normal file
Binary file not shown.
8
substitutors.nix
Normal file
8
substitutors.nix
Normal 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
45
users.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -6,82 +6,16 @@
|
||||
...
|
||||
}: let
|
||||
background-path = ".config/sway/background.png";
|
||||
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
|
||||
'';
|
||||
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;
|
||||
@@ -93,6 +27,7 @@ in {
|
||||
stateVersion = "26.05";
|
||||
packages = [
|
||||
pkgs.acpi
|
||||
pkgs.agenix
|
||||
pkgs.alacritty
|
||||
pkgs.anki
|
||||
pkgs.brightnessctl
|
||||
@@ -111,7 +46,7 @@ in {
|
||||
pkgs.tree
|
||||
pkgs.zoxide
|
||||
];
|
||||
file.${background-path}.source = pkgs.nixos-artwork.wallpapers.gear;
|
||||
file.${background-path}.source = config.stylix.image;
|
||||
};
|
||||
programs = {
|
||||
alacritty.enable = true;
|
||||
@@ -156,6 +91,81 @@ in {
|
||||
};
|
||||
};
|
||||
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 = {
|
||||
@@ -168,15 +178,6 @@ in {
|
||||
};
|
||||
gh.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;
|
||||
nvf = {
|
||||
enable = true;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
# silk-light is light theme
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-hard.yaml";
|
||||
polarity = "dark";
|
||||
image = "${pkgs.nixos-artwork.wallpapers.gear}/share/backgrounds/nixos/nix-wallpaper-gear.png";
|
||||
fonts = {
|
||||
monospace = {
|
||||
package = pkgs.miracode;
|
||||
|
||||
79
users/andromeda/sway_config
Normal file
79
users/andromeda/sway_config
Normal file
@@ -0,0 +1,79 @@
|
||||
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 @backgroundImagePath@ fill
|
||||
|
||||
bindsym $mod+Shift+Return exec $term
|
||||
bindsym $mod+Shift+d exec $menu
|
||||
bindsym $mod+Shift+a exec anki
|
||||
bindsym $mod+Shift+q exec firefox
|
||||
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
|
||||
|
||||
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+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 2%-
|
||||
bindsym --locked XF86MonbrightnessUp exec brightnessctl set 2%+
|
||||
|
||||
default_border none
|
||||
font pango:monospace 0.001
|
||||
titlebar_border_thickness 0
|
||||
titlebar_padding 0
|
||||
Reference in New Issue
Block a user