168 Commits

Author SHA1 Message Date
48397d98d0 home/xdg: set OPAMROOT override 2026-02-20 15:23:02 +09:00
392b856863 home/email: add meli 2026-02-20 15:22:26 +09:00
79835dd63e home/packages: add signal-desktop 2026-02-20 15:21:59 +09:00
7ea25a1bed home/ssh: disable persistent sockets, manually specify defaults 2026-02-20 15:21:36 +09:00
ecd71b180c home/neomutt: better default paths, enable sidebar 2026-02-06 13:15:48 +09:00
502b825051 xps16/disks: don't mount snapshot dirs as readonly 2026-02-06 13:15:48 +09:00
b42b1b0797 home/email: init 2026-02-06 13:15:47 +09:00
25fa892f66 home/ssh: add smask to pvv machine list 2026-02-03 13:03:01 +09:00
ebe6fe999d home/ssh: add powerpuff to pvv machine list, move buskerud 2026-02-03 13:00:46 +09:00
66371e050e home/ssh: add wegonke to pvv machine list 2026-02-02 23:13:52 +09:00
2ba599fa11 home/anyrun: fix (but it's barely holding on tbh) 2026-02-02 23:08:36 +09:00
478e607b8d home/tmux: increase history buffer tenfold 2026-02-02 23:06:48 +09:00
625dca5c2e common: install a bunch of manpages 2026-02-02 23:06:00 +09:00
743adf0735 treewide: yeet some proprietary slop, also name and shame 2026-02-02 23:05:29 +09:00
2821f23ef5 flake.lock: bump 2026-02-02 10:54:25 +01:00
5a92dad529 hosts/xps16: add ~/archive mount 2026-02-02 17:38:42 +09:00
6e033dcca3 hosts/xps16: automount snapshot dirs 2026-02-02 17:38:41 +09:00
fcfbde58f5 hosts/xps16: fix disko device name 2026-02-02 17:32:55 +09:00
78b5339a95 hosts/xps16: flatten ~/{git,music} subvols 2026-02-02 16:44:52 +09:00
f928ebdb50 hosts/xps16: mount btrfs snapshots as readonly 2026-02-02 16:35:42 +09:00
8f521284c8 hosts/xps16: flatten out some btrfs subvols 2026-02-02 16:32:36 +09:00
9dda35094d hosts/xps16: 8 gigs of swap 2026-02-02 16:00:00 +09:00
43d37864db hosts/xps16: use disko as source of truth for fileSystems 2026-02-02 15:33:26 +09:00
37e127d89d Revert "home/hyprland: replace uwsm for app2unit for starting scratchpads"
This reverts commit 19980dc75b.
2026-01-26 17:24:18 +09:00
0a940328f2 zed: trust all worktrees 2026-01-26 17:22:29 +09:00
700d52db60 home/hyprland: replace uwsm for app2unit for adhoc terminals 2026-01-22 12:20:59 +09:00
19980dc75b home/hyprland: replace uwsm for app2unit for starting scratchpads 2026-01-22 12:19:45 +09:00
c1143c78db home/ssh: add more pvv machines 2026-01-21 17:29:26 +09:00
b05354c23b tsuki/matrix: setup livekit 2026-01-21 17:28:42 +09:00
96e74326d3 home/alacritty: send alt+z on super+z 2026-01-18 16:18:58 +09:00
de84111822 modules/duperemove: init 2026-01-18 04:43:51 +09:00
d7fa0ed77e {flake.nix,home/packages}: remove remains of dosei 2026-01-18 04:07:23 +09:00
1d320fc3c3 home/zed: configure php lsp 2026-01-18 04:04:51 +09:00
b0e9cf2151 home/neovim: store backups 2026-01-18 04:03:04 +09:00
5a61436308 home/firefox: set kagi as default search engine 2026-01-18 03:59:36 +09:00
ca8f9efe05 home/git/switch-interactive: add colors, list tags 2026-01-18 03:25:56 +09:00
cadba619d1 tsuki/matrix: set web client location 2026-01-18 00:03:07 +09:00
7e949a3c14 hosts/xps16: remove redundant ipu6 config 2026-01-18 00:02:41 +09:00
9f2a4e3035 hosts/xps16/home: new monitor config for hyprland 2026-01-18 00:02:12 +09:00
b013771c9f hosts/xps16: attempt muting audio on closing laptop lid 2026-01-18 00:01:36 +09:00
a5b9c6eab5 hosts/xps16: use stable kernel again 2026-01-17 23:59:52 +09:00
7708de4a8a hosts/xps16: move ipu6 config to separate file, extend 2026-01-16 23:58:46 +09:00
c9f899cb4c flake.nix: switch nixos-matrix-modules upstream 2026-01-13 19:37:38 +01:00
632be8fdf3 tsuki/matrix: update trusted key servers 2026-01-14 02:13:58 +09:00
1a96108ba9 home/git/author-lines.sh: skip binary files 2025-12-31 04:03:45 +09:00
d6e83cb4c4 home/git: add diffc script 2025-12-29 17:58:01 +09:00
5bd5355150 flake.lock: bump 2025-12-29 16:59:38 +09:00
d9e6c35e51 common: don't install fonts on headless machines 2025-12-29 16:54:57 +09:00
266a1b1730 hosts/tsuki: send ntfy message on awaiting zfs pass 2025-12-29 16:45:13 +09:00
b1b0f87ac6 home/xsession: use xdg.configHome 2025-12-29 14:28:30 +09:00
9863a33778 home/newsboat: upstream automation to home-manager 2025-12-29 14:24:50 +09:00
282b46a768 home/zed: use ty 2025-12-18 12:34:37 +09:00
a006630ddc README: fix security critical typo
Thx to @vegardbm for the find
2025-12-15 18:11:01 +09:00
058a43fcba home/git: add all-commits script 2025-12-14 01:06:36 +09:00
186a0c901b home/git: add author-lines script 2025-12-10 14:46:42 +09:00
13f890f096 home/zed: disable nil 2025-12-05 15:34:42 +09:00
a554a50439 tsuki: update to 25.11 2025-12-05 07:33:13 +01:00
7ce64ff4fd flake.nix: fix input urls 2025-12-05 14:52:39 +09:00
414f9d4c33 home/zed: misc improvements 2025-12-05 14:51:45 +09:00
1cbb2dce68 home/nix: toggle enable 2025-11-30 22:03:54 +09:00
d62846811b home/tmux: add workaround for double-prefix bug 2025-11-30 22:03:13 +09:00
010472a7b6 xps16: re-enable latest kernel + IPU 2025-11-30 22:02:25 +09:00
fddefdde61 Update nixpkgs to 25.11-beta 2025-11-25 21:07:42 +09:00
6d89b7b2af flake.lock: bump 2025-11-05 01:54:46 +01:00
56ef2b09b2 common/udisks2: only enable on graphical machines 2025-11-05 09:54:32 +09:00
36c9a5affc common/wpa_supplicant: harden 2025-11-05 09:47:16 +09:00
5a7269f55d common/irqbalance: apply chroot 2025-11-05 09:38:54 +09:00
99fac5e5aa common/rtkit: harden 2025-11-05 09:38:53 +09:00
80d078739b common/udisks2: harden 2025-11-05 09:38:53 +09:00
4d516b7bab common/polkit: apply chroot 2025-11-05 09:38:53 +09:00
31c4434627 home/shell: add shellscript for preparing backup of file 2025-11-05 09:13:17 +09:00
be70280f18 home/shell: reactivate functions as shellscripts 2025-11-05 09:09:43 +09:00
704be04e26 common/packages: add more manpages 2025-11-05 08:50:16 +09:00
664be83949 common/packages: split off file from default.nix 2025-11-05 08:49:47 +09:00
f2ce070f0b home/firefox: disable additional telemetry options 2025-11-05 08:44:36 +09:00
6d5deb059c hosts/xps16: use stable kernel 2025-11-05 08:43:57 +09:00
fe4a25d447 hosts/xps16: disable displaylink 2025-11-05 08:43:22 +09:00
4ad2f1dc61 hosts/xps16: enable apparmor for firefox 2025-11-05 08:43:03 +09:00
52607f7ee6 common/dbus: temporarily undo hardening, system broke :( 2025-11-05 08:41:07 +09:00
27ac053b47 xps16/btrfs/scrub: disable internet, restrict filesystems 2025-10-28 14:32:01 +09:00
f2931da4ab common/dbus: harden dbus-broker units 2025-10-28 13:46:26 +09:00
a3542e6a6c common: use nsncd instead of nscd 2025-10-28 11:52:49 +09:00
5d866049a0 common: use nftables as firewall 2025-10-28 11:52:09 +09:00
47ddf0cd1e tsuki: move to different machine and reinit 2025-10-24 12:22:01 +09:00
6a4337e34f home/git: don't delete main/master on delete-merged 2025-10-24 11:45:00 +09:00
68268ec2a0 home/fcitx5: fix eval against NixOS 25.11 2025-10-24 11:44:18 +09:00
d99347f708 home/shellAliases: fix eval against NixOS 25.11 2025-10-24 11:43:40 +09:00
6158692b97 home/zed: fix a few options 2025-10-12 00:57:10 +09:00
bec478767f xps16: change timezone 2025-10-03 10:47:36 +09:00
96631ae9cf home/ssh: register kyoto-u machines 2025-10-03 10:46:51 +09:00
5b4cf2289f home/xdg: set XDG_SCREENSHOTS_DIR 2025-08-29 15:26:01 +02:00
9b15aae9d7 hyprland: add keybind for saved fullscreen screenshots 2025-08-29 15:25:34 +02:00
7f1ca1e761 flake.nix: remove nixGL from pvv home config 2025-08-27 16:57:54 +02:00
0ee8659117 home/zed: use builtin option to configure theme 2025-08-27 16:57:28 +02:00
dd3a8975a7 home/breakerbox: make keybase breakers 2025-08-23 21:46:18 +02:00
d5a0e9ec2d home/breakerbox: make fcitx5 breaker 2025-08-23 21:44:32 +02:00
36db01748e home/zed: fix config conditionals 2025-08-23 15:42:49 +02:00
b941fa4143 home/zed: fix breaker 2025-08-23 15:37:34 +02:00
6916515737 home/fcitx5: use home-manager module options for config 2025-08-23 15:34:16 +02:00
dd37bdc08a home/breakerbox: make gtk breaker 2025-08-22 14:51:23 +02:00
df745d64cc home/breakerbox: only enable texlive on machines with graphics 2025-08-22 14:39:43 +02:00
652420556c home/breakerbox: add rest of wayland stuff 2025-08-22 14:36:49 +02:00
32a3bd27a8 hosts/dosei: drop 2025-08-22 14:25:51 +02:00
57b1390e45 treewide: get rid of nordic related config 2025-08-22 14:25:51 +02:00
26a8de0e9a home/ghci: init 2025-08-22 14:11:32 +02:00
de3aa0a7da tsuki/nginx: enable quic for testmap 2025-08-22 14:10:44 +02:00
74ee5599dd tsuki/kanidm: unpin package 2025-08-22 14:10:43 +02:00
4c2c0bd977 hosts/tsuki: bump kernel version 2025-08-22 14:10:42 +02:00
55f8a7fbf3 flake.nix: update matrix-synapse-next 2025-08-22 14:10:42 +02:00
a788f3c087 home/breakerbox: make zathura breaker 2025-08-22 13:48:05 +02:00
65e357e8ff home/breakerbox: make anyrun breaker 2025-08-22 13:48:05 +02:00
690da7585d home/vscode: remove old vendored extension 2025-08-22 13:48:04 +02:00
83c2971bb9 home/breakerbox: make vscode breaker 2025-08-22 13:48:04 +02:00
04dee771e2 home/breakerbox: make zed breaker 2025-08-22 13:48:04 +02:00
df56e9bc1c flake.lock: bump 2025-08-20 17:36:33 +02:00
6bd0968075 flake.nix: add pvv home-manager config 2025-08-20 16:52:16 +02:00
549d87eae4 home/zed: register path to nodejs 2025-08-20 16:34:41 +02:00
739c88f2db hosts/xps16: disable ipu6 2025-08-20 16:34:15 +02:00
caf215c9a0 hosts/xps16: enable displaylink 2025-08-20 16:34:06 +02:00
57c74d4615 hosts/xps16: pin kernel to 6.15 2025-08-20 16:33:56 +02:00
ea872ad977 home/packages: add mumble 2025-08-20 16:33:25 +02:00
22b69810bb xps16/home: additional wayland monitor declarations 2025-08-20 16:15:40 +02:00
1d8897ace8 secrets/common: update github token 2025-08-11 21:23:24 +02:00
f426ba832d home/ssh: register more pvv machines 2025-08-11 21:12:24 +02:00
671f4a1a7f home/packages: use gimp3 2025-08-11 21:12:00 +02:00
927577a770 home/breakerbox: add more service breakers 2025-06-04 12:45:18 +02:00
11d7401695 dosei: fix to 6.14 kernel 2025-06-04 12:17:48 +02:00
de542913a2 home/helix: init 2025-06-04 12:16:46 +02:00
0bdd97a80b home/breakerbox: add more program breakers 2025-06-04 12:12:36 +02:00
0026cfb484 home/breakerbox: init 2025-06-04 12:01:57 +02:00
465d33fadf home/packages: use unstable discord 2025-05-27 18:31:12 +02:00
e85619b5b4 home/downloads-sorter: fix issue where dlsorter ate .tar.*.part files 2025-05-27 16:57:22 +02:00
7100852dde home/zsh: precreate compinit directory with systemd-tmpfiles 2025-05-27 16:24:52 +02:00
e55a4a4093 home/hyprland: split into separate files 2025-05-27 16:11:56 +02:00
f2f329d6ac home/hyprland: use xdg-desktop-portal-termfilechooser 2025-05-27 13:54:07 +02:00
c3d4f91952 home/yazi: init 2025-05-27 13:52:28 +02:00
5f4228eab7 home/hyprland: set session.slice for multiple units 2025-05-27 12:28:02 +02:00
17b79e60bf home/hyprland: enable hyprpolkitagent 2025-05-27 12:23:45 +02:00
8f6c8bc338 common/gnome-keyring: move to session.slice 2025-05-27 12:23:15 +02:00
345e8acbc6 home/anyrun: fix config file 2025-05-27 12:12:18 +02:00
18e37aa599 common/dconf: move to session.slice 2025-05-27 12:12:18 +02:00
b97efab47f home/hyprland: add extra xdg portals 2025-05-27 11:15:58 +02:00
d77bba0ab1 home/zed: more lsp stuff 2025-05-27 11:08:41 +02:00
1c72aae1bc home/hyprland: swap stop keys 2025-05-27 11:07:31 +02:00
96b66673ec home/modules: start background tasks in background.slice 2025-05-27 11:06:33 +02:00
a76415de95 README: add badge 2025-05-21 10:48:38 +02:00
9c73af2b12 home: disable ~/.icons generation 2025-05-21 10:19:22 +02:00
ef33e52880 common/docker: split file, fix auto-prune service 2025-05-21 10:03:35 +02:00
c71f91a87f common/display-manager: split file, fix sddm theme, fix default compositor choice 2025-05-21 09:55:39 +02:00
8534bc90ea home/shell: restrict shells for cds 2025-05-21 00:26:14 +02:00
3dcab3e966 home/modules/shellAliases: add support for restricting shells 2025-05-21 00:25:47 +02:00
abac62b42b nixpkgs 25.05 🎉 2025-05-20 20:57:25 +02:00
9132b537fd common/uptimed: add settings, sd_notify 2025-05-08 16:19:50 +02:00
150089a583 {common,home}/nix: finegrained tokens 2025-05-06 13:05:21 +02:00
045ca620ea kasei: grub -> systemd-boot 2025-05-05 22:30:47 +02:00
3e39d48d27 home/shell: don't load envvars for nushell 2025-05-05 22:29:37 +02:00
de1140b84d home/homedir-structure: add more dirs, set mode 2025-05-05 22:29:09 +02:00
c114b72b40 home/xdg: set dir modes via tmpfiles 2025-05-05 22:28:42 +02:00
b32342219c hosts/xps16: collect bootloader config in one place 2025-05-05 22:27:58 +02:00
6cad08b8f3 home/homedir-structure: use modern tmpfiles api 2025-05-05 21:14:42 +02:00
86fb8dde57 home/shell: use modern tmpfiles api 2025-05-05 21:13:40 +02:00
5c0ab7bfdc home/mpd: use modern tmpfiles api 2025-05-05 21:05:18 +02:00
a4e332ced8 home/modules/prism-launcher: use modern tmpfiles api 2025-05-05 21:04:13 +02:00
9349553d3e home/downloads-sorter: sort more stuff 2025-05-05 21:01:09 +02:00
9bad62502d home/modules/downloads-sorter: extend 2025-05-05 21:00:26 +02:00
1b206b70e8 home/xdg: use downloads as download dir 2025-05-05 18:28:18 +02:00
b948b6cb7e home/git: properly quote realpath in maintenance preexec script 2025-05-05 18:27:36 +02:00
c015ca8a61 home/modules/downloads-sorter: init 2025-05-05 18:27:06 +02:00
183 changed files with 4192 additions and 2717 deletions

View File

@@ -1,6 +1,6 @@
keys:
- &gpg_h7x4 F7D37890228A907440E1FD4846B9228E814A2AAC
- &host_tsuki age1c92j4w0gqh32hwssl5m2mfrggssxax9pge8qxwytv9lmrnfttcvqdrgsst
- &host_tsuki age1ue7uv559wf6tfjsutn9dsh07vpk53sgrfkdzqy4ltg6dnxcxeg7srx800u
- &host_kasei age1eu2a6m3adakfzelfa9pqpl74a5dz0wkyr0v7gegm5ajnx7aqmqcqsp2ftc
- &host_dosei age1s6s4w7cdfgajm30z9gy8va8pvs2lrzk5gnsg0hmn5z2sl8z36seqej406r
- &host_xps16 age1np3fg9ue2tp4l47x7waapvjxh5zcaye2j54laapy7uklamve2c4qv3gytm

View File

@@ -1,5 +1,6 @@
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)
![works on my machine](https://img.shields.io/badge/status-works_on_my_machine-blue)
# Nix Dotfiles
@@ -15,7 +16,7 @@ Here are some of the interesting files and dirs:
| `/modules` | Custom nixos modules that I use in my own configuration. If you see options that does not appear in [NixOS Search][nixos-search], they might be defined here. |
| `/package-overrides` | Updated or pinned versions of packages that have not been upstreamed to nixpkgs (yet). |
| `/secrets` | Encrypted [sops-nix][sops-nix] secrets. |
| `flake.nix` | The root of everyting. Defines the inputs and outputs of the project. Also applies misc overlays and adds config-wide modules. See [Nix Flakes][nix-flakes] for more information. |
| `flake.nix` | The root of everything. Defines the inputs and outputs of the project. Also applies misc overlays and adds config-wide modules. See [Nix Flakes][nix-flakes] for more information. |
## Hosts
@@ -24,7 +25,6 @@ Here are some of the interesting files and dirs:
|------|--------------|---------|
| `Tsuki` | Dell Poweredge r710 server | Data storage / Build server / Selfhosted services. This server hosts a wide variety of services, including websites, matrix server, git repos, CI/CD and more. **This is probably the most interesting machine to pick config from** |
| `Kasei` | AMD Zen 2 CPU / AMD GPU - desktop computer | Semi-daily driver. This is my main computer at home. |
| `Dosei` | Dell Optiplex | Work computer, mostly used for development and testing. |
## home-manager configuration

162
flake.lock generated
View File

@@ -1,36 +1,34 @@
{
"nodes": {
"anyrun": {
"disko": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
]
},
"locked": {
"lastModified": 1743762088,
"narHash": "sha256-f+oXT9b3xuBDmm4v4nDqJvlHabxxZRB6+pay4Ub/NvA=",
"owner": "anyrun-org",
"repo": "anyrun",
"rev": "786f539d69d5abcefa68978dbaa964ac14536a00",
"lastModified": 1768920986,
"narHash": "sha256-CNzzBsRhq7gg4BMBuTDObiWDH/rFYHEuDRVOwCcwXw4=",
"owner": "nix-community",
"repo": "disko",
"rev": "de5708739256238fb912c62f03988815db89ec9a",
"type": "github"
},
"original": {
"owner": "anyrun-org",
"ref": "master",
"repo": "anyrun",
"owner": "nix-community",
"ref": "v1.13.0",
"repo": "disko",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
@@ -39,45 +37,6 @@
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -85,16 +44,16 @@
]
},
"locked": {
"lastModified": 1745557122,
"narHash": "sha256-eqSo9ugzsqhFgaDFYUZj943nurlX4L6f+AW0skJ4W+M=",
"lastModified": 1769580047,
"narHash": "sha256-tNqCP/+2+peAXXQ2V8RwsBkenlfWMERb+Uy6xmevyhM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "dd26f75fb4ec1c731d4b1396eaf4439ce40a91c1",
"rev": "366d78c2856de6ab3411c15c1cb4fb4c2bf5c826",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
@@ -106,18 +65,18 @@
]
},
"locked": {
"lastModified": 1735857245,
"narHash": "sha256-AKLLPrgXTxgzll3DqVUMa4QlPlRN3QceutgFBmEf8Nk=",
"owner": "dali99",
"repo": "nixos-matrix-modules",
"rev": "da9dc0479ffe22362793c87dc089035facf6ec4d",
"type": "github"
"lastModified": 1769430305,
"narHash": "sha256-ae92wLbdzLAFIHP3EigPCQzG4MSrxN4Nq4QQjQNqPvg=",
"ref": "main",
"rev": "45e302b9ff3835229cf9b76c62bceb11904725d8",
"revCount": 87,
"type": "git",
"url": "https://git.pvv.ntnu.no/oysteikt/nixos-matrix-modules"
},
"original": {
"owner": "dali99",
"ref": "0.7.0",
"repo": "nixos-matrix-modules",
"type": "github"
"ref": "main",
"type": "git",
"url": "https://git.pvv.ntnu.no/oysteikt/nixos-matrix-modules"
}
},
"maunium-stickerpicker": {
@@ -161,17 +120,17 @@
"minecraft": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
]
],
"systems": "systems"
},
"locked": {
"lastModified": 1745805739,
"narHash": "sha256-ryJ95o+w0hSVm5LkW5dxTbL2e1HCHCPcpNh627D3KHU=",
"lastModified": 1770000653,
"narHash": "sha256-QO/twGynxjOSUDtxbqJLshc/Q5/wImLH5O6KV2p9eoE=",
"owner": "infinidoge",
"repo": "nix-minecraft",
"rev": "ea8fa40a5fbf2762c41efc913c03aed3587ec7fa",
"rev": "6a2ddb643aaf7949caa6158e718c5efc3dda7dc1",
"type": "github"
},
"original": {
@@ -183,11 +142,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1745503349,
"narHash": "sha256-bUGjvaPVsOfQeTz9/rLTNLDyqbzhl0CQtJJlhFPhIYw=",
"lastModified": 1769302137,
"narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "f7bee55a5e551bd8e7b5b82c9bc559bc50d868d1",
"rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8",
"type": "github"
},
"original": {
@@ -199,26 +158,26 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1745742390,
"narHash": "sha256-1rqa/XPSJqJg21BKWjzJZC7yU0l/YTVtjRi0RJmipus=",
"lastModified": 1769900590,
"narHash": "sha256-I7Lmgj3owOTBGuauy9FL6qdpeK2umDoe07lM4V+PnyA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "26245db0cb552047418cfcef9a25da91b222d6c7",
"rev": "41e216c0ca66c83b12ab7a98cc326b5db01db646",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.11",
"ref": "nixos-25.11",
"type": "indirect"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1745377448,
"narHash": "sha256-jhZDfXVKdD7TSEGgzFJQvEEZ2K65UMiqW5YJ2aIqxMA=",
"lastModified": 1769983348,
"narHash": "sha256-mXYq4h7AFmbLMQtINwejLLL3DiW/ERJbg5UXqMTEV2M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "507b63021ada5fee621b6ca371c4fca9ca46f52c",
"rev": "eb8d947de7b05897b2b5f4117d184f9c9846cd06",
"type": "github"
},
"original": {
@@ -229,11 +188,11 @@
},
"nixpkgs-yet-unstabler": {
"locked": {
"lastModified": 1745831704,
"narHash": "sha256-HMoKsZr3POMhCCIN1sFbPmYZ5ZBT/pCeyZnUXnJchdc=",
"lastModified": 1770025348,
"narHash": "sha256-nUJyE7QwmFQZ46YpgKdhkvacWnxiPVG0H1u96yTbnGI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7aa91c307d9af07d6900b337cecd02da067e8433",
"rev": "0b407490c176a5e0d0af9e105108e534e93bbeeb",
"type": "github"
},
"original": {
@@ -250,11 +209,11 @@
]
},
"locked": {
"lastModified": 1684092181,
"narHash": "sha256-Oi6G8Jx2RkEMi3UndtAnZw61hfgKGEe7l/ILdB9ump4=",
"lastModified": 1742203788,
"narHash": "sha256-nRqyf+msCPEXvvXF6bvfiYH/B089dqWPc7ljRXieA7g=",
"ref": "refs/heads/master",
"rev": "028ed8774d1cf4650fc15253146cf14451eb608c",
"revCount": 43,
"rev": "c4e353e745b4012feb75dd1c4405a71f6318ed02",
"revCount": 51,
"type": "git",
"url": "file:///home/h7x4/git/osuchan-line-bot"
},
@@ -265,7 +224,7 @@
},
"root": {
"inputs": {
"anyrun": "anyrun",
"disko": "disko",
"home-manager": "home-manager",
"matrix-synapse-next": "matrix-synapse-next",
"maunium-stickerpicker": "maunium-stickerpicker",
@@ -285,11 +244,11 @@
]
},
"locked": {
"lastModified": 1745310711,
"narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=",
"lastModified": 1769921679,
"narHash": "sha256-twBMKGQvaztZQxFxbZnkg7y/50BW9yjtCBWwdjtOZew=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c",
"rev": "1e89149dcfc229e7e2ae24a8030f124a31e4f24f",
"type": "github"
},
"original": {
@@ -299,21 +258,6 @@
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

107
flake.nix
View File

@@ -1,11 +1,18 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11";
nixpkgs.url = "nixpkgs/nixos-25.11";
# nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
nixpkgs-yet-unstabler.url = "github:NixOS/nixpkgs/master";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
url = "github:nix-community/home-manager/release-25.11";
# url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko/v1.13.0";
inputs.nixpkgs.follows = "nixpkgs";
};
@@ -32,12 +39,7 @@
};
matrix-synapse-next = {
url = "github:dali99/nixos-matrix-modules/0.7.0";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:anyrun-org/anyrun/master";
url = "git+https://git.pvv.ntnu.no/oysteikt/nixos-matrix-modules?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@@ -48,6 +50,7 @@
nixpkgs-unstable,
nixpkgs-yet-unstabler,
home-manager,
disko,
nixos-hardware,
matrix-synapse-next,
@@ -55,7 +58,7 @@
minecraft,
osuchan,
sops-nix,
anyrun,
# anyrun,
}: let
system = "x86_64-linux";
@@ -63,14 +66,18 @@
inherit system;
config = {
allowUnfree = true;
allowUnfreePredicate = pkg: nixpkgs.lib.elem (nixpkgs.lib.getName pkg) [
"discord"
"geogebra"
"ipu6-camera-bins"
"ipu6-camera-bins-unstable"
"ivsc-firmware"
"ivsc-firmware-unstable"
];
android_sdk.accept_license = true;
segger-jlink.acceptLicense = true;
permittedInsecurePackages = [
"segger-jlink-qt4-796s"
"dotnet-core-combined"
"dotnet-sdk-6.0.428"
"dotnet-sdk-wrapped-6.0.428"
"segger-jlink-qt4-810"
];
};
@@ -144,16 +151,17 @@
nixosModules = {
machineVars = ./modules/machineVars.nix;
socketActivation = ./modules/socketActivation.nix;
duperemove = ./modules/duperemove.nix;
};
homeModules = {
cargo = ./home/modules/programs/cargo;
colors = ./home/modules/colors.nix;
direnv-auto-prune = ./home/modules/programs/direnv/auto-prune.nix;
downloads-sorter = ./home/modules/services/downloads-sorter.nix;
gpg = ./home/modules/programs/gpg;
mpd-auto-updater = ./home/modules/services/mpd.nix;
neovim-auto-clean-swapfiles = ./home/modules/programs/neovim/auto-clean-swapfiles.nix;
newsboat = ./home/modules/programs/newsboat;
nix-index-auto-update-database = ./home/modules/programs/nix-index/auto-update-database.nix;
prism-launcher = ./home/modules/programs/prism-launcher;
shellAliases = ./home/modules/shellAliases.nix;
@@ -184,6 +192,55 @@
};
};
};
pvv = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit unstable-pkgs;
inherit yet-unstabler-pkgs;
inherit (self) extendedLib;
machineName = "pvv-machine";
machineVars = {
headless = true;
# fixDisplayCommand = "echo 'not available'";
gaming = false;
development = true;
laptop = false;
battery = null;
wlanInterface = null;
wayland = false;
};
};
modules = [
./home/home.nix
./modules/machineVars.nix
inputs.sops-nix.homeManagerModules.sops
({ config, pkgs, lib, ... }: {
home = {
username = lib.mkForce "oysteikt";
homeDirectory = lib.mkForce "/home/pvv/d/oysteikt";
stateVersion = "25.05";
packages = [
# NOTE: nix on pvv machines is severely outdated
# putting it in the path of home-manager
# will ensure we use the new one by default
config.nix.package
];
};
nix.package = pkgs.nix;
nix.settings.use-xdg-base-directories = lib.mkForce false;
local.shell.aliases."Nix Stuff" = {
nxr = lib.mkForce "echo \"Local rebuilds are not available on this machine\"";
nxrl = lib.mkForce "echo \"Local rebuilds are not available on this machine\"";
};
})
] ++ (builtins.attrValues self.homeModules);
};
};
nixosConfigurations = let
@@ -227,7 +284,6 @@
sharedModules = [
inputs.sops-nix.homeManagerModules.sops
inputs.anyrun.homeManagerModules.default
] ++ (builtins.attrValues self.homeModules);
users.h7x4.imports = [
@@ -244,18 +300,6 @@
"specialArgs"
]));
in {
dosei = nixSys "dosei" {
modules = [
{
home-manager.users.h7x4.home.uid = 1000;
}
nixos-hardware.nixosModules.common-pc
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-gpu-intel
];
};
kasei = nixSys "kasei" {
modules = [
nixos-hardware.nixosModules.common-pc
@@ -272,10 +316,17 @@
nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-gpu-intel
disko.nixosModules.default
];
};
tsuki = nixSys "tsuki" {
modules = [
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-pc-ssd
disko.nixosModules.default
matrix-synapse-next.nixosModules.default
osuchan.outputs.nixosModules.default
maunium-stickerpicker.nixosModules.default

192
home/breakerbox.nix Normal file
View File

@@ -0,0 +1,192 @@
{ config, lib, machineVars, ... }:
let
inherit (lib) mkForce mkIf optionals;
graphics = !machineVars.headless;
in
{
imports = [
./config/gtk.nix
./programs/nix.nix
./programs/ahoviewer.nix
./programs/alacritty.nix
./programs/anki.nix
./programs/anyrun
./programs/aria2.nix
./programs/atuin.nix
./programs/bash.nix
./programs/bat.nix
./programs/beets.nix
./programs/bottom.nix
./programs/cargo.nix
# ./programs/comma.nix
./programs/delta.nix
./programs/direnv
./programs/element-desktop.nix
./programs/emacs
./programs/eza.nix
./programs/fastfetch.nix
./programs/feh.nix
./programs/firefox.nix
./programs/fzf.nix
./programs/gdb.nix
./programs/gh-dash.nix
./programs/gh.nix
./programs/ghci.nix
./programs/git
./programs/gpg.nix
./programs/home-manager.nix
./programs/hyprland
./programs/jq.nix
./programs/less.nix
./programs/man.nix
./programs/meli.nix
./programs/mpv.nix
./programs/ncmpcpp.nix
./programs/neomutt.nix
./programs/neovim
./programs/newsboat
./programs/nix-index
./programs/nushell.nix
./programs/nyxt.nix
./programs/obs-studio.nix
./programs/obsidian.nix
./programs/pandoc.nix
./programs/prism-launcher.nix
./programs/python.nix
./programs/qutebrowser.nix
./programs/rclone.nix
./programs/ripgrep.nix
./programs/rofi
./programs/skim.nix
./programs/sqlite.nix
./programs/ssh
./programs/taskwarrior.nix
./programs/tealdeer
./programs/texlive.nix
./programs/thunderbird.nix
./programs/tmux
./programs/uv.nix
./programs/vscode
./programs/waybar.nix
./programs/yazi.nix
./programs/yt-dlp.nix
./programs/zathura.nix
./programs/zed
./programs/zoxide.nix
./programs/zsh
./services/copyq.nix
./services/dunst.nix
./services/fcitx5.nix
./services/gnome-keyring.nix
./services/mpd.nix
./services/mpris-proxy.nix
./services/network-manager.nix
./services/nix-channel-update.nix
./services/psd.nix
./services/pueue.nix
./services/tumblerd.nix
] ++ (optionals (!machineVars.wayland) [
./programs/xmonad
# ./programs/xmobar
./services/picom.nix
./services/polybar.nix
./services/screen-locker.nix
# ./services/stalonetray.nix
./services/sxhkd.nix
]);
programs.aria2.enable = true;
programs.atuin.enable = true;
programs.bash.enable = true;
programs.bat.enable = true;
programs.beets.enable = true;
programs.bottom.enable = true;
programs.cargo.enable = true;
# programs.comma.enable = true;
programs.direnv.enable = true;
programs.eza.enable = true;
programs.fastfetch.enable = true;
programs.fzf.enable = true;
programs.gdb.enable = true;
programs.gh-dash.enable = true;
programs.gh.enable = true;
programs.ghci.enable = true;
programs.git.enable = true;
programs.gpg.enable = true;
programs.helix.enable = true;
programs.home-manager.enable = true;
programs.jq.enable = true;
programs.less.enable = true;
programs.man.enable = true;
programs.meli.enable = true;
programs.neomutt.enable = true;
programs.neovim.enable = true;
programs.nix-index.enable = true;
programs.nushell.enable = true;
programs.pandoc.enable = true;
programs.python.enable = true;
programs.rclone.enable = true;
programs.ripgrep.enable = true;
programs.skim.enable = true;
programs.sqlite.enable = true;
programs.ssh.enable = true;
programs.tealdeer.enable = true;
programs.tmux.enable = true;
programs.uv.enable = true;
programs.yazi.enable = true;
programs.yt-dlp.enable = true;
programs.zoxide.enable = true;
programs.zsh.enable = true;
services.pueue.enable = true;
gtk.enable = graphics;
programs.ahoviewer.enable = graphics;
programs.alacritty.enable = graphics;
programs.anki.enable = graphics;
programs.chromium.enable = graphics;
programs.element-desktop.enable = graphics;
programs.emacs.enable = graphics;
programs.feh.enable = graphics;
programs.firefox.enable = graphics;
programs.mpv.enable = graphics;
programs.ncmpcpp.enable = graphics;
programs.newsboat.enable = graphics;
programs.nyxt.enable = graphics;
programs.obs-studio.enable = graphics;
programs.obsidian.enable = false;
programs.prism-launcher.enable = graphics;
programs.qutebrowser.enable = graphics;
programs.rofi.enable = graphics;
programs.taskwarrior.enable = graphics;
programs.texlive.enable = graphics;
programs.thunderbird.enable = graphics;
programs.vscode.enable = graphics;
programs.zathura.enable = graphics;
programs.zed-editor.enable = graphics;
services.copyq.enable = graphics;
services.dunst.enable = graphics;
services.gnome-keyring.enable = graphics;
services.kbfs.enable = graphics;
services.keybase.enable = graphics;
services.mpd.enable = graphics;
services.mpris-proxy.enable = graphics;
services.network-manager-applet.enable = graphics;
services.psd.enable = graphics;
services.tumblerd.enable = graphics;
i18n.inputMethod = mkIf graphics {
enable = true;
type = "fcitx5";
};
programs.anyrun.enable = machineVars.wayland;
programs.waybar.enable = machineVars.wayland;
wayland.windowManager.hyprland.enable = machineVars.wayland;
}

View File

@@ -0,0 +1,129 @@
{ config, lib, ... }:
let
cfg = config.services.downloads-sorter;
in
{
services.downloads-sorter = {
enable = true;
mappings = {
"archives" = [
"*.rar"
"*.zip"
"*.7z"
"*.tar"
"*.tar.bz2"
"*.tar.gz"
"*.tar.lz4"
"*.tar.lzma"
"*.tar.sz"
"*.tar.sz"
"*.tar.xz"
"*.tar.zst"
"*.tbz"
"*.tbz2"
"*.tgz"
"*.tlz4"
"*.tlzma"
"*.tsz"
"*.txz"
"*.tzst"
"*.bz2"
"*.gz"
"*.lz4"
"*.lzma"
"*.sz"
"*.sz"
"*.xz"
"*.zst"
];
"pictures" = {
createDirIfNotExists = false;
globs = [
"*.gif"
"*.jpeg"
"*.jpg"
"*.png"
"*.svg"
"*.webp"
];
};
"docs" = {
createDirIfNotExists = false;
globs = [
"*.md"
"*.pdf"
"*.PDF" # why do people do this
"*.docx"
"*.doc"
"*.xlsx"
"*.xls"
"*.ppt"
"*.pptx"
"*.odt"
"*.ods"
"*.odp"
"*.odg"
"*.odf"
];
};
"books" = {
createDirIfNotExists = false;
globs = [ "*.epub" ];
};
"videos" = {
createDirIfNotExists = false;
globs = [
"*.mp4"
"*.webm"
"*.mov"
];
};
"isos" = [
"*.iso"
"*.img"
];
"jars" = [ "*.jar" ];
"txt" = [ "*.txt" ];
"patches" = [
"*.patch"
"*.diff"
];
};
};
systemd.user.tmpfiles.settings."10-downloads-sorter-service" = let
inherit (cfg) downloadsDirectory;
inherit (config.xdg) userDirs;
symlink = link: target: {
"${link}".L = {
user = config.home.username;
mode = "0770";
argument = "${target}";
};
"${target}".d = {
user = config.home.username;
mode = "0770";
};
};
in lib.mkMerge [
(symlink "${downloadsDirectory}/books" "${userDirs.documents}/books/downloads")
(symlink "${downloadsDirectory}/docs" "${userDirs.documents}/downloads")
(symlink "${downloadsDirectory}/pictures" "${userDirs.pictures}/downloads")
(symlink "${downloadsDirectory}/videos" "${userDirs.videos}/downloads")
];
}

View File

@@ -1,27 +1,46 @@
{ config, ... }:
let
home = config.home.homeDirectory;
user = config.home.username;
in {
systemd.user.tmpfiles.rules = [
"d ${home}/SD - ${user} - - -"
"d ${home}/ctf - ${user} - - -"
"d ${home}/git - ${user} - - -"
"d ${home}/pvv - ${user} - - -"
"d ${home}/work - ${user} - - -"
{
systemd.user.tmpfiles.settings."05-homedir" = let
home = config.home.homeDirectory;
user = config.home.username;
"d ${home}/pictures/icons - ${user} - - -"
"d ${home}/pictures/photos - ${user} - - -"
"d ${home}/pictures/screenshots - ${user} - - -"
"d ${home}/pictures/stickers - ${user} - - -"
"d ${home}/pictures/wallpapers - ${user} - - -"
defaultDirConf = {
d = {
inherit user;
mode = "0700";
};
};
"d ${home}/documents/books - ${user} - - -"
"d ${home}/documents/scans - ${user} - - -"
symlink = target: {
L = {
inherit user;
argument = target;
mode = "0600";
};
};
in {
"${home}/SD" = defaultDirConf;
"${home}/ctf" = defaultDirConf;
"${home}/git" = defaultDirConf;
"${home}/pvv" = defaultDirConf;
"${home}/tmp" = defaultDirConf;
"${home}/work" = defaultDirConf;
"L ${home}/Downloads - ${user} - - ${home}/downloads"
"${home}/pictures/icons" = defaultDirConf;
"${home}/pictures/photos" = defaultDirConf;
"${home}/pictures/screenshots" = defaultDirConf;
"${home}/pictures/stickers" = defaultDirConf;
"${home}/pictures/wallpapers" = defaultDirConf;
"L ${config.xdg.dataHome}/wallpapers - ${user} - - ${home}/pictures/wallpapers"
"L ${config.home.sessionVariables.TEXMFHOME} - ${user} - - ${home}/git/texmf"
];
"${home}/documents/books" = defaultDirConf;
"${home}/documents/manuals" = defaultDirConf;
"${home}/documents/music-sheets" = defaultDirConf;
"${home}/documents/scans" = defaultDirConf;
"${home}/documents/schematics" = defaultDirConf;
"${home}/Downloads" = symlink "${home}/downloads";
"${config.xdg.dataHome}/wallpapers" = symlink "${home}/pictures/wallpapers";
"${config.home.sessionVariables.TEXMFHOME}" = symlink "${home}/git/texmf";
};
}

View File

@@ -1,7 +1,6 @@
{ pkgs, config, machineVars, ... }:
{ pkgs, config, ... }:
{
gtk = pkgs.lib.mkIf (!machineVars.headless) {
enable = true;
gtk = {
font.name = "Droid Sans";
iconTheme = {

View File

@@ -1,16 +1,21 @@
{ config, lib, ... }:
let
cfg = config.xdg.userDirs;
in
{
imports = [
./mimetypes.nix
./directory-spec-overrides.nix
];
xdg = {
enable = true;
userDirs = {
enable = true;
desktop = lib.mkDefault "${config.home.homeDirectory}/Desktop";
documents = lib.mkDefault "${config.home.homeDirectory}/documents";
download = lib.mkDefault "${config.home.homeDirectory}/Downloads";
download = lib.mkDefault "${config.home.homeDirectory}/downloads";
music = lib.mkDefault "${config.home.homeDirectory}/music";
pictures = lib.mkDefault "${config.home.homeDirectory}/pictures";
publicShare = lib.mkDefault "${config.home.homeDirectory}/public";
@@ -18,4 +23,25 @@
videos = lib.mkDefault "${config.home.homeDirectory}/videos";
};
};
home.sessionVariables.XDG_SCREENSHOTS_DIR = "${cfg.pictures}/screenshots";
systemd.user.tmpfiles.settings."05-xdg-userdirs" = let
dirCfg = {
d = {
user = config.home.username;
mode = "0700";
};
};
in {
"${cfg.desktop}" = dirCfg;
"${cfg.documents}" = dirCfg;
"${cfg.download}" = dirCfg;
"${cfg.music}" = dirCfg;
"${cfg.pictures}" = dirCfg;
"${cfg.publicShare}" = dirCfg;
"${cfg.templates}" = dirCfg;
"${cfg.videos}" = dirCfg;
"${config.home.sessionVariables.XDG_SCREENSHOTS_DIR}" = dirCfg;
};
}

View File

@@ -43,17 +43,18 @@
GOCACHE = "${cacheHome}/go/build";
GOMODCACHE = "${cacheHome}/go/mod";
GOPATH = "${dataHome}/go";
GRIPHOME = "${configHome}/grip";
GRADLE_USER_HOME = "${dataHome}/gradle";
GRIPHOME = "${configHome}/grip";
ICEAUTHORITY = "${cacheHome}/ICEauthority";
NIMBLE_DIR = "${dataHome}/nimble";
NLTK_DATA = "${dataHome}/nltk_data";
NODE_COMPILE_CACHE = "${cacheHome}/node-compile-cache";
NPM_CONFIG_CACHE = "${cacheHome}/npm";
NPM_CONFIG_INIT_MODULE = "${configHome}/npm/config/npm-init.js";
NPM_CONFIG_TMP = "${runtimeDir}/npm";
NODE_COMPILE_CACHE = "${cacheHome}/node-compile-cache";
NRFUTIL_HOME = "${dataHome}/nrfutil";
NUGET_PACKAGES = "${cacheHome}/nuget-packages";
OPAMROOT = "${dataHome}/opam";
PARALLEL_HOME = "${configHome}/parallel";
PGPASSFILE = "${configHome}/pg/pgpass";
PSQLRC = "${configHome}/pg/psqlrc";

129
home/email.nix Normal file
View File

@@ -0,0 +1,129 @@
{ config, lib, pkgs, ... }:
let
cfg = config.accounts.email;
in
{
sops.secrets = {
"email/naniwtf/password" = { };
"email/kyoto-u/password" = { };
"email/pvv/password" = { };
};
accounts.email = {
maildirBasePath = "mail";
accounts = {
"naniwtf" = let
userName = "h7x4";
domain = "nani.wtf";
in {
primary = true;
userName = "${userName}@${domain}";
realName = "h7x4";
address = "${userName}@${domain}";
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${config.sops.secrets."email/naniwtf/password".path}";
imap = {
host = "redbull.mxrouting.net";
port = 993;
authentication = "plain";
tls.enable = true;
};
smtp = {
host = "redbull.mxrouting.net";
port = 465;
authentication = "plain";
tls.enable = true;
};
gpg = {
key = "46B9228E814A2AAC";
signByDefault = true;
};
neomutt.enable = true;
thunderbird.enable = true;
meli.enable = true;
};
"pvv" = let
userName = "oysteikt";
domain = "pvv.ntnu.no";
in {
inherit userName;
realName = "Øystein K Tveit";
address = "${userName}@${domain}";
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${config.sops.secrets."email/pvv/password".path}";
imap = {
host = "imap.${domain}";
port = 993;
authentication = "plain";
tls.enable = true;
};
smtp = {
host = "redbull.mxrouting.net";
port = 587;
authentication = "plain";
tls = {
enable = true;
useStartTls = true;
};
};
gpg = {
key = "";
signByDefault = true;
};
neomutt.enable = true;
thunderbird.enable = true;
meli.enable = true;
};
"kyoto-u" = let
userName = "oysteikt";
domain = "fos.kuis.kyoto-u.ac.jp";
in {
inherit userName;
realName = "";
address = "${userName}@${domain}";
passwordCommand = "${lib.getExe' pkgs.coreutils "cat"} ${config.sops.secrets."email/kyoto-u/password".path}";
imap = {
host = "io.kuis.kyoto-u.ac.jp";
port = 993;
authentication = "plain";
tls.enable = true;
};
smtp = {
host = "io.kuis.kyoto-u.ac.jp";
port = 587;
authentication = "plain";
tls = {
enable = true;
useStartTls = true;
};
};
# gpg = {
# };
neomutt.enable = true;
thunderbird.enable = true;
meli.enable = true;
};
};
};
systemd.user.tmpfiles.settings."10-maildir" = lib.mkIf (lib.any (acct: acct.enable) (lib.attrValues cfg.accounts)) {
"${config.home.homeDirectory}/${cfg.maildirBasePath}".d = {
mode = "0700";
user = config.home.username;
};
};
}

View File

@@ -3,96 +3,15 @@
graphics = !machineVars.headless;
in {
imports = [
./shell.nix
./breakerbox.nix
./email.nix
./packages.nix
./shell.nix
./config/xdg
./config/ensure-homedir-structure.nix
./programs/aria2.nix
./programs/atuin.nix
./programs/bash.nix
./programs/bat.nix
./programs/beets.nix
./programs/bottom.nix
./programs/cargo.nix
./programs/comma.nix
./programs/direnv
./programs/eza.nix
./programs/fzf.nix
./programs/gdb.nix
./programs/gh-dash.nix
./programs/gh.nix
./programs/git
./programs/gpg.nix
./programs/home-manager.nix
./programs/jq.nix
./programs/less.nix
./programs/man.nix
./programs/neovim
./programs/nix-index
./programs/nix.nix
./programs/nushell.nix
./programs/pandoc.nix
./programs/python.nix
./programs/ripgrep.nix
./programs/skim.nix
./programs/sqlite.nix
./programs/ssh
./programs/tealdeer
./programs/texlive.nix
./programs/thunderbird.nix
./programs/tmux
./programs/uv.nix
./programs/yt-dlp.nix
./programs/zoxide.nix
./programs/zsh
./services/nix-channel-update.nix
./services/pueue.nix
] ++ (optionals graphics [
./config/gtk.nix
./programs/alacritty.nix
./programs/emacs
./programs/feh.nix
./programs/firefox.nix
./programs/mpv.nix
./programs/ncmpcpp.nix
./programs/newsboat
./programs/obs-studio.nix
./programs/prism-launcher.nix
./programs/qutebrowser.nix
./programs/rofi
./programs/taskwarrior.nix
./programs/vscode
./programs/zathura.nix
./programs/zed
./services/copyq.nix
./services/dunst.nix
./services/fcitx5.nix
./services/gnome-keyring.nix
./services/keybase.nix
./services/mpd.nix
./services/mpris-proxy.nix
./services/network-manager.nix
./services/psd.nix
./services/tumblerd.nix
]) ++ (optionals machineVars.wayland [
./programs/hyprland.nix
./programs/waybar.nix
./programs/anyrun
]) ++ (optionals (!machineVars.wayland) [
./programs/xmonad
# ./programs/xmobar
./services/picom.nix
./services/polybar.nix
./services/screen-locker.nix
# ./services/stalonetray.nix
./services/sxhkd.nix
]);
./config/downloads-sorter.nix
];
sops.defaultSopsFile = ../secrets/home.yaml;
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519_home_sops" ];
@@ -115,8 +34,7 @@ in {
package = pkgs.capitaine-cursors;
name = "capitaine-cursors";
size = 16;
# TODO: enable in 25.05
# dotIcons = false;
dotIcons.enable = false;
};
keyboard.options = [ "caps:escape" ];
@@ -136,14 +54,8 @@ in {
xsession = {
enable = !machineVars.wayland;
# TODO: declare using xdg config home
scriptPath = ".config/X11/xsession";
profilePath = ".config/X11/xprofile";
};
xdg.configFile = {
"ghc/ghci.conf".text = ''
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
'';
scriptPath = "${config.xdg.configHome}/X11/xsession";
profilePath = "${config.xdg.configHome}/X11/xprofile";
};
news.display = "silent";

View File

@@ -25,6 +25,7 @@ in
Service = {
Type = "oneshot";
Slice = "background.slice";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${lib.getExe cfg.package} prune";

View File

@@ -32,6 +32,7 @@ in
Service = {
Type = "oneshot";
Slice = "background.slice";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${lib.getExe cfg.package} --refresh-keys";

View File

@@ -32,6 +32,7 @@ in
Service = {
Type = "oneshot";
Slice = "background.slice";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${lib.getExe cfg.package} --update-trustdb";

View File

@@ -31,6 +31,7 @@ in
Service = {
Type = "oneshot";
Slice = "background.slice";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = lib.getExe (pkgs.writeShellApplication {

View File

@@ -1,6 +0,0 @@
{
imports = [
./vacuum.nix
./fetch-articles.nix
];
}

View File

@@ -1,53 +0,0 @@
{ config, pkgs, lib, ... }:
let
cfg = config.programs.newsboat;
package = pkgs.newsboat;
in
{
options.programs.newsboat.fetch-articles = {
enable = lib.mkEnableOption "automatic article fetcher for newsboat";
onCalendar = lib.mkOption {
type = lib.types.str;
default = "daily";
example = "weekly";
# TODO: link to systemd manpage for format.
description = "How often to fetch new articles.";
};
};
config = lib.mkIf cfg.fetch-articles.enable {
# TODO: wait for internet
systemd.user.services.newsboat-fetch-articles = {
Unit = {
Description = "Automatically fetch new articles for newsboat";
Documentation = [ "man:newsboat(1)" ];
};
Service = {
Type = "oneshot";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --execute=reload";
};
};
systemd.user.timers.newsboat-fetch-articles = {
Unit = {
Description = "Automatically fetch new articles for newsboat";
Documentation = [ "man:newsboat(1)" ];
After = [ "network.target" ];
};
Timer = {
Unit = "newsboat-fetch-articles.service";
OnCalendar = cfg.fetch-articles.onCalendar;
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
}

View File

@@ -1,51 +0,0 @@
{ config, pkgs, lib, ... }:
let
cfg = config.programs.newsboat;
package = pkgs.newsboat;
in
{
options.programs.newsboat.vacuum = {
enable = lib.mkEnableOption "automatic cleaning of the newsboat cache";
onCalendar = lib.mkOption {
type = lib.types.str;
default = "weekly";
example = "monthly";
# TODO: link to systemd manpage for format.
description = "How often to run the cleaning.";
};
};
config = lib.mkIf cfg.vacuum.enable {
systemd.user.services.newsboat-vacuum = {
Unit = {
Description = "Automatically clean newsboat cache";
Documentation = [ "man:newsboat(1)" ];
};
Service = {
Type = "oneshot";
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --vacuum";
};
};
systemd.user.timers.newsboat-vacuum = {
Unit = {
Description = "Automatically clean newsboat cache";
Documentation = [ "man:newsboat(1)" ];
};
Timer = {
Unit = "newsboat-vacuum.service";
OnCalendar = cfg.vacuum.onCalendar;
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
}

View File

@@ -44,6 +44,7 @@ in
Service = {
Type = "oneshot";
Slice = "background.slice";
ExecStart = lib.getExe (pkgs.writeShellApplication {
name = "fetch-nix-index-database";
runtimeInputs = with pkgs; [

View File

@@ -3,6 +3,10 @@ let
cfg = config.programs.prism-launcher;
in
{
imports = [
../../systemd-tmpfiles.nix
];
options.programs.prism-launcher = {
enable = lib.mkEnableOption "PrismLauncher, an open source minecraft launcher";
@@ -57,6 +61,7 @@ in
Unit.Description = "Watchdog that moves screenshots from all prismlauncher minecraft instances into a common dir";
Service = {
Type = "oneshot";
Slice = "background.slice";
ExecStart = lib.getExe (pkgs.writeShellApplication {
name = "prismlauncher-move-minecraft-screenshots.sh";
runtimeInputs = with pkgs; [ coreutils findutils ];
@@ -96,8 +101,10 @@ in
};
};
systemd.user.tmpfiles.rules = lib.mkIf cfg.screenshotMover.enable [
"'d' '${cfg.screenshotMover.screenshotDir}' - ${config.home.username} - - -"
];
systemd.user.tmpfiles.settings."10-prismlauncher" = lib.mkIf cfg.screenshotMover.enable {
${cfg.screenshotMover.screenshotDir}.d = {
user = config.home.username;
};
};
};
}

View File

@@ -1,5 +1,160 @@
{ ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.services.downloads-sorter;
in
{
# TODO: create abstraction over `systemd.path` thingy that looks at incoming files and
# sorts them into subdirs by extension.
imports = [
../systemd-tmpfiles.nix
];
options.services.downloads-sorter = {
enable = lib.mkEnableOption "downloads sorter units, path activated units to keep the download dir clean";
downloadsDirectory = lib.mkOption {
type = lib.types.path;
description = "Which directory to keep clean";
default = if config.xdg.userDirs.enable then config.xdg.userDirs.download else "${config.home.homeDirectory}/Downloads";
defaultText = ''
if config.xdg.userDirs.enable then config.xdg.userDirs.download else "''${config.home.homeDirectory}/Downloads"
'';
example = ''
"''${config.home.homeDirectory}/downloads"
'';
};
mappings = lib.mkOption {
type = let
mappingType = lib.types.submodule ({ name, ... }: {
options = {
unitName = lib.mkOption {
type = lib.types.str;
description = ''
The basename of the path/service unit responsible for this mapping
'';
default = "downloads-sorter@${name}";
example = "downloads-sorter@asdf";
};
dir = lib.mkOption {
type = lib.types.path;
description = ''
Absolute path to the directory where matching files should be moved.
'';
default = if builtins.substring 0 1 name == "/" then name else "${cfg.downloadsDirectory}/${name}";
defaultText = ''
if builtins.substring 0 1 name == "/" then name else "''${config.services.downloads-sorter.downloadsDirectory}/''${name}"
'';
};
globs = lib.mkOption {
type = with lib.types; listOf str;
description = ''
A list of globs that match the files that should be moved.
'';
example = [
"*.jpg"
"IMG_*_2020_*.png"
];
apply = map (g: "${cfg.downloadsDirectory}/${g}");
};
createDirIfNotExists = lib.mkOption {
type = lib.types.bool;
description = ''
Whether to create the target directory if it does not exist yet.
Turn this off if you'd like the target directory to be a symlink or similar.
'';
default = true;
example = false;
};
# TODO: allow specifying a dynamic filter together with a system path trigger in an attrset.
};
});
in with lib.types; attrsOf (coercedTo (listOf str) (globs: { inherit globs; }) mappingType);
description = ''
A mapping from a file pattern to the location where it should be moved.
By default, the output mapping is relative to the download dir.
If an absolute path is given, the sorter will move the files out of the downloads dir.
'';
default = { };
example = {
"pictures" = [
"*.png"
"*.jpg"
];
"documents" = {
createDirIfNotExists = false;
globs = [ "*.pdf" ];
};
"/home/<user>/archives" = [ "*.rar" ];
};
};
};
config = lib.mkIf cfg.enable {
systemd.user.paths = lib.mapAttrs' (dir: mapping: {
name = mapping.unitName;
value = {
Install.WantedBy = [ "paths.target" ];
Path = {
PathExistsGlob = mapping.globs;
Unit = "${mapping.unitName}.service";
TriggerLimitIntervalSec = "1s";
TriggerLimitBurst = "1";
};
};
}) cfg.mappings;
# TODO: deduplicate
systemd.user.services = lib.mapAttrs' (dir: mapping: {
name = mapping.unitName;
value = {
Unit.Description = "Downloads directory watchdog, sorts the downloads directory";
Service = {
Type = "oneshot";
Slice = "background.slice";
SyslogIdentifier = mapping.unitName;
ExecStart = let
script = pkgs.writeShellApplication {
name = "downloads-sorter-${dir}.sh";
runtimeInputs = [ pkgs.coreutils ];
text = ''
shopt -s nullglob
FILES=(${builtins.concatStringsSep " " mapping.globs})
for file in "''${FILES[@]}"; do
echo "$file -> ${mapping.dir}"
mv "$file" '${mapping.dir}'
done
'';
};
in lib.getExe script;
PrivateUsers = true;
ProtectSystem = true;
NoNewPrivileges = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
PrivateNetwork = true;
RestrictNamespaces = true;
};
};
}) cfg.mappings;
systemd.user.tmpfiles.settings."10-downloads-sorter-service" = let
absolutePaths = lib.pipe cfg.mappings [
builtins.attrValues
(builtins.filter (m: m.createDirIfNotExists))
(map (m: m.dir))
];
in lib.genAttrs absolutePaths (_: {
d = {
user = config.home.username;
};
});
};
}

View File

@@ -36,7 +36,8 @@ in
};
Service = {
Type = "oneshot";
ExecStart = "${lib.getExe pkgs.mpc-cli} update --wait";
Slice = "background.slice";
ExecStart = "${lib.getExe pkgs.mpc} update --wait";
PrivateUsers = true;
ProtectSystem = true;

View File

@@ -25,7 +25,7 @@
};
};
isAlias = v: builtins.isAttrs v && v ? "alias" && v ? "type";
isAlias = v: builtins.isAttrs v && v ? alias;
};
in {
lib = formatLib;
@@ -47,6 +47,29 @@
"grep nix"
];
};
shells = lib.mkOption {
description = "List of shells for which the alias is valid.";
type = with lib.types; listOf (enum [
"bash"
"zsh"
"fish"
"nushell"
]);
default = [
"bash"
"zsh"
"fish"
"nushell"
];
example = [
"bash"
"zsh"
];
};
# TODO:
# subshell = lib.mkEnableOption "" // {
# description = "Whether to run the aliased command in a subshell";
# };
};
};
@@ -55,49 +78,36 @@
type = " ";
alias = [ str ];
};
in (coercedTo str coerce rawAliasType) // {
check = v: builtins.isString v || formatLib.isAlias v;
};
in addCheck (coercedTo str coerce rawAliasType) (v: builtins.isString v || formatLib.isAlias v);
aliasTreeType = with lib.types; attrsOf (either coercedAliasType aliasTreeType);
aliasTreeType = with lib.types; attrsOf (either coercedAliasType aliasTreeType) // {
description = "Alias tree";
};
in aliasTreeType;
# Alias Tree -> { :: Alias }
generateAttrs = let
inherit (lib) mapAttrs attrValues filterAttrs isAttrs
isString concatStringsSep foldr;
applyFunctor = attrset: formatLib.functors.${attrset.type}.apply attrset;
# TODO: better naming
allAttrValuesAreStrings = attrset: let
# [ {String} ]
filteredAliases = [(filterAttrs (_: isString) attrset)];
# [ {String} ]
remainingFunctors = let
functorSet = filterAttrs (_: formatLib.isAlias) attrset;
appliedFunctorSet = mapAttrs (_: applyFunctor) functorSet;
in [ appliedFunctorSet ];
# [ {AttrSet} ]
remainingAliasSets = attrValues (filterAttrs (_: v: isAttrs v && !formatLib.isAlias v) attrset);
# [ {String} ]
recursedAliasSets = filteredAliases
++ (remainingFunctors)
++ (map allAttrValuesAreStrings remainingAliasSets);
in foldr (a: b: a // b) {} recursedAliasSets;
in
allAttrValuesAreStrings;
# TODO:
# generateAttrs = pipe [
# collect leave nodes
# map apply functor
# ]
# Alias Tree -> String -> { :: Alias }
generateAttrs = shell: let
generateAttrs' = attrset: lib.pipe attrset [
(attrset: {
right = lib.filterAttrs (_: v: formatLib.isAlias v) attrset;
wrong = lib.filterAttrs (_: v: !(formatLib.isAlias v)) attrset;
})
({ right, wrong }:
# Leaf nodes
(lib.pipe right [
(lib.filterAttrs (_: v: lib.elem shell v.shells))
(builtins.mapAttrs (_: v: formatLib.functors.${v.type}.apply v))
])
//
# Subsets
(lib.pipe wrong [
builtins.attrValues
(map generateAttrs')
(lib.foldr (a: b: a // b) { })
])
)
];
in generateAttrs';
# Alias Tree -> String
generateText = aliases: let
@@ -243,20 +253,20 @@ in {
programs = {
zsh = {
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
shellAliases = shellAliasesFormat.generateAttrs "zsh" cfg.aliases;
sessionVariables = cfg.variables;
};
bash = {
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
shellAliases = shellAliasesFormat.generateAttrs "bash" cfg.aliases;
sessionVariables = cfg.variables;
};
fish = {
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
shellAliases = shellAliasesFormat.generateAttrs "fish" cfg.aliases;
# TODO: fish does not support session variables?
# localVariables = cfg.variables;
};
nushell = {
shellAliases = shellAliasesFormat.generateAttrs cfg.aliases;
shellAliases = shellAliasesFormat.generateAttrs "nushell" cfg.aliases;
environmentVariables = cfg.variables;
};
};

View File

@@ -1,4 +1,4 @@
{ pkgs, config, machineVars, machineName, ... }:
{ pkgs, yet-unstabler-pkgs, config, machineVars, machineName, ... }:
{
home.packages = with pkgs; [
bandwhich
@@ -7,7 +7,7 @@
cyme
czkawka
difftastic
diskonaut
# diskonaut
duf
duff
fclones
@@ -35,11 +35,9 @@
lurk
mdcat
mediainfo
meli
mkvtoolnix
mmv
mtr
neofetch
nix-diff
nix-output-monitor
nix-tree
@@ -52,13 +50,11 @@
pipr
progress
pwntools
rclone
rip2
rnr
rsync
# sc-im
skim
slack-term
# slack-term
tea
terminal-parrot
termtosvg
@@ -87,21 +83,17 @@
xorg.xprop
] ++ (
lib.optionals (!machineVars.headless) [
ahoviewer
alsa-utils
anki
ark
kdePackages.ark
calibre
cool-retro-term
darktable
discord
element-desktop
yet-unstabler-pkgs.discord
foliate
geogebra
ghidra
gimp
gimp3-with-plugins
gnome-font-viewer
google-chrome
imhex
imv
inkscape
@@ -110,26 +102,27 @@
kid3
koreader
krita
ktouch
# kdePackages.ktouch
libnotify
libreoffice
light
mission-center
mopidy
mopidy-mpd
mopidy-soundcloud
mopidy-youtube
mpc_cli
# mopidy
# mopidy-mpd
# mopidy-soundcloud
# mopidy-youtube
mpc
mumble
naps2
nsxiv
nyxt
obsidian
pcloud
pdfarranger
pwvucontrol
# scrcpy
seahorse
shellcheck
slack
signal-desktop
# slack
# sublime3
# swiPrologWithGui
tagainijisho
@@ -158,16 +151,12 @@
touchegg
] ++ lib.optionals (machineVars.gaming) [
desmume
osu-lazer
retroarchFull
steam
steam-tui
# osu-lazer
# retroarchFull
# steam
# steam-tui
stepmania
taisei
] ++ lib.optionals (machineName != "dosei") [
# Source blocked by external firewall on dosei
pcloud
# taisei
]
);
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.ahoviewer = { };
}

View File

@@ -1,7 +1,6 @@
{ pkgs, lib, config, ... }:
{
programs.alacritty = {
enable = true;
settings = {
window = {
padding = { x = 15; y = 15; };
@@ -18,6 +17,16 @@
size = 12.0;
};
keyboard.bindings = [
# NOTE: Allows for Ctrl+A Super+Z to work as Ctrl+A Alt+Z in tmux,
# very nice for a keyboard with Alt and Super switched.
{
key = "z";
mods = "Super";
chars = "\\u001bz";
}
];
colors =
let
inherit (lib.attrsets) getAttrs filterAttrs;

4
home/programs/anki.nix Normal file
View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.anki = { };
}

View File

@@ -1,20 +1,18 @@
{ pkgs, lib, inputs, ... }:
{ pkgs, lib, ... }:
{
programs.anyrun = {
enable = true;
config = {
y.fraction = 0.3;
width.fraction = 0.25;
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
"${pkgs.anyrun}/lib/libapplications.so"
];
hidePluginInfo = true;
closeOnClick = true;
showResultsImmediately = true;
};
extraCss = builtins.readFile (./. + "/style.css");
extraCss = builtins.readFile ./style.css;
extraConfigFiles."applications.ron".text = let
preprocess_script = pkgs.writeShellApplication {
@@ -30,7 +28,10 @@
desktop_actions: false,
max_entries: 10,
preprocess_exec_script: Some("${lib.getExe preprocess_script}"),
terminal: Some("${lib.getExe pkgs.alacritty}"),
terminal: Some(Terminal(
command: "${lib.getExe pkgs.alacritty}",
args: "-e {}",
)),
)
'';
};

View File

@@ -1,48 +1,76 @@
* {
all: unset;
font-size: 1.2rem;
}
@define-color accent #5599d2;
@define-color bg-color #161616;
@define-color fg-color #eeeeee;
@define-color desc-color #cccccc;
#window,
#match,
#entry,
#plugin,
#main {
window {
background: transparent;
}
#match.activatable {
border-radius: 8px;
margin: 4px 0;
padding: 4px;
/* transition: 100ms ease-out; */
}
#match.activatable:first-child {
margin-top: 12px;
}
#match.activatable:last-child {
margin-bottom: 0;
box.main {
padding: 5px;
margin: 10px;
border-radius: 10px;
border: 2px solid @accent;
background-color: @bg-color;
box-shadow: 0 0 5px black;
}
#match:hover {
background: rgba(255, 255, 255, 0.05);
}
#match:selected {
background: rgba(255, 255, 255, 0.1);
text {
min-height: 30px;
padding: 5px;
border-radius: 5px;
color: @fg-color;
}
#entry {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 4px 8px;
.matches {
background-color: rgba(0, 0, 0, 0);
border-radius: 10px;
}
box#main {
background: rgba(0, 0, 0, 0.5);
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.1),
0 30px 30px 15px rgba(0, 0, 0, 0.5);
border-radius: 20px;
padding: 12px;
box.plugin:first-child {
margin-top: 5px;
}
box.plugin.info {
min-width: 200px;
}
list.plugin {
background-color: rgba(0, 0, 0, 0);
}
label.match {
color: @fg-color;
}
label.match.description {
font-size: 10px;
color: @desc-color;
}
label.plugin.info {
font-size: 14px;
color: @fg-color;
}
.match {
background: transparent;
}
.match:selected {
border-left: 4px solid @accent;
background: transparent;
animation: fade 0.1s linear;
}
@keyframes fade {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.aria2.enable = true;
}
programs.aria2 = { };
}

View File

@@ -1,11 +1,10 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.programs.atuin;
xdg_runtime_dir = "/run/user/${toString config.home.uid}";
in
{
lib.mkIf cfg.enable {
programs.atuin = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableNushellIntegration = config.programs.nushell.enable;

View File

@@ -1,7 +1,9 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.programs.bash;
in
{
programs.bash = {
enable = true;
historyFile = "${config.xdg.dataHome}/bash_history";
historySize = 100000;
bashrcExtra = ''

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.bat.enable = true;
}
programs.bat = { };
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.beets.enable = true;
programs.beets = { };
}

View File

@@ -1,7 +1,9 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.programs.bottom;
in
{
programs.bottom = {
enable = true;
settings = {
flags.enable_gpu = true;

View File

@@ -1,10 +1,10 @@
{ pkgs, lib, ... }:
{
"Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true;
"Wikipedia (en)".metaData.hidden = true;
"Google".metaData.alias = "gg";
"DuckDuckGo".metaData.alias = "dd";
"amazondotcom-us".metaData.hidden = true;
"bing".metaData.hidden = true;
"wikipedia".metaData.hidden = true;
"google".metaData.alias = "gg";
"ddg".metaData.alias = "dd";
"Arch Package Repository" = {
urls = [{
@@ -95,6 +95,14 @@
definedAliases = [ "hg" ];
};
"Kagi" = {
urls = [{
template = "https://kagi.com/search";
params = [{ name = "q"; value = "{searchTerms}"; }];
}];
definedAliases = "k";
};
"Melpa" = {
urls = [{
template = "https://melpa.org/";
@@ -166,7 +174,7 @@
definedAliases = [ "ut" ];
};
"YouTube" = {
"youtube" = {
urls = [{
template = "https://www.youtube.com/results";
params = [{ name = "search_query"; value = "{searchTerms}"; }];

View File

@@ -1,7 +1,9 @@
{ ... }:
{
{ config, lib, ... }:
let
cfg = config.programs.cargo;
in
lib.mkIf cfg.enable {
programs.cargo = {
enable = true;
settings = {
cargo-new.vcs = "git";
};

11
home/programs/delta.nix Normal file
View File

@@ -0,0 +1,11 @@
{ ... }:
{
programs.delta = {
enableGitIntegration = true;
options = {
line-numbers = true;
side-by-side = true;
theme = "Monokai Extended Origin";
};
};
}

View File

@@ -1,7 +1,9 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.programs.direnv;
in
{
programs.direnv = {
enable = true;
silent = true;
nix-direnv.enable = true;

View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.element-desktop = { };
}

View File

@@ -1,4 +1,6 @@
{ pkgs, ... }: let
{ config, lib, pkgs, ... }:
let
cfg = config.programs.emacs;
configEl = pkgs.stdenv.mkDerivation {
name = "config.el";
@@ -14,11 +16,11 @@
'';
};
in {
in
lib.mkIf cfg.enable {
xdg.configFile."emacs/init.el".source = configEl.outPath;
programs.emacs = {
enable = true;
extraPackages = epkgs: with epkgs; [
# # package
use-package

View File

@@ -1,7 +1,9 @@
{ config, ... }:
{ config, lib, ... }:
let
cfg = config.programs.eza;
in
{
programs.eza = {
enable = true;
icons = "auto";
enableNushellIntegration = config.programs.nushell.enable;
};

View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.fastfetch = { };
}

View File

@@ -1,4 +1,4 @@
{ machineVars, ... }:
{ ... }:
{
programs.feh.enable = !machineVars.headless;
}
programs.feh = { };
}

View File

@@ -1,15 +1,17 @@
{ lib, pkgs, ... }:
{
programs.firefox = {
enable = true;
profiles.h7x4 = {
bookmarks = [{
toolbar = true;
bookmarks = import ./browser/bookmarks.nix;
}];
bookmarks = {
force = true;
settings = [{
toolbar = true;
bookmarks = import ./browser/bookmarks.nix;
}];
};
search = {
default = "Google";
default = "Kagi";
engines = import ./browser/engines.nix { inherit pkgs lib; };
force = true;
};
@@ -23,18 +25,25 @@
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.hybridContent.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.prompted" = 2;
"toolkit.telemetry.rejected" = true;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.unifiedIsOptIn" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";

View File

@@ -1,7 +1,9 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.programs.fzf;
in
{
programs.fzf = {
enable = true;
defaultCommand = "fd --type f";
};
}
}

View File

@@ -1,25 +1,32 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.programs.gdb;
in
{
xdg.configFile."gdb/gdbinit".text = ''
# C++ related beautifiers
set print pretty on
set print object on
set print static-members on
set print vtbl on
set print demangle on
set print sevenbit-strings off
set print asm-demangle on
set print elements 0
options.programs.gdb.enable = lib.mkEnableOption "gdb";
# Assembly
set disassembly-flavor intel
config = lib.mkIf cfg.enable {
xdg.configFile."gdb/gdbinit".text = ''
# C++ related beautifiers
set print pretty on
set print object on
set print static-members on
set print vtbl on
set print demangle on
set print sevenbit-strings off
set print asm-demangle on
set print elements 0
# Save command history between sessions:
set history save
# Assembly
set disassembly-flavor intel
# Print a beautifully colored prompt:
set prompt \001\033[1;36m\002(gdb) \001\033[0m\002
'';
# Save command history between sessions:
set history save
local.shell.aliases."System Tool Replacements".gdb = "${pkgs.pwndbg}/bin/pwndbg";
# Print a beautifully colored prompt:
set prompt \001\033[1;36m\002(gdb) \001\033[0m\002
'';
# local.shell.aliases."System Tool Replacements".gdb = "${pkgs.pwndbg}/bin/pwndbg";
};
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.gh-dash.enable = true;
programs.gh-dash = { };
}

View File

@@ -1,7 +1,6 @@
{ pkgs, ... }:
{
programs.gh = {
enable = true;
settings = {
gitProtocol = "ssh";
pager = "${pkgs.bat}/bin/bat";

22
home/programs/ghci.nix Normal file
View File

@@ -0,0 +1,22 @@
{ config, lib, pkgs, extendedLib, ... }:
let
cfg = config.programs.ghci;
in
{
options.programs.ghci = {
enable = lib.mkEnableOption "ghci, interactive haskell shell";
package = lib.mkPackageOption pkgs "ghc" { };
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
# Personal config
xdg.configFile = {
"ghc/ghci.conf".text = ''
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
'';
};
};
}

View File

@@ -13,18 +13,11 @@ let
"github.com:"
];
in
{
# TODO: convert to template once nix-sops supports it in hm module
sops.secrets."git/nordicsemi-config" = { };
lib.mkIf cfg.enable {
programs.git = lib.mkMerge [
{
enable = true;
package = pkgs.gitFull;
userName = "h7x4";
userEmail = "h7x4@nani.wtf";
signing = {
key = "46B9228E814A2AAC";
# format = "openpgp";
@@ -35,86 +28,82 @@ in
lfs.enable = true;
delta = {
enable = true;
options = {
line-numbers = true;
side-by-side = true;
theme = "Monokai Extended Origin";
settings = {
user = {
name = "h7x4";
email = "h7x4@nani.wtf";
};
};
aliases = {
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
authors = "shortlog --summary --numbered --email";
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d";
ff = "fixup-fixup";
fi = "fixup-interactive";
forcepush = "push --force-with-lease --force-if-includes";
git = "!git";
pp = "post-pr";
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
reset-to-upstream = "!git reset --hard \"origin/$(git rev-parse --abbrev-ref HEAD)\"";
rf = "rebase-fixups";
si = "switch-interactive";
subs = "submodule update --init --recursive";
} // (let
c = c: s: "%C(${c})${s}%C(reset)";
in {
graph = let
fmt = lib.concatStringsSep "" [
" - "
(c "bold blue" "%h")
" - "
(c "bold green" "(%ar)")
" "
(c "white" "> %s")
" "
(c "dim white" "- %an")
(c "bold yellow" "%d")
];
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
alias = {
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
authors = "shortlog --summary --numbered --email";
delete-merged = "!git branch --merged | grep -v -e '\\*' -e 'master' -e 'main' | xargs -n 1 git branch -d";
ff = "fixup-fixup";
fi = "fixup-interactive";
forcepush = "push --force-with-lease --force-if-includes";
git = "!git";
pp = "post-pr";
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
reset-to-upstream = "!git reset --hard \"origin/$(git rev-parse --abbrev-ref HEAD)\"";
rf = "rebase-fixups";
si = "switch-interactive";
subs = "submodule update --init --recursive";
} // (let
c = c: s: "%C(${c})${s}%C(reset)";
in {
graph = let
fmt = lib.concatStringsSep "" [
" - "
(c "bold blue" "%h")
" - "
(c "bold green" "(%ar)")
" "
(c "white" "> %s")
" "
(c "dim white" "- %an")
(c "bold yellow" "%d")
];
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
graphv = let
fmt = lib.concatStringsSep "" [
(c "bold blue" "%h")
" - "
(c "bold cyan" "%aD")
" "
(c "bold green" "(%ar)")
(c "bold yellow" "%d")
"%n"
" "
(c "white" "%s")
" "
(c "dim white" "- %an")
];
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
graphv = let
fmt = lib.concatStringsSep "" [
(c "bold blue" "%h")
" - "
(c "bold cyan" "%aD")
" "
(c "bold green" "(%ar)")
(c "bold yellow" "%d")
"%n"
" "
(c "white" "%s")
" "
(c "dim white" "- %an")
];
in "log --graph --abbrev-commit --decorate --format=format:'${fmt}' --all";
l = let
fmt = lib.concatStringsSep "%n" (map (x: if builtins.isList x then lib.concatStringsSep " " x else x) [
[ (c "bold yellow" "%H") (c "auto" "%d") ]
[ (c "bold white" "Author:") (c "bold cyan" "%aN <%aE>") (c "bold green" "(%ah)") ]
[ (c "bold white" "Committer:") (c "bold cyan" "%cN <%cE>") (c "bold green" "(%ah)") ]
[ (c "bold white" "GPG: (%G?)") (c "bold magenta" "%GF") "-" (c "bold cyan" "%GS") (c "bold blue" "(%GT) ") ]
""
(c "bold white" "# %s")
"%+b"
(c "dim yellow" "%+N")
]);
# sedExpressions = let
# colorExpr = "\\x1B\\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]";
# colorEndExpr = "\\x1B\\[m";
# colored = x: "${colorExpr}${x}${colorEndExpr}";
# in lib.concatMapStringsSep " " (x: "-e '${x}'") [
# "s|${colored "GPG: \\(N\\)"} ${colored "F3CDA86CC55A9F10D7A069819F2F7D8250F35146"} - ${colored "h7x4 <h7x4@nani.wtf>"} ${colored "\\(ultimate\\)"}|GPG: h7x4|"
# "s|${colored "GPG: \\(N\\)"} ${colored ""} - ${colored ""} ${colored "\\(undefined\\)"}||"
# ];
in "log --decorate --format=tformat:'${fmt}'";
# in "!git log --color=always --format=format:'${fmt}' | sed -E ${sedExpressions} | $PAGER";
});
l = let
fmt = lib.concatStringsSep "%n" (map (x: if builtins.isList x then lib.concatStringsSep " " x else x) [
[ (c "bold yellow" "%H") (c "auto" "%d") ]
[ (c "bold white" "Author:") (c "bold cyan" "%aN <%aE>") (c "bold green" "(%ah)") ]
[ (c "bold white" "Committer:") (c "bold cyan" "%cN <%cE>") (c "bold green" "(%ah)") ]
[ (c "bold white" "GPG: (%G?)") (c "bold magenta" "%GF") "-" (c "bold cyan" "%GS") (c "bold blue" "(%GT) ") ]
""
(c "bold white" "# %s")
"%+b"
(c "dim yellow" "%+N")
]);
# sedExpressions = let
# colorExpr = "\\x1B\\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]";
# colorEndExpr = "\\x1B\\[m";
# colored = x: "${colorExpr}${x}${colorEndExpr}";
# in lib.concatMapStringsSep " " (x: "-e '${x}'") [
# "s|${colored "GPG: \\(N\\)"} ${colored "F3CDA86CC55A9F10D7A069819F2F7D8250F35146"} - ${colored "h7x4 <h7x4@nani.wtf>"} ${colored "\\(ultimate\\)"}|GPG: h7x4|"
# "s|${colored "GPG: \\(N\\)"} ${colored ""} - ${colored ""} ${colored "\\(undefined\\)"}||"
# ];
in "log --decorate --format=tformat:'${fmt}'";
# in "!git log --color=always --format=format:'${fmt}' | sed -E ${sedExpressions} | $PAGER";
});
extraConfig = {
core = {
whitespace = lib.concatStringsSep "," [
"space-before-tab"
@@ -244,7 +233,7 @@ in
reflogExpireUnreachable = "90 days";
};
web.browser = "google-chrome-stable";
web.browser = "firefox";
"filter \"lfs\"" = {
required = true;
@@ -282,7 +271,7 @@ in
];
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") uri-prefixes);
in {
extraConfig."url \"${lib.head uri-prefixes}\"".insteadOf = lib.tail uri-prefixes;
settings."url \"${lib.head uri-prefixes}\"".insteadOf = lib.tail uri-prefixes;
includes = map (x: {
contentSuffix = "pvv.gitconfig";
@@ -295,42 +284,6 @@ in
};
}) (lib.flatten (lib.attrValues prefixes-per-org));
})
(let
bitbucket-uri-prefixes = [
# Preferred
"bitbucket-nordicsemi:"
# Alternative
"ssh://git@bitbucket.nordicsemi.no:7999"
"https://projecttools.nordicsemi.no/bitbucket/scm"
];
prefixes-per-org = let
organizations = [
"NordicSemiconductor"
"NordicPlayground"
"nrfconnect"
"oysteintveit-nordicsemi"
];
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") (github-uri-prefixes ++ [ "github-nordicsemi:" ]));
in {
extraConfig = lib.mergeAttrs
{
"url \"${lib.head bitbucket-uri-prefixes}\"".insteadOf = lib.tail bitbucket-uri-prefixes;
}
(lib.mapAttrs' (org: uri-prefixes: {
name = "url \"github-nordicsemi:${org}\"";
value.insteadOf = uri-prefixes;
}) prefixes-per-org)
;
includes = map (x: {
contentSuffix = "nordicsemi.gitconfig";
condition = "hasconfig:remote.*.url:${x}/**";
path = config.sops.secrets."git/nordicsemi-config".path;
}) (bitbucket-uri-prefixes ++ (lib.flatten (lib.attrValues prefixes-per-org)));
})
];
systemd.user.services."git-maintenance@".Service = lib.mkIf cfg.maintenance.enable {
@@ -348,7 +301,7 @@ in
echo "[maintenance]"
for repoLocation in ${repoDirs}; do
for repo in "$repoLocation"/*/.git; do
echo "repo = $("${pkgs.coreutils}/bin/realpath" "''${repo%"/.git"}")"
echo "repo = $('${pkgs.coreutils}/bin/realpath' "''${repo%"/.git"}")"
done
done
} > "$1"
@@ -397,8 +350,32 @@ in
text = lib.fileContents ./scripts/git-switch-interactive.sh;
excludeShellChecks = [
"SC2001" # (style): See if you can use ${variable//search/replace} instead. (sed invocation)
"SC2155"
];
})
(pkgs.writeShellApplication {
name = "git-author-lines";
runtimeInputs = with pkgs; [ cfg.package gnused gnugrep gawk uutils-coreutils-noprefix ];
text = lib.fileContents ./scripts/git-author-lines.sh;
})
(pkgs.writeShellApplication {
name = "git-all-commits";
runtimeInputs = with pkgs; [ cfg.package gnugrep gawk findutils uutils-coreutils-noprefix ];
text = lib.fileContents ./scripts/git-all-commits.sh;
})
(pkgs.writeShellApplication {
name = "git-diffc";
runtimeInputs = with pkgs; [ cfg.package gawk ];
text = let
printfLiteral = lib.concatStrings [
"\\033[36m%s\\033[0m\\n"
"\\033[32m%s\\033[0m\\n"
"\\033[31m%s\\033[0m\\n"
];
in ''
git --no-pager diff --shortstat "$@" | awk -F',' '{ printf "${printfLiteral}", $1, $2 ? $2 : "", $3 ? $3 : ""; }'
'';
})
((pkgs.writers.writePython3Bin "git-post-pr" {
libraries = with pkgs.python3Packages; [
tkinter

View File

@@ -0,0 +1,15 @@
GIT_ROOT="$(git rev-parse --show-toplevel)"
find "$GIT_ROOT/.git/objects" -type f | \
while read -r file; do
if echo "$file" | grep -Eq '\.idx$'; then
git show-index < "$file" | awk '{print $2}'
elif echo "$file" | grep -Eq '[0-9a-f]{38}$'; then
echo "$(basename "$(dirname "$file")")$(basename "$file")"
fi
done | \
while read -r hash; do
if [ "$(git cat-file -t "$hash")" = commit ]; then
echo "$hash"
fi
done

View File

@@ -0,0 +1,21 @@
set -euo pipefail
if [ -n "${1:-}" ]; then
REF="${1}"
else
REF="HEAD"
fi
# TODO: optionally keep track of which files the authors were present in,
# and print a list of up to N files where the authors contributed the most.
git ls-tree -r "${REF}" \
| while read -r _filemode _objtype _githash filepath; do
if git grep -Il . -- "$filepath" >/dev/null; then
git --no-pager blame --line-porcelain "${filepath}"
fi
done \
| grep --binary-files=without-match '^author ' \
| sed -e 's/author //' \
| awk '{ a[$0]+=1 } END{ for (i in a) { print a[i],i } }' \
| sort --numeric-sort --key 1 --reverse

View File

@@ -1,16 +1,136 @@
set -euo pipefail
if [ -n "${1:-}" ]; then
if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ] || [ $# -ge 2 ]; then
declare -r ARGV0=$(basename "${0:-git-switch-interactive.sh}")
printf 'Usage: %s [BRANCH]\n' "$ARGV0" >&2
cat <<'EOF' >&2
Interactively choose a local branch, remote branch, or tag to switch to.
Options:
-h, --help Show this help and exit
BRANCH If a single branch/tag/ref is provided, the script will
run git switch BRANCH and exit.
EOF
exit 0
fi
if [ $# -eq 1 ]; then
git switch "$1"
exit 0
fi
BRANCHES=$(cat <(git branch) <(git branch --remotes) | grep --invert-match '^\*\|HEAD ->' | sed 's|^\s*||')
CHOSEN_BRANCH=$(sk --reverse --info=inline --preview 'git show --color {}' <<<"$BRANCHES")
declare -r BRANCH_COLOR=$'\033[32m'
declare -r REMOTE_COLOR=$'\033[33m'
declare -r ORIGIN_COLOR=$'\033[31m'
declare -r TAG_COLOR=$'\033[35m'
declare -r RESET_COLOR=$'\033[0m'
CLEAN_BRANCH_NAME=$(sed 's|^\s*||' <<<"$CHOSEN_BRANCH")
for REMOTE in $(git remote); do
CLEAN_BRANCH_NAME=$(sed "s|^${REMOTE}/||" <<<"$CLEAN_BRANCH_NAME")
done
if [ -n "${NO_COLOR:-}" ]; then
declare -r BRANCH_COLOR=''
declare -r REMOTE_COLOR=''
declare -r ORIGIN_COLOR=''
declare -r TAG_COLOR=''
declare -r RESET_COLOR=''
fi
git switch "${CLEAN_BRANCH_NAME}"
declare -r STRIP_ANSI_SED='s/\x1B\[[0-9;]*[a-zA-Z]//g'
declare -r TRIM_SPACE_SED='s/^[[:space:]]+//; s/[[:space:]]+$//'
declare -r STRIP_SURROUNDING_QUOTES_SED="s/^[[:space:]\"'[]+//; s/[[:space:]\"'\\]]+\$//; s/^\"\\[+//; s/^\\[+//; s/\\]+$//"
sanitize_ref_from_git() {
sed -E \
-e "$STRIP_ANSI_SED" \
-e "$TRIM_SPACE_SED" \
-e "$STRIP_SURROUNDING_QUOTES_SED" <<<"$1"
}
declare -a VISIBLE_ITEMS=()
while IFS= read -r ref; do
[ -z "$ref" ] && continue
VISIBLE_ITEMS+=("${BRANCH_COLOR}(branch)${RESET_COLOR} $(sanitize_ref_from_git "$ref")")
done < <(git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads 2>/dev/null)
while IFS= read -r ref; do
[ -z "$ref" ] && continue
case "$ref" in
*/*)
remote_part="$(sanitize_ref_from_git "${ref%%/*}")"
branch_part="$(sanitize_ref_from_git "${ref#*/}")"
if [ -z "$branch_part" ] || [ "$branch_part" = "HEAD" ]; then
continue
fi
VISIBLE_ITEMS+=("${REMOTE_COLOR}(remote)${RESET_COLOR} ${ORIGIN_COLOR}${remote_part}${RESET_COLOR}/${branch_part}")
;;
*)
continue
;;
esac
done < <(git for-each-ref --format='%(refname:short)' refs/remotes 2>/dev/null)
while IFS= read -r ref; do
[ -z "$ref" ] && continue
VISIBLE_ITEMS+=("${TAG_COLOR}(tag)${RESET_COLOR} $(sanitize_ref_from_git "$ref")")
done < <(git for-each-ref --format='%(refname:short)' refs/tags 2>/dev/null)
if [ ${#VISIBLE_ITEMS[@]} -eq 0 ]; then
echo "No branches or tags found." >&2
exit 1
fi
declare -r SKIM_PREVIEW_COMMAND_RAW=$(cat <<'EOF'
raw=$(printf "%s" {} | sed -r 's/\x1B\[[0-9;]*[A-Za-z]//g')
ref=$(printf "%s" "$raw" | sed -n -E 's/^[[:space:]]*\([^)]*\)[[:space:]]*(.*)$/\1/p')
git show --color "$ref" 2>/dev/null || git log -n 50 --color "$ref"
EOF
)
declare -r SKIM_PREVIEW_COMMAND_=${SKIM_PREVIEW_COMMAND_RAW//$'\n'/'; '}
declare -r SKIM_PREVIEW_COMMAND=${SKIM_PREVIEW_COMMAND_%'; '}
CHOSEN=$(printf '%s\n' "${VISIBLE_ITEMS[@]}" | sk --ansi --reverse --info=inline --preview "$SKIM_PREVIEW_COMMAND")
[ -z "${CHOSEN:-}" ] && exit 0
declare -r CLEAN=$(sed -E \
-e "$STRIP_ANSI_SED" \
-e "$TRIM_SPACE_SED" \
<<<"$CHOSEN"
)
declare -r PARSED=$(sed -n -E "s/^[[:space:]]*\(([^)]*)\)[[:space:]]*(.*)$/\1|\2/p" <<<"$CLEAN") || true
if [ -z "$PARSED" ]; then
echo "Failed to parse selection: $CLEAN" >&2
exit 2
fi
declare -r TYPE=${PARSED%%|*}
declare -r RAW_REF=${PARSED#*|}
declare -r REF=$(sanitize_ref_from_git "$RAW_REF")
case "$TYPE" in
tag)
git switch --detach "$REF"
;;
remote)
SWITCH_NAME="$REF"
for R in $(git remote 2>/dev/null); do
if [ "${REF#"${R}"/}" != "$REF" ]; then
CAND=${REF#"${R}"/}
if git show-ref --verify --quiet "refs/heads/$CAND"; then
SWITCH_NAME="$CAND"
break
fi
fi
done
git switch "$SWITCH_NAME"
;;
branch)
git switch "$REF"
;;
*)
git switch "$REF"
;;
esac
exit 0

View File

@@ -1,7 +1,9 @@
{ config, pkgs, ... }:
{
{ config, lib, pkgs, ... }:
let
cfg = config.programs.gpg;
in
lib.mkIf cfg.enable {
programs.gpg = {
enable = true;
homedir = "${config.xdg.configHome}/gnupg";
auto-refresh-keys.enable = true;
@@ -26,7 +28,7 @@
services.gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
pinentry.package = pkgs.pinentry-curses;
enableExtraSocket = true;
enableSshSupport = true;
enableScDaemon = true;

4
home/programs/helix.nix Normal file
View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.helix = { };
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.home-manager.enable = true;
}
programs.home-manager = { };
}

View File

@@ -1,380 +0,0 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
home.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
WLR_RENDERER_ALLOW_SOFTWARE = "1";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
GDK_BACKEND = "wayland,x11,*";
QT_QPA_PLATFORM = "wayland;xcb";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
SDL_VIDEODRIVER = "wayland";
OZONE_PLATFORM = "wayland";
CLUTTER_BACKEND = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
# QT_QPA_PLATFORMTHEME = "qt6ct";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
# LIBVA_DRIVER_NAME = "nvidia";
# GBM_BACKEND = "nvidia-drm";
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
};
home.packages = with pkgs; [
hyprpolkitagent
wl-clipboard-rs
];
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 0;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = ''Password...'';
shadow_passes = 2;
}
];
auth = {
"pam:enabled" = true;
"pam:module" = "hyprlock";
};
};
};
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
after_sleep_cmd = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
};
listener = [
{
timeout = 900;
on-timeout = "${config.programs.hyprlock.package}/bin/hyprlock";
}
{
timeout = 1200;
on-timeout = "${cfg.finalPackage}/bin/hyprctl dispatch dpms off";
on-resume = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
}
];
};
};
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
systemd.enableXdgAutostart = false;
settings = let
exe = lib.getExe;
scratchpads = [
(rec {
title = "Floating terminal";
class = "floatingTerminal";
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.tmux} new-session -A -s f";
size = { h = 90; w = 95; };
keys = [
"$mod, RETURN"
"$mod, SPACE"
];
})
(rec {
title = "Ncmpcpp";
class = "floatingNcmpcpp";
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.ncmpcpp}";
size = { h = 95; w = 95; };
keys = [ "$mod, Q" ];
})
# "$mod, W, emacs"
# "$mod, E, filebrowser"
# "$mod, X, taskwarriortui"
];
in {
"$mod" = "SUPER";
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
bind = [
"$mod SHIFT, Q, exec, ${pkgs.systemd}/bin/loginctl terminate-user \"\""
"$mod ALT SHIFT, Q, exec, uwsm stop"
"$mod, R, exec, uwsm app -- ${exe config.programs.anyrun.package}"
"$mod, T, togglefloating"
"$mod, F, fullscreenstate, 1"
"$mod SHIFT, F, fullscreenstate, 3"
"$mod, C, exec, ${cfg.finalPackage}/bin/hyprctl reload"
"$mod, BACKSPACE, killactive"
"$mod SHIFT, RETURN, exec, uwsm app -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
"$mod SHIFT, SPACE, exec, uwsm app -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
"$mod, j, layoutmsg,cyclenext"
"$mod, k, layoutmsg,cycleprev"
"$mod SHIFT, j, layoutmsg, swapnext"
"$mod SHIFT, k, layoutmsg, swapprev"
"$mod, 1, focusworkspaceoncurrentmonitor, 1"
"$mod, 2, focusworkspaceoncurrentmonitor, 2"
"$mod, 3, focusworkspaceoncurrentmonitor, 3"
"$mod, 4, focusworkspaceoncurrentmonitor, 4"
"$mod, 5, focusworkspaceoncurrentmonitor, 5"
"$mod, 6, focusworkspaceoncurrentmonitor, 6"
"$mod, 7, focusworkspaceoncurrentmonitor, 7"
"$mod, 8, focusworkspaceoncurrentmonitor, 8"
"$mod, 9, focusworkspaceoncurrentmonitor, 9"
"$mod SHIFT, 1, movetoworkspacesilent, 1"
"$mod SHIFT, 2, movetoworkspacesilent, 2"
"$mod SHIFT, 3, movetoworkspacesilent, 3"
"$mod SHIFT, 4, movetoworkspacesilent, 4"
"$mod SHIFT, 5, movetoworkspacesilent, 5"
"$mod SHIFT, 6, movetoworkspacesilent, 6"
"$mod SHIFT, 7, movetoworkspacesilent, 7"
"$mod SHIFT, 8, movetoworkspacesilent, 8"
"$mod SHIFT, 9, movetoworkspacesilent, 9"
"$mod, b, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s mozc"
"$mod, n, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-no"
"$mod, m, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-us"
"$mod, l, exec, ${pkgs.systemd}/bin/loginctl lock-session"
# TODO: fix
# "super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter"
", Print, exec, ${exe pkgs.grimblast} copy area"
# "SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} copy area"
# "shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png"
"$mod, Print, exec, ${exe pkgs.woomer}"
]
++
(lib.pipe scratchpads [
(map ({ keys, command, class, ... }:
(map (key: let
# TODO: rewrite this to take arguments instead of creating n copies
invokeIfNotRunningAndToggleWorkspace = pkgs.writeShellApplication {
name = "hyprland-toggle-scratchpad-${class}";
runtimeInputs = [ cfg.finalPackage pkgs.jq ];
text = ''
SCRATCHPAD_PROGRAM_EXISTS=$(hyprctl clients -j | jq -r '[.[].class]|any(. == "${class}")')
CURRENT_WORKSPACE_ID=$(hyprctl activeworkspace -j | jq -r '.id')
if [ "$SCRATCHPAD_PROGRAM_EXISTS" != "true" ]; then
${command} &
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
hyprctl dispatch focuswindow "class:${class}"
else
SCRATCHPAD_PROGRAM_WORKSPACE_ID=$(hyprctl clients -j | jq '.[] | select( .class == "${class}") | .workspace.id')
if [ "$SCRATCHPAD_PROGRAM_WORKSPACE_ID" != "$CURRENT_WORKSPACE_ID" ]; then
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
hyprctl dispatch focuswindow "class:${class}"
else
hyprctl dispatch movetoworkspacesilent "special:${class}Ws,class:${class}"
fi
fi
'';
};
in "${key}, exec, ${lib.getExe invokeIfNotRunningAndToggleWorkspace}"
) keys)
))
lib.flatten
]);
bindm = [
"$mod, mouse:272, movewindow"
"$mod, Control_L, movewindow"
"$mod, mouse:273, resizewindow"
"$mod, ALT_L, resizewindow"
];
bindl = [
"$mod, p, exec, ${exe pkgs.mpc_cli} toggle"
",XF86AudioPlay, exec, ${exe pkgs.mpc_cli} toggle"
",XF86AudioPrev, exec, ${exe pkgs.mpc_cli} prev"
",XF86AudioNext, exec, ${exe pkgs.mpc_cli} next"
];
bindle = [
",XF86MonBrightnessUp, exec, ${exe pkgs.brightnessctl} s +5%"
",XF86MonBrightnessDown, exec, ${exe pkgs.brightnessctl} s 5%-"
",XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
",XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
"$mod ,F7, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
"$mod ,F8, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
];
exec-once = [
"uwsm finalize"
];
windowrulev2 = [
"float, class:^(Rofi)$"
"float, class:^(xdg-desktop-portal-gtk)$"
"float, title:^(.*Bitwarden Password Manager.*)$"
"float, title:^(Picture-in-Picture)$"
"tile, class:^(Nsxiv)$"
"float, class: ^(Gimp-2.*)$, title:^(Open Image)$"
"size 70%, class: ^(Gimp-2.*)$, title:^(Open Image)$"
"center, class: ^(Gimp-2.*)$, title:^(Open Image)$"
"dimaround, class:^(xdg-desktop-portal-gtk)$"
"workspace special silent, title:^(Firefox Sharing Indicator)$"
"workspace special silent, title:^(Zen Sharing Indicator)$"
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$"
"workspace 2, class:^(firefox)$"
"workspace 2, class:^(google-chrome)$"
"workspace 3, class:^(Emacs)$"
"workspace 3, class:^(code)$"
"workspace 3, class:^(code-url-handler)$"
"workspace 3, class:^(dev.zed.Zed)$"
"workspace 5, class:^(discord)$"
"workspace 5, class:^(Element)$"
]
++
(lib.pipe scratchpads [
(map ({ class, size, ... }: [
"workspace special:${class}Ws, class:^${class}$"
"float, class:^${class}$"
"size ${toString size.w}% ${toString size.h}%, class:^${class}$"
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^${class}$"
]))
lib.flatten
]);
monitor = [
# TODO: host specific
"eDP-1, 3840x2400@90.00Hz, 0x0, 2"
# PVV Demiurgen
"desc:Hewlett Packard HP ZR24w CNT01711G6, 1920x1200, 0x-1200, 1"
"desc:Hewlett Packard HP ZR24w CNT018103H, 1920x1200, 1920x-1200, 1"
# PVV Eirin
"desc:Hewlett Packard HP ZR24w CNT01710L4, 1920x1200, 0x-1200, 1"
"desc:Hewlett Packard HP ZR24w CNT0181039, 1920x1200, 1920x-1200, 1"
",preferred,auto,1"
];
general = {
gaps_in = 5;
gaps_out = 15;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
resize_on_border = false;
allow_tearing = false;
layout = "master";
};
decoration = {
rounding = 10;
# Change transparency of focused and unfocused windows
active_opacity = 1.0;
inactive_opacity = 1.0;
# drop_shadow = true;
# shadow_range = 4;
# shadow_render_power = 3;
# "col.shadow" = "rgba(1a1a1aee)";
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = 0.1696;
};
};
animations.enabled = false;
master = {
new_status = "slave";
};
misc = {
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
};
input ={
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_options = "caps:escape";
kb_rules = "";
follow_mouse = 1;
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
touchpad = {
natural_scroll = false;
};
};
};
};
services.hyprpaper = {
enable = true;
settings.ipc = true;
};
# UWSM
systemd.user.services = {
hypridle.Unit.After = lib.mkForce "graphical-session.target";
waybar.Unit.After = lib.mkForce "graphical-session.target";
network-manager-applet.Unit.After = lib.mkForce "graphical-session.target";
fcitx5-daemon.Unit.After = lib.mkForce "graphical-session.target";
# hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
};
}

View File

@@ -0,0 +1,56 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
imports = [
./hypridle.nix
./hyprland.nix
./hyprlock.nix
./hyprpaper.nix
./hyprpolkitagent.nix
./keybinds.nix
./scratchpads.nix
./windowrules.nix
./xdg-portals.nix
];
config = lib.mkIf cfg.enable {
home.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
WLR_RENDERER_ALLOW_SOFTWARE = "1";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
GDK_BACKEND = "wayland,x11,*";
QT_QPA_PLATFORM = "wayland;xcb";
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
SDL_VIDEODRIVER = "wayland";
OZONE_PLATFORM = "wayland";
CLUTTER_BACKEND = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
# QT_QPA_PLATFORMTHEME = "qt6ct";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
# LIBVA_DRIVER_NAME = "nvidia";
# GBM_BACKEND = "nvidia-drm";
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
};
home.packages = with pkgs; [
wl-clipboard-rs
];
systemd.user.services = {
waybar.Unit.After = lib.mkForce "graphical-session.target";
network-manager-applet.Unit.After = lib.mkForce "graphical-session.target";
fcitx5-daemon = {
Unit.After = lib.mkForce "graphical-session.target";
Service.Slice = "session.slice";
};
};
};
}

View File

@@ -0,0 +1,36 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
after_sleep_cmd = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
};
listener = [
{
timeout = 900;
on-timeout = "${config.programs.hyprlock.package}/bin/hyprlock";
}
{
timeout = 1200;
on-timeout = "${cfg.finalPackage}/bin/hyprctl dispatch dpms off";
on-resume = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
}
];
};
};
systemd.user.services.hypridle = {
Unit.After = lib.mkForce "graphical-session.target";
Service.Slice = "session.slice";
};
};
}

View File

@@ -0,0 +1,90 @@
{
wayland.windowManager.hyprland = {
systemd.enable = false;
systemd.enableXdgAutostart = false;
settings = {
exec-once = [
"uwsm finalize"
];
monitor = [
# TODO: host specific
"eDP-1, 3840x2400@90.00Hz, 0x0, 2"
# PVV Demiurgen
"desc:Hewlett Packard HP ZR24w CNT01711G6, 1920x1200, 0x-1200, 1"
"desc:Hewlett Packard HP ZR24w CNT018103H, 1920x1200, 1920x-1200, 1"
# PVV Eirin
"desc:Hewlett Packard HP ZR24w CNT01710L4, 1920x1200, 0x-1200, 1"
"desc:Hewlett Packard HP ZR24w CNT0181039, 1920x1200, 1920x-1200, 1"
",preferred,auto,1"
];
general = {
gaps_in = 5;
gaps_out = 15;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
resize_on_border = false;
allow_tearing = false;
layout = "master";
};
decoration = {
rounding = 10;
# Change transparency of focused and unfocused windows
active_opacity = 1.0;
inactive_opacity = 1.0;
# drop_shadow = true;
# shadow_range = 4;
# shadow_render_power = 3;
# "col.shadow" = "rgba(1a1a1aee)";
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = 0.1696;
};
};
animations.enabled = false;
master = {
new_status = "slave";
};
misc = {
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
};
input ={
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_options = "caps:escape";
kb_rules = "";
follow_mouse = 1;
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
touchpad = {
natural_scroll = false;
};
};
};
};
}

View File

@@ -0,0 +1,48 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 0;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = ''Password...'';
shadow_passes = 2;
}
];
auth = {
"pam:enabled" = true;
"pam:module" = "hyprlock";
};
};
};
};
}

View File

@@ -0,0 +1,17 @@
{ config, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
services.hyprpaper = {
enable = true;
settings.ipc = true;
};
systemd.user.services.hyprpaper = {
Unit.After = lib.mkForce "graphical-session.target";
Service.Slice = "session.slice";
};
};
}

View File

@@ -0,0 +1,14 @@
{ config, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
services.hyprpolkitagent.enable = true;
systemd.user.services.hyprpolkitagent = {
Unit.After = lib.mkForce "graphical-session.target";
Service.Slice = "session.slice";
};
};
}

View File

@@ -0,0 +1,94 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.settings = let
exe = lib.getExe;
in {
"$mod" = "SUPER";
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
bind = [
"$mod SHIFT, Q, exec, uwsm stop"
"$mod ALT SHIFT, Q, exec, ${pkgs.systemd}/bin/loginctl terminate-user \"${config.home.username}\""
"$mod, R, exec, uwsm app -- ${exe config.programs.anyrun.package}"
"$mod, T, togglefloating"
"$mod, F, fullscreenstate, 1"
"$mod SHIFT, F, fullscreenstate, 3"
"$mod, C, exec, ${cfg.finalPackage}/bin/hyprctl reload"
"$mod, BACKSPACE, killactive"
"$mod SHIFT, RETURN, exec, ${exe pkgs.app2unit} -t service -C -s app-graphical.slice -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
"$mod SHIFT, SPACE, exec, ${exe pkgs.app2unit} -t service -C -s app-graphical.slice -- ${exe pkgs.alacritty} --class termTerminal -e ${exe pkgs.tmux} new-session -A -s term"
"$mod, j, layoutmsg,cyclenext"
"$mod, k, layoutmsg,cycleprev"
"$mod SHIFT, j, layoutmsg, swapnext"
"$mod SHIFT, k, layoutmsg, swapprev"
"$mod, 1, focusworkspaceoncurrentmonitor, 1"
"$mod, 2, focusworkspaceoncurrentmonitor, 2"
"$mod, 3, focusworkspaceoncurrentmonitor, 3"
"$mod, 4, focusworkspaceoncurrentmonitor, 4"
"$mod, 5, focusworkspaceoncurrentmonitor, 5"
"$mod, 6, focusworkspaceoncurrentmonitor, 6"
"$mod, 7, focusworkspaceoncurrentmonitor, 7"
"$mod, 8, focusworkspaceoncurrentmonitor, 8"
"$mod, 9, focusworkspaceoncurrentmonitor, 9"
"$mod SHIFT, 1, movetoworkspacesilent, 1"
"$mod SHIFT, 2, movetoworkspacesilent, 2"
"$mod SHIFT, 3, movetoworkspacesilent, 3"
"$mod SHIFT, 4, movetoworkspacesilent, 4"
"$mod SHIFT, 5, movetoworkspacesilent, 5"
"$mod SHIFT, 6, movetoworkspacesilent, 6"
"$mod SHIFT, 7, movetoworkspacesilent, 7"
"$mod SHIFT, 8, movetoworkspacesilent, 8"
"$mod SHIFT, 9, movetoworkspacesilent, 9"
"$mod, b, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s mozc"
"$mod, n, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-no"
"$mod, m, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-us"
"$mod, l, exec, ${pkgs.systemd}/bin/loginctl lock-session"
# TODO: fix
# "super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter"
", Print, exec, ${exe pkgs.grimblast} copy area"
"SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} save"
# "shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png"
"$mod, Print, exec, ${exe pkgs.woomer}"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, Control_L, movewindow"
"$mod, mouse:273, resizewindow"
"$mod, ALT_L, resizewindow"
];
bindl = [
"$mod, p, exec, ${exe pkgs.mpc} toggle"
",XF86AudioPlay, exec, ${exe pkgs.mpc} toggle"
",XF86AudioPrev, exec, ${exe pkgs.mpc} prev"
",XF86AudioNext, exec, ${exe pkgs.mpc} next"
];
bindle = [
",XF86MonBrightnessUp, exec, ${exe pkgs.brightnessctl} s +5%"
",XF86MonBrightnessDown, exec, ${exe pkgs.brightnessctl} s 5%-"
",XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
",XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
"$mod ,F7, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
"$mod ,F8, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
];
};
};
}

View File

@@ -0,0 +1,75 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.settings = let
exe = lib.getExe;
scratchpads = [
(rec {
title = "Floating terminal";
class = "floatingTerminal";
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.tmux} new-session -A -s f";
size = { h = 90; w = 95; };
keys = [
"$mod, RETURN"
"$mod, SPACE"
];
})
(rec {
title = "Ncmpcpp";
class = "floatingNcmpcpp";
command = "uwsm app -- ${exe pkgs.alacritty} --class ${class} -e ${exe pkgs.ncmpcpp}";
size = { h = 95; w = 95; };
keys = [ "$mod, Q" ];
})
# "$mod, W, emacs"
# "$mod, E, filebrowser"
# "$mod, X, taskwarriortui"
];
in {
bind = lib.pipe scratchpads [
(map ({ keys, command, class, ... }:
(map (key: let
# TODO: rewrite this to take arguments instead of creating n copies
invokeIfNotRunningAndToggleWorkspace = pkgs.writeShellApplication {
name = "hyprland-toggle-scratchpad-${class}";
runtimeInputs = [ cfg.finalPackage pkgs.jq ];
text = ''
SCRATCHPAD_PROGRAM_EXISTS=$(hyprctl clients -j | jq -r '[.[].class]|any(. == "${class}")')
CURRENT_WORKSPACE_ID=$(hyprctl activeworkspace -j | jq -r '.id')
if [ "$SCRATCHPAD_PROGRAM_EXISTS" != "true" ]; then
${command} &
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
hyprctl dispatch focuswindow "class:${class}"
else
SCRATCHPAD_PROGRAM_WORKSPACE_ID=$(hyprctl clients -j | jq '.[] | select( .class == "${class}") | .workspace.id')
if [ "$SCRATCHPAD_PROGRAM_WORKSPACE_ID" != "$CURRENT_WORKSPACE_ID" ]; then
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
hyprctl dispatch focuswindow "class:${class}"
else
hyprctl dispatch movetoworkspacesilent "special:${class}Ws,class:${class}"
fi
fi
'';
};
in "${key}, exec, ${lib.getExe invokeIfNotRunningAndToggleWorkspace}"
) keys)
))
lib.flatten
];
windowrulev2 = lib.pipe scratchpads [
(map ({ class, size, ... }: [
"workspace special:${class}Ws, class:^(${class})$"
"float, class:^${class}$"
"size ${toString size.w}% ${toString size.h}%, class:^(${class})$"
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^(${class})$"
]))
lib.flatten
];
};
};
}

View File

@@ -0,0 +1,41 @@
{ config, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.settings.windowrulev2 = [
"float, class:^(Rofi)$"
"float, class:^(xdg-desktop-portal-gtk)$"
"float, title:^(.*Bitwarden Password Manager.*)$"
"float, title:^(Picture-in-Picture)$"
"tile, class:^(Nsxiv)$"
"float, class: ^(Gimp-2.*)$, title:^(Open Image)$"
"size 70%, class: ^(Gimp-2.*)$, title:^(Open Image)$"
"center, class: ^(Gimp-2.*)$, title:^(Open Image)$"
"dimaround, class:^(xdg-desktop-portal-gtk)$"
"workspace special silent, title:^(Firefox Sharing Indicator)$"
"workspace special silent, title:^(Zen Sharing Indicator)$"
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$"
"workspace 2, class:^(firefox)$"
"workspace 2, class:^(chromium)$"
"workspace 3, class:^(Emacs)$"
"workspace 3, class:^(code)$"
"workspace 3, class:^(code-url-handler)$"
"workspace 3, class:^(dev.zed.Zed)$"
"workspace 5, class:^(discord)$"
"workspace 5, class:^(Element)$"
"float, class:^(xdg-desktop-portal-termfilechooser)$"
"float, class:^(anyrun)$"
"size 70% 80%, class:^(xdg-desktop-portal-termfilechooser)$"
"move 15% 10%, class:^(xdg-desktop-portal-termfilechooser)$"
];
};
}

View File

@@ -0,0 +1,34 @@
{ config, pkgs, lib, ... }:
let
cfg = config.wayland.windowManager.hyprland;
in {
config = lib.mkIf cfg.enable {
xdg.portal = {
xdgOpenUsePortal = true;
configPackages = with pkgs; [ gnome-session ];
extraPortals = with pkgs; [
gnome-keyring
xdg-desktop-portal-gtk
xdg-desktop-portal-termfilechooser
];
config.hyprland = {
default = "hyprland;gtk;";
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ];
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
};
};
xdg.configFile."xdg-desktop-portal-termfilechooser/config".source =
(pkgs.formats.ini { listsAsDuplicateKeys = true; }).generate "xdg-desktop-portal-termfilechooser.ini" {
filechooser = {
cmd = "${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh";
default_dir = "$HOME";
env = [
"TERMCMD=alacritty -T \"Filechooser\" --class \"xdg-desktop-portal-termfilechooser\" --command"
];
};
};
};
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.jq.enable = true;
programs.jq = { };
}

View File

@@ -1,8 +1,7 @@
{ config, ... }:
{
programs.less = {
enable = true;
keys = ''
config = ''
#env
LESS = -i -R
LESSHISTSIZE=20000

View File

@@ -1,7 +1,6 @@
{ ... }:
{
programs.man = {
enable = true;
generateCaches = true;
};
}
}

8
home/programs/meli.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
programs.meli = {
package = pkgs.meli.overrideAttrs {
doCheck = false;
};
};
}

View File

@@ -1,8 +1,6 @@
{ config, lib, machineVars, ... }:
{
programs.mpv = {
enable = !machineVars.headless;
config = {
screenshot-directory = "${config.xdg.userDirs.pictures}/mpv-screenshots";

View File

@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
{
programs.ncmpcpp = {
enable = true;
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
bindings = [

39
home/programs/neomutt.nix Normal file
View File

@@ -0,0 +1,39 @@
{ config, lib, ... }:
let
cfg = config.programs.neomutt;
in lib.mkIf cfg.enable {
programs.neomutt = {
vimKeys = true;
sidebar.enable = true;
settings = {
debug_file = "${config.xdg.dataHome}/neomutt/debug0";
history_file = "${config.xdg.dataHome}/neomutt/history";
mailcap_path = "${config.xdg.configHome}/neomutt/mailcap";
# header_cache = "${config.xdg.cacheHome}/neomutt/headers";
# message_cache_dir = "${config.xdg.cacheHome}/neomutt/messages";
news_cache_dir = "${config.xdg.cacheHome}/neomutt/news";
tmp_dir = "/run/user/${toString config.home.uid}/neomutt";
alias_file = "${config.xdg.dataHome}/neomutt/aliases";
};
extraConfig = ''
source "${config.xdg.dataHome}/neomutt/aliases"
# vim: filetype=neomuttrc
'';
};
xdg.configFile."neomutt/mailcap".text = ''
# vim: filetype=muttrc
text/plain; nvim %s
#PDFs
application/pdf; zathura %s pdf
#Images
image/png; feh %s
image/jpeg; feh %s
'';
}

View File

@@ -1,8 +1,9 @@
{ pkgs, lib, machineVars, ... }:
{
{ config, pkgs, lib, machineVars, ... }:
let
cfg = config.programs.neovim;
in
lib.mkIf cfg.enable {
programs.neovim = {
enable = true;
auto-clean-swapfiles.enable = true;
viAlias = true;

View File

@@ -2,19 +2,14 @@
let
cfg = config.programs.newsboat;
# package = cfg.package;
package = pkgs.newsboat;
defaultBrowser = "google-chrome-stable %u";
defaultBrowser = "firefox %u";
videoViewer = "mpv %u";
in {
imports = [ ./sources.nix ];
programs.newsboat = {
enable = true;
fetch-articles.enable = true;
vacuum.enable = true;
autoFetchArticles.enable = true;
autoVacuum.enable = true;
autoReload = true;
maxItems = 50;
@@ -74,11 +69,4 @@ in {
''
];
};
# systemd.user.slices.app-newsboat = {
# Unit = {
# Description = "Newsboat automation";
# Documentation = [ "man:newsboat(1)" ];
# };
# };
}

View File

@@ -1,7 +1,6 @@
{ ... }:
{
programs.nix-index = {
enable = true;
autoUpdateDatabase.enable = true;
};
}

View File

@@ -1,18 +1,27 @@
{ config, ... }:
{ config, lib, ... }:
{
sops = {
secrets = {
"nix/access-tokens/github" = { sopsFile = ../../secrets/common.yaml; };
"nix/access-tokens/pvv-git" = { sopsFile = ../../secrets/common.yaml; };
"nix/access-tokens/github" = { sopsFile = ./../../secrets/common.yaml; };
"nix/access-tokens/pvv-git" = { sopsFile = ./../../secrets/common.yaml; };
};
templates."nix-access-tokens.conf".content = let
inherit (config.sops) placeholder;
in ''
access-tokens = github.com=${placeholder."nix/access-tokens/github"} git.pvv.ntnu.no=${placeholder."nix/access-tokens/pvv-git"}
'';
tokens = {
"github.com" = placeholder."nix/access-tokens/github";
"git.pvv.ntnu.no" = placeholder."nix/access-tokens/pvv-git";
};
in "access-tokens = ${lib.pipe tokens [
lib.attrsToList
(builtins.sort (p: q: p.name > q.name))
(map ({ name, value }: "${name}=${value}"))
(builtins.concatStringsSep " ")
]}";
};
nix = {
enable = true;
settings.use-xdg-base-directories = true;
extraOptions = ''
!include ${config.sops.templates."nix-access-tokens.conf".path}

View File

@@ -1,6 +1,4 @@
{ ... }:
{
programs.nushell = {
enable = true;
};
programs.nushell = { };
}

4
home/programs/nyxt.nix Normal file
View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.nyxt = { };
}

View File

@@ -1,4 +1,4 @@
{ machineVars, ... }:
{ ... }:
{
programs.obs-studio.enable = !machineVars.headless;
}
programs.obs-studio = { };
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.obsidian = { };
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.pandoc.enable = true;
programs.pandoc = { };
}

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }:
{
programs.prism-launcher = {
enable = true;
package = pkgs.prismlauncher.override {
jdk17 = pkgs.jdk21;
};

View File

@@ -1,24 +1,31 @@
{ config, pkgs, extendedLib, ... }:
{ config, lib, pkgs, extendedLib, ... }:
let
cfg = config.programs.python;
in
{
# Python for interactive use
home.packages = [
(pkgs.python3.withPackages (pypkgs: with pypkgs; [
requests
]))
];
options.programs.python.enable = lib.mkEnableOption "python";
xdg.configFile."python/pyrc".text = ''
#!/usr/bin/env python3
import sys
config = lib.mkIf cfg.enable {
# Python for interactive use
home.packages = [
(pkgs.python3.withPackages (pypkgs: with pypkgs; [
requests
]))
];
# You also need \x01 and \x02 to separate escape sequence, due to:
# https://stackoverflow.com/a/9468954/1147688
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
'';
xdg.configFile."python/pyrc".text = ''
#!/usr/bin/env python3
import sys
home.sessionVariables = {
PYTHONSTARTUP = "${config.xdg.configHome}/python/pyrc";
PYTHON_HISTORY = "${config.xdg.dataHome}/python_history";
# You also need \x01 and \x02 to separate escape sequence, due to:
# https://stackoverflow.com/a/9468954/1147688
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
'';
home.sessionVariables = {
PYTHONSTARTUP = "${config.xdg.configHome}/python/pyrc";
PYTHON_HISTORY = "${config.xdg.dataHome}/python_history";
};
};
}

View File

@@ -1,7 +1,6 @@
{ ... }:
{
programs.qutebrowser = {
enable = true;
aliases = {};
searchEngines = {};
settings = {};

4
home/programs/rclone.nix Normal file
View File

@@ -0,0 +1,4 @@
{ ... }:
{
programs.rclone = { };
}

View File

@@ -1,4 +1,4 @@
{ ... }:
{
programs.ripgrep.enable = true;
programs.ripgrep = { };
}

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }:
{
programs.rofi = {
enable = true;
# plugins = with pkgs; [
# rofi-emoji
# rofi-mpd

View File

@@ -1,7 +1,6 @@
{ ... }:
{
programs.skim = {
enable = true;
defaultCommand = "fd --type f";
};
}

View File

@@ -1,17 +1,24 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.programs.sqlite;
in
{
xdg.configFile."sqlite3/sqliterc".text = ''
.bail on
.changes on
.headers on
.mode box
.nullvalue '<NULL>'
.timer on
'';
options.programs.sqlite.enable = lib.mkEnableOption "sqlite";
home.packages = [
pkgs.sqlite-interactive
];
config = lib.mkIf cfg.enable {
xdg.configFile."sqlite3/sqliterc".text = ''
.bail on
.changes on
.headers on
.mode box
.nullvalue '<NULL>'
.timer on
'';
home.sessionVariables.SQLITE_HISTORY= "${config.xdg.dataHome}/sqlite_history";
home.packages = [
pkgs.sqlite-interactive
];
home.sessionVariables.SQLITE_HISTORY= "${config.xdg.dataHome}/sqlite_history";
};
}

View File

@@ -1,5 +1,6 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.programs.ssh;
runtimeDir = "/run/user/${toString config.home.uid}";
controlMastersDir = "${runtimeDir}/ssh";
in
@@ -8,32 +9,46 @@ in
./home.nix
./other.nix
./pvv.nix
./kyoto-u.nix
];
config = lib.mkIf cfg.enable {
sops.secrets."ssh/secret-config" = {
mode = "0444";
};
programs.ssh = {
enable = true;
includes = [
config.sops.secrets."ssh/secret-config".path
"${config.home.homeDirectory}/.ssh/mutable_config"
];
controlMaster = "auto";
controlPersist = "10m";
controlPath = "${controlMastersDir}/%n%C";
};
systemd.user.tmpfiles.settings."10-ssh" = {
${controlMastersDir}.d = {
user = config.home.username;
mode = "0700";
sops.secrets."ssh/secret-config" = {
mode = "0444";
};
"${config.home.homeDirectory}/.ssh/mutable_config".f = {
user = config.home.username;
mode = "0600";
programs.ssh = {
includes = [
config.sops.secrets."ssh/secret-config".path
"${config.home.homeDirectory}/.ssh/mutable_config"
];
enableDefaultConfig = false;
matchBlocks."*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
# controlPersist = "10m";
controlPersist = "no";
controlMaster = "auto";
controlPath = "${controlMastersDir}/%n%C";
};
};
systemd.user.tmpfiles.settings."10-ssh" = {
${controlMastersDir}.d = {
user = config.home.username;
mode = "0700";
};
"${config.home.homeDirectory}/.ssh/mutable_config".f = {
user = config.home.username;
mode = "0600";
};
};
};
}

View File

@@ -0,0 +1,25 @@
{ lib, ... }:
let
default = {
user = "oysteikt";
identityFile = [ "~/.ssh/id_ed25519" ];
};
in
{
programs.ssh.matchBlocks = {
"io" = default // {
hostname = "io.kuis.kyoto-u.ac.jp";
# SOCKS proxy for access to internal web.
dynamicForwards = [{ port = 8080; }];
};
} // (lib.genAttrs [
"argo"
"procyon"
"apus"
"vega"
"leo"
] (name: default // {
hostname = "${name}.fos.kuis.kyoto-u.ac.jp";
proxyJump = "io";
}));
}

View File

@@ -11,17 +11,6 @@
hostname = "github.com";
identityFile = [ "~/.ssh/id_rsa" ];
};
"github-nordicsemi" = {
user = "git";
hostname = "github.com";
identityFile = [ "~/.ssh/id_ed25519_nordicsemi" ];
};
"bitbucket-nordicsemi" = {
user = "git";
hostname = "bitbucket.nordicsemi.no";
port = 7999;
identityFile = [ "~/.ssh/id_ed25519_nordicsemi" ];
};
"gitlab.stud.idi.ntnu.no" = {
user = "git";
proxyJump = "pvv";

View File

@@ -11,19 +11,26 @@ let # http://www.pvv.ntnu.no/pvv/Maskiner
proxyJump = lib.mkDefault null;
addressFamily = "inet";
}
"bakke"
[ "bekkalokk" "pvv-web" "pvv-wiki" "pvv-webmail" ]
[ "bicep" "pvv-databases" ]
"bikkje"
"bob"
[ "brzeczyszczykiewicz" "brez" "bokhylle" ]
"buskerud"
"dagali"
"demiurgen"
"eirin"
"georg"
"gluttony"
"ildkule"
"isvegg"
"knutsen"
"kommode"
"lupine-1"
"lupine-2"
"lupine-3"
"lupine-4"
"lupine-5"
{
names = [ "microbel" "pvv-users" "pvv-mail" ];
proxyJump = lib.mkDefault null;
@@ -31,10 +38,14 @@ let # http://www.pvv.ntnu.no/pvv/Maskiner
}
"orchid"
"shark"
"skrott"
"tallulah"
"temmie"
"tom"
"ustetind"
"venture"
"wenche"
"wegonke"
];
rootMachines = [
@@ -48,6 +59,11 @@ let # http://www.pvv.ntnu.no/pvv/Maskiner
names = [ "sleipner" "pvv-salt" ];
user = "oysteikt/admin";
}
"buskerud"
"smask"
[ "blossom" "powerpuff1" "powerpuff" ]
[ "bubbles" "powerpuff2" ]
[ "buttercup" "powerpuff3" ]
];
overrideIfNotExists = b: a: a // (builtins.removeAttrs b (builtins.attrNames a));

View File

@@ -1,7 +1,9 @@
{ pkgs, ... }:
{
{ config, lib, pkgs, ... }:
let
cfg = config.programs.taskwarrior;
in
lib.mkIf cfg.enable {
programs.taskwarrior = {
enable = true;
package = pkgs.taskwarrior3;
config = rec {
report.minimal.filter = "(status:pending or status:waiting)";

View File

@@ -1,5 +1,8 @@
{ pkgs, lib, ... }:
{
{ config, pkgs, lib, ... }:
let
cfg = config.programs.tealdeer;
in
lib.mkIf cfg.enable {
systemd.user.services.update-tldr-db = {
Unit = {
Description = "Update tealdeer database";

View File

@@ -4,5 +4,5 @@
./auto-update-tldr-db.nix
];
programs.tealdeer.enable = true;
programs.tealdeer = { };
}

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