Compare commits

...

300 commits

Author SHA1 Message Date
Benjamin Bädorf f6062d0019
Merge pull request 'Pull in upstream devos commits' (#150) from feature/pull-in-upstream-devos-commits into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/150
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-11-08 16:50:10 +00:00
teutat3s 06ed2a78a9
Bump flake.lock 2022-11-07 11:26:58 +01:00
teutat3s 02c145697b
Pull in upstream commits from https://github.com/divnix/digga/pull/490
Improved flake-compat

Get the rev from the flake.lock file. Shouldn't be an issue for
first time users as the guide instructs users to generate a lock
file. `builtins.file` was used in accordance with nix.dev
reccommendations.

https://nix.dev/anti-patterns/language#reproducibility-referencing-top-level-directory-with

Rm tempfix
2022-11-07 11:24:59 +01:00
teutat3s c860d5e3f6
Merge pull request 'Update drone-config' (#143) from feature/update-drone-config-for-kvm-tests into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/143
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-10-29 20:40:26 +00:00
Hendrik Sokolowski 630d0afc5e
Update drone-config 2022-10-29 03:57:08 +02:00
Benjamin Bädorf e26ffd2725
Merge pull request 'Embrace nvfetcher' (#145) from feature/embrace-nvfetcher into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/145
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-29 00:43:30 +00:00
Benjamin Bädorf 6824cf70f3
Merge pull request 'Improve hibernation logic' (#148) from feature/improve-hibernation-logic into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/148
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-24 19:35:28 +00:00
teutat3s 3aff6251b5
Merge branch 'main' into feature/embrace-nvfetcher 2022-10-24 15:25:45 +02:00
teutat3s ea6233f57e
zsh: fetch plugins using nvfetcher 2022-10-24 15:24:52 +02:00
Hendrik Sokolowski eece344083
Make resume_offset optional 2022-10-23 18:33:52 +02:00
teutat3s 51d03f0de7
Merge pull request 'drone: use our custom drone-scp image' (#146) from fix/drone-publish-iso-symlink into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/146
2022-10-21 13:08:52 +00:00
teutat3s e4418bfe0c
drone: use our custom drone-scp image 2022-10-20 18:29:20 +02:00
teutat3s 520e9546ed
Merge pull request 'Bump flake.lock' (#144) from bump/flake-lock into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/144
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-20 10:37:08 +00:00
teutat3s e69c8fe9c7
Bump flake.lock 2022-10-18 17:02:23 +02:00
teutat3s 4520dece5f
neovim: use nvfetcher for custom plugins 2022-10-18 16:55:51 +02:00
Benjamin Bädorf bcf6ca5fe4
Merge pull request 'Fix base user ssh public keys' (#141) from fix/base-user-ssh-public-keys into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/141
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-05 11:19:41 +00:00
teutat3s d43bd80580
core: disable SSH passwordAuthentication by default 2022-10-05 11:58:26 +02:00
teutat3s f28d05e24e
Change user.publicKeys to a SSH keys string list 2022-10-05 11:57:51 +02:00
Benjamin Bädorf b7132c3744
Merge pull request 'Be more paranoid' (#139) from feature/more-paranoia into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/139
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-10-03 18:36:05 +00:00
Benjamin Bädorf f3a5b2233a
Merge branch 'main' into feature/more-paranoia 2022-10-03 02:55:25 +00:00
Benjamin Bädorf 5da560ef56
Open up SSH by default 2022-10-03 04:55:14 +02:00
Benjamin Bädorf 65bb399df8
Merge pull request 'alacritty: improve selection and cursor colors' (#140) from fix/alacritty-selection-cursor-colors into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/140
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-03 02:48:39 +00:00
teutat3s b23e1e16a4
alacritty: improve selection and cursor colors 2022-10-03 04:11:16 +02:00
Benjamin Bädorf 6f3885d0ca
Remove doubled openssh configs in paranoia module 2022-10-03 04:07:48 +02:00
Benjamin Bädorf 8529a15177
Be more paranoid
The paranoia mode now also enables the firewall and closes down a couple
of small openSSH holes. `noexec` on the whole FS is left out as it will
make every existing PubSolarOS installation panic.
2022-10-03 04:03:09 +02:00
Benjamin Bädorf 22445ea19e
Merge pull request 'ci: fix upload target path' (#138) from fix/iso-publish-upload-path into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/138
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-03 00:59:57 +00:00
teutat3s f2ecc2d8b9
ci: fix upload target path 2022-10-03 02:30:08 +02:00
teutat3s 741e4bfef1
Merge pull request 'iso: add PubSolarOS naming, drone pipeline' (#137) from feature/our-super-iso-label into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/137
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-02 23:33:44 +00:00
teutat3s 986680cc26
bootstrap iso: add PubSolarOS naming, drone pipeline
adjustments to include a symlink to the latest iso built
2022-10-03 01:30:34 +02:00
Benjamin Bädorf 40e327d60b
Merge pull request 'Update inputs in flake.lock' (#133) from update/flake-lock into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/133
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-02 12:04:35 +00:00
teutat3s e801958494
Update inputs in flake.lock 2022-10-02 04:10:50 +02:00
hensoko 1181cd6fea
Improve core module (#132)
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/132
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-02 01:17:34 +00:00
teutat3s a4545fa1d2
Merge pull request 'Fix swayidle, lock, waybar menu' (#131) from fix/swayidle-waybar-menu into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/131
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-10-01 23:47:53 +00:00
teutat3s 612e5e35c0
Fix swayidle, lock, waybar menu 2022-10-02 01:19:48 +02:00
teutat3s a7f5b9de2a
Merge pull request 'bootstrap: host needs digga's bootstrapIso module' (#129) from fix/bootstrap-host-missing-isoimage-module into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/129
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-09-01 14:41:29 +00:00
teutat3s 0fbabc23b9
bootstap: host needs digga's bootstrapIso module 2022-09-01 15:35:04 +02:00
teutat3s 0c11e9119e
Merge pull request 'Fixes for hosts rebuilding with ISO config, fixes for swaylock, swayidle' (#128) from fix/iso-hosts-swaylock-swayidle into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/128
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-09-01 13:29:15 +00:00
teutat3s 1767dcb076
Fix swayidle service
- add missing \
- reference swaylock-bg script from pkgs
2022-09-01 14:38:10 +02:00
teutat3s d563b1d469
Fix swaylock-bg, now a bash script
- reference jq from pkgs
- shellcheck fixes
2022-09-01 14:37:14 +02:00
teutat3s b7ba1b7ba9
Fix hosts rebuilding with ISO config after #125
See: https://github.com/divnix/digga/pull/455#issuecomment-1231789444

Upstream fix found in e1b09712fe/nixos/default.nix (L85-L88)
2022-09-01 14:34:57 +02:00
teutat3s 0ce3a30211
Merge pull request 'Use more descriptive drone secret names' (#127) from fix/ci-publish-iso into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/127
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-29 16:43:08 +00:00
teutat3s 2fa84ab4aa
Use more descriptive drone secret names 2022-08-29 16:47:31 +02:00
teutat3s 272bbd40ed
Merge pull request 'Fix Build ISO ci step' (#126) from fix/bootstrap-iso-ci into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/126
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-29 13:30:11 +00:00
teutat3s 7b5696435a
Fix Build ISO ci step, use
'.#nixosConfigurations.bootstrap.config.system.build.isoImage'
2022-08-29 15:19:13 +02:00
teutat3s 132b2b1a91
Merge pull request 'Use our digga fork to fix bootstrap iso builds' (#125) from fix/bootstrap-iso into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/125
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-29 13:11:06 +00:00
teutat3s c1b672fe70
Fix conflicting definition values, force use of
our defined value.

error: The option 'services.getty.autologinUser' has conflicting definition values:
       - In '/nix/store/zyh8f18z0m1r9jppvdcdivfvfxg0j3fv-source/nixos/modules/profiles/installation-device.nix': "nixos"
       - In '/nix/store/w82qigr5jqv9c6jhdrpdwixydk3rmbzw-source/modules/graphical': "pub-solar"
2022-08-29 11:55:20 +02:00
teutat3s 209eed069c
Add comment how to build isoImage 2022-08-29 11:53:55 +02:00
teutat3s 242de215d6
Switch to our digga fork, include upstream PR
divnix/digga#455 to fix bootstrap iso builds
2022-08-27 13:49:55 +02:00
teutat3s 6122021435
Bump flake.lock 2022-08-27 13:48:32 +02:00
Benjamin Bädorf 27e961da2c
Merge pull request 'feature/tests' (#91) from feature/tests into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/91
2022-08-26 00:20:18 +00:00
Benjamin Bädorf 51de365ae7
Merge branch 'main' into feature/tests 2022-08-25 23:21:15 +00:00
Benjamin Bädorf c7affb6533
Merge pull request 'Barebones ci-runner module' (#108) from feature/ci-runner-onecommit into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/108
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-25 21:46:22 +00:00
teutat3s 8c3bd94ba2
Merge branch 'main' into feature/tests 2022-08-25 17:09:37 +02:00
teutat3s 6db8ab0a98
Merge pull request 'Import the full environment again' (#124) from fix/env581a8829 into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/124
Reviewed-by: teutat3s <teutates@mailbox.org>
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-25 14:14:16 +00:00
teutat3s c2e5d8df3c
ci: better matrix notify template message,
prefix manta path with ci/ and set target filename for mput
2022-08-25 16:06:56 +02:00
teutat3s 8feaa494cb
ci: add matrix notify step, fix ssh key id 2022-08-25 16:06:48 +02:00
teutat3s 553e23baf9
ci: add upload artifacts step 2022-08-25 16:06:37 +02:00
teutat3s 472560e1c1
Restructure CI:
build ISO on each push to main branch

tags with v* and t* names trigger a test VM

pull requests trigger a basic check building host PubSolarOS
2022-08-25 16:06:33 +02:00
teutat3s 8be1bd53d3
wip: first PubSolarOS iso test using the NixOS
test suite:

https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests
2022-08-25 16:06:25 +02:00
Benjamin Bädorf 8fc8ac2d58
Fix service startup for ci-runner 2022-08-25 15:25:34 +02:00
Benjamin Bädorf a643701e49
Merge branch 'main' into feature/ci-runner-onecommit 2022-08-25 13:20:52 +00:00
Benjamin Bädorf dbee2f03e7
Import the full environment again 2022-08-25 15:17:38 +02:00
Benjamin Bädorf b16299965c
Merge pull request 'Fix hibernation' (#120) from fix/hibernation into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/120
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-25 09:58:20 +00:00
Benjamin Bädorf 6d1d683b23
Fix swayidle command, add hibernation on lid close, fix env
The swayidle command in the service was straight up broken, this commit
fixes that.

Environment Variables set in the `session-variables` file are now
correctly imported across the system. This fixes `EDITOR` defaulting to
`nano`.
2022-08-25 00:13:23 +02:00
Benjamin Bädorf 40799ed5b6
Merge pull request 'feature/pin-zsh-plugins-to-deterministic-versions' (#123) from feature/pin-zsh-plugins-to-deterministic-versions into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/123
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-24 22:05:08 +00:00
teutat3s de03f0f42f
zsh: correctly pin plugins to commits instead of
branch names, to prevent errors like:
error: hash mismatch in fixed-output derivation '/nix/store/n7w9jd46zx4rzy9a24abxv3lcx1ikn1j-source.drv':
         specified: sha256-0pzkKPdzyQXTe8usaSaM1Iivi2UHQrSJrh5V2pRd0Gg=
            got:    sha256-9vc4cMBCNOmPOyzGwnPeMrXXyQUq4pC9Du3AWl9+Rys=
2022-08-24 23:19:18 +02:00
teutat3s f7eda8ca1c
zsh: bundle plugins within our config 2022-08-24 23:19:13 +02:00
hensoko ad0402fd93
Merge pull request 'Disable NetworkManager-wait-online system service' (#121) from feature/disable-networkmanager-wait-online into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/121
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-24 20:50:45 +00:00
hensoko 9d83f32bd8
Merge pull request 'Use iwd as wifi backend' (#122) from feature/use-iwd-as-networkmanager-wifi-backend into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/122
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-24 20:50:18 +00:00
Hendrik Sokolowski 8efc4c2f9e
Use iwd as wifi backend
iwd is a lightweight wireless connection backend that was initiated by
developers of intel. It is supposed to be faster.
2022-08-24 21:49:59 +02:00
Hendrik Sokolowski 57f608ecde
Disable NetworkManager-wait-online system service
This service is presumably useful for devices that need to ensure there
is an active internet connection before starting other systemd units.
This is neither the case for end-user devices as the an active internet
connection is only needed after login nor the case for server-like
systems as they normally have a static / dhcp-based network configuration
which does not require switchable network configuration profiles.
2022-08-24 21:47:58 +02:00
Benjamin Bädorf dc8257f31f
Fix hibernation
The resumeDevice and kernel `resume` parameter were being used wrong.

Only `boot.resumeDevice` is necessary, and it should point at the _block
device_ that holds the swapfile. If you are running on encrypted
volumes, this means you will need to use the name of the *decrypted
block device* on which the swapfile sits.
2022-08-24 18:46:35 +02:00
Benjamin Bädorf 80e71ca547
Merge pull request 'nix: set nix.package to force overlays/overrides.nix to apply' (#119) from fix/nix-version-from-latest into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/119
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-24 13:13:20 +00:00
teutat3s c63c3da345
nix: set nix.package to force overlays/
overrides.nix to apply

use nix as default version alias in devshell as well
2022-08-24 00:55:57 +02:00
Benjamin Bädorf 9c5bcc6a2f
Merge branch 'main' into feature/ci-runner-onecommit 2022-08-14 22:17:19 +02:00
Benjamin Bädorf 0f6eb3d6df
Merge pull request 'Always hibernate' (#74) from feat/hibernate-always into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/74
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-14 19:18:43 +00:00
Benjamin Bädorf 14ba701061
Don't use libvirt in ci-runner 2022-08-14 20:28:18 +02:00
Benjamin Bädorf c5362c0453
Fix path in drone runner exec 2022-08-14 20:25:43 +02:00
Benjamin Bädorf f9b7c9e3c9
Fix build 2022-08-14 20:09:38 +02:00
Benjamin Bädorf 46992c46d6
Add parameter for swapfile offset 2022-08-14 19:59:01 +02:00
Benjamin Bädorf ba6dfdcf53
Fix sway mode_system config import 2022-08-14 19:48:45 +02:00
Benjamin Bädorf 963212893e
Merge branch 'main' into feat/hibernate-always 2022-08-14 19:15:25 +02:00
Benjamin Bädorf aabe96a335
Fix hibernation config 2022-08-14 18:11:25 +02:00
Benjamin Bädorf 5de07c5b8a
Merge pull request 'Improve help and screen recording keybindings in sway' (#100) from feature/screen-recording into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/100
Reviewed-by: teutat3s <teutates@mailbox.org>
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-14 16:04:07 +00:00
Benjamin Bädorf 043178172b
Improve help and screen recording keybindings in sway
This commit shuffles around some sway keybindings and improves the
screen recording experience by adding a small wrapper around `slurp` and
`wf-recorder` conveniently called `record-screen`.

* `$mod+F5` now reload the sway configuration,
* `$mod+Ctrl+r` starts a screen recording (to stop it, go to workspace 7
  and kill the process),
* `record-screen` and the firefox sharing indicator are both on
  workspace 7 now, making it the "trash" workspace,
* `$mod+F1` and `$mod+Shift+h` now open Firefox with the docs of our
repository availabe under `help.local`.
* To not infuriate `qMasterPassword` users, that is now available under
`$mod+Shift+m` instead of `$mod+F1`.
2022-08-14 18:03:32 +02:00
Benjamin Bädorf 26803ccf4f
Merge branch 'feat/hibernate-always' of git.b12f.io:pub-solar/os into feat/hibernate-always 2022-08-14 17:20:14 +02:00
Benjamin Bädorf ca4262b84f
Fix hibernation enabling in paranoia mode 2022-08-14 17:20:09 +02:00
Benjamin Bädorf 63435d6e59
Merge branch 'main' into feature/ci-runner-onecommit 2022-08-14 15:18:58 +00:00
Benjamin Bädorf 932bd05c41
Merge branch 'main' into feat/hibernate-always 2022-08-14 15:18:01 +00:00
teutat3s 55d5f6938a
Merge pull request 'tree: remove bud and all mentions of it' (#105) from feature/remove-bud into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/105
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-14 15:17:40 +00:00
hensoko cb5c75b1cc
feature/terminal-life-lite-mode (#117)
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/117
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-14 15:17:35 +00:00
teutat3s b42f7b72ad
Remove bud from CI, too 2022-08-14 17:16:56 +02:00
teutat3s 1c015508e1
tree: remove bud and all mentions of it
Include upstream update doc updates
2022-08-14 17:16:54 +02:00
Benjamin Bädorf 762e78677b
Fix hibernation enabling in paranoia mode 2022-08-14 17:15:50 +02:00
Benjamin Bädorf 4c0991c7e1
Put always hibernate behind a flag
Hibernation is now a core option:
```
pub-solar.core.hibernation.enable = true;
```

And there's a paranoia mode, that keeps the disk encrypted as much as
possible by enabling hibernation and removing the options for sleep,
screen locking.

Idle locking now hibernates, and it does it on very short notice.
2022-08-14 17:10:30 +02:00
teutat3s a0d0b62cf8
Merge pull request 'devos: include upstream commits' (#106) from feature/upstream-fixes into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/106
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-14 15:10:01 +00:00
teutat3s c400f58ce8
Merge branch 'main' into feature/ci-runner-onecommit 2022-08-14 16:33:57 +02:00
Benjamin Bädorf d3d4c6f498
Merge remote-tracking branch 'origin/main' into feat/hibernate-always 2022-08-14 16:28:59 +02:00
teutat3s d9057d8281
Merge branch 'main' into feature/upstream-fixes 2022-08-14 16:25:25 +02:00
teutat3s b149ae0136 Merge pull request 'Remove nix-dram as default nix binary' (#114) from fix/set-nix-dram-default into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/114
Reviewed-by: Benjamin Bädorf <hello@benjaminbaedorf.eu>
2022-08-14 14:24:54 +00:00
teutat3s 5dd0a5badb
Merge branch 'main' into fix/set-nix-dram-default 2022-08-14 15:54:51 +02:00
hensoko c43b96c4d5 Fix core module (#116)
Co-authored-by: Hendrik Sokolowski <hensoko@gssws.de>
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/116
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-08-14 13:54:19 +00:00
Benjamin Bädorf 98a537d287
Merge branch 'main' into feat/hibernate-always 2022-08-14 15:27:01 +02:00
teutat3s 71a47f35b4
Merge branch 'main' into fix/set-nix-dram-default 2022-08-14 15:18:55 +02:00
teutat3s 9d25b3ee9b
Fix build of rnix-lsp for nix verion 2.10+
This fix didn't land in a released tag of rnix-lsp
yet.
Build it from the master branch until next release
Upstream PR:
https://github.com/nix-community/rnix-lsp/pull/94

Also bump flake.lock
2022-08-14 15:16:57 +02:00
Benjamin Bädorf e436443bd2 Merge pull request 'Rework of x-os module / core profile' (#115) from feature/integrate-core-profile-into-x-os-and-rename-x-os-to-core into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/115
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-08-14 13:13:27 +00:00
teutat3s bf581d1e9c
nix-dram: remove nix-dram as default nix binary
nix-dram as default nix binary isn't worth the
maintenance work anymore, CI builds started
failing because of it:
https://ci.b12f.io/pub-solar/os/533/1/2

Automatic builds still happen each night and can be
checked in our fork of nix-dram:
https://github.com/pub-solar/nix-dram/actions

Users of nix-dram can continue to use it via devshells
or nix run github:dramforever/nix-dram -- --version
2022-08-14 15:12:23 +02:00
Hendrik Sokolowski 7785744d73 Move some packages from full to default set, move options for modules to
default.nix
2022-08-14 15:11:01 +02:00
Benjamin Bädorf e3bfdc71fc
Merge branch 'main' into feat/hibernate-always 2022-08-14 15:05:32 +02:00
Hendrik Sokolowski 4190818304 Rework of x-os module / core profile
* move core settings to x-os
* add option to only install a lite core
* rename x-os module to core
* remove core profile from flake.nix
2022-08-14 14:47:44 +02:00
Benjamin Bädorf be016c44fb Merge pull request 'Remove nonfree software' (#113) from feat/fucking-free into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/113
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-08-14 12:47:32 +00:00
Benjamin Bädorf 4f74f6ff80 Merge pull request 'Add AGPLv3 License' (#111) from maintenance/add-license into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/111
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-08-14 12:44:23 +00:00
Benjamin Bädorf b4250fec9c Merge pull request 'Our first real readme' (#112) from maintenance/update-readme into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/112
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-08-14 12:44:10 +00:00
teutat3s 99d5e53ec8
readme: add link to https://ci.b12f.io 2022-08-14 14:41:20 +02:00
teutat3s 2f9225457c
readme: ARM -> aarch64 2022-08-14 14:40:44 +02:00
teutat3s c2c9a65fc4
devos: move common overlays to sharedOverlays for
fup passthrough
See:
89d9b3ea97
2022-08-14 14:21:11 +02:00
Benjamin Bädorf 552b2ee53e
Remove nonfree software
This commit removes the default, global `allowUnfree = true;` setting
and removes nonfree packages where I could find them. Tested by building
the `PubSolarOS` host once.
2022-08-14 14:15:02 +02:00
Benjamin Bädorf b3a4ae5bbc
Our first real readme 2022-08-14 14:14:17 +02:00
Benjamin Bädorf 9031dacbb5
Add AGPLv3 License 2022-08-14 14:11:10 +02:00
Benjamin Bädorf d01753bbfa Merge pull request 'Theme change for fzf' (#104) from fix/fzf-colors into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/104
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-08-13 21:16:31 +00:00
hensoko 18e9b4a009 feature/restructure-core-profile (#109)
Co-authored-by: Hendrik Sokolowski <hensoko@gssws.de>
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/109
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-08-13 20:35:43 +00:00
Benjamin Bädorf e3d76f1999
Move ci-runner to user and add git, virsh and nix to path 2022-08-13 22:31:30 +02:00
Benjamin Bädorf 0b229a771e
Barebones ci-runner module
This adds a barebones CI-runner module with the following option:

`pub-solar.ci-runner.enable`

If enabled, this will start a systemd service on boot that runs
`drone-runner-exec`. The configuration expects you to have a file called
`secrets/drone-runner-exec-config` handled by agenix that gets put into
`/run/agenix/drone-runner-exec-config` and is owned by root.

This file should contain a configuration similar to the following:

```
CLIENT_DRONE_RPC_PROTO=https
CLIENT_DRONE_RPC_HOST=drone.company.com
CLIENT_DRONE_RPC_SECRET=super-duper-secret
```
2022-08-13 22:08:02 +02:00
teutat3s 616b7af858
devos: include upstream commits
780620d865

e6b14d39d6

dd51f64bc5
2022-08-13 21:50:23 +02:00
vlalentim 6817fb3d5f Theme change for fzf 2022-08-13 20:05:51 +02:00
teutat3s 524845a460 Merge pull request 'Various neovim cherry-picks' (#96) from fix/neovim-cherry-picks into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/96
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-08-13 15:36:31 +00:00
teutat3s e11c91f86e
Merge branch 'main' into fix/neovim-cherry-picks 2022-08-13 17:35:16 +02:00
teutat3s a5848ad06e
Bump flake.lock, fix error:
attribute 'deploy-rs' missing
2022-08-13 17:08:26 +02:00
vlalentim cb3141d354 Merge pull request 'Make cryptroot optional' (#102) from feat/optional-cryptroot into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/102
Reviewed-by: vlalentim <vlalentim@noreply.example.org>
2022-08-13 10:33:44 +00:00
Benjamin Bädorf 93aaab2685
Make cryptroot optional 2022-08-13 12:32:37 +02:00
Benjamin Bädorf 69a48b4225 Merge pull request 'Update lock file so deploy-rs is available' (#101) from maintenance/update-flake-lock into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/101
Reviewed-by: hensoko <hensoko@noreply.example.org>
Reviewed-by: vlalentim <vlalentim@noreply.example.org>
2022-08-13 10:08:48 +00:00
Benjamin Bädorf d11b90d830
Update lock file so deploy-rs is available 2022-08-13 12:06:24 +02:00
Benjamin Bädorf 9375fc4aae Merge pull request 'Add denols to nvim' (#88) from feature/denols into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/88
2022-08-12 22:45:13 +00:00
Benjamin Bädorf ebfd447037 Merge pull request 'Add Arduino module' (#98) from feature/arduino into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/98
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-12 22:44:28 +00:00
Benjamin Bädorf 6b396f0840 Merge branch 'main' into fix/neovim-cherry-picks 2022-08-12 20:52:57 +00:00
Benjamin Bädorf 1a7d0979c1 Merge pull request 'Add spotify as an audio option' (#99) from feature/spotify into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/99
Reviewed-by: hensoko <hensoko@noreply.example.org>
2022-08-12 20:43:03 +00:00
Benjamin Bädorf e5d08ba595 Merge pull request 'hosts: add missing system.stateVersion' (#94) from fix/missing-system-stateVersion into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/94
2022-08-12 18:45:12 +00:00
Benjamin Bädorf 06d2b07b09 Merge pull request 'Remove unused scream pulse service file' (#89) from refactor/remove-scream-pulse-service into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/89
2022-08-12 18:44:50 +00:00
Benjamin Bädorf 6150201e6e Merge pull request 'signal-desktop: works without workaround again' (#93) from social/revert-signal-fix into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/93
2022-08-12 18:44:32 +00:00
Benjamin Bädorf 8e634ad70b Merge pull request 'audio: remove mopidy-spotify, upstream abandonded support' (#95) from fix/audio-remove-mopidy-spotify into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/95
2022-08-12 18:33:26 +00:00
Benjamin Bädorf a4cf1bcd53 Merge pull request 'audio: switch to wireplumber for pipewire configuration' (#92) from feature/audio-wireplumber into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/92
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-08-12 18:33:12 +00:00
Benjamin Bädorf 1f1384a65e Merge pull request 'devshell: get pkgs from nixpkgs to avoid constant rebuilds' (#97) from fix/get-deploy-rs-nvfetcher-from-nixpkgs into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/97
2022-08-12 18:22:37 +00:00
Benjamin Bädorf 45202d98ec
Add Arduino module
This adds a small arduino development module that installs development
tooling and adds the user to the `dialout` group.
2022-08-10 22:53:37 +02:00
Benjamin Bädorf bb53317daf
Add spotify as an audio option
Adds a `config.pub-solar.audio.spotify` option that when enabled
installs and configures `spotifyd` as a systemd daemon and `spotify-tui`
as the terminal-based UI.

After enabling, run `spt` in the terminal to open the UI.
2022-08-10 22:52:17 +02:00
teutat3s be0ae1a799
neovim: fix quoting, use vim.fn.stdpath to get
the neovim config directory path
2022-08-09 23:26:10 +02:00
teutat3s 0619a69f32
neovim: add vim-nixhash plugin 2022-08-09 23:25:33 +02:00
teutat3s 4339f04f7c
neovim: use vimagit from latest master commit 2022-08-09 23:25:12 +02:00
teutat3s 3142c58cf4
neovim, caddy: add json-schema, use tabs in
Caddyfiles, add vim-caddyfile
2022-08-09 23:23:55 +02:00
teutat3s 0cc621a4ec
deploy-rs: use nixpkgs version 2022-08-09 23:16:06 +02:00
teutat3s b25b043176
nvfetcher: use nixpkgs version 2022-08-09 23:16:00 +02:00
teutat3s f7fbdb80af
hosts: add missing system.stateVersion 2022-07-08 14:36:17 +02:00
teutat3s 237a753474
audio: switch to wireplumber for pipewire configuration
https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
2022-07-08 14:34:30 +02:00
teutat3s 6a5b09a26a
audio: remove mopidy-spotify, upstream abandonded support 2022-07-08 14:25:22 +02:00
teutat3s 3bd0b3c502
signal-desktop: works without workaround again
Also add --use-tray-icon flag, since it works now
2022-07-08 14:24:23 +02:00
Benjamin Bädorf d5ed22c6a3 Merge pull request 'Make sure we're all successful' (#90) from feature/success into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/90
2022-06-04 18:29:50 +00:00
Benjamin Bädorf 5094495a79
Less annoying 2022-06-04 20:29:09 +02:00
Benjamin Bädorf d84ee5d67a
Remove unused scream pulse service file 2022-06-04 19:42:13 +02:00
Benjamin Bädorf 63fe359cab
Add denols to nvim
In Deno projects `tsserver` is less than ideal. This PR starts `denols`
instead of `tsserver` if `nvim` finds the `NVIM_USE_DENOLS` variable
when reading the lsp config.
2022-06-04 19:41:28 +02:00
Benjamin Bädorf 6054a02ebf
Make sure we're all successful 2022-06-04 19:40:55 +02:00
Benjamin Bädorf c6d4a9f0dc Merge pull request 'Follow nixos release-22.05' (#87) from feature/nixos-22.05 into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/87
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-06-04 00:58:58 +00:00
Benjamin Bädorf 54c2a7a2b2 Merge pull request 'move Firefox sharing indicator to sway workspace 7' (#85) from fix/firefox-sharing-indicator into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/85
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-06-03 22:20:02 +00:00
Benjamin Bädorf b4b8f22c00 Merge branch 'main' into fix/firefox-sharing-indicator 2022-06-03 22:19:46 +00:00
teutat3s 8e43046dee
nixos: follow release-22.05
home: follow release-22.05 branch

Fixes for upstream changes:

ag renamed to silver-searcher, extfat-utils is now exfat, lot's of
overrides no longer needed, as they're now in the release branch,
services.caddy.config split up into globalConfig and extraConfig
2022-06-02 10:13:17 +02:00
teutat3s 3fae0d93fa
graphical: move FF sharing indicator to sway ws 7
The Firefox sharing indicator sometimes doesn't like to float like it
should, and when it does, it usually floats over UI elements you'd like
to use.

Moving it to sway workspace 7 should get it mostly out of the way
2022-05-06 14:53:27 +02:00
Benjamin Bädorf 47ffd26add Merge pull request 'Add docker drone runner wrapper' (#81) from feature/drone-docker-runner into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/81
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-05-06 11:29:43 +00:00
hensoko b751593368 Merge pull request 'Introduce option to enable autologin' (#83) from feature/add-flag-to-enable-autologin into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/83
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-05-03 17:54:32 +00:00
Hendrik Sokolowski 3ce121ce60 Introduce option to enable autologin
This option allows to disable autologin which is enabled by default.
2022-05-03 19:26:02 +02:00
teutat3s 5e01e35e38 Merge pull request 'Remove fake comment from gitmessage' (#82) from fix/remove-gitmessage-fake into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/82
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-05-03 10:57:30 +00:00
Benjamin Bädorf f4a2cc34bb
Comment Co-Authored-by 2022-05-03 12:43:32 +02:00
Benjamin Bädorf af12b9eabd
Remove gitmessage indentation 2022-05-03 11:48:00 +02:00
Benjamin Bädorf 07577283e3
Remove fake comment from gitmessage
This was part of a botched copy paste and should not be in the actual
gitmessage, since the real change list will come from git itself.
2022-05-03 11:43:36 +02:00
Benjamin Bädorf 87d7697326
Add docker drone runner wrapper
Adds a small sh wrapper around a drone runner docker container. The
`stop` and `logs` functionality is barely better than using straight up
docker, but at least it saves you from having to know any of the
implementation details.
2022-05-02 23:53:34 +02:00
teutat3s f132ab1814 Merge pull request 'Fix ISO target path for publishing' (#77) from fix/drone-ci-iso-target-path into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/77
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-05-02 19:56:34 +00:00
teutat3s ff69e1f8d6
Merge branch 'main' into fix/drone-ci-iso-target-path 2022-05-02 21:56:03 +02:00
Benjamin Bädorf c6b9ff43f1 Merge pull request 'Start sway as a systemd user process again' (#80) from feature/start-sway-as-systemd-service into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/80
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-05-02 18:58:58 +00:00
Hendrik Sokolowski 159ae86722 Start sway as a systemd user process again
After login on TTY1 sway was started by calling
    exec sway

See also b84d88fc92

Co-authored-by: Hendrik Sokolowski <hensoko@gssws.de>
2022-05-02 20:55:34 +02:00
Benjamin Bädorf 797e83f9aa Merge pull request 'zsh: precmd() don't echo trailing newline' (#78) from fix/zsh-precmd into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/78
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-05-02 18:34:08 +00:00
Benjamin Bädorf 24123e84ce Merge pull request 'sway: fix cursor not scaling correctly' (#79) from fix/sway-cursor-scaling into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/79
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-05-02 18:33:50 +00:00
teutat3s 077ab8b4f4
Fix ISO target path for publishing 2022-05-02 10:39:59 +02:00
teutat3s e3b6cca939 Merge pull request 'Revert "Merge pull request 'fix/boostrap-iso' (#75) from fix/boostrap-iso into main"' (#76) from fix/revert-digga-change into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/76
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-05-02 08:30:39 +00:00
Benjamin Bädorf 91605af135
Revert "Merge pull request 'fix/boostrap-iso' (#75) from fix/boostrap-iso into main"
This reverts commit 48be9cfa75, reversing
changes made to 281d7b56b4.
2022-05-02 09:49:14 +02:00
teutat3s a772a91d7b
zsh: precmd() don't echo trailing newline 2022-05-02 01:30:09 +02:00
teutat3s 4712e535f9
sway: fix cursor not scaling correctly 2022-05-02 01:28:35 +02:00
Benjamin Bädorf 0c4987ede1
Add resume device 2022-05-01 17:29:34 +02:00
Benjamin Bädorf 4b828cd91f
Shorten time until hibernate 2022-05-01 17:04:29 +02:00
Benjamin Bädorf 48be9cfa75 Merge pull request 'fix/boostrap-iso' (#75) from fix/boostrap-iso into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/75
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-05-01 14:55:27 +00:00
Benjamin Bädorf bfec68938d Merge branch 'main' into fix/boostrap-iso 2022-05-01 14:55:07 +00:00
Benjamin Bädorf d2f8a2d837
Remove swaylock-bg from install list 2022-04-30 23:56:02 +02:00
teutat3s 281d7b56b4 Merge pull request 'Show notification when changing keyboard layouts' (#73) from feature/keyboard-toggle-notify into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/73
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-04-30 21:54:20 +00:00
Benjamin Bädorf 3dc6e6a5f6
Change bootstrap isoImage command in CI 2022-04-30 23:20:47 +02:00
Benjamin Bädorf 3024b14735
Merge branch 'main' into feat/hibernate-always 2022-04-30 22:55:32 +02:00
Benjamin Bädorf a94a41f444
Use our patched version of digga 2022-04-30 22:12:52 +02:00
Benjamin Bädorf fdf167d92a Merge pull request 'Improve terminal pwd title by shortening home to ~' (#70) from fix/shorten-home-to-tilde-zsh into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/70
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-04-30 19:51:34 +00:00
Benjamin Bädorf 0ecbdaa0bc
Merge branch 'main' into fix/shorten-home-to-tilde-zsh 2022-04-30 21:50:42 +02:00
Benjamin Bädorf c48e1c8a75
Add package import of libnotify 2022-04-30 21:43:56 +02:00
Benjamin Bädorf d2f8f0537c
Show notification when changing keyboard layouts 2022-04-30 21:42:48 +02:00
teutat3s 26ccb60ce5 Merge pull request 'Add gitmessage template to global git config' (#72) from feature/gitmessage into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/72
Reviewed-by: teutat3s <teutates@mailbox.org>
2022-04-30 19:42:14 +00:00
Benjamin Bädorf 4c9dd20e4a
better newlines 2022-04-30 21:35:32 +02:00
Benjamin Bädorf 0acabe0624 Merge pull request 'tree-wide: gnome3 -> gnome, add hicolor-icon-theme' (#66) from fix/gnome3-to-gnome into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/66
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-04-30 19:29:40 +00:00
Benjamin Bädorf af84260922 Merge pull request 'zsh: precmd() don't echo trailing newline' (#71) from fix/zsh-precmd into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/71
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-04-30 19:27:51 +00:00
Benjamin Bädorf 1f1ac4c575
Add gitmessage template to global git config 2022-04-30 21:27:22 +02:00
teutat3s 4b915053b4
zsh: precmd() don't echo trailing newline 2022-04-30 20:58:06 +02:00
teutat3s 99ece3e3f1
Merge branch 'main' into fix/gnome3-to-gnome 2022-04-30 20:17:25 +02:00
Benjamin Bädorf 1823e7cc39 Merge pull request 'Basic ISO' (#54) from feature/basic-iso into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/54
Reviewed-by: Benjamin Bädorf <b12f@noreply.example.org>
2022-04-30 17:52:49 +00:00
Benjamin Bädorf e30974c1b2
Merge branch 'main' into feature/basic-iso 2022-04-30 19:51:38 +02:00
Benjamin Bädorf 84fa70513f
Improve terminal pwd title by shortening home to ~ 2022-04-30 18:28:11 +02:00
teutat3s cf5dd8c72c
clean up bud 2022-04-30 17:03:13 +02:00
teutat3s 47ed302f7a
drone: add check step 2022-04-30 17:03:00 +02:00
teutat3s d23376f7fb
Workaround ps-signal-desktop is not supported on aarch64-linux
using fake metadata
2022-04-30 16:54:40 +02:00
teutat3s db34fa77c2
Merge branch 'main' into feature/basic-iso 2022-04-30 16:40:10 +02:00
teutat3s e956a69abf
Re-enable CI Check step 2022-04-30 16:38:19 +02:00
teutat3s 970e6de8a7
Merge branch 'main' into feature/basic-iso 2022-04-30 16:04:59 +02:00
teutat3s 6f2c137c06
direnv: update envrc 2022-04-30 15:58:00 +02:00
teutat3s 2852efbbbc
tree-wide: gnome3 -> gnome, add hicolor-icon-theme
as fallback
2022-04-30 15:21:27 +02:00
teutat3s 4e9786442b
DEBUG: try to build ISO without volume as build store cache 2022-02-27 17:09:06 +01:00
teutat3s 94b6304140
DEBUG: try to build ISO without volume as build store cache 2022-02-27 17:07:43 +01:00
teutat3s 5a0078be8d
DEBUG: try to build ISO without volume as build store cache 2022-02-27 17:06:24 +01:00
teutat3s d0e972f85f
DEBUG: try to build ISO without volume as build store cache 2022-02-25 13:59:37 +01:00
teutat3s 67504a2560
DEBUG: try if nix build work with cached store 2022-02-09 17:17:08 +01:00
teutat3s 98be94a4db
DEBUG: try if nix build work with cached store 2022-02-08 19:09:53 +01:00
teutat3s e970370f38
Try with eval-store=local 2022-02-08 14:34:58 +01:00
teutat3s 0b7f1019af
Try nix store cache docker volume with privileged mode 2022-02-08 14:21:57 +01:00
teutat3s d157e71a72
DEBUG: try build without eval-store 2022-02-03 15:32:16 +01:00
teutat3s f5c07c2e49
DEBUG: try if nix build work with cached store 2022-02-03 14:25:38 +01:00
teutat3s ec8c0dae45
use SUBCMD_FLAGS env var 2022-02-03 12:22:07 +01:00
teutat3s c7a0811200
make the yaml parser happy 2022-02-03 12:16:48 +01:00
teutat3s 07ecc4bdae
fix nix flags, only use NIX_FLAGS where we would repeat
ourselfes way too much
2022-02-03 12:13:56 +01:00
teutat3s d33aef6060
factor out nix command flags into NIX_FLAGS env var
for better readability
2022-02-03 12:01:39 +01:00
teutat3s 67d48485d0
add --eval-store local flag to nix CI commands
see https://github.com/nix-community/naersk/issues/217

and https://kevincox.ca/2022/01/02/nix-in-docker-caching/
2022-02-03 11:44:40 +01:00
teutat3s 135dc20dc4
sign .drone.yml 2022-02-03 11:31:28 +01:00
teutat3s 96dde2315d
Use drone host volume for /nix/store to speed up
build times
2022-02-03 11:28:48 +01:00
teutat3s db2ffe63f5
pub-solar-iso: enable wlroots software renderer pixman 2022-02-03 03:41:42 +01:00
teutat3s af96a74b95
Revert "Use drone host volume for /nix/store to
speed up build times"

This reverts commit ae8f39b89a.
2022-02-03 03:37:40 +01:00
teutat3s 741c0863ed
graphical: make wayland use the software renderer pixman optionally,
https://github.com/swaywm/wlroots/blob/master/docs/env_vars.md#wlroots-specific

This should help run sway in VMs
2022-02-03 02:47:00 +01:00
teutat3s 2c9fef6cbd
sway: add foot, make sway.terminal an option
this helps getting a working terminal in VMs where

3D acceleration is limited
2022-02-03 02:05:56 +01:00
teutat3s ae8f39b89a
Use drone host volume for /nix/store to speed up build times 2022-02-03 01:59:42 +01:00
teutat3s d551045ac5
services.getty.autologinUser wants a lib.mkForce hammer 2022-02-03 01:34:01 +01:00
teutat3s 2bddc9c700
Make Build ISO step depend on Check step 2022-02-03 01:22:36 +01:00
teutat3s 58efdd3528
Use nixUnstable from latest channel, aka nixos-unstable
this is required because 2.5.1 with a required fix

for nix docker didn't get backported to release-21.11 yet
2022-02-03 01:14:21 +01:00
teutat3s 82c9283639
Follow upstream devshell with nixUnstable, important fixes
for docker needed, see:

https://github.com/NixOS/nix/issues/5777

https://github.com/NixOS/nix/pull/5787
2022-02-03 00:33:21 +01:00
teutat3s 0a1cd6bf40
Remove SSH public key, add comment about default password 2022-02-02 21:23:35 +01:00
teutat3s a039ce0943
Only build ISO on tag event 2022-02-02 15:18:12 +01:00
teutat3s 1bd3019ca5
Follow nixos-unstable in check / build base image, to get nix
version 2.5+ with accept-flake-config flag, see:

30496af598
c52fdf233b/images/nix-flakes/default.nix (L7)
https://github.com/NixOS/nixpkgs/blob/release-21.11/pkgs/top-level/aliases.nix#L603
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/top-level/aliases.nix#L665
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/package-management/nix/default.nix#L66
2022-02-02 15:08:24 +01:00
teutat3s 29bea44c6c
Use nixos-21.11 as base image tag, benefiting from recent
change to get nixConfig from the projects flake.nix, for details,

see: c52fdf233b
2022-02-02 14:12:24 +01:00
teutat3s be9ce55f58
Nix flake check works 2022-02-02 13:31:27 +01:00
teutat3s 821565aea4
Fix up rebase 2022-02-02 05:13:01 +01:00
teutat3s e9e53147d8
Fix up rebase 2022-02-02 04:47:08 +01:00
teutat3s 74b4ec148c
Merge branch 'main' into feature/basic-iso 2022-02-02 04:38:30 +01:00
Benjamin Bädorf 8442a936e5
Remove git crypt, update docs 2022-02-02 04:21:43 +01:00
teutat3s dca27eda2e
Fix up rebase 2022-02-02 04:21:40 +01:00
teutat3s f99159df93
chore: bump flake lock 2022-02-02 04:00:14 +01:00
teutat3s 1d2eb2edd0
iso: use iso suite in PubSolarOS host
fae: boots PubSolarOS
2022-02-02 04:00:11 +01:00
teutat3s 0cf1c0e9b0
iso: default user nixos becomes pub-solar 2022-02-02 04:00:11 +01:00
teutat3s bc4ca4557e
core: add ncd, useful for comparing versions of pkgs that
will be upgraded, see:
https://discourse.nixos.org/t/nvd-simple-nix-nixos-version-diff-tool/12397
2022-02-02 04:00:11 +01:00
teutat3s e2a15bf817
core: add missing argument inputs 2022-02-02 04:00:11 +01:00
teutat3s e1b4ec65e0
pkgs: lgcl: fix nix flake check for aarch64-linux 2022-02-02 04:00:11 +01:00
teutat3s fa03692511
modules: user: add publicKeys option 2022-02-02 04:00:11 +01:00
teutat3s 7589360e6d
terminal-life: add asciinema 2022-02-02 04:00:11 +01:00
teutat3s c85cb99a15
Use newer ansible version instead of pythonPackages one 2022-02-02 04:00:11 +01:00
teutat3s 6da0f503e1
wayland: use NIXOS_OZONE_WL instead of *-wayland packages 2022-02-02 04:00:10 +01:00
teutat3s f07010445e
Reference nix-dram package directly from inputs
This should avoid patches not working because our pkgs
follows nixos = release-21.11 and nix-dram follows nixos-unstable
2022-02-02 04:00:10 +01:00
teutat3s 3cb0cd2e2e
Fix last upstream merge, add back openssh service
Dont't autoUpgrade by default
2022-02-02 04:00:10 +01:00
Parthiv Seetharaman 0534c731e2
overrides: remove nix-direnv line
Use correct overrides for nix 2.4
2022-02-02 04:00:02 +01:00
Parthiv Seetharaman 7d67ba1caf
bud: switch back to pulling devos as template 2022-02-02 03:45:20 +01:00
Parthiv Seetharaman c36ec0b546
flake: update digga, home, nixos, latest 2022-02-02 03:44:17 +01:00
Parthiv Seetharaman efcaa6f256
README: Add more flakes to "in the wild"
Remove the nrd branch, since that doesn't exist anymore
2022-02-02 03:42:19 +01:00
Parthiv Seetharaman ea8937cd51
profiles/core: add comments for each option 2022-02-02 03:42:13 +01:00
Ben Merritt d8c8fc35ad
Fix outdated option name 2022-02-02 03:37:03 +01:00
Ben Merritt ecc862c156
Update secrets path
See e538664435
2022-02-02 03:37:03 +01:00
teutat3s 8d3dedc562
core: add gitFull, nix-tree 2022-02-02 03:37:02 +01:00
teutat3s 2a6ac25369
base user: init global gitignore, update mimeapps 2022-02-02 03:37:02 +01:00
teutat3s 18c566f30e
devops: add pgcli 2022-02-02 03:37:02 +01:00
teutat3s a208a817f7
audio: rename pulseeffects to easyeffects, follow
upstream: https://github.com/wwmm/easyeffects
2022-02-02 03:37:02 +01:00
teutat3s 52e934b3fc
neovim: fix completion, fix python lsp 2022-02-02 03:37:00 +01:00
teutat3s 0629024cf5
chore: clean up after upstream updates 2022-02-02 03:33:20 +01:00
Benjamin Bädorf 578f05b4f1
Always hibernate 2022-01-12 17:39:16 +01:00
teutat3s 907b08930a
drone: only trigger upstreaming on cron event 2021-10-26 10:45:53 +02:00
teutat3s 5aac177940
drone: use trigger conditional for whole publish pipeline 2021-10-26 10:40:03 +02:00
teutat3s c78126c338
Merge branch 'main' into feature/basic-iso 2021-10-26 10:33:42 +02:00
teutat3s d36feb2028
drone: strip path before scp'ing 2021-10-26 10:14:42 +02:00
teutat3s 7271c34320
hammer for fontconfig 2021-10-26 01:19:47 +02:00
teutat3s 27d962c96b
fix x-os option 2021-10-26 01:06:13 +02:00
teutat3s 1ab1ec5ded
drone: sign 2021-10-26 01:02:17 +02:00
teutat3s 09371808ae
Merge branch 'main' into feature/basic-iso 2021-10-26 01:00:30 +02:00
teutat3s 74241b459e
switch to pub-solar user and use base-user profile 2021-10-25 22:43:02 +02:00
teutat3s effea24101
drone: fix publish scp source path 2021-10-25 21:51:13 +02:00
teutat3s 8f194d1503
Fix devshell for executing bud 2021-10-24 23:18:10 +02:00
teutat3s 6b67d08edd
Use different path for volume 2021-10-24 23:13:13 +02:00
teutat3s a79834c15a
Test push event on feature branch 2021-10-24 23:04:53 +02:00
teutat3s 40e93f15d9
Sign correctly 2021-10-24 23:01:08 +02:00
teutat3s 2340270d81
All the option are with us now 2021-10-24 22:55:28 +02:00
teutat3s 2588264d88
Make check work 2021-10-24 22:03:28 +02:00
teutat3s c956297041
x-os: prepare booting from unencrypted /boot partition 2021-10-24 20:19:13 +02:00
teutat3s cd4dce51c1
drone: init check pipeline 2021-10-24 20:13:31 +02:00
teutat3s b79e92155a
bootstrap: add graphical profile 2021-10-24 20:13:18 +02:00
teutat3s 3aaef50eca
profiles: move social into separate profile 2021-10-24 20:12:57 +02:00
teutat3s 27aab3e540
initrd: make keyfile optional 2021-10-23 23:29:09 +02:00
teutat3s 0bfe4a135e
modules: remove redundant server module, SSH is enabled in core profile, too 2021-10-23 23:28:42 +02:00
teutat3s 7473789e8e
kernel: switch to linux lts 5.10 2021-10-23 23:27:38 +02:00
Benjamin Bädorf 411a0e3e74
Add basic ISO setup 2021-10-21 20:06:57 +02:00
112 changed files with 11344 additions and 1490 deletions

View file

@ -1,79 +1,72 @@
---
kind: pipeline
type: exec
name: Check
node:
hosttype: baremetal
steps:
- name: "Check"
when:
event:
- pull_request
environment:
NIX_FLAGS: "--print-build-logs --verbose"
commands:
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
- nix $$NIX_FLAGS develop --command nix flake show
- nix $$NIX_FLAGS build ".#nixosConfigurations.PubSolarOS.config.system.build.toplevel"
---
kind: pipeline
type: exec
name: Tests
node:
hosttype: baremetal
steps:
- name: "Tests"
environment:
NIX_FLAGS: "--print-build-logs --verbose"
commands:
- 'echo DEBUG: Using NIX_FLAGS: $NIX_FLAGS'
- nix $$NIX_FLAGS build ".#checks.x86_64-linux.customTestFor-PubSolarOS-firstTest"
- nix-store --read-log result
- nix $$NIX_FLAGS flake check
- nix $$NIX_FLAGS develop --command echo OK
- name: "Upload artifacts"
environment:
TRITON_DONT_SOURCE_PROFILE: 1
PRIVATE_SSH_KEY:
from_secret: private_ssh_key
MANTA_USER: pub_solar
MANTA_URL: https://eu-central.manta.greenbaum.cloud
MANTA_KEY_ID: "5d:5f:3d:22:8d:37:1f:e6:d6:ab:06:18:d9:a2:04:67"
commands:
- export TARGET_DIR="ci/$${DRONE_REPO}/$${DRONE_BUILD_NUMBER}"
- echo env var TARGET_DIR is set to $$TARGET_DIR
- "mkdir ~/.ssh && chmod 700 ~/.ssh"
- echo "$$PRIVATE_SSH_KEY" > ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519
- nix flake new --template "git+https://git.greenbaum.cloud/dev/tritonshell?ref=main" ./tritonshell
- git add tritonshell
- cd tritonshell
- nix develop --command mput -p -f ../result/foot_wayland_info.png ~~/public/$${TARGET_DIR}/foot_wayland_info.png
- nix develop --command mput -p -f ../result/test-wayland.out ~~/public/$${TARGET_DIR}/test-wayland.out
trigger:
ref:
- refs/tags/v*
- refs/tags/t*
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: Upstreaming name: Notification
steps: steps:
- name: "Sync 'devos' branch with upstream"
image: alpine/git
when:
event:
- cron
cron:
- sync-main-with-upstream
environment:
GITEA_SSH_KEY:
from_secret: gitea_ssh_key
commands:
- ./.drone/setup_ssh.sh
- git remote add devos git@git.b12f.io:pub-solar/devos
- git remote set-url origin git@git.b12f.io:pub-solar/os
- git fetch --all
- git checkout -b devos --track origin/devos
- git merge -X theirs devos/main
- git push origin devos
- git remote set-url origin https://git.b12f.io/pub-solar/os.git
- name: "Sync $BRANCH with upstream"
image: alpine/git
when:
event:
- cron
cron:
- sync-main-with-upstream
- sync-b12f-with-main
- sync-teutat3s-with-main
environment:
GITEA_SSH_KEY:
from_secret: gitea_ssh_key
commands:
- git fetch origin
- git checkout origin/main
- ./.drone/setup_ssh.sh
- git remote set-url origin git@git.b12f.io:pub-solar/os
- git fetch --all
- ./.drone/upstream-branch.sh
- name: "Open pull request for failed merge"
image: nixery.dev/shell/tea
when:
status:
- failure
event:
- cron
cron:
- sync-main-with-upstream
- sync-b12f-with-main
- sync-teutat3s-with-main
environment:
TEA_CONFIG:
from_secret: tea_config
commands:
- mkdir -p ~/.config/tea
- echo "$$TEA_CONFIG" > ~/.config/tea/config.yml
- tea pulls create --base main --head devos
- name: "Notify matrix" - name: "Notify matrix"
image: plugins/matrix image: plugins/matrix
when:
status:
- failure
event:
- cron
cron:
- sync-main-with-upstream
- sync-b12f-with-main
- sync-teutat3s-with-main
settings: settings:
homeserver: https://matrix.pub.solar homeserver: https://matrix.pub.solar
roomid: dfQBqwkhIzrFjMSsxy:pub.solar roomid: dfQBqwkhIzrFjMSsxy:pub.solar
@ -81,9 +74,80 @@ steps:
from_secret: matrix_username from_secret: matrix_username
password: password:
from_secret: matrix_password from_secret: matrix_password
template: "Upstreaming {{ build.status }} [{{ build.branch }}#{{ truncate build.commit 8 }}]({{ build.link }}) by {{ build.author }}. [Pull requests](https://git.b12f.io/pub-solar/os/pulls)" template: "Test run triggered by tag: {{ build.tag }}. Test run exit status: {{ build.status }}. Artifacts uploaded to Manta: https://eu-central.manta.greenbaum.cloud/pub_solar/public/ci/{{ repo.Owner }}/{{ repo.Name }}/{{ build.number }}/foot_wayland_info.png"
depends_on:
- Tests
trigger:
ref:
- refs/tags/v*
- refs/tags/t*
---
kind: pipeline
type: docker
name: Publish ISO
steps:
- name: "Build ISO"
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
environment:
NIX_FLAGS: "--print-build-logs --verbose"
volumes:
- name: file-exchange
path: /var/nix/iso-cache
commands:
- |
nix $$NIX_FLAGS build \
'.#nixosConfigurations.bootstrap.config.system.build.isoImage'
- cp $(readlink -f result)/iso/PubSolarOS*.iso /var/nix/iso-cache/
- nix shell nixpkgs#findutils
- cd /var/nix/iso-cache/
- export ISO_NAME=$(find . -name '*.iso' -printf "%f\n")
- sha256sum $ISO_NAME > $ISO_NAME.sha256
- ln -s $ISO_NAME PubSolarOS-latest.iso
- cp $ISO_NAME.sha256 PubSolarOS-latest.iso.sha256
- nix run nixpkgs#gnused -- --in-place "s/$ISO_NAME/PubSolarOS-latest.iso/" PubSolarOS-latest.iso.sha256
- name: "Publish ISO"
# custom drone-scp image, source: https://git.b12f.io/pub-solar/drone-scp/
# docker build --tag registry.greenbaum.cloud/library/drone-scp:v1.6.5 --file ./docker/Dockerfile.linux.amd64 .
image: registry.greenbaum.cloud/library/drone-scp:v1.6.5
volumes:
- name: file-exchange
path: /var/nix/iso-cache
settings:
host:
from_secret: iso_web_ssh_host
user:
from_secret: iso_web_ssh_user
port:
from_secret: iso_web_ssh_port
key:
from_secret: iso_web_ssh_key
target: /srv/os/download
source:
- /var/nix/iso-cache/*.iso
- /var/nix/iso-cache/*.iso.sha256
unlink_first: true
strip_components: 3
depends_on:
- Check
trigger:
branch:
- main
event:
- push
volumes:
- name: file-exchange
temp: {}
--- ---
kind: signature kind: signature
hmac: 07d9a95e8f577483d753e9eea76229ffe0c369ecd642bfc364ae183f662d2167 hmac: 291be33bbf2954d1f5e4bf569679e24a773e7d6f90db4765fb9dacb3686a825e
... ...

660
LICENSE.md Normal file
View file

@ -0,0 +1,660 @@
### GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
### Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains
free software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing
under this license.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS
#### 0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public
License.
"Copyright" also means copyright-like laws that apply to other kinds
of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of
an exact copy. The resulting work is called a "modified version" of
the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user
through a computer network, with no transfer of a copy, is not
conveying.
An interactive user interface displays "Appropriate Legal Notices" to
the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
#### 1. Source Code.
The "source code" for a work means the preferred form of the work for
making modifications to it. "Object code" means any non-source form of
a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can
regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same
work.
#### 2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey,
without conditions so long as your license otherwise remains in force.
You may convey covered works to others for the sole purpose of having
them make modifications exclusively for you, or provide you with
facilities for running those works, provided that you comply with the
terms of this License in conveying all material for which you do not
control copyright. Those thus making or running the covered works for
you must do so exclusively on your behalf, under your direction and
control, on terms that prohibit them from making any copies of your
copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the
conditions stated below. Sublicensing is not allowed; section 10 makes
it unnecessary.
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License with
respect to the covered work, and you disclaim any intention to limit
operation or modification of the work as a means of enforcing, against
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
#### 4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
#### 5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:
- a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
- b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to "keep intact all notices".
- c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
- d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
#### 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:
- a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
- b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
- c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
- d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
- e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
incorporation into a dwelling. In determining whether a product is a
consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
"normally used" refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the way
in which the particular user actually uses, or expects or is expected
to use, the product. A product is a consumer product regardless of
whether the product has substantial commercial, industrial or
non-consumer uses, unless such uses represent the only significant
mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to
install and execute modified versions of a covered work in that User
Product from a modified version of its Corresponding Source. The
information must suffice to ensure that the continued functioning of
the modified object code is in no case prevented or interfered with
solely because modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or
updates for a work that has been modified or installed by the
recipient, or for the User Product in which it has been modified or
installed. Access to a network may be denied when the modification
itself materially and adversely affects the operation of the network
or violates the rules and protocols for communication across the
network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
#### 7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:
- a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
- b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
- c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
- d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or
- e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
- f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
#### 8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
#### 9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
#### 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
#### 11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned
or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within the
scope of its coverage, prohibits the exercise of, or is conditioned on
the non-exercise of one or more of the rights that are specifically
granted under this License. You may not convey a covered work if you
are a party to an arrangement with a third party that is in the
business of distributing software, under which you make payment to the
third party based on the extent of your activity of conveying the
work, and under which the third party grants, to any of the parties
who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by
you (or copies made from those copies), or (b) primarily for and in
connection with specific products or compilations that contain the
covered work, unless you entered into that arrangement, or that patent
license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
#### 12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under
this License and any other pertinent obligations, then as a
consequence you may not convey it at all. For example, if you agree to
terms that obligate you to collect a royalty for further conveying
from those to whom you convey the Program, the only way you could
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
#### 13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your
version supports such interaction) an opportunity to receive the
Corresponding Source of your version by providing access to the
Corresponding Source from a network server at no charge, through some
standard or customary means of facilitating copying of software. This
Corresponding Source shall include the Corresponding Source for any
work covered by version 3 of the GNU General Public License that is
incorporated pursuant to the following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
#### 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Affero General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever
published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions
of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
#### 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
#### 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#### 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively state
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper
mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for
the specific requirements.
You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. For more information on this, and how to apply and follow
the GNU AGPL, see <https://www.gnu.org/licenses/>.

131
README.md
View file

@ -1,95 +1,46 @@
[![NixOS](https://img.shields.io/badge/NixOS-unstable-blue.svg?style=flat&logo=NixOS&logoColor=white)](https://nixos.org) # PubSolarOS
[![MIT License](https://img.shields.io/github/license/divnix/devos)][mit]
[![Chat](https://img.shields.io/matrix/devos:nixos.org.svg?label=%23devos%3Anixos.org&logo=matrix&server_fqdn=matrix.org)][matrix]
> #### ⚠ Advisory ⚠ Welcome to PubSolarOS, a very opiniated Linux (NixOS) distribution for the nerdy.
> DevOS requires the [flakes][flakes] feature available via an _experimental_
> branch of [nix][nix]. Until nix 2.4 is released, this project
> should be considered unstable.
### Why? We're creating this distribution for our own personal use and fun, but
Make an awesome template for NixOS users, with consideration for common tools like [home-manager][home-manager], take pride in our craft. As of 14.08.22 it's running on 14 physical devices,
[devshell][devshell], and [more](./doc/integrations). both `x86_64` and `aarch64`.
### No. Why _flakes_? At its core, it's a NixOS installation running our configuration. The UX
Flakes are a part of an explicit push to improve [Nix's UX](https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/cli-guideline.md), and have become an integral part of that effort. decisions and the way the project is structured are what make it
_PubSolarOS_:
They also make [Nix expressions](https://nixos.org/manual/nix/unstable/expressions/expression-syntax.html) easier to distribute and reuse with convient [flake references](https://github.com/NixOS/nix/blob/master/src/nix/flake.md#flake-references) for building or using packages, modules, and whole systems. * Reproducibility is king, and the future is with declarative and functional
programming. Even if Nix does not turn out to be the end-all-be-all of
reproducible package management (Guix looks good), it has a plethora
of packages, a very active and helpful community, and very solid
software engineering practices.
* Because reproducibility is king, we're using nix flakes for locking flake
dependencies. [Digga](https://github.com/divnix/digga) is our flake
utility library, made by the wonderful people of the Divnix community.
* Physical devices are not shared anymore nowadays. Only seldomly will you
find shared devices that need more than one user account. For this
reason, only one user (excluding `root`) is assumed.
* Keyboard navigation wins where it matters; ergonomics, programmability,
efficiency, and speed. We use a tiling window manager (`sway`) and
prioritize cli-based solutions where sensible. The editor is `neovim`
configured to be just as opiniated as the operating system it is a part
of. For mailing, `neomutt` is the default, but we're more divided on
that part.
* We like new and shiny things, so we've moved to Wayland and pipewire.
* SICHERHEIT is written in capital letters at pub.solar, so we have first-
class disk-encryption support. Currently in the works is a paranoid
mode where the device can only hibernate (no more sleep or lockscreen)
so your data is locked any time you leave the device.
* Free software is better. If we can avoid it, nonfree software is avoided.
By default, `allowUnfree` is `false` so we don't ship non-free software
in a basic PubSolarOS ISO. However, nothing prevents you from using
as much non-free software as you like.
* Automation is better. The reproducibility of nix feels so much more
powerful once you're deploying your new configuration from your laptop
to all your other devices with one command. [We have an automated CI using drone](https://ci.b12f.io/pub-solar/os).
* Community is important. We just like working on this together, and it
feels really good to see our progress at the end of a
[hakken.irl](https://pub.solar/hakken) session.
## Getting Started To get started, take a look at the quick start guide in our docs.
Check out the [guide](https://devos.divnix.com/start) to get up and running.
Also, have a look at [_flake.nix_](./flake.nix). If anything is not immediately
discoverable via "[`digga`][digga]'s [`mkFlake`][mk-flake],
please file a bug report.
### Status: Beta
Although this project has already matured quite a bit, especially through
recent outfactoring of [`digga`][digga], a fair amount of api polishing is still
expected. There are unstable versions (0._x_._x_) to help users keep track
of changes and progress, and a [`develop`](https://github.com/divnix/devos/tree/develop) branch for the brave 😜
## In the Wild
* @Pacman99: [Personal](https://gitlab.com/coffeetables/lower), [Server](https://gitlab.com/coffeetables/myrdd)
* [@danielphan2003](https://github.com/danielphan2003/flk) and make sure to also check out [devos-ext-lib][devos-ext-lib]
* [PubSolarOS](https://git.sr.ht/~b12f/pub-solar-os)
## Shoulders
This work does not reinvent the wheel. It stands on the [shoulders of the
following giants][giants]:
### :onion: &mdash; like the layers of an onion
- [`divnix/digga`][digga]
- [`gytis-ivaskevicius/flake-utils-plus`][fup]
- [`numtide/flake-utils`][fu]
### :family: &mdash; like family
- [`numtide/devshell`][devshell]
- [`serokell/deploy-rs`][deploy]
- [`berberman/nvfetcher`][nvfetcher]
- [`NixOS/nixpkgs`][nixpkgs]
:heart:
## Inspiration & Art
- [hlissner/dotfiles][dotfiles]
- [nix-user-chroot](https://github.com/nix-community/nix-user-chroot)
- [Nickel](https://github.com/tweag/nickel)
- [Awesome Nix](https://github.com/nix-community/awesome-nix)
- [devshell](https://github.com/numtide/devshell)
## Divnix
The divnix org is an open space that spontaneously formed out of "the Nix".
It is really just a place where otherwise unrelated people work
together and get stuff done.
It's a place to stop "geeking out in isolation" (or within company boundaries).
A place to experiment, learn together, and iterate quickly on best practices.
That's what it is.
It might eventually become a non-profit if that's not too complicated or, if those
goals are sufficiently upstreamed into "the Nix", dissolved.
# License
DevOS is licensed under the [MIT License][mit].
[community]: https://github.com/divnix/devos/tree/community
[core]: https://github.com/divnix/devos
[deploy]: https://github.com/serokell/deploy-rs
[devshell]: https://github.com/numtide/devshell
[digga]: https://github.com/divnix/digga
[dotfiles]: https://github.com/hlissner/dotfiles
[flake-doc]: https://github.com/NixOS/nix/blob/master/src/nix/flake.md
[flakes]: https://nixos.wiki/wiki/Flakes
[fu]: https://github.com/numtide/flake-utils
[fup]: https://github.com/gytis-ivaskevicius/flake-utils-plus
[giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants
[home-manager]: https://nix-community.github.io/home-manager
[mit]: https://mit-license.org
[mk-flake]: https://github.com/divnix/digga/tree/main/src/mkFlake
[nix]: https://nixos.org/manual/nix/stable
[nixos]: https://nixos.org/manual/nixos/stable
[nixpkgs]: https://github.com/NixOS/nixpkgs
[nvfetcher]: https://github.com/berberman/nvfetcher
[please]: https://github.com/nrdxp/devos/tree/nrd
[matrix]: https://matrix.to/#/#devos:nixos.org
[devos-ext-lib]: https://github.com/divnix/devos-ext-lib

View file

@ -1,18 +1,13 @@
# Pull Requests # TL;DR;
## TL;DR;
- **Target Branch**: `main` - **Target Branch**: `main`
- **Merge Policy**: [`bors`][bors] is always right (&rarr; `bors try`) - **Merge Policy**: green check: merge away. yellow circle: have patience. red x: try again.
- **Docs**: every changeset is expected to contain doc updates - **Docs**: every change set is expected to contain doc updates
- **Commit Msg**: be a poet! Comprehensive and explanatory commit messages - **Commit Msg**: be a poet! Comprehensive and explanatory commit messages
should cover the motivation and use case in an easily understandable manner should cover the motivation and use case in an easily understandable manner
even when read after a few months. even when read after a few months.
- **Test Driven Development**: please default to test driven development where possible. - **Test Driven Development**: please default to test driven development you can
make use of the `./examples` & `./e2e` and wire test up in the devshell.
### Within the Devshell (`nix develop`) ### Within the Devshell (`nix develop`)
- **Hooks**: please `git commit` within the devshell - **Hooks**: please `git commit` within the devshell
- **Fail Early**: please run from within the devshell on your local machine: - **Fail Early**: please run `check-all` from within the devshell on your local machine
- `nix flake check`
[bors]: https://bors.tech

View file

@ -3,8 +3,6 @@
- [Introduction](../README.md) - [Introduction](../README.md)
- [Quick Start](./start/index.md) - [Quick Start](./start/index.md)
- [ISO](./start/iso.md) - [ISO](./start/iso.md)
- [Bootstrapping](./start/bootstrapping.md)
- [From NixOS](./start/from-nixos.md)
- [Key Concepts](./concepts/index.md) - [Key Concepts](./concepts/index.md)
- [Hosts](./concepts/hosts.md) - [Hosts](./concepts/hosts.md)
- [Overrides](./concepts/overrides.md) - [Overrides](./concepts/overrides.md)
@ -18,11 +16,16 @@
- [Concerns]() - [Concerns]()
- [Secrets](./secrets.md) - [Secrets](./secrets.md)
- [Tests](./tests.md) - [Tests](./tests.md)
- [Helper Script `bud`](./bud/index.md)
- [get](./bud/get.md)
- [Integrations](./integrations/index.md) - [Integrations](./integrations/index.md)
- [Cachix](./integrations/cachix.md) - [Cachix](./integrations/cachix.md)
- [Deploy RS](./integrations/deploy.md) - [Deploy RS](./integrations/deploy.md)
- [NvFetcher](./integrations/nvfetcher.md) - [NvFetcher](./integrations/nvfetcher.md)
- [Hercules CI](./integrations/hercules.md) - [Hercules CI](./integrations/hercules.md)
- [API Reference](./api-reference.md)
- [Channels](./api-reference-channels.md)
- [Home](./api-reference-home.md)
- [Devshell](./api-reference-devshell.md)
- [NixOS](./api-reference-nixos.md)
- [Library Reference]()
- [Contributing](./CONTRIBUTING.md) - [Contributing](./CONTRIBUTING.md)

91
doc/api-reference-channels.md Executable file
View file

@ -0,0 +1,91 @@
# Channels API Container
Configure your channels that you can use throughout your configurations.
> #### ⚠ Gotcha ⚠
> Devshell & (non-host-specific) Home-Manager `pkgs` instances are rendered off the
> `nixos.hostDefaults.channelName` (default) channel.
## channels
nixpkgs channels to create
*_Type_*:
attribute set of submodules or path convertible to it
*_Default_*
```
{}
```
## channels.\<name\>.config
nixpkgs config for this channel
*_Type_*:
attribute set or path convertible to it
*_Default_*
```
{}
```
## channels.\<name\>.input
nixpkgs flake input to use for this channel
*_Type_*:
nix flake
*_Default_*
```
"self.inputs.<name>"
```
## channels.\<name\>.overlays
overlays to apply to this channel
these will get exported under the 'overlays' flake output
as \<channel\>/\<name\> and any overlay pulled from \<inputs\>
will be filtered out
*_Type_*:
list of valid Nixpkgs overlay or path convertible to its or anything convertible to it or path convertible to it
*_Default_*
```
[]
```
## channels.\<name\>.patches
patches to apply to this channel
*_Type_*:
list of paths
*_Default_*
```
[]
```

72
doc/api-reference-devshell.md Executable file
View file

@ -0,0 +1,72 @@
# Devshell API Container
Configure your devshell module collections of your environment.
## devshell
Modules to include in your DevOS shell. the `modules` argument
will be exported under the `devshellModules` output
*_Type_*:
submodule or path convertible to it
*_Default_*
```
{}
```
## devshell.exportedModules
modules to include in all hosts and export to devshellModules output
*_Type_*:
list of valid module or path convertible to its or anything convertible to it
*_Default_*
```
[]
```
## devshell.externalModules
The `externalModules` option has been removed.
Any modules that should be exported should be defined with the `exportedModules`
option and all other modules should just go into the `modules` option.
*_Type_*:
list of valid modules or anything convertible to it
*_Default_*
```
[]
```
## devshell.modules
modules to include that won't be exported
meant importing modules from external flakes
*_Type_*:
list of valid modules or anything convertible to it or path convertible to it
*_Default_*
```
[]
```

119
doc/api-reference-home.md Executable file
View file

@ -0,0 +1,119 @@
# Home-Manager API Container
Configure your home manager modules, profiles & suites.
## home
hosts, modules, suites, and profiles for home-manager
*_Type_*:
submodule or path convertible to it
*_Default_*
```
{}
```
## home.exportedModules
modules to include in all hosts and export to homeModules output
*_Type_*:
list of valid modules or anything convertible to it or path convertible to it
*_Default_*
```
[]
```
## home.externalModules
The `externalModules` option has been removed.
Any modules that should be exported should be defined with the `exportedModules`
option and all other modules should just go into the `modules` option.
*_Type_*:
list of valid modules or anything convertible to it
*_Default_*
```
[]
```
## home.importables
Packages of paths to be passed to modules as `specialArgs`.
*_Type_*:
attribute set
*_Default_*
```
{}
```
## home.importables.suites
collections of profiles
*_Type_*:
null or attribute set of list of paths or anything convertible to its or path convertible to it
*_Default_*
```
null
```
## home.modules
modules to include that won't be exported
meant importing modules from external flakes
*_Type_*:
list of valid modules or anything convertible to it or path convertible to it
*_Default_*
```
[]
```
## home.users
HM users that can be deployed portably without a host.
*_Type_*:
attribute set of HM user configs
*_Default_*
```
{}
```

234
doc/api-reference-nixos.md Executable file
View file

@ -0,0 +1,234 @@
# NixOS API Container
Configure your nixos modules, profiles & suites.
## nixos
hosts, modules, suites, and profiles for NixOS
*_Type_*:
submodule or path convertible to it
*_Default_*
```
{}
```
## nixos.hostDefaults
Defaults for all hosts.
the modules passed under hostDefaults will be exported
to the 'nixosModules' flake output.
They will also be added to all hosts.
*_Type_*:
submodule
*_Default_*
```
{}
```
## nixos.hostDefaults.channelName
Channel this host should follow
*_Type_*:
channel defined in `channels`
## nixos.hostDefaults.exportedModules
modules to include in all hosts and export to nixosModules output
*_Type_*:
list of valid modules or anything convertible to it or path convertible to it
*_Default_*
```
[]
```
## nixos.hostDefaults.externalModules
The `externalModules` option has been removed.
Any modules that should be exported should be defined with the `exportedModules`
option and all other modules should just go into the `modules` option.
*_Type_*:
list of valid modules or anything convertible to it
*_Default_*
```
[]
```
## nixos.hostDefaults.modules
modules to include that won't be exported
meant importing modules from external flakes
*_Type_*:
list of valid modules or anything convertible to it or path convertible to it
*_Default_*
```
[]
```
## nixos.hostDefaults.system
system for this host
*_Type_*:
null or system defined in `supportedSystems`
*_Default_*
```
null
```
## nixos.hosts
configurations to include in the nixosConfigurations output
*_Type_*:
attribute set of submodules
*_Default_*
```
{}
```
## nixos.hosts.\<name\>.channelName
Channel this host should follow
*_Type_*:
null or channel defined in `channels`
*_Default_*
```
null
```
## nixos.hosts.\<name\>.modules
modules to include
*_Type_*:
list of valid modules or anything convertible to it or path convertible to it
*_Default_*
```
[]
```
## nixos.hosts.\<name\>.system
system for this host
*_Type_*:
null or system defined in `supportedSystems`
*_Default_*
```
null
```
## nixos.hosts.\<name\>.tests
tests to run
*_Type_*:
list of valid NixOS test or path convertible to its or anything convertible to it
*_Default_*
```
[]
```
*_Example_*
```
{"_type":"literalExpression","text":"[\n {\n name = \"testname1\";\n machine = { ... };\n testScript = ''\n # ...\n '';\n }\n ({ corutils, writers, ... }: {\n name = \"testname2\";\n machine = { ... };\n testScript = ''\n # ...\n '';\n })\n ./path/to/test.nix\n];\n"}
```
## nixos.importables
Packages of paths to be passed to modules as `specialArgs`.
*_Type_*:
attribute set
*_Default_*
```
{}
```
## nixos.importables.suites
collections of profiles
*_Type_*:
null or attribute set of list of paths or anything convertible to its or path convertible to it
*_Default_*
```
null
```

80
doc/api-reference.md Executable file
View file

@ -0,0 +1,80 @@
# Top Level API
`digga`'s top level API. API Containers are documented in their respective sub-chapter:
- [Channels](./api-reference-channels.md)
- [Home](./api-reference-home.md)
- [Devshell](./api-reference-devshell.md)
- [NixOS](./api-reference-nixos.md)
- [Darwin](./api-reference-darwin.md)
## channelsConfig
nixpkgs config for all channels
*_Type_*:
attribute set or path convertible to it
*_Default_*
```
{}
```
## inputs
The flake's inputs
*_Type_*:
attribute set of nix flakes
## outputsBuilder
builder for flake system-spaced outputs
The builder gets passed an attrset of all channels
*_Type_*:
function that evaluates to a(n) attribute set or path convertible to it
*_Default_*
```
"channels: { }"
```
## self
The flake to create the DevOS outputs for
*_Type_*:
nix flake
## supportedSystems
The systems supported by this flake
*_Type_*:
list of strings
*_Default_*
```
["aarch64-linux","aarch64-darwin","i686-linux","x86_64-darwin","x86_64-linux"]
```

View file

@ -3,4 +3,4 @@ authors = ["Timothy DeHerrera"]
language = "en" language = "en"
multilingual = false multilingual = false
src = "." src = "."
title = "devos docs" title = "PubSolarOS documentation"

View file

@ -1,10 +0,0 @@
# get
The `get` subcommand is useful for getting a bare copy of devos without the
git history.
## Usage
```sh
bud get DEST-DIR
```
If DEST-DIR is ommitted, it defaults to _./devos_.

View file

@ -1,24 +0,0 @@
# [`bud`][bud] command
The template incudes a convenient script for managing your system called [`bud`][bud].
It is a portable and highly composable system control tool that work anywhere on your host
or in the flake's devshell.
Although it comes with some predefined standard helpers,
it is very extensible and you are encouraged to write your own script snippets
to ease your workflows. An example is the bud module for a `get` command that
comes included with `devos`.
While writing scripts you can convenientely access smart environment variables
that can tell the current architecture, user or host name, among others, regardless
wether you invoke `bud` within the devshell or as the system-wide installed `bud`.
For details, please review the [bud repo][bud].
## Usage
```sh
bud help
```
[bud]: https://github.com/divnix/bud

View file

@ -49,19 +49,18 @@ argument that gets passed to your home-manager users.
## External Usage ## External Usage
You can easily use the defined home-manager configurations outside of NixOS You can easily use the defined home-manager configurations outside of NixOS
using the `homeConfigurations` flake output. The [bud](../bud/index.md) helper using the `homeConfigurations` flake output.
script makes this even easier.
This is great for keeping your environment consistent across Unix systems, This is great for keeping your environment consistent across Unix-like systems,
including OSX. including macOS.
### From within the projects devshell: ### From within the projects devshell:
```sh ```sh
# builds the nixos user defined in the NixOS host # builds the pub-solar user defined in the PubSolarOS host
bud home NixOS nixos nix build '.#homeConfigurations."pub-solar@PubSolarOS".activationPackage'
# build and activate # build and activate
bud home NixOS nixos switch nix build '.#homeConfigurations."pub-solar@PubSolarOS".activationPackage' && ./result/activate && unlink result
``` ```
### Manually from outside the project: ### Manually from outside the project:

View file

@ -1,102 +0,0 @@
# Bootstrapping
This will help you boostrap a bare host with the help of the
[bespoke iso](./iso.md) live installer.
_Note: nothing prevents you from remotely executing the boostrapping
process. See below._
Once your target host has booted into the live iso, you need to partition
and format your disk according to the [official manual][manual].
## Mount partitions
Then properly mount the formatted partitions at `/mnt`, so that you can
install your system to those new partitions.
Mount `nixos` partition to `/mnt` and &mdash; for UEFI &mdash; `boot`
partition to `/mnt/boot`:
```console
$ mount /dev/disk/by-label/nixos /mnt
$ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only
$ swapon /dev/disk/by-label/swap
```
Add some extra space to the store. In the iso, it's running on a tmpfs
off your RAM:
```console
$ mkdir -p /mnt/tmpstore/{work,store}
$ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store
```
## Install
Install off of a copy of devos from the time the iso was built:
```console
$ cd /iso/devos
$ nixos-install --flake .#NixOS
```
## Notes of interest
### Remote access to the live installer
The iso live installer comes preconfigured with a network configuration
which announces it's hostname via [MulticastDNS][mDNS] as `hostname.local`,
that is `bootstrap.local` in the [iso example](./iso).
In the rare case that [MulticastDNS][mDNS] is not availabe or turned off
in your network, there is a static link-local IPv6 address configured to
`fe80::47`(mnemonic from the letter's position in the english alphabet:
`n=14 i=9 x=24; 47 = n+i+x`).
Provided that you have added your public key to the authorized keys of the
`root` user _(hint: [`deploy-rs`](../integrations/deploy.md) needs passwordless
sudo access)_:
```nix
{ ... }:
{
users.users.root.openssh.authorizedKeys.keyFiles = [
../secrets/path/to/key.pub
];
}
```
You can then ssh into the live installer through one of the
following options:
```console
ssh root@bootstrap.local
ssh root@fe80::47%eno1 # where eno1 is your network interface on which you are linked to the target
```
_Note: the [static link-local IPv6 address][staticLLA] and [MulticastDNS][mDNS] is only
configured on the live installer. If you wish to enable [MulticastDNS][mDNS]
for your environment, you ought to configure that in a regular [profile](../concepts/profiles.md)._
### EUI-64 LLA & Host Identity
The iso's IPv6 Link Local Address (LLA) is configured with a static 64-bit Extended
Unique Identifiers (EUI-64) that is derived from the host interface's Message
Authentication Code (MAC) address.
After a little while (a few seconds), you can remotely discover this unique and host
specific address over [NDP][NDP] for example with:
```console
ip -6 neigh show # also shows fe80::47
```
***This LLA is stable for the host, unless you need to swap that particular network card.***
Under this reservation, though, you may use this EUI-64 to wire up a specific
(cryptographic) host identity.
[manual]: https://nixos.org/manual/nixos/stable/index.html#sec-installation-partitioning
[mDNS]: https://en.wikipedia.org/wiki/Multicast_DNS
[NDP]: https://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol
[staticLLA]: https://tools.ietf.org/html/rfc7404

View file

@ -1,51 +0,0 @@
# From NixOS
## Generate Configuration
Assuming you're happy with your existing partition layout, you can generate a
basic NixOS configuration for your system using:
```sh
bud up
```
This will make a new file `hosts/up-$(hostname).nix`, which you can edit to
your liking.
You must then add a host to `nixos.hosts` in flake.nix:
```nix
{
nixos.hosts = {
modules = hosts/NixOS.nix;
};
}
```
Make sure your `i18n.defaultLocale` and `time.timeZone` are set properly for
your region. Keep in mind that `networking.hostName` will be automatically
set to the name of your host;
Now might be a good time to read the docs on [suites](../concepts/suites.md) and
[profiles](../concepts/profiles.md) and add or create any that you need.
> ##### _Note:_
> While the `up` sub-command is provided as a convenience to quickly set up and
> install a "fresh" NixOS system on current hardware, committing these files is
> discouraged.
>
> They are placed in the git staging area automatically because they would be
> invisible to the flake otherwise, but it is best to move what you need from
> them directly into a host module of your own making, and commit that instead.
# Installation
Once you're ready to deploy `hosts/my-host.nix`:
```sh
bud my-host switch
```
This calls `nixos-rebuild` with sudo to build and install your configuration.
> ##### _Notes:_
> - Instead of `switch`, you can pass `build`, `test`, `boot`, etc just as with
> `nixos-rebuild`.

View file

@ -2,25 +2,35 @@
The only dependency is nix, so make sure you have it [installed][install-nix]. The only dependency is nix, so make sure you have it [installed][install-nix].
## Get the Template ## Get the Template
Here is a snippet that will get you the template without the git history: If you currently don't have flakes setup, you can utilize the digga shell to pull the template:
```sh ```sh
nix-shell -p cachix --run "cachix use nrdxp" nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
--run "nix flake init -t github:divnix/digga"
nix-shell https://github.com/divnix/devos/archive/main.tar.gz -A shell \ ```
--run "bud get main" If you already have flakes support, you can directly pull the template:
```sh
cd devos nix flake init -t github:divnix/digga
```
nix-shell
Then make sure to create the git repository:
```sh
git init git init
git add . git add .
git commit -m init git commit -m init
``` ```
This will place you in a new folder named `devos` with git initialized, and a To drop into a nix-shell, if you don't have flakes setup, use the digga shell to create a `flake.lock`:
nix-shell that provides all the dependencies, including the unstable nix ```sh
version required. nix-shell "https://github.com/divnix/digga/archive/main.tar.gz" \
--run "nix flake lock"
```
Or if you do have flakes support, just run:
```sh
nix flake lock
```
Finally, run `nix-shell` to get to an interactive shell with all the dependencies, including the unstable nix
version required. You can run `menu` to confirm that you are using digga (expected output includes [docs], [general commands], [linter], etc.).
In addition, the [binary cache](../integrations/cachix.md) is added for faster deployment. In addition, the [binary cache](../integrations/cachix.md) is added for faster deployment.
@ -33,9 +43,8 @@ In addition, the [binary cache](../integrations/cachix.md) is added for faster d
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"` > you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
## Next Steps: ## Next Steps:
- [Make installable ISO](./iso.md) - [Make installable ISO](./iso.md)
- [Bootstrap Host](./bootstrapping.md)
- [Already on NixOS](./from-nixos.md)
[install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation [install-nix]: https://nixos.org/manual/nix/stable/#sect-multi-user-installation

View file

@ -1,22 +1,36 @@
# ISO # Installation Media
This project leverages [nix-community/nixos-generators][nixos-generators] for
building machine images. In most cases, you'll probably want to use the
`install-iso` format.
Making an installable ISO for `hosts/bootstrap.nix` is as simple as:
Making and writing an installable iso for `hosts/bootstrap.nix` is as simple as:
```sh ```sh
bud build bootstrap bootstrapIso nix run github:nix-community/nixos-generators -- \
sudo -E $(which bud) burn --format install-iso \
--flake '.#bootstrap'
``` ```
This works for any host. Then "burn" the ISO to your USB stick (or CD-R if you like!) following the
[instructions in the NixOS manual][burn] (or using your preferred USB burner).
## ISO image nix store & cache You can also swap out the `--format` for [any of the others][formats] supported
by nixos-generators.
The iso image holds the store to the live environment and _also_ acts as a binary cache Continue by following the usual installation instructions in the NixOS manual.
to the installer. To considerably speed up things, the image already includes all flake
`inputs` as well as the `devshell` closures.
While you _could_ provision any machine with a single stick, a custom-made iso for ## ISO Nix Store and Cache
the host you want to install DevOS to, maximises those local cache hits.
For hosts that don't differ too much, a single usb stick might be ok, whereas when The ISO image holds the Nix store for the live environment and _also_ acts as a
there are bigger differences, a custom-made usb stick will be considerably faster. binary cache to the installer. To considerably speed things up, the image
already includes all flake `inputs` as well as the `devshell` closures.
While you _could_ provision any NixOS machine with the same USB stick, an ISO
custom-made for your target host will maximise those local cache hits. For hosts
that don't differ too much, a single USB stick might be ok, whereas when there
are bigger differences, a custom-made USB stick will be considerably faster.
[nixos-generators]: https://github.com/nix-community/nixos-generators
[burn]: https://nixos.org/manual/nixos/stable/index.html#sec-booting-from-usb
[formats]: https://github.com/nix-community/nixos-generators/tree/master/formats

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1648942457, "lastModified": 1665870395,
"narHash": "sha256-i29Z1t3sVfCNfpp+KAfeExvpqHQSbLO1KWylTtfradU=", "narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "0d5e59ed645e4c7b60174bc6f6aac6a203dc0b01", "rev": "a630400067c6d03c9b3e0455347dc8559db14288",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,26 +20,6 @@
"type": "github" "type": "github"
} }
}, },
"beautysh": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1641830469,
"narHash": "sha256-uhDmgNP/biOWe4FtOa6c2xZnREH+NP9rdrMm0LccRUk=",
"owner": "lovesegfault",
"repo": "beautysh",
"rev": "e85d9736927c0fcf2abb05cb3a2d8d9b4502a2eb",
"type": "github"
},
"original": {
"owner": "lovesegfault",
"repo": "beautysh",
"type": "github"
}
},
"blank": { "blank": {
"locked": { "locked": {
"lastModified": 1625557891, "lastModified": 1625557891,
@ -55,31 +35,6 @@
"type": "github" "type": "github"
} }
}, },
"bud": {
"inputs": {
"beautysh": "beautysh",
"devshell": [
"digga",
"devshell"
],
"nixpkgs": [
"nixos"
]
},
"locked": {
"lastModified": 1642035816,
"narHash": "sha256-1Lq5c1AeUv/1SK08+O704JVfDdD/zodHzA0cv0TIga8=",
"owner": "divnix",
"repo": "bud",
"rev": "a789d710851441ba7e7cd59be378623b1fe05688",
"type": "github"
},
"original": {
"owner": "divnix",
"repo": "bud",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -87,11 +42,32 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1650920635, "lastModified": 1667419884,
"narHash": "sha256-csLLku/jHa7oTPAEJCQhFfyGYstD7jmJJV+3MiOyA+E=", "narHash": "sha256-oLNw87ZI5NxTMlNQBv1wG2N27CUzo9admaFlnmavpiY=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "1a387b8b3e4d65d7e65ae3fd85ac62b7c114c9c8", "rev": "cfc0125eafadc9569d3d6a16ee928375b77e3100",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"darwin_2": {
"inputs": {
"nixpkgs": [
"digga",
"nixpkgs"
]
},
"locked": {
"lastModified": 1651916036,
"narHash": "sha256-UuD9keUGm4IuVEV6wdSYbuRm7CwfXE63hVkzKDjVsh4=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "2f2bdf658d2b79bada78dc914af99c53cad37cba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -109,11 +85,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1648475189, "lastModified": 1659725433,
"narHash": "sha256-gAGAS6IagwoUr1B0ohE3iR6sZ8hP4LSqzYLC8Mq3WGU=", "narHash": "sha256-1ZxuK67TL29YLw88vQ18Y2Y6iYg8Jb7I6/HVzmNB6nM=",
"owner": "serokell", "owner": "serokell",
"repo": "deploy-rs", "repo": "deploy-rs",
"rev": "83e0c78291cd08cb827ba0d553ad9158ae5a95c3", "rev": "41f15759dd8b638e7b4f299730d94d5aa46ab7eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -123,12 +99,19 @@
} }
}, },
"devshell": { "devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"digga",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1637575296, "lastModified": 1655976588,
"narHash": "sha256-ZY8YR5u8aglZPe27+AJMnPTG6645WuavB+w0xmhTarw=", "narHash": "sha256-VreHyH6ITkf/1EX/8h15UqhddJnUleb0HgbC3gMkAEQ=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "0e56ef21ba1a717169953122c7415fa6a8cd2618", "rev": "899ca4629020592a13a46783587f6e674179d1db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -140,6 +123,7 @@
"digga": { "digga": {
"inputs": { "inputs": {
"blank": "blank", "blank": "blank",
"darwin": "darwin_2",
"deploy": [ "deploy": [
"deploy" "deploy"
], ],
@ -155,18 +139,20 @@
], ],
"nixpkgs": [ "nixpkgs": [
"nixos" "nixos"
] ],
"nixpkgs-unstable": "nixpkgs-unstable"
}, },
"locked": { "locked": {
"lastModified": 1650465041, "lastModified": 1661600857,
"narHash": "sha256-rAvwIjzHUBd2wBR0psWe2EtJr7w046TIOXZcSjLD2qg=", "narHash": "sha256-KfQCcTtfvU0PXV4fD9XKIMcKx9lUUR0xWJoBgc12fKE=",
"owner": "divnix", "owner": "pub-solar",
"repo": "digga", "repo": "digga",
"rev": "d60f27f697d7bb8038f85917030ca706a99eea49", "rev": "c902b3ef0aa45cb4f336c390f647bb182c38a221",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "divnix", "owner": "pub-solar",
"ref": "fix/bootstrap-iso",
"repo": "digga", "repo": "digga",
"type": "github" "type": "github"
} }
@ -190,11 +176,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1641205782, "lastModified": 1650374568,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -206,11 +192,27 @@
"flake-compat_3": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1648199409, "lastModified": 1650374568,
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=", "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03", "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -221,11 +223,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1631561581, "lastModified": 1642700792,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -239,35 +241,21 @@
"flake-utils": "flake-utils_2" "flake-utils": "flake-utils_2"
}, },
"locked": { "locked": {
"lastModified": 1639385028, "lastModified": 1654029967,
"narHash": "sha256-oqorKz3mwf7UuDJwlbCEYCB2LfcWLL0DkeCWhRIL820=", "narHash": "sha256-my3GQ3mQIw/1f6GPV1IhUZrcYQSWh0YJAMPNBjhXJDw=",
"owner": "gytis-ivaskevicius", "owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus", "repo": "flake-utils-plus",
"rev": "be1be083af014720c14f3b574f57b6173b4915d0", "rev": "6271cf3842ff9c8a9af9e3508c547f86bc77d199",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "gytis-ivaskevicius", "owner": "gytis-ivaskevicius",
"ref": "refs/pull/120/head",
"repo": "flake-utils-plus", "repo": "flake-utils-plus",
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": { "flake-utils_2": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
@ -282,13 +270,13 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_3": {
"locked": { "locked": {
"lastModified": 1649676176, "lastModified": 1667077288,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -304,27 +292,27 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1650841545, "lastModified": 1667677389,
"narHash": "sha256-AF3fk+p/mHbdtyrI3kpms+MoMVOdGIBGJ+7LT7WWdaU=", "narHash": "sha256-y9Zdq8vtsn0T5TO1iTvWA7JndYIAGjzCjbYVi/hOSmA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "236c6ec21420e44c38ec76de4fc3335bec1859b5", "rev": "87d55517f6f36aa1afbd7a4a064869d5a1d405b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-21.11", "ref": "release-22.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"latest": { "latest": {
"locked": { "locked": {
"lastModified": 1638198142, "lastModified": 1657265485,
"narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", "narHash": "sha256-PUQ9C7mfi0/BnaAUX2R/PIkoNCb/Jtx9EpnhMBNrO/o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a308775674e178495767df90c419425474582a1", "rev": "b39924fc7764c08ae3b51beef9a3518c414cdb7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -336,11 +324,11 @@
}, },
"latest_2": { "latest_2": {
"locked": { "locked": {
"lastModified": 1650831523, "lastModified": 1667629849,
"narHash": "sha256-6pDZ08SAXsUx5rOP391x+TG39ENP/XA8VMa1tQvgEjc=", "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "87d34a6b8982e901b8e50096b8e79ebc0e66cda0", "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -357,11 +345,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1650265945, "lastModified": 1662220400,
"narHash": "sha256-SO8+1db4jTOjnwP++29vVgImLIfETSXyoz0FuLkiikE=", "narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=",
"owner": "nmattia", "owner": "nmattia",
"repo": "naersk", "repo": "naersk",
"rev": "e8f9f8d037774becd82fce2781e1abdb7836d7df", "rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -370,27 +358,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-dram": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"latest"
]
},
"locked": {
"lastModified": 1649569158,
"narHash": "sha256-Wtmiyu/1d+3YGGcRxTnQyEtnJaKKR/Ry0kNbOY48Afs=",
"owner": "dramforever",
"repo": "nix-dram",
"rev": "84c47c0dc93c77f7edfd996f71618d278844c1c4",
"type": "github"
},
"original": {
"owner": "dramforever",
"repo": "nix-dram",
"type": "github"
}
},
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1636849918, "lastModified": 1636849918,
@ -408,16 +375,16 @@
}, },
"nixos": { "nixos": {
"locked": { "locked": {
"lastModified": 1650830814, "lastModified": 1667653703,
"narHash": "sha256-P7vGsHdS19eHVUJt4BeQA4JfauL2nOpEcnYKIbX76YM=", "narHash": "sha256-Xow4vx52/g5zkhlgZnMEm/TEXsj+13jTPCc2jIhW1xU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c254b8c915ac912ae9ee9dc74eac555ccbf33795", "rev": "f09ad462c5a121d0239fde645aacb2221553a217",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-21.11", "ref": "nixos-22.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -425,14 +392,14 @@
"nixos-generators": { "nixos-generators": {
"inputs": { "inputs": {
"nixlib": "nixlib", "nixlib": "nixlib",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1650388175, "lastModified": 1666812839,
"narHash": "sha256-auVEdcVtIIuBnoygUXedJewfmsf/2gSMwCrAcq/QNhM=", "narHash": "sha256-0nBDgjPU+iDsvz89W+cDEyhnFGSwCJmwDl/gMGqYiU0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "b0326ae4f0761b9b482b8472975b3a8e86940ce2", "rev": "41f3518bc194389df22a3d198215eae75e6b5ab9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -443,11 +410,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1650522846, "lastModified": 1667768008,
"narHash": "sha256-SxWHXRI3qJwswyXAtzsi6PKVY3KLNNnb072KaJthII8=", "narHash": "sha256-PGbX0s2hhXGnZDFVE6UIhPSOf5YegpWs5dUXpT/14F0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "6b4ebea9093c997c5f275c820e679108de4871ab", "rev": "f6483e0def85efb9c1e884efbaff45a5e7aabb34",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -457,22 +424,6 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1633971123,
"narHash": "sha256-WmI4NbH1IPGFWVkuBkKoYgOnxgwSfWDgdZplJlQ93vA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e4ef597edfd8a0ba5f12362932fc9b1dd01a0aef",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1637186689, "lastModified": 1637186689,
"narHash": "sha256-NU7BhgnwA/3ibmCeSzFK6xGi+Bari9mPfn+4cBmyEjw=", "narHash": "sha256-NU7BhgnwA/3ibmCeSzFK6xGi+Bari9mPfn+4cBmyEjw=",
@ -488,12 +439,27 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1657292830,
"narHash": "sha256-ldfVSTveWceDCmW6gf3B4kR6vwmz/XS80y5wsLLHFJU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "334ec8b503c3981e37a04b817a70e8d026ea9e84",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1626378135, "lastModified": 0,
"narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=", "narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=",
"path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source", "path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source",
"rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -503,18 +469,18 @@
}, },
"nvfetcher": { "nvfetcher": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixos" "nixos"
] ]
}, },
"locked": { "locked": {
"lastModified": 1650169042, "lastModified": 1667620329,
"narHash": "sha256-x8469XNOU/ebIh5YCuvjcOAaAptwHjkEl1aTFrevu1o=", "narHash": "sha256-v1Zk7rtEbAGpevBGPZvZBKpwbmw4I+uVwxvd+pBlp3o=",
"owner": "berberman", "owner": "berberman",
"repo": "nvfetcher", "repo": "nvfetcher",
"rev": "db780dba6923e531b5aedca502a36d3d9627fca9", "rev": "294826951113dcd3aa9abbcacfb1aa5b95a19116",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -523,44 +489,16 @@
"type": "github" "type": "github"
} }
}, },
"poetry2nix": {
"inputs": {
"flake-utils": [
"bud",
"beautysh",
"flake-utils"
],
"nixpkgs": [
"bud",
"beautysh",
"nixpkgs"
]
},
"locked": {
"lastModified": 1633382856,
"narHash": "sha256-hYlet806M9xJj4yxf0g5fhDT2IEUVIMAl7sqIeZ8DUM=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "705cbfa10e3d9bfed2e59e0256844ae3704dbd7e",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"bud": "bud",
"darwin": "darwin", "darwin": "darwin",
"deploy": "deploy", "deploy": "deploy",
"digga": "digga", "digga": "digga",
"flake-compat": "flake-compat_3",
"home": "home", "home": "home",
"latest": "latest_2", "latest": "latest_2",
"naersk": "naersk", "naersk": "naersk",
"nix-dram": "nix-dram",
"nixos": "nixos", "nixos": "nixos",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",

View file

@ -8,20 +8,19 @@
inputs = inputs =
{ {
# Track channels with commits tested and built by hydra # Track channels with commits tested and built by hydra
nixos.url = "github:nixos/nixpkgs/nixos-21.11"; nixos.url = "github:nixos/nixpkgs/nixos-22.05";
latest.url = "github:nixos/nixpkgs/nixos-unstable"; latest.url = "github:nixos/nixpkgs/nixos-unstable";
digga.url = "github:divnix/digga"; flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
digga.url = "github:pub-solar/digga/fix/bootstrap-iso";
digga.inputs.nixpkgs.follows = "nixos"; digga.inputs.nixpkgs.follows = "nixos";
digga.inputs.nixlib.follows = "nixos"; digga.inputs.nixlib.follows = "nixos";
digga.inputs.home-manager.follows = "home"; digga.inputs.home-manager.follows = "home";
digga.inputs.deploy.follows = "deploy"; digga.inputs.deploy.follows = "deploy";
bud.url = "github:divnix/bud"; home.url = "github:nix-community/home-manager/release-22.05";
bud.inputs.nixpkgs.follows = "nixos";
bud.inputs.devshell.follows = "digga/devshell";
home.url = "github:nix-community/home-manager/release-21.11";
home.inputs.nixpkgs.follows = "nixos"; home.inputs.nixpkgs.follows = "nixos";
darwin.url = "github:LnL7/nix-darwin"; darwin.url = "github:LnL7/nix-darwin";
@ -42,16 +41,11 @@
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
nixos-generators.url = "github:nix-community/nixos-generators"; nixos-generators.url = "github:nix-community/nixos-generators";
# PubSolarOS additions
nix-dram.url = "github:dramforever/nix-dram";
nix-dram.inputs.nixpkgs.follows = "latest";
}; };
outputs = outputs =
{ self { self
, digga , digga
, bud
, nixos , nixos
, home , home
, nixos-hardware , nixos-hardware
@ -59,24 +53,22 @@
, agenix , agenix
, nvfetcher , nvfetcher
, deploy , deploy
, nix-dram
, ... , ...
} @ inputs: } @ inputs:
digga.lib.mkFlake digga.lib.mkFlake
{ {
inherit self inputs; inherit self inputs;
channelsConfig = { allowUnfree = true; }; channelsConfig = {
# allowUnfree = true;
};
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
channels = { channels = {
nixos = { nixos = {
imports = [ (digga.lib.importOverlays ./overlays) ]; imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [ overlays = [ ];
nur.overlay
agenix.overlay
nvfetcher.overlay
./pkgs/default.nix
];
}; };
latest = { }; latest = { };
}; };
@ -90,6 +82,10 @@
our = self.lib; our = self.lib;
}); });
}) })
nur.overlay
agenix.overlay
(import ./pkgs)
]; ];
nixos = { nixos = {
@ -99,27 +95,39 @@
imports = [ (digga.lib.importExportableModules ./modules) ]; imports = [ (digga.lib.importExportableModules ./modules) ];
modules = [ modules = [
{ lib.our = self.lib; } { lib.our = self.lib; }
digga.nixosModules.bootstrapIso # FIXME: upstream module causes a huge number of unnecessary
# dependencies to be pulled in for all systems -- many of them are
# graphical. should only be imported as needed.
# digga.nixosModules.bootstrapIso
digga.nixosModules.nixConfig digga.nixosModules.nixConfig
home.nixosModules.home-manager home.nixosModules.home-manager
agenix.nixosModules.age agenix.nixosModules.age
bud.nixosModules.bud
]; ];
}; };
imports = [ (digga.lib.importHosts ./hosts) ]; imports = [ (digga.lib.importHosts ./hosts) ];
hosts = { hosts = {
/* set host specific properties here */ /* set host specific properties here */
NixOS = { }; bootstrap = {
modules = [
digga.nixosModules.bootstrapIso
];
};
PubSolarOS = {
tests = [
(import ./tests/first-test.nix { pkgs = nixos.legacyPackages.x86_64-linux; lib = nixos.lib; })
];
};
}; };
importables = rec { importables = rec {
profiles = digga.lib.rakeLeaves ./profiles // { profiles = digga.lib.rakeLeaves ./profiles // {
users = digga.lib.rakeLeaves ./users; users = digga.lib.rakeLeaves ./users;
}; };
suites = with profiles; rec { suites = with profiles; rec {
base = [ core users.nixos users.root ]; base = [ users.pub-solar users.root ];
pubsolaros = [ core base-user users.root ]; iso = base ++ [ base-user graphical pub-solar-iso ];
anonymous = [ pubsolaros users.nixos ]; pubsolaros = [ full-install base-user users.root ];
anonymous = [ pubsolaros users.pub-solar ];
}; };
}; };
}; };
@ -134,7 +142,7 @@
}; };
}; };
users = { users = {
nixos = { suites, ... }: { imports = suites.base; }; pub-solar = { suites, ... }: { imports = suites.base; };
}; # digga.lib.importers.rakeLeaves ./users/hm; }; # digga.lib.importers.rakeLeaves ./users/hm;
}; };
@ -143,6 +151,5 @@
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
} };
;
} }

View file

@ -1,7 +1,10 @@
{ suites, ... }: { suites, ... }:
{ {
### root password is empty by default ### ### root password is empty by default ###
imports = suites.base; ### default password: pub-solar, optional: add your SSH keys
imports =
suites.iso
;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@ -9,4 +12,12 @@
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
} }

View file

@ -1,18 +1,51 @@
{ profiles, ... }: { config, lib, pkgs, profiles, ... }:
with lib;
let
# Gets hostname of host to be bundled inside iso
# Copied from https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L3-L11
getFqdn = config:
let
net = config.networking;
fqdn =
if (net ? domain) && (net.domain != null)
then "${net.hostName}.${net.domain}"
else net.hostName;
in
fqdn;
in
{ {
# build with: `bud build bootstrap bootstrapIso` # build with: `nix build ".#nixosConfigurations.bootstrap.config.system.build.isoImage"`
# reachable on the local link via ssh root@fe80::47%eno1
# where 'eno1' is replaced by your own machine's network
# interface that has the local link to the target machine
imports = [ imports = [
# profiles.networking # profiles.networking
profiles.core
profiles.users.root # make sure to configure ssh keys profiles.users.root # make sure to configure ssh keys
profiles.users.nixos profiles.users.pub-solar
profiles.base-user
profiles.graphical
profiles.pub-solar-iso
]; ];
config = {
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
# will be overridden by the bootstrapIso instrumentation # will be overridden by the bootstrapIso instrumentation
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
system.nixos.label = "PubSolarOS-" + config.system.nixos.version;
# mkForce because a similar transformation gets double applied otherwise
# https://github.com/divnix/digga/blob/30ffa0b02272dc56c94fd3c7d8a5a0f07ca197bf/modules/bootstrap-iso.nix#L17
# https://github.com/NixOS/nixpkgs/blob/aecd4d8349b94f9bd5718c74a5b789f233f67326/nixos/modules/installer/cd-dvd/installation-cd-base.nix#L21-L22
isoImage = {
isoBaseName = mkForce (getFqdn config);
isoName = mkForce "${config.system.nixos.label}-${config.isoImage.isoBaseName}-${pkgs.stdenv.hostPlatform.system}.iso";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
};
} }

View file

@ -1,14 +1,14 @@
let let
rev = "e7e5d481a0e15dcd459396e55327749989e04ce0"; lock = builtins.fromJSON (builtins.readFile builtins.path { path = ../../flake.lock; name = "lockPath"; });
flake = (import flake = (import
( (
fetchTarball { fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz"; url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x"; sha256 = lock.nodes.flake-compat.locked.narHash;
} }
) )
{ {
src = ../../.; src = builtins.path { path = ../../.; name = "projectRoot"; };
}); });
in in
flake flake

View file

@ -2,7 +2,7 @@
let let
inherit (default.inputs.nixos) lib; inherit (default.inputs.nixos) lib;
host = configs.${hostname} or configs.NixOS; host = configs.${hostname} or configs.PubSolarOS;
configs = default.nixosConfigurations; configs = default.nixosConfigurations;
default = (import ../.).defaultNix; default = (import ../.).defaultNix;
hostname = lib.fileContents /etc/hostname; hostname = lib.fileContents /etc/hostname;

View file

@ -0,0 +1,23 @@
{ lib, config, pkgs, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.devops;
in
{
options.pub-solar.arduino = {
enable = mkEnableOption "Life with home automation";
};
config = mkIf cfg.enable {
users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] {
extraGroups = [ "dialout" ];
};
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [
arduino
arduino-cli
];
};
};
}

View file

@ -8,9 +8,22 @@ in
{ {
options.pub-solar.audio = { options.pub-solar.audio = {
enable = mkEnableOption "Life in highs and lows"; enable = mkEnableOption "Life in highs and lows";
mopidy.enable = mkEnableOption "Life with mopidy";
spotify.enable = mkEnableOption "Life in DRM";
spotify.username = mkOption {
description = "Spotify login username or email";
type = types.str;
example = "yourname@example.com";
default = "";
};
bluetooth.enable = mkEnableOption "Life with bluetooth";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] {
extraGroups = [ "audio" ];
};
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
# easyeffects, e.g. for microphone noise filtering # easyeffects, e.g. for microphone noise filtering
@ -22,9 +35,23 @@ in
# Needed for pactl cmd, until pw-cli is more mature (vol up/down hotkeys?) # Needed for pactl cmd, until pw-cli is more mature (vol up/down hotkeys?)
pulseaudio pulseaudio
vimpc vimpc
]; ] ++ (if cfg.spotify.enable then [ pkgs.spotify-tui ] else [ ]);
xdg.configFile."vimpc/vimpcrc".source = ./.config/vimpc/vimpcrc; xdg.configFile."vimpc/vimpcrc".source = ./.config/vimpc/vimpcrc;
systemd.user.services.easyeffects = import ./easyeffects.service.nix pkgs; systemd.user.services.easyeffects = import ./easyeffects.service.nix pkgs;
services.spotifyd = mkIf cfg.spotify.enable {
enable = true;
settings = {
global = {
username = cfg.spotify.username;
password_cmd = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus ${pkgs.libsecret}/bin/secret-tool lookup spotify password";
bitrate = 320;
volume_normalisation = true;
no_audio_cache = false;
max_cache_size = 1000000000;
};
};
};
}; };
# Enable sound using pipewire-pulse # Enable sound using pipewire-pulse
@ -41,39 +68,26 @@ in
}; };
}; };
config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json); config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json);
};
# Bluetooth configuration for pipewire # Bluetooth configuration using wireplumber
media-session.config.bluez-monitor.rules = [ # https://nixos.wiki/wiki/PipeWire#Bluetooth_Configuration
{ environment.etc = mkIf cfg.bluetooth.enable {
# Matches all cards "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
matches = [{ "device.name" = "~bluez_card.*"; }]; bluez_monitor.properties = {
actions = { ["bluez5.enable-sbc-xq"] = true,
"update-props" = { ["bluez5.enable-msbc"] = true,
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ]; ["bluez5.enable-hw-volume"] = true,
# mSBC is not expected to work on all headset + adapter combinations. ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
"bluez5.msbc-support" = true;
};
};
} }
{ '';
matches = [
# Matches all sources
{ "node.name" = "~bluez_input.*"; }
# Matches all outputs
{ "node.name" = "~bluez_output.*"; }
];
actions = {
"node.pause-on-idle" = false;
};
}
];
}; };
# Enable bluetooth # Enable bluetooth
hardware.bluetooth.enable = true; hardware.bluetooth.enable = mkIf cfg.bluetooth.enable true;
services.blueman.enable = true; services.blueman.enable = mkIf cfg.bluetooth.enable true;
# Enable audio server & client # Enable audio server & client
services.mopidy = import ./mopidy.nix pkgs; services.mopidy = mkIf cfg.mopidy.enable ((import ./mopidy.nix) pkgs);
}; };
} }

View file

@ -1,7 +1,6 @@
pkgs: { pkgs: {
enable = true; enable = true;
extensionPackages = with pkgs; [ extensionPackages = with pkgs; [
mopidy-spotify
mopidy-mpd mopidy-mpd
mopidy-soundcloud mopidy-soundcloud
mopidy-youtube mopidy-youtube

View file

@ -0,0 +1,41 @@
{ lib, config, pkgs, self, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.ci-runner;
in
{
options.pub-solar.ci-runner = {
enable = mkEnableOption "Enables a systemd service that runs drone-ci-runner";
};
config = mkIf cfg.enable {
systemd.user.services.ci-runner = {
enable = true;
description = "CI runner for the PubSolarOS repository that can run test VM instances with KVM.";
serviceConfig = {
Type = "simple";
Restart = "always";
};
path = [
pkgs.git
pkgs.nix
pkgs.libvirt
];
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "libvirtd.service" ];
script = ''${pkgs.drone-runner-exec}/bin/drone-runner-exec daemon /run/agenix/drone-runner-exec-config'';
};
age.secrets."drone-runner-exec-config" = {
file = "${self}/secrets/drone-runner-exec-config";
mode = "700";
owner = psCfg.user.name;
};
};
}

42
modules/core/boot.nix Normal file
View file

@ -0,0 +1,42 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.pub-solar.core;
in
{
options.pub-solar.core.iso-options.enable = mkOption {
type = types.bool;
default = false;
description = "Feature flag for iso builds";
};
options.pub-solar.core.disk-encryption-active = mkOption {
type = types.bool;
default = true;
description = "Whether it should be assumed that there is a cryptroot device";
};
config = {
boot = {
# Enable plymouth for better experience of booting
plymouth.enable = mkIf (!cfg.lite) (lib.mkDefault true);
# Mount / luks device in initrd
# Allow fstrim to work on it.
# The ! makes this enabled by default
initrd = mkIf (!cfg.iso-options.enable && cfg.disk-encryption-active) {
luks.devices."cryptroot" = {
allowDiscards = true;
};
};
loader.systemd-boot.enable = true;
# Use latest LTS linux kernel by default
kernelPackages = pkgs.linuxPackages_5_15;
# Support ntfs drives
supportedFilesystems = [ "ntfs" ];
};
};
}

41
modules/core/default.nix Normal file
View file

@ -0,0 +1,41 @@
{ config, lib, ... }:
with lib;
let
cfg = config.pub-solar.core;
in
{
imports = [
./boot.nix
./hibernation.nix
./fonts.nix
./i18n.nix
./networking.nix
./nix.nix
./packages.nix
./services.nix
];
options.pub-solar.core = {
lite = mkOption {
description = ''
Enable a lite edition of core with less default modules and a reduced package set.
'';
default = false;
type = types.bool;
};
};
config = {
pub-solar = {
audio.enable = mkIf (!cfg.lite) (mkDefault true);
crypto.enable = mkIf (!cfg.lite) (mkDefault true);
devops.enable = mkIf (!cfg.lite) (mkDefault true);
terminal-life = {
enable = mkDefault true;
lite = cfg.lite;
};
};
};
}

12
modules/core/fonts.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
{
fonts = {
fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];
};
};
}

View file

@ -0,0 +1,33 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.pub-solar.core.hibernation;
in
{
options.pub-solar.core.hibernation = {
enable = mkOption {
type = types.bool;
default = false;
description = "Whether the device can hibernate. This creates a swapfile at /swapfile.";
};
resumeDevice = mkOption {
type = types.str;
default = "/dev/sda1";
description = "The location of the hibernation resume swap file.";
};
resumeOffset = mkOption {
type = types.nullOr types.int;
default = null;
description = "The swap file offset. Can be found by running `filefrag -v $swap_file_location`. See https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file";
};
};
config = {
boot = mkIf cfg.enable {
resumeDevice = cfg.resumeDevice;
kernelParams = mkIf (cfg.resumeOffset != null) [ "resume_offset=${builtins.toString cfg.resumeOffset}" ];
};
};
}

View file

@ -0,0 +1,81 @@
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.pub-solar.core;
in
{
options.pub-solar.core = {
enableCaddy = mkOption {
type = types.bool;
default = !cfg.lite;
};
enableHelp = mkOption {
type = types.bool;
default = !cfg.lite;
};
binaryCaches = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Binary caches to use.";
};
publicKeys = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Public keys of binary caches.";
};
};
config = {
# disable NetworkManager-wait-online by default
systemd.services.NetworkManager-wait-online.enable = lib.mkDefault false;
networking.networkmanager = {
# Enable networkmanager. REMEMBER to add yourself to group in order to use nm related stuff.
enable = true;
wifi.backend = "iwd";
};
networking.firewall.enable = true;
# Customized binary caches list (with fallback to official binary cache)
nix.binaryCaches = cfg.binaryCaches;
nix.binaryCachePublicKeys = cfg.publicKeys;
# These entries get added to /etc/hosts
networking.hosts = {
"127.0.0.1" = [ ]
++ lib.optionals cfg.enableCaddy [ "caddy.local" ]
++ lib.optionals config.pub-solar.printing.enable [ "cups.local" ]
++ lib.optionals cfg.enableHelp [ "help.local" ];
};
# Caddy reverse proxy for local services like cups
services.caddy = {
enable = cfg.enableCaddy;
globalConfig = ''
default_bind 127.0.0.1
auto_https off
'';
extraConfig = concatStringsSep "\n" [
(lib.optionalString
config.pub-solar.printing.enable
''
cups.local:80 {
request_header Host localhost:631
reverse_proxy unix//run/cups/cups.sock
}
'')
(lib.optionalString
cfg.enableHelp
''
help.local:80 {
root * ${pkgs.psos-docs}/lib/html
file_server
}
'')
];
};
};
}

25
modules/core/nix.nix Normal file
View file

@ -0,0 +1,25 @@
{ config, pkgs, lib, inputs, ... }:
{
nix = {
# Use default version alias for nix package
package = pkgs.nix;
# Improve nix store disk usage
autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
# Prevents impurities in builds
useSandbox = true;
# give root and @wheel special privileges with nix
trustedUsers = [ "root" "@wheel" ];
# This is just a representation of the nix default
systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
# Generally useful nix option defaults
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
}

75
modules/core/packages.nix Normal file
View file

@ -0,0 +1,75 @@
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.core;
in
{
environment = {
systemPackages = with pkgs; [
# Core unix utility packages
coreutils-full
dnsutils
inetutils
progress
pciutils
usbutils
wget
openssl
openssh
curl
htop
lsof
psmisc
file
# zippit
zip
unzip
# Modern modern utilities
p7zip
croc
jq
]
++ lib.optionals (!cfg.lite) [
mtr
gitFull
git-lfs
git-bug
xdg-utils
sysfsutils
renameutils
nfs-utils
moreutils
mailutils
keyutils
input-utils
elfutils
binutils
dateutils
diffutils
findutils
exfat
# Nix specific utilities
niv
manix
nix-index
nix-tree
nixpkgs-review
# Build broken, python2.7-PyJWT-2.0.1.drv' failed
#nixops
psos
nvd
# Fun
neofetch
];
};
}

15
modules/core/services.nix Normal file
View file

@ -0,0 +1,15 @@
{ config, pkgs, lib, ... }:
{
# For rage encryption, all hosts need a ssh key pair
services.openssh = {
enable = true;
# If you don't want the host to have SSH actually opened up to the net,
# set `services.openssh.openFirewall` to false in your config.
openFirewall = lib.mkDefault true;
passwordAuthentication = false;
};
# Service that makes Out of Memory Killer more effective
services.earlyoom.enable = true;
}

View file

@ -30,7 +30,7 @@ in
}; };
home.packages = [ home.packages = [
gnome3.seahorse gnome.seahorse
keepassxc keepassxc
libsecret libsecret
qMasterPassword qMasterPassword

View file

@ -15,7 +15,8 @@ in
drone-cli drone-cli
nmap nmap
pgcli pgcli
python38Packages.ansible ansible
ansible-lint
restic restic
shellcheck shellcheck
terraform_0_15 terraform_0_15

View file

@ -100,10 +100,15 @@
foreground = "0xe3e1e4"; foreground = "0xe3e1e4";
}; };
# Colors the cursor will use if `custom_cursor_colors` is true # Cursor colors
#
# Colors which should be used to draw the terminal cursor.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
cursor = { cursor = {
text = "0x1a181a"; text = "CellBackground";
cursor = "0xe3e1e4"; cursor = "CellForeground";
}; };
# Colors used for the search bar and match highlighting. # Colors used for the search bar and match highlighting.
@ -115,14 +120,25 @@
background = "0x1a181a"; background = "0x1a181a";
}; };
focused_match = { focused_match = {
foreground = "0xe5c463"; foreground = "CellBackground";
background = "0xe3e1e4"; background = "CellForeground";
}; };
#bar = #bar =
# background = "#c5c8c6"; # background = "#c5c8c6";
# foreground = "#1d1f21"; # foreground = "#1d1f21";
}; };
# Selection colors
#
# Colors which should be used to draw the selection area.
#
# Allowed values are CellForeground/CellBackground, which reference the
# affected cell, or hexadecimal colors like #ff00ff.
selection = {
text = "0x1a181a";
background = "0xf85e84";
};
# Normal colors # Normal colors
normal = { normal = {
black = "0x1a181a"; black = "0x1a181a";

View file

@ -5,7 +5,8 @@ let
cfg = config.pub-solar.graphical; cfg = config.pub-solar.graphical;
yamlFormat = pkgs.formats.yaml { }; yamlFormat = pkgs.formats.yaml { };
recursiveMerge = attrList: recursiveMerge = attrList:
let f = attrPath: let
f = attrPath:
zipAttrsWith (n: values: zipAttrsWith (n: values:
if tail values == [ ] if tail values == [ ]
then head values then head values
@ -15,7 +16,8 @@ let
then f (attrPath ++ [ n ]) values then f (attrPath ++ [ n ]) values
else last values else last values
); );
in f [ ] attrList; in
f [ ] attrList;
in in
{ {
options.pub-solar.graphical = { options.pub-solar.graphical = {
@ -26,6 +28,16 @@ in
default = { }; default = { };
}; };
}; };
autologin.enable = mkOption {
type = types.bool;
default = true;
description = "Feature flag enabling autologin after boot.";
};
wayland.software-renderer.enable = mkOption {
type = types.bool;
default = false;
description = "Feature flag enabling wlroots software renderer, useful in VMs";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -49,7 +61,7 @@ in
}; };
}; };
services.getty.autologinUser = "${psCfg.user.name}"; services.getty.autologinUser = mkIf cfg.autologin.enable (mkForce "${psCfg.user.name}");
qt5 = { qt5 = {
enable = true; enable = true;
@ -67,7 +79,6 @@ in
fonts.enableDefaultFonts = true; fonts.enableDefaultFonts = true;
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
corefonts
fira-code fira-code
fira-code-symbols fira-code-symbols
google-fonts google-fonts
@ -81,17 +92,20 @@ in
source-sans-pro source-sans-pro
]; ];
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
alacritty alacritty
foot
chromium chromium
firefox-wayland firefox-wayland
flameshot flameshot
libnotify libnotify
gnome3.adwaita-icon-theme gnome.adwaita-icon-theme
gnome.eog gnome.eog
gnome3.nautilus gnome.nautilus
gnome.yelp
hicolor-icon-theme
wine wine
@ -112,7 +126,7 @@ in
enable = true; enable = true;
font.name = "Lato"; font.name = "Lato";
iconTheme = { iconTheme = {
package = pkgs.papirus-maia-icon-theme; package = pkgs.papirus-icon-theme;
name = "Papirus-Adapta-Nokto-Maia"; name = "Papirus-Adapta-Nokto-Maia";
}; };
theme = { theme = {

View file

@ -17,7 +17,7 @@ in
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
libreoffice-fresh libreoffice-fresh
gnome3.simple-scan gnome.simple-scan
# Tools like pdfunite # Tools like pdfunite
poppler_utils poppler_utils
# tool for annotating PDFs # tool for annotating PDFs

View file

@ -0,0 +1,52 @@
{ config, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.paranoia;
in
{
options.pub-solar.paranoia = {
enable = mkOption {
description = ''
Only offer hibernation instead of screen locking and sleeping. This only makes sense
if your hard drive is encrypted, and ensures that the contents of your drive are
encrypted if you are not actively using the device.
'';
default = false;
type = types.bool;
};
};
config = mkIf cfg.enable {
pub-solar.core.hibernation.enable = true;
services.logind.lidSwitch = "hibernate";
# The options below are directly taken from or inspired by
# https://xeiaso.net/blog/paranoid-nixos-2021-07-18
# Don't set this if you need sftp
services.openssh.allowSFTP = false;
services.openssh.openFirewall = false; # Lock yourself out
# Limit the use of sudo to the group wheel
security.sudo.execWheelOnly = true;
# Remove the complete default environment of packages like
# nano, perl and rsync
environment.defaultPackages = lib.mkForce [ ];
# fileSystems."/".options = [ "noexec" ];
services.openssh = {
kbdInteractiveAuthentication = false;
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
};
}

View file

@ -21,10 +21,6 @@ in
services.printing.defaultShared = false; services.printing.defaultShared = false;
services.printing.drivers = [ services.printing.drivers = [
pkgs.gutenprint pkgs.gutenprint
pkgs.brgenml1lpr
pkgs.brgenml1cupswrapper
pkgs.brlaser
pkgs.cups-brother-hl3140cw
]; ];
hardware.sane = { hardware.sane = {
enable = true; enable = true;

View file

@ -1,19 +0,0 @@
{ lib, config, pkgs, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.server;
in
{
options.pub-solar.server = {
enable = mkEnableOption "Enable server options like sshd";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
};
}

View file

@ -12,7 +12,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
ps-signal-desktop signal-desktop
tdesktop tdesktop
element-desktop element-desktop
irssi irssi

View file

@ -1,212 +0,0 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left j
set $down k
set $up i
set $right l
# Your preferred terminal emulator
set $term alacritty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
#set $menu dmenu_path | dmenu | xargs swaymsg exec bemenu-run --no-overlap
default_border pixel 1
### Output configuration
#
# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
output * bg ~/.config/wallpaper.jpg fill
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Start a terminal
bindsym $mod+Shift+Return exec sh -c '$term --working-directory $(wcwd)'
# Kill focused window
bindsym $mod+Shift+q kill
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Ctrl+r reload
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
# set $ws2 2:
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
set $ws9 9
# Switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
bindsym $mod+Ctrl+9 move container to workspace $ws9
# Move focused container to workspace and move focus with it
bindsym $mod+Shift+1 move container to workspace 1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace 2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace 3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace 4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace 5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace 6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace 7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace 8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace 9; workspace $ws9
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#navigate workspaces next / previous
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
#
# Layout stuff:
#
# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border pixel 1
default_floating_border normal
# Hide borders
hide_edge_borders none
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font xft:Hack 16
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+h splith; exec notify-send 'tile horizontally'
bindsym $mod+v splitv; exec notify-send 'tile vertically'
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+t focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
bindsym $mod+d focus child
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
include ~/.config/sway/config.d/*

View file

@ -14,8 +14,9 @@ assign [app_id="telegramdesktop"] $ws4
# Launcher # Launcher
for_window [app_id="launcher" title="Alacritty"] floating enable, border pixel 10, sticky enable for_window [app_id="launcher" title="Alacritty"] floating enable, border pixel 10, sticky enable
for_window [app_id="pavucontrol"] floating enable, border pixel 10, sticky enable
# Floating menus # Floating menus
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="blueman-manager"] floating enable for_window [app_id="blueman-manager"] floating enable
# Open specific applications in floating mode # Open specific applications in floating mode
@ -58,10 +59,15 @@ for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable for_window [window_type="menu"] floating enable
for_window [title="About Mozilla Firefox"] floating enabled for_window [title="About Mozilla Firefox"] floating enable
for_window [title="Password Required - Mozilla Firefox"] floating enabled for_window [title="Password Required - Mozilla Firefox"] floating enable
for_window [title="Firefox — Sharing Indicator"] floating enabled for_window [title="Extension: (Open in Browser)*"] floating enable
for_window [title="Extension: (Open in Browser)*"] floating enabled
# Technical media stuff happens on ws7
for_window [app_id="screen-recorder" title="Alacritty"] move to workspace $ws7, floating disable
no_focus [app_id="screen-recorder"]
for_window [title="Firefox — Sharing Indicator"] move to workspace $ws7, floating disable
no_focus [title="Firefox — Sharing Indicator"]
# qMasterPassword floating menu # qMasterPassword floating menu
for_window [title="qMasterPassword"] focus for_window [title="qMasterPassword"] focus

View file

@ -13,37 +13,26 @@ bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################ ################################################################################################
# Quickstart application shortcuts # Quickstart application shortcuts
bindsym $mod+F1 exec qMasterPassword bindsym $mod+F1 exec psos help
bindsym $mod+Shift+h exec psos help
bindsym $mod+F2 exec firefox bindsym $mod+F2 exec firefox
bindsym $mod+F3 exec $term -e vifm bindsym $mod+F3 exec $term -e vifm
bindsym $mod+Shift+F3 exec gksu $term -e vifm bindsym $mod+Shift+F3 exec gksu $term -e vifm
bindsym $mod+F4 exec nautilus -w
bindsym $mod+Shift+F4 exec signal-desktop
bindsym $mod+F5 exec $term -e 'mocp -C $XDG_CONFIG_DIR/mocp/config'
bindsym $mod+Shift+m exec mu
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
# Screenshofts bindsym $mod+F4 exec nautilus -w
bindsym $mod+Shift+F4 exec signal-desktop --use-tray-icon
bindsym $mod+Shift+m exec qMasterPassword
# Screenshots and screen recordings
bindsym $mod+Ctrl+p exec grim -g "$(slurp -d -b \#ffffff11)" ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png bindsym $mod+Ctrl+p exec grim -g "$(slurp -d -b \#ffffff11)" ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png
bindsym $mod+Shift+p exec grim ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png bindsym $mod+Shift+p exec grim ~/Pictures/Screenshots/$(date +%Y%m%d_%Hh%Mm%Ss)_grim.png
bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep 0.5s && flameshot gui )" bindsym $mod+Ctrl+f exec "( pkill flameshot || true && flameshot & ) && ( sleep 0.5s && flameshot gui )"
bindsym $mod+Ctrl+r exec record-screen
# Launcher # Launcher
set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" sway-launcher set $menu exec alacritty --class launcher -e env TERMINAL_COMMAND="alacritty -e" sway-launcher
bindsym $mod+Space exec $menu bindsym $mod+Space exec $menu
# Set shut down, restart and locking features
set $mode_system (l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
bindsym $mod+0 mode "$mode_system"
mode "$mode_system" {
bindsym l exec swaylock-bg, mode "default"
bindsym e exec swaymsg exit, mode "default"
bindsym s exec systemctl suspend, mode "default"
bindsym h exec systemctl hibernate, mode "default"
bindsym r exec systemctl reboot, mode "default"
bindsym Shift+s exec systemctl poweroff, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}

View file

@ -0,0 +1,28 @@
{ pkgs, psCfg, ... }: ''
# Set shut down, restart and locking features
'' + (if psCfg.core.hibernation.enable && !psCfg.paranoia.enable then ''
set $mode_system (e)xit, (h)ibernate, (l)ock, (s)uspend, (r)eboot, (Shift+s)hutdown
'' else if psCfg.paranoia.enable then ''
set $mode_system (e)xit, (h)ibernate, (r)eboot, (Shift+s)hutdown
'' else ''
set $mode_system (e)xit, (l)ock, (s)uspend, (r)eboot, (Shift+s)hutdown
'')
+ ''
bindsym $mod+0 mode "$mode_system"
mode "$mode_system" {
bindsym e exec swaymsg exit, mode "default"
'' + (if psCfg.core.hibernation.enable then ''
bindsym h exec systemctl hibernate, mode "default"
'' else "")
+ (if !psCfg.paranoia.enable then ''
bindsym l exec ${pkgs.swaylock-bg}/bin/swaylock-bg, mode "default"
bindsym s exec systemctl suspend, mode "default"
'' else "") + ''
bindsym r exec systemctl reboot, mode "default"
bindsym Shift+s exec systemctl poweroff, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
''

View file

@ -5,4 +5,4 @@
# https://github.com/swaywm/sway/wiki/Systemd-integration # https://github.com/swaywm/sway/wiki/Systemd-integration
# Also, import the most important environment variables into the D-Bus and systemd # Also, import the most important environment variables into the D-Bus and systemd
# user environments (e.g. required for screen sharing and Pinentry prompts): # user environments (e.g. required for screen sharing and Pinentry prompts):
exec "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target; exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemd-cat --identifier=sway sway" exec "systemctl --user import-environment; systemctl --user start sway-session.target; exec dbus-update-activation-environment --systemd $IMPORT_ENVIRONMENT_ENV_LIST DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemd-cat --identifier=sway sway"

View file

@ -11,3 +11,6 @@ exec_always import-gtk-settings \
gtk-theme:gtk-theme-name \ gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \ icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name cursor-theme:gtk-cursor-theme-name
# Workaround to fix cursor scaling, see https://github.com/swaywm/sway/issues/4112
seat seat0 xcursor_theme Adwaita

View file

@ -0,0 +1,214 @@
{ config, pkgs, ... }:
''
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left j
set $down k
set $up i
set $right l
# Your preferred terminal emulator
set $term ${config.pub-solar.sway.terminal}
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
#set $menu dmenu_path | dmenu | xargs swaymsg exec bemenu-run --no-overlap
default_border pixel 1
### Output configuration
#
# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
output * bg ~/.config/wallpaper.jpg fill
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Start a terminal
bindsym $mod+Shift+Return exec sh -c '$term --working-directory $(wcwd)'
# Kill focused window
bindsym $mod+Shift+q kill
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+F5 reload
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
# set $ws2 2:
set $ws1 1
set $ws2 2
set $ws3 3
set $ws4 4
set $ws5 5
set $ws6 6
set $ws7 7
set $ws8 8
set $ws9 9
# Switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
bindsym $mod+Ctrl+9 move container to workspace $ws9
# Move focused container to workspace and move focus with it
bindsym $mod+Shift+1 move container to workspace 1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace 2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace 3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace 4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace 5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace 6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace 7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace 8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace 9; workspace $ws9
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#navigate workspaces next / previous
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
#
# Layout stuff:
#
# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border pixel 1
default_floating_border normal
# Hide borders
hide_edge_borders none
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font xft:Hack 16
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+h splith; exec notify-send 'tile horizontally'
bindsym $mod+v splitv; exec notify-send 'tile vertically'
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+t focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
bindsym $mod+d focus child
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
include ~/.config/sway/config.d/*''

View file

@ -2,20 +2,26 @@
with lib; with lib;
let let
psCfg = config.pub-solar; psCfg = config.pub-solar;
cfg = config.pub-solar.sway;
in in
{ {
options.pub-solar.sway = { options.pub-solar.sway = {
enable = mkEnableOption "Life in boxes"; enable = mkEnableOption "Life in boxes";
terminal = mkOption {
type = types.nullOr types.str;
default = "alacritty";
description = "Choose sway's default terminal";
}; };
options.pub-solar.sway.v4l2loopback.enable = mkOption {
v4l2loopback.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = "WebCam streaming tool"; description = "WebCam streaming tool";
}; };
};
config = mkIf cfg.enable (mkMerge [ config = mkIf psCfg.sway.enable (mkMerge [
(mkIf (cfg.v4l2loopback.enable) { (mkIf (psCfg.sway.v4l2loopback.enable) {
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
boot.kernelModules = [ "v4l2loopback" ]; boot.kernelModules = [ "v4l2loopback" ];
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
@ -32,7 +38,17 @@ in
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; wlr = {
enable = true;
settings = {
screencast = {
max_fps = 30;
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
};
};
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
gtkUsePortal = true; gtkUsePortal = true;
}; };
@ -60,8 +76,8 @@ in
xsettingsd xsettingsd
ydotool ydotool
swaylock-bg
sway-launcher sway-launcher
record-screen
import-gtk-settings import-gtk-settings
s s
wcwd wcwd
@ -70,17 +86,19 @@ in
programs.waybar.enable = true; programs.waybar.enable = true;
#programs.waybar.systemd.enable = true; #programs.waybar.systemd.enable = true;
systemd.user.services.mako = import ./mako.service.nix pkgs; systemd.user.services.mako = import ./mako.service.nix { inherit pkgs psCfg; };
systemd.user.services.swayidle = import ./swayidle.service.nix pkgs; systemd.user.services.sway = import ./sway.service.nix { inherit pkgs psCfg; };
systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs; systemd.user.services.swayidle = import ./swayidle.service.nix { inherit pkgs psCfg; };
systemd.user.services.waybar = import ./waybar.service.nix pkgs; systemd.user.services.xsettingsd = import ./xsettingsd.service.nix { inherit pkgs psCfg; };
systemd.user.targets.sway-session = import ./sway-session.target.nix pkgs; systemd.user.services.waybar = import ./waybar.service.nix { inherit pkgs psCfg; };
systemd.user.targets.sway-session = import ./sway-session.target.nix { inherit pkgs psCfg; };
xdg.configFile."sway/config".source = ./config/config; xdg.configFile."sway/config".text = import ./config/config.nix { inherit config pkgs; };
xdg.configFile."sway/config.d/colorscheme.conf".source = ./config/config.d/colorscheme.conf; xdg.configFile."sway/config.d/colorscheme.conf".source = ./config/config.d/colorscheme.conf;
xdg.configFile."sway/config.d/theme.conf".source = ./config/config.d/theme.conf; xdg.configFile."sway/config.d/theme.conf".source = ./config/config.d/theme.conf;
xdg.configFile."sway/config.d/gaps.conf".source = ./config/config.d/gaps.conf; xdg.configFile."sway/config.d/gaps.conf".source = ./config/config.d/gaps.conf;
xdg.configFile."sway/config.d/custom-keybindings.conf".source = ./config/config.d/custom-keybindings.conf; xdg.configFile."sway/config.d/custom-keybindings.conf".source = ./config/config.d/custom-keybindings.conf;
xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.conf.nix { inherit pkgs psCfg; };
xdg.configFile."sway/config.d/applications.conf".source = ./config/config.d/applications.conf; xdg.configFile."sway/config.d/applications.conf".source = ./config/config.d/applications.conf;
xdg.configFile."sway/config.d/systemd.conf".source = ./config/config.d/systemd.conf; xdg.configFile."sway/config.d/systemd.conf".source = ./config/config.d/systemd.conf;
}; };

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "set color temperature of display according to time of day"; Description = "set color temperature of display according to time of day";

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "Actions gestures on your touchpad using libinput"; Description = "Actions gestures on your touchpad using libinput";

View file

@ -1,11 +1,10 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "Lightweight Wayland notification daemon"; Description = "Lightweight Wayland notification daemon";
Documentation = [ "man:mako(1)" ]; Documentation = [ "man:mako(1)" ];
BindsTo = [ "sway-session.target" ]; BindsTo = [ "sway-session.target" ];
After = [ "sway-session.target" ]; After = [ "sway-session.target" ];
# ConditionEnvironment requires systemd v247 to work correctly
ConditionEnvironment = [ "WAYLAND_DISPLAY" ]; ConditionEnvironment = [ "WAYLAND_DISPLAY" ];
}; };
Service = { Service = {

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "sway compositor session"; Description = "sway compositor session";

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "sway - SirCmpwn's Wayland window manager"; Description = "sway - SirCmpwn's Wayland window manager";

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, psCfg, ... }:
{ {
Unit = { Unit = {
Description = "Idle manager for Wayland"; Description = "Idle manager for Wayland";
@ -9,13 +9,16 @@ pkgs:
}; };
Service = { Service = {
Type = "simple"; Type = "simple";
Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock}/bin:${pkgs.swaylock-bg}/bin"; Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock-bg}/bin:${pkgs.swayidle}/bin";
ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ ExecStart = ''swayidle -w \
after-resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock-bg' '' + (if psCfg.paranoia.enable then '' \
timeout 120 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
timeout 150 'systemctl hibernate'
'' else '' \
timeout 600 'swaylock-bg' \ timeout 600 'swaylock-bg' \
timeout 900 'swaymsg "output * dpms off"' \ timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
resume 'swaymsg "output * dpms on"' \ '');
before-sleep 'swaylock-bg'
'';
}; };
Install = { Install = {
WantedBy = [ "sway-session.target" ]; WantedBy = [ "sway-session.target" ];

View file

@ -1,11 +1,12 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors."; Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors.";
Documentation = "https://github.com/Alexays/Waybar/wiki/"; Documentation = "https://github.com/Alexays/Waybar/wiki/";
BindsTo = [ "sway-session.target" ]; BindsTo = [ "sway-session.target" ];
After = [ "graphical-session-pre.target" "network-online.target" ]; After = [ "sway-session.target" "network-online.target" ];
Wants = [ "graphical-session-pre.target" "network-online.target" "blueman-applet.service" ]; Wants = [ "graphical-session-pre.target" "network-online.target" "blueman-applet.service" ];
ConditionEnvironment = [ "WAYLAND_DISPLAY" ];
}; };
Service = { Service = {

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "X Settings Daemon"; Description = "X Settings Daemon";

View file

@ -1,4 +1,4 @@
pkgs: { pkgs, ... }:
{ {
Unit = { Unit = {
Description = "ydotool - Generic command-line automation tool (no X!)"; Description = "ydotool - Generic command-line automation tool (no X!)";

View file

@ -7,6 +7,14 @@ in
{ {
options.pub-solar.terminal-life = { options.pub-solar.terminal-life = {
enable = mkEnableOption "Life in black and white"; enable = mkEnableOption "Life in black and white";
lite = mkOption {
description = ''
Enable a lite edition of terminal-life with less modules and a reduced package set.
'';
default = false;
type = types.bool;
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -26,7 +34,7 @@ in
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
ack ack
ag asciinema
bat bat
exa exa
fd fd
@ -34,6 +42,7 @@ in
glow glow
nnn nnn
powerline powerline
silver-searcher
vifm vifm
watson watson
]; ];

View file

@ -1,49 +1,10 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
psCfg = config.pub-solar; psCfg = config.pub-solar;
cfg = config.pub-solar.terminal-life;
xdg = config.home-manager.users."${psCfg.user.name}".xdg; xdg = config.home-manager.users."${psCfg.user.name}".xdg;
preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs); preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs);
instant-nvim = pkgs.vimUtils.buildVimPlugin {
name = "instant";
src = pkgs.fetchFromGitHub {
owner = "jbyuki";
repo = "instant.nvim";
rev = "c02d72267b12130609b7ad39b76cf7f4a3bc9554";
sha256 = "sha256-7Pr2Au/oGKp5kMXuLsQY4BK5Wny9L1EBdXtyS5EaZPI=";
};
};
workspace = pkgs.vimUtils.buildVimPlugin {
name = "vim-workspace";
src = pkgs.fetchFromGitHub {
owner = "thaerkh";
repo = "vim-workspace";
rev = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
sha256 = "sha256-XV7opLyfkHIDO0+JJaO/x0za0gsHuklrzapTGdLHJmI=";
};
};
beautify = pkgs.vimUtils.buildVimPlugin {
name = "vim-beautify";
src = pkgs.fetchFromGitHub {
owner = "zeekay";
repo = "vim-beautify";
rev = "e0691483927dc5a0c051433602397419f9628623";
sha256 = "QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
};
};
apprentice = pkgs.vimUtils.buildVimPlugin {
name = "vim-apprentice";
src = pkgs.fetchFromGitHub {
owner = "romainl";
repo = "Apprentice";
rev = "ecd41698037f15a58125b349be76dbd2595bfb6d";
sha256 = "sha256-9s7Yzn3IEJBjcyUq9NBIQ9wb45Xr7jOkEIoWf0lAYYg=";
};
};
in in
{ {
enable = true; enable = true;
@ -56,7 +17,7 @@ in
withRuby = true; withRuby = true;
withPython3 = true; withPython3 = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; lib.mkIf (!cfg.lite) [
ccls ccls
gopls gopls
nodejs nodejs
@ -67,9 +28,7 @@ in
nodePackages.typescript-language-server nodePackages.typescript-language-server
nodePackages.vim-language-server nodePackages.vim-language-server
nodePackages.vue-language-server nodePackages.vue-language-server
nodePackages.vscode-css-languageserver-bin nodePackages.vscode-langservers-extracted
nodePackages.vscode-html-languageserver-bin
nodePackages.vscode-json-languageserver-bin
nodePackages.yaml-language-server nodePackages.yaml-language-server
python39Packages.python-lsp-server python39Packages.python-lsp-server
python3Full python3Full
@ -89,7 +48,7 @@ in
lsp_extensions-nvim lsp_extensions-nvim
nvim-lspconfig nvim-lspconfig
instant-nvim instant-nvim-nvfetcher
ack-vim ack-vim
vim-airline vim-airline
@ -100,23 +59,23 @@ in
syntastic syntastic
vim-gutentags vim-gutentags
vim-vinegar vim-vinegar
workspace vim-workspace-nvfetcher
sonokai sonokai
vim-hybrid-material vim-hybrid-material
vim-airline-themes vim-airline-themes
apprentice vim-apprentice-nvfetcher
fugitive fugitive
vim-gitgutter vim-gitgutter
vim-rhubarb vim-rhubarb
vimagit vimagit-nvfetcher
fzf-vim fzf-vim
fzfWrapper fzfWrapper
vim-highlightedyank vim-highlightedyank
beautify vim-beautify-nvfetcher
vim-surround vim-surround
vim-bufkill vim-bufkill
@ -125,11 +84,14 @@ in
ansible-vim ansible-vim
emmet-vim emmet-vim
rust-vim rust-vim
vim-caddyfile-nvfetcher
vim-go vim-go
vim-javascript vim-javascript
vim-json vim-json
SchemaStore-nvim
vim-markdown vim-markdown
vim-nix vim-nix
vim-nixhash
vim-ruby vim-ruby
vim-toml vim-toml
vim-vue vim-vue

View file

@ -76,6 +76,11 @@ lua <<EOF
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
capabilities.textDocument.completion.completionItem.snippetSupport = true
local use_denols_for_typescript = not(os.getenv('NVIM_USE_DENOLS') == nil)
for lsp_key, lsp_settings in pairs({ for lsp_key, lsp_settings in pairs({
'bashls', ------------------------------- Bash 'bashls', ------------------------------- Bash
'ccls', --------------------------------- C / C++ / Objective-C 'ccls', --------------------------------- C / C++ / Objective-C
@ -100,21 +105,41 @@ lua <<EOF
} }
}, },
['jsonls'] = { -------------------------- JSON ['jsonls'] = { -------------------------- JSON
['cmd'] = {"json-languageserver", "--stdio"} ['settings'] = {
['json'] = {
['schemas' ] = vim.list_extend(
{
{
['description'] = 'JSON schema for Caddy v2',
['fileMatch'] = { '*caddy*.json' },
['name'] = 'caddy_schema.json',
['url'] = vim.fn.stdpath('data')..'/json-schemas/caddy_schema.json',
},
},
require('schemastore').json.schemas()
),
['validate'] = { ['enable'] = true }
}
}
}, },
'phpactor', ----------------------------- PHP 'phpactor', ----------------------------- PHP
'pylsp', --------------------------------- Python 'pylsp', -------------------------------- Python
'rnix', --------------------------------- Nix 'rnix', --------------------------------- Nix
'solargraph', --------------------------- Ruby 'solargraph', --------------------------- Ruby
'rust_analyzer', ------------------------ Rust 'rust_analyzer', ------------------------ Rust
['sqlls'] = { ['sqlls'] = {
['cmd'] = {"$XDG_DATA_HOME/nvm/versions/node/v12.19.0/bin/sql-language-server", "up", "--method", "stdio"} ['cmd'] = {vim.fn.stdpath('data')..'/nvm/versions/node/v12.19.0/bin/sql-language-server', 'up', '--method', 'stdio'}
}, },
['terraformls'] = { --------------------- Terraform ['terraformls'] = { --------------------- Terraform
['filetypes'] = { "terraform", "hcl", "tf" } ['filetypes'] = { 'terraform', 'hcl', 'tf' }
}, },
'tsserver', ----------------------------- Typescript / JavaScript
'angularls', ---------------------------- Angular -- The TS/JS server is chosen depending on an environment variable,
-- since denols is nicer for Deno based projects
------------------------ Deno TS/JS
------------------------------------ Typescript / JavaScript
(use_denols_for_typescript and 'denols' or 'tsserver'),
'vuels', -------------------------------- Vue 'vuels', -------------------------------- Vue
'svelte', ------------------------------- Svelte 'svelte', ------------------------------- Svelte
['yamlls'] = { -------------------------- YAML ['yamlls'] = { -------------------------- YAML
@ -125,6 +150,7 @@ lua <<EOF
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}', ['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}', ['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}', ['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
['https://json.schemastore.org/swagger-2.0'] = 'swagger.{yml,yaml}',
} }
} }
} }
@ -197,21 +223,26 @@ lua <<EOF
}, },
} }
-- Configure diagnostics -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#denols
vim.diagnostic.config({ vim.g.markdown_fenced_languages = {
"ts=typescript"
}
-- Configure diagnostics
vim.diagnostic.config({
virtual_text = false, virtual_text = false,
signs = true, signs = true,
underline = true, underline = true,
update_in_insert = false, update_in_insert = false,
severity_sort = false, severity_sort = false,
}) })
-- Change diagnostic symbols in the sign column (gutter) -- Change diagnostic symbols in the sign column (gutter)
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end end
EOF EOF
" have a fixed column for the diagnostics to appear in " have a fixed column for the diagnostics to appear in

View file

@ -9,12 +9,17 @@ let g:gutentags_file_list_command = 'git ls-files'
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
" Golang " Golang
" Go test shortcut " Go test, Def, Decls shortcut
nmap <Leader>got :GoTest<CR>:botright copen<CR> nmap <Leader>got :GoTest<CR>:botright copen<CR>
autocmd FileType go nmap gd :GoDef<CR>
autocmd FileType go nmap gD :GoDecls<CR>
" Go formatting " Go formatting
autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist
" Caddyfile indentation
autocmd FileType caddyfile setlocal noexpandtab shiftwidth=8 tabstop=8 softtabstop=8 nolist
" vim-go disable text-objects " vim-go disable text-objects
let g:go_textobj_enabled = 0 let g:go_textobj_enabled = 0

View file

@ -19,7 +19,7 @@ in
}; };
loginExtra = '' loginExtra = ''
[ "$(tty)" = "/dev/tty1" ] && exec sway [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.sway-service}/bin/sway-service
''; '';
shellAliases = { shellAliases = {
@ -39,21 +39,30 @@ in
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
}; };
zplug = {
enable = true;
plugins = [ plugins = [
# src gets fetched by nvfetcher, see: ./pkgs/sources.toml
{ {
name = "plugins/z"; # will source ohmyzsh/plugins/z/
tags = [ "from:oh-my-zsh" ]; name = "zsh-plugins-z";
file = "plugins/z/z.plugin.zsh";
src = pkgs.sources.ohmyzsh.src;
} }
{ {
name = "romkatv/powerlevel10k"; name = "zsh-powerlevel10k";
tags = [ "as:theme" "depth:1" ]; file = "powerlevel10k.zsh-theme";
src = pkgs.sources.powerlevel10k.src;
}
{
name = "zsh-fast-syntax-highlighting";
file = "F-Sy-H.plugin.zsh";
src = pkgs.sources.F-Sy-H.src;
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.sources.zsh-nix-shell.src;
} }
{ name = "zdharma/fast-syntax-highlighting"; }
{ name = "chisui/zsh-nix-shell"; }
]; ];
};
initExtra = '' initExtra = ''
bindkey -v bindkey -v
@ -71,20 +80,28 @@ in
bindkey '^R' fzf-history-widget bindkey '^R' fzf-history-widget
# ArrowUp/Down start searching history with current input # ArrowUp/Down start searching history with current input
autoload -U history-search-end autoload -U up-line-or-beginning-search
zle -N history-beginning-search-backward-end history-search-end autoload -U down-line-or-beginning-search
zle -N history-beginning-search-forward-end history-search-end zle -N up-line-or-beginning-search
bindkey "^[[A" history-beginning-search-backward-end zle -N down-line-or-beginning-search
bindkey "^[[B" history-beginning-search-forward-end bindkey "^[[A" up-line-or-beginning-search
bindkey "^P" history-beginning-search-backward-end bindkey "^[[B" down-line-or-beginning-search
bindkey "^N" history-beginning-search-forward-end bindkey "^P" up-line-or-beginning-search
bindkey "^N" down-line-or-beginning-search
# MAKE CTRL+S WORK IN VIM # MAKE CTRL+S WORK IN VIM
stty -ixon stty -ixon
stty erase '^?' stty erase '^?'
precmd () { precmd () {
echo -e "\e]2;$(pwd)\e\\" DIR_NAME=$(pwd | sed "s|^$HOME|~|g")
echo -e -n "\e]2;$DIR_NAME\e\\"
if [ $(date +%d%m) = '0104' ]; then
if [ $? -eq 0 ]; then
echo "Success! That was a great command! I can't wait to see what amazing stuff you'll be up to next."
fi
fi
} }
# If a command is not found, show me where it is # If a command is not found, show me where it is

View file

@ -21,6 +21,11 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
}; };
publicKeys = mkOption {
description = "User SSH public keys";
type = types.listOf types.str;
default = [ ];
};
fullName = mkOption { fullName = mkOption {
description = "User full name"; description = "User full name";
type = types.nullOr types.str; type = types.nullOr types.str;

View file

@ -20,7 +20,7 @@ in
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;
qemuOvmf = true; qemu.ovmf.enable = true;
}; };
users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] { users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] {
extraGroups = [ "libvirtd" ]; extraGroups = [ "libvirtd" ];

View file

@ -1,19 +0,0 @@
pkgs:
{
enable = true;
wantedBy = [ "multi-user.target" ];
unitConfig = {
Description = "Scream IVSHMEM pulse reciever";
BindsTo = [ "pipewire-pulse.service" ];
After = [ "pipewire-pulse.service" ];
Wants = [ "pipewire-pulse.service" ];
};
serviceConfig = {
Type = "simple";
ExecStartPre = [
"${pkgs.coreutils-full}/bin/truncate -s 0 /dev/shm/scream-ivshmem"
"${pkgs.coreutils-full}/bin/dd if=/dev/zero of=/dev/shm/scream-ivshmem bs=1M count=2"
];
ExecStart = "${pkgs.scream}/bin/scream -m /dev/shm/scream-ivshmem";
};
}

View file

@ -1,21 +0,0 @@
{ config, pkgs, lib, ... }:
let
cfg = config.pub-solar.x-os;
in
{
config = {
# Enable plymouth for better experience of booting
boot.plymouth.enable = true;
# Mount / luks device in initrd
# Allow fstrim to work on it.
boot.initrd = {
luks.devices."cryptroot" = {
allowDiscards = true;
};
};
boot.loader.systemd-boot.enable = true;
};
}

View file

@ -1,7 +0,0 @@
{ ... }: {
imports = [
./boot.nix
./i18n.nix
./networking.nix
];
}

View file

@ -1,54 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.pub-solar.x-os;
in
{
options.pub-solar.x-os = {
binaryCaches = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Binary caches to use.";
};
publicKeys = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Public keys of binary caches.";
};
iwdConfig = mkOption {
type = with types; nullOr (attrsOf (attrsOf (oneOf [ bool int str ])));
default = null;
description = "Configuratoin of iNet Wireless Daemon.";
};
};
config = {
networking.networkmanager = {
# Enable networkmanager. REMEMBER to add yourself to group in order to use nm related stuff.
enable = true;
};
# Customized binary caches list (with fallback to official binary cache)
nix.binaryCaches = cfg.binaryCaches;
nix.binaryCachePublicKeys = cfg.publicKeys;
# These entries get added to /etc/hosts
networking.hosts = {
"127.0.0.1" = [ "cups.local" ];
};
# Caddy reverse proxy for local services like cups
services.caddy = {
enable = true;
config = ''
{
auto_https off
}
cups.local:80
bind 127.0.0.1
request_header Host localhost:631
reverse_proxy unix//run/cups/cups.sock
'';
};
};
}

View file

@ -0,0 +1,22 @@
final: prev: {
vimPlugins = prev.vimPlugins // {
instant-nvim-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.instant-nvim-nvfetcher) pname version src;
};
vimagit-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vimagit-nvfetcher) pname version src;
};
vim-caddyfile-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-caddyfile-nvfetcher) pname version src;
};
vim-workspace-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-workspace-nvfetcher) pname version src;
};
vim-beautify-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-beautify-nvfetcher) pname version src;
};
vim-apprentice-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-apprentice-nvfetcher) pname version src;
};
};
}

View file

@ -8,22 +8,17 @@ channels: final: prev: {
discord discord
element-desktop element-desktop
rage rage
nix-index
nixpkgs-fmt nixpkgs-fmt
qutebrowser qutebrowser
signal-desktop signal-desktop
starship starship
deploy-rs deploy-rs
nix
neovim-unwrapped
tdesktop tdesktop
xdg-desktop-portal arduino
xdg-desktop-portal-gtk arduino-cli
xdg-desktop-portal-wlr
obs-studio
obs-studio-plugins
looking-glass-client
nix-direnv
vimPlugins
; ;

11
overlays/rnix-lsp.nix Normal file
View file

@ -0,0 +1,11 @@
final: prev: {
rnix-lsp = prev.rnix-lsp.overrideAttrs (oldAttrs: rec {
inherit (prev.sources.rnix-lsp-nvfetcher) pname version src;
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const {
name = "rnix-lsp-vendor.tar.gz";
inherit src;
outputHash = "sha256-SroynaHaFpvKlMSEagoGQhZcY7A0tE4xTbUXYFcneo8=";
});
});
}

View file

@ -1,16 +1,136 @@
# This file was generated by nvfetcher, please do not modify it manually. # This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl }: { fetchgit, fetchurl, fetchFromGitHub }:
{ {
F-Sy-H = {
pname = "F-Sy-H";
version = "b935a87a75560f8173dd78deee6717c59d464e06";
src = fetchFromGitHub ({
owner = "z-shell";
repo = "F-Sy-H";
rev = "b935a87a75560f8173dd78deee6717c59d464e06";
fetchSubmodules = false;
sha256 = "sha256-448OlDnrDkUjvaSLDhXsa9bkgYXzj1Ju8CTpJVjH8LM=";
});
};
instant-nvim-nvfetcher = {
pname = "instant-nvim-nvfetcher";
version = "294b6d08143b3db8f9db7f606829270149e1a786";
src = fetchFromGitHub ({
owner = "jbyuki";
repo = "instant.nvim";
rev = "294b6d08143b3db8f9db7f606829270149e1a786";
fetchSubmodules = false;
sha256 = "sha256-DXJWji/NR8ZCxe014rD51v3EHJHMhRQeOoI3SsY8mR4=";
});
};
manix = { manix = {
pname = "manix"; pname = "manix";
version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4"; version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
src = fetchgit { src = fetchFromGitHub ({
url = "https://github.com/mlvzk/manix"; owner = "mlvzk";
repo = "manix";
rev = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4"; rev = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
fetchSubmodules = false; fetchSubmodules = false;
deepClone = false; sha256 = "sha256-GqPuYscLhkR5E2HnSFV4R48hCWvtM3C++3zlJhiK/aw=";
leaveDotGit = false; });
sha256 = "1b7xi8c2drbwzfz70czddc4j33s7g1alirv12dwl91hbqxifx8qs";
}; };
ohmyzsh = {
pname = "ohmyzsh";
version = "65a1e4edbe678cdac37ad96ca4bc4f6d77e27adf";
src = fetchFromGitHub ({
owner = "ohmyzsh";
repo = "ohmyzsh";
rev = "65a1e4edbe678cdac37ad96ca4bc4f6d77e27adf";
fetchSubmodules = false;
sha256 = "sha256-qyI7CU0vKhhADZfQtD73GsyAbqdMPhDQ1uA03h4erpw=";
});
};
powerlevel10k = {
pname = "powerlevel10k";
version = "8091c8a3a8a845c70046684235a01cd500075def";
src = fetchFromGitHub ({
owner = "romkatv";
repo = "powerlevel10k";
rev = "8091c8a3a8a845c70046684235a01cd500075def";
fetchSubmodules = false;
sha256 = "sha256-I0/tktXCbZ3hMYTNvPoWfOEYWRgmHoXsar/jcUB6bpo=";
});
};
rnix-lsp-nvfetcher = {
pname = "rnix-lsp-nvfetcher";
version = "6925256babec4307479a4080b44f2be38056f210";
src = fetchFromGitHub ({
owner = "nix-community";
repo = "rnix-lsp";
rev = "6925256babec4307479a4080b44f2be38056f210";
fetchSubmodules = false;
sha256 = "sha256-OKLyIXIXhUnRB3Xw+7zI3u6XkwF7Mrbfz1XaasV6i7Q=";
});
};
vim-apprentice-nvfetcher = {
pname = "vim-apprentice-nvfetcher";
version = "9942d0bb0a5d82f7a24450b00051c1f2cc008659";
src = fetchFromGitHub ({
owner = "romainl";
repo = "Apprentice";
rev = "9942d0bb0a5d82f7a24450b00051c1f2cc008659";
fetchSubmodules = false;
sha256 = "sha256-Xs+vTdnihNbBFPOKsW+NB40pqN9eaadqzc0DIeNoOFo=";
});
};
vim-beautify-nvfetcher = {
pname = "vim-beautify-nvfetcher";
version = "e0691483927dc5a0c051433602397419f9628623";
src = fetchFromGitHub ({
owner = "zeekay";
repo = "vim-beautify";
rev = "e0691483927dc5a0c051433602397419f9628623";
fetchSubmodules = false;
sha256 = "sha256-QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
});
};
vim-caddyfile-nvfetcher = {
pname = "vim-caddyfile-nvfetcher";
version = "24fe0720551883e407cb70ae1d7c03f162d1d5a0";
src = fetchFromGitHub ({
owner = "isobit";
repo = "vim-caddyfile";
rev = "24fe0720551883e407cb70ae1d7c03f162d1d5a0";
fetchSubmodules = false;
sha256 = "sha256-rRYv3vnt31g7hNTxttTD6BWdv5JJ+ko3rPNyDUEOZ9o=";
});
};
vim-workspace-nvfetcher = {
pname = "vim-workspace-nvfetcher";
version = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
src = fetchFromGitHub ({
owner = "thaerkh";
repo = "vim-workspace";
rev = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
fetchSubmodules = false;
sha256 = "sha256-XV7opLyfkHIDO0+JJaO/x0za0gsHuklrzapTGdLHJmI=";
});
};
vimagit-nvfetcher = {
pname = "vimagit-nvfetcher";
version = "308650ddc1e9a94e49fae0ea04bbc1c45f23d4c4";
src = fetchFromGitHub ({
owner = "jreybert";
repo = "vimagit";
rev = "308650ddc1e9a94e49fae0ea04bbc1c45f23d4c4";
fetchSubmodules = false;
sha256 = "sha256-fhazQQqyFaO0fdoeNI9nBshwTDhKNHH262H/QThtuO0=";
});
};
zsh-nix-shell = {
pname = "zsh-nix-shell";
version = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
src = fetchFromGitHub ({
owner = "chisui";
repo = "zsh-nix-shell";
rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
fetchSubmodules = false;
sha256 = "sha256-BjgMhILEL/qdgfno4LR64LSB8n9pC9R+gG7IQWwgyfQ=";
});
}; };
} }

View file

@ -9,14 +9,16 @@ with final; {
mopidy-jellyfin = import ./mopidy-jellyfin.nix final; mopidy-jellyfin = import ./mopidy-jellyfin.nix final;
mu = writeShellScriptBin "mu" (import ./mu.nix final); mu = writeShellScriptBin "mu" (import ./mu.nix final);
psos = writeShellScriptBin "psos" (import ./psos.nix final); psos = writeShellScriptBin "psos" (import ./psos.nix final);
psos-docs = import ./psos-docs.nix final;
s = writeShellScriptBin "s" (import ./s.nix final); s = writeShellScriptBin "s" (import ./s.nix final);
sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final); sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final);
sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final); sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final);
swaylock-bg = writeScriptBin "swaylock-bg" (import ./swaylock-bg.nix final); swaylock-bg = writeShellScriptBin "swaylock-bg" (import ./swaylock-bg.nix final);
toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final);
uhk-agent = import ./uhk-agent.nix final; uhk-agent = import ./uhk-agent.nix final;
wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final);
drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final);
record-screen = writeShellScriptBin "record-screen" (import ./record-screen.nix final);
# ps-fixes # ps-fixes
ps-signal-desktop = writeShellScriptBin "signal-desktop" (import ./ps-signal-desktop.nix final);
} }

View file

@ -0,0 +1,32 @@
self: with self; ''
case $1 in
start)
${self.docker}/bin/docker run --detach \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RPC_PROTO=$DRONE_RPC_PROTO \
--env=DRONE_RPC_HOST=$DRONE_RPC_HOST \
--env=DRONE_RPC_SECRET=$(${self.libsecret}/bin/secret-tool lookup drone rpc-secret) \
--env=DRONE_RUNNER_CAPACITY=8 \
--env=DRONE_RUNNER_NAME=$(${self.inetutils}/bin/hostname) \
--publish=3000:3000 \
--restart=always \
--name=drone-runner \
drone/drone-runner-docker:1
;;
stop)
${self.docker}/bin/docker stop drone-runner
${self.docker}/bin/docker rm drone-runner
;;
logs)
${self.docker}/bin/docker logs drone-runner
;;
*)
echo "Usage: drone-docker-runner <start|stop|logs>"
exit 1;
;;
esac
''

View file

@ -1,3 +1,9 @@
self: with self; '' self: with self;
${self.looking-glass-client}/bin/looking-glass-client -f /dev/shm/looking-glass input:ignoreWindowsKeys=yes input:grabKeyboardOnFocus=no let
looking-glass-client = self.looking-glass-client.overrideAttrs (old: {
meta.platforms = [ "x86_64-linux" "aarch64-linux" ];
});
in
''
${looking-glass-client}/bin/looking-glass-client -f /dev/shm/looking-glass input:ignoreWindowsKeys=yes input:grabKeyboardOnFocus=no
'' ''

View file

@ -1,3 +0,0 @@
self: with self; ''
exec ${signal-desktop}/bin/signal-desktop --disable-gpu -- "$@"
''

26
pkgs/psos-docs.nix Normal file
View file

@ -0,0 +1,26 @@
self: with self;
stdenv.mkDerivation rec {
pname = "psos-docs";
version = "0.0.1";
buildInputs = [
mdbook
mdbook-pdf
];
src = ../docs/..; # wut
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''
cp -r $src/doc ./doc
cp $src/README.md ./README.md
chmod ug+w -R .
ls -la .
mdbook build doc
'';
installPhase = ''
mkdir -p $out/lib/
cp -r doc/book $out/lib/html
'';
}

View file

@ -14,6 +14,10 @@ self: with self; ''
shift; shift;
exec nixos-option -I nixpkgs=/etc/nixos/lib/compat $@ exec nixos-option -I nixpkgs=/etc/nixos/lib/compat $@
;; ;;
help)
shift;
exec xdg-open http://help.local/
;;
*) *)
if [[ "$@" != "" ]]; then if [[ "$@" != "" ]]; then
echo "Unknown command: psos $@" echo "Unknown command: psos $@"

10
pkgs/record-screen.nix Normal file
View file

@ -0,0 +1,10 @@
self: with self; ''
mkdir -p "$HOME/Videos/Screenrecordings"
GEOMETRY="$(slurp -d -b \#ffffff11)"
RESOLUTION="$(echo $GEOMETRY | awk '{print $2}')"
FILE_LOCATION="$HOME/Videos/Screenrecordings/$(${coreutils}/bin/date +%Y%m%d_%Hh%Mm%Ss)_$RESOLUTION.mp4"
echo "Recording $GEOMETRY into $FILE_LOCATION"
${alacritty}/bin/alacritty \
--class screen-recorder \
-e ${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION"
''

View file

@ -2,3 +2,47 @@
[manix] [manix]
src.git = "https://github.com/mlvzk/manix" src.git = "https://github.com/mlvzk/manix"
fetch.github = "mlvzk/manix" fetch.github = "mlvzk/manix"
[ohmyzsh]
src.git = "https://github.com/ohmyzsh/ohmyzsh"
fetch.github = "ohmyzsh/ohmyzsh"
[powerlevel10k]
src.git = "https://github.com/romkatv/powerlevel10k"
fetch.github = "romkatv/powerlevel10k"
[F-Sy-H]
src.git = "https://github.com/z-shell/F-Sy-H"
fetch.github = "z-shell/F-Sy-H"
[zsh-nix-shell]
src.git = "https://github.com/chisui/zsh-nix-shell"
fetch.github = "chisui/zsh-nix-shell"
[rnix-lsp-nvfetcher]
src.git = "https://github.com/nix-community/rnix-lsp"
fetch.github = "nix-community/rnix-lsp"
[vimagit-nvfetcher]
src.git = "https://github.com/jreybert/vimagit"
fetch.github = "jreybert/vimagit"
[instant-nvim-nvfetcher]
src.git = "https://github.com/jbyuki/instant.nvim"
fetch.github = "jbyuki/instant.nvim"
[vim-caddyfile-nvfetcher]
src.git = "https://github.com/isobit/vim-caddyfile"
fetch.github = "isobit/vim-caddyfile"
[vim-workspace-nvfetcher]
src.git = "https://github.com/thaerkh/vim-workspace"
fetch.github = "thaerkh/vim-workspace"
[vim-beautify-nvfetcher]
src.git = "https://github.com/zeekay/vim-beautify"
fetch.github = "zeekay/vim-beautify"
[vim-apprentice-nvfetcher]
src.git = "https://github.com/romainl/Apprentice"
fetch.github = "romainl/Apprentice"

View file

@ -23,7 +23,7 @@ self: with self; ''
# search command list # search command list
command_str=$(printf "%s\n" "''${command_history}" "''${command_list}" | \ command_str=$(printf "%s\n" "''${command_history}" "''${command_list}" | \
sed -E 's/^[0-9]+ (.+)$/\1/' | \ sed -E 's/^[0-9]+ (.+)$/\1/' | \
fzf --exact --no-extended --print-query --no-sort | \ fzf --color=16 --exact --no-extended --print-query --no-sort | \
tail -n1) || exit 1 tail -n1) || exit 1
if [ "$command_str" = "" ]; then if [ "$command_str" = "" ]; then

View file

@ -1,6 +1,6 @@
self: with self; '' self: with self; ''
# first import environment variables from the login manager # first import environment variables from the login manager
systemctl --user import-environment systemctl --user import-environment;
# then start the service # then start the service
exec systemctl --wait --user start sway.service exec systemctl --wait --user start sway.service
'' ''

View file

@ -3,18 +3,17 @@ self: with self; ''
# swaylock # swaylock
# Make sure we aren't running twice # Make sure we aren't running twice
RUNNING=$(ps -A | grep swaylock | wc -l) RUNNING=$(${procps}/bin/pgrep -c ${swaylock}/bin/swaylock)
if [ $RUNNING -ne 0 ]; then if [ "$RUNNING" -ne 0 ]; then
exit 0 exit 0
fi fi
IMAGE=$XDG_CONFIG_HOME/wallpaper.jpg IMAGE="$XDG_CONFIG_HOME/wallpaper.jpg"
LOCKARGS="" LOCKARGS=""
for OUTPUT in `${sway}/bin/swaymsg -t get_outputs | jq -r '.[].name'` for OUTPUT in $(${sway}/bin/swaymsg -t get_outputs | ${jq}/bin/jq -r '.[].name')
do do
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}" LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
IMAGES="''${IMAGES} ''${IMAGE}"
done done
exec ${swaylock}/bin/swaylock $LOCKARGS exec ${swaylock}/bin/swaylock $LOCKARGS
'' ''

View file

@ -10,5 +10,6 @@ self: with self; ''
next_layout=0; next_layout=0;
fi fi
${libnotify}/bin/notify-send "$next_layout"
${sway}/bin/swaymsg input '*' xkb_switch_layout "$next_layout" ${sway}/bin/swaymsg input '*' xkb_switch_layout "$next_layout"
'' ''

View file

@ -0,0 +1,6 @@
{ self, config, lib, pkgs, ... }:
let inherit (lib) fileContents;
in
{
pub-solar.audio.enable = true;
}

View file

@ -24,6 +24,7 @@ in
[commit] [commit]
gpgsign = true gpgsign = true
template = ${xdg.configHome}/git/gitmessage
[tag] [tag]
gpgsign = true gpgsign = true
[init] [init]

View file

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
let
user = config.pub-solar.user;
xdg = config.home-manager.users."${user.name}".xdg;
in
''
# Title: Summary, imperative, start upper case, don't end with a period
# No more than 50 chars. #### 50 chars is here: #
#
# ^ Remember ending with an extra blank line
# Body: Explain *what* and *why* (not *how*). Include issue number.
# Wrap at 72 chars. ################################## which is here: #
#
# ^ Remember ending with an extra blank line
# At the end: Include Co-authored-by for all contributors.
#
# Co-authored-by: Example Name <email@example.com>
''

View file

@ -4,7 +4,7 @@
"height": 26, // Waybar height "height": 26, // Waybar height
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["mpd"], //"modules-center": ["mpd"],
"modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"], "modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"],
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true "disable-scroll": true

File diff suppressed because one or more lines are too long

View file

@ -16,9 +16,16 @@ in
# home to /home/username, useDefaultShell to true, and isSystemUser to false. # home to /home/username, useDefaultShell to true, and isSystemUser to false.
isNormalUser = true; isNormalUser = true;
description = psCfg.user.description; description = psCfg.user.description;
extraGroups = [ "wheel" "docker" "input" "audio" "networkmanager" "lp" "scanner" ]; extraGroups = [
"wheel"
"input"
"networkmanager"
"lp"
"scanner"
];
initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else ""; initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else "";
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keys = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [ ];
}; };
}; };
} }

View file

@ -20,7 +20,7 @@ in
home.packages = with pkgs; [ ]; home.packages = with pkgs; [ ];
fonts.fontconfig.enable = true; fonts.fontconfig.enable = mkForce true;
programs.dircolors.enable = true; programs.dircolors.enable = true;
programs.dircolors.enableZshIntegration = true; programs.dircolors.enableZshIntegration = true;
@ -32,6 +32,7 @@ in
xdg.mimeApps = import ./mimeapps.nix; xdg.mimeApps = import ./mimeapps.nix;
xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; };
xdg.configFile."git/gitmessage".text = import ./.config/git/gitmessage.nix { inherit config; inherit pkgs; };
xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix { inherit config; inherit pkgs; }; xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix { inherit config; inherit pkgs; };
xdg.configFile."dircolors".source = ./.config/dircolors; xdg.configFile."dircolors".source = ./.config/dircolors;
xdg.configFile."xmodmap".source = ./.config/xmodmap; xdg.configFile."xmodmap".source = ./.config/xmodmap;
@ -54,6 +55,10 @@ in
# Ensure nvim backup directory gets created # Ensure nvim backup directory gets created
# Workaround for E510: Can't make backup file (add ! to override) # Workaround for E510: Can't make backup file (add ! to override)
xdg.dataFile."nvim/backup/.keep".text = ""; xdg.dataFile."nvim/backup/.keep".text = "";
xdg.dataFile."nvim/json-schemas/.keep".text = "";
# Generated with:
# docker run -it --name caddy-json-schema registry.greenbaum.cloud/gc/caddy-l4:2.5.2 caddy json-schema -output /srv/caddy_schema.json
xdg.dataFile."nvim/json-schemas/caddy_schema.json".source = .local/share/nvim/json-schemas/caddy_schema.json;
xdg.dataFile."nvim/templates/.keep".text = ""; xdg.dataFile."nvim/templates/.keep".text = "";
xdg.dataFile."shell.nix.tmpl" = { xdg.dataFile."shell.nix.tmpl" = {
text = '' text = ''

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let let
psCfg = config.pub-solar; psCfg = config.pub-solar;
wlroots = psCfg.graphical.wayland;
xdg = config.home-manager.users."${psCfg.user.name}".xdg; xdg = config.home-manager.users."${psCfg.user.name}".xdg;
variables = { variables = {
XDG_CONFIG_HOME = xdg.configHome; XDG_CONFIG_HOME = xdg.configHome;
@ -15,6 +16,7 @@ let
ECORE_EVAS_ENGINE = "wayland_egl"; ECORE_EVAS_ENGINE = "wayland_egl";
ELM_ENGINE = "wayland_egl"; ELM_ENGINE = "wayland_egl";
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland";
WLR_RENDERER = if wlroots.software-renderer.enable then "pixman" else "gles2";
EDITOR = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim"; EDITOR = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim"; VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
@ -75,10 +77,22 @@ let
# TELEMETRY BS # TELEMETRY BS
VUEDX_TELEMETRY = "off"; VUEDX_TELEMETRY = "off";
}; };
envListNames = lib.attrsets.mapAttrsToList (name: value: name) variables;
# Here we merge an extra variable into the attrset called FULL_ENV_LIST.
# It's a list of the variable names defined above.
# We can use this to tell `systemctl import-environment` to import the full list above.
variablesWithMeta = lib.attrsets.zipAttrsWith (name: values: builtins.head values) [
variables
{ IMPORT_ENVIRONMENT_ENV_LIST = lib.lists.foldl (a: b: a + " " + b) "IMPORT_ENVIRONMENT_ENV_LIST" envListNames; }
];
in in
{ {
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.sessionVariables = variables; home.sessionVariables = variablesWithMeta;
systemd.user.sessionVariables = variables; systemd.user.sessionVariables = variablesWithMeta;
}; };
environment.variables = variablesWithMeta;
} }

View file

@ -1,133 +0,0 @@
{ self, config, lib, pkgs, inputs, ... }:
let inherit (lib) fileContents;
in
{
# Sets nrdxp.cachix.org binary cache which just speeds up some builds
imports = [ ../cachix ];
config = {
pub-solar.terminal-life.enable = true;
pub-solar.audio.enable = true;
pub-solar.crypto.enable = true;
pub-solar.devops.enable = true;
pub-solar.docker.enable = true;
pub-solar.nextcloud.enable = true;
pub-solar.office.enable = true;
# pub-solar.printing.enable = true; # this is enabled automatically if office is enabled
pub-solar.server.enable = true;
pub-solar.printing.enable = true;
# This is just a representation of the nix default
nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
environment = {
systemPackages = with pkgs; [
# Core unix utility packages
coreutils-full
progress
dnsutils
inetutils
pciutils
usbutils
gitFull
git-lfs
git-bug
wget
openssl
openssh
curl
htop
lsof
psmisc
xdg-utils
sysfsutils
renameutils
nfs-utils
moreutils
mailutils
keyutils
input-utils
elfutils
binutils
dateutils
diffutils
findutils
exfat-utils
file
# zippit
zip
unzip
# Modern modern utilities
p7zip
croc
jq
# Nix specific utilities
niv
manix
nix-index
nix-tree
nixpkgs-review
# Build broken, python2.7-PyJWT-2.0.1.drv' failed
#nixops
psos
# Fun
neofetch
];
};
fonts = {
fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];
};
};
nix = {
# use nix-dram, a patched nix command, see: https://github.com/dramforever/nix-dram
package = inputs.nix-dram.packages.${pkgs.system}.nix-dram;
# Improve nix store disk usage
autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
# Prevents impurities in builds
useSandbox = true;
# give root and @wheel special privileges with nix
trustedUsers = [ "root" "@wheel" ];
# Generally useful nix option defaults
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
# used by nix-dram
default-flake = flake:nixpkgs
'';
};
# For rage encryption, all hosts need a ssh key pair
services.openssh = {
enable = true;
openFirewall = lib.mkDefault false;
};
# Service that makes Out of Memory Killer more effective
services.earlyoom.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = [ "ntfs" ];
};
}

View file

@ -1,95 +0,0 @@
[aws]
symbol = " "
[character]
success_symbol = "[](bold purple)"
vicmd_symbol = "[](bold purple)"
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
[conda]
symbol = " "
[directory]
style = "cyan"
read_only = " 🔒"
[docker]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[git_branch]
format = "[$symbol$branch]($style) "
symbol = " "
style = "bold dimmed white"
[git_status]
format = '([「$all_status$ahead_behind」]($style) )'
conflicted = "⚠️"
ahead = "⟫${count} "
behind = "⟪${count}"
diverged = "🔀 "
untracked = "📁 "
stashed = "↪ "
modified = "𝚫 "
staged = "✔ "
renamed = "⇆ "
deleted = "✘ "
style = "bold bright-white"
[golang]
symbol = " "
[haskell]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[memory_usage]
symbol = " "
disabled = false
[nim]
symbol = " "
[nix_shell]
format = '[$symbol$state]($style) '
symbol = " "
pure_msg = "λ"
impure_msg = "⎔"
[nodejs]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
[status]
disabled = false

Some files were not shown because too many files have changed in this diff Show more