Compare commits

...
Sign in to create a new pull request.

204 commits

Author SHA1 Message Date
Stefan Schwarz
b104bba6f2 up 2025-05-06 12:46:51 +02:00
Stefan Schwarz
aaf916de75 fix 2025-01-20 09:03:31 +01:00
Stefan Schwarz
359b7cf8d0 up 2024-11-15 11:05:08 +01:00
Stefan Schwarz
599d34d9cb updates 2024-10-08 13:06:54 +02:00
Stefan Schwarz
2a39913fde feat: remove unused helm2 2024-04-22 08:40:54 +02:00
Stefan Schwarz
3e522cebfd up 2024-03-15 11:16:02 +01:00
Stefan Schwarz
44ed4f7a5c fix lorri confi 2024-03-15 11:15:51 +01:00
Stefan Schwarz
5446d3aace libvirt uefi
still not working
2024-03-15 11:15:40 +01:00
Stefan Schwarz
6a911794f1 switch notify daemon 2024-03-15 11:15:14 +01:00
Stefan Schwarz
4eb2a0dd1b fix(nagstamon): working on wayland 2024-01-03 16:48:00 +01:00
Stefan Schwarz
d492658ecc fix(slack): enable screenshare 2024-01-03 16:20:44 +01:00
Stefan Schwarz
ddf25a45b0 fix nixos 23.11 2024-01-03 16:20:36 +01:00
Stefan Schwarz
49ae5f3981 work 2024-01-03 15:26:33 +01:00
Stefan Schwarz
698e0b6ec2 feat(kubectx): test kubectl 2023-03-24 08:46:34 +01:00
Stefan Schwarz
2622bdb144 feat(yubikey): add support 2023-03-24 08:44:56 +01:00
Stefan Schwarz
210bc59571 feat(wezterm): add wezterm 2023-03-24 08:44:33 +01:00
Stefan Schwarz
a4bff2a186 feat(sway): lightmode 2023-03-24 08:44:05 +01:00
Stefan Schwarz
18902b41c3 chore: remove x 2023-03-03 10:38:23 +01:00
Stefan Schwarz
c426807bce fix(configuration): allow broken kerberos package 2023-03-03 10:35:53 +01:00
Stefan Schwarz
2660ebc7af feat(desktop): desktop changes 2023-03-03 10:35:35 +01:00
Stefan Schwarz
58a0d3f1d8 feat(admin): add nmap and ipcalc 2023-03-03 10:35:21 +01:00
Stefan Schwarz
e361a43b48 feat(golang): update to 1.19 2023-03-03 10:34:48 +01:00
Stefan Schwarz
f8690d90e6 feat(network): add openconnect vpn support 2023-03-03 10:34:23 +01:00
Stefan Schwarz
959c3c0fe9 feat(work): add google cloud sdk plugins 2023-03-03 10:34:11 +01:00
Stefan Schwarz
f40031327f fix(nagstamon): fix package and update to 3.10 2023-03-03 10:33:39 +01:00
Stefan Schwarz
b528bbd88f feat(hardware): framework 2023-03-03 10:33:29 +01:00
Stefan Schwarz
0d4265f5f1 feat(alacritty): smaller fontsize 2023-03-03 10:33:20 +01:00
Stefan Schwarz
5f1cd851b9 fix(status): use correct battery number for framework 2023-03-03 10:33:08 +01:00
Stefan Schwarz
458ce0ccf6 fix(sway): remove cursor theme resetting (breaks it) 2023-03-03 10:32:53 +01:00
Stefan Schwarz
ed4af6d356 fix(sway): keybindings 2023-02-20 10:55:34 +01:00
Stefan Schwarz
b4a40fa36d feat(wallpaper): fix wallpaper 2023-02-20 10:55:17 +01:00
75289b6cd3 x 2022-09-30 09:41:10 +02:00
efab382ce2 use always latest pyright
required for up2date with python
2022-08-12 08:19:33 +02:00
e92cf8f9cd ignore dupes and leading spaces in bash history 2022-08-12 08:19:17 +02:00
937bf0572e add memcache support to python 2022-08-04 10:07:33 +02:00
47b85bcad9 add terraform language server 2022-08-01 15:43:39 +02:00
665f3d1b76 add terraform to default setup 2022-08-01 15:43:04 +02:00
788f405ed4 remove kerberos from nagstamon 2022-07-13 08:39:02 +02:00
cfd000a8e7 Revert "remove i3config"
This reverts commit 9d44ab40b1.
2022-06-28 19:02:12 +02:00
820e327ea3 install ferdi for slack 2022-06-28 19:02:12 +02:00
3efdeb2f4d use stable keepassxc
unstable wont start on wayland
2022-06-02 17:10:03 +02:00
46d58735cc nixos 22.05 fixes 2022-06-02 10:59:21 +02:00
125c5fe0a5 use latest kernel 2022-06-02 10:58:48 +02:00
125778ba15 start cloudstation on work machine 2022-06-02 10:58:26 +02:00
91d385c417 remove redshift (22.05) 2022-06-02 10:58:14 +02:00
191ce8ed67 fix typo 2022-06-02 10:58:07 +02:00
0cac1911ce add restic to base packages 2022-05-02 11:17:04 +02:00
78094a6118 use stable alacritty 2022-05-02 08:34:47 +02:00
3299de933c update for nixpkgs 2022-04-06 13:26:10 +02:00
1c594a1a0b update nagstamon to 3.8 2022-04-06 12:11:10 +02:00
a9be78fd11 fix thunderbird starting firefox remotely 2022-04-05 16:02:40 +02:00
17838d5715 update to latest go 2022-04-04 11:48:50 +02:00
4446e0c151 add alias for docker-compose 2022-04-04 11:48:43 +02:00
f03c408d70 add umlaut layer with wtype 2022-03-21 13:48:10 +01:00
8b6b8f07ff fix cloudstation startup 2022-03-21 13:47:46 +01:00
ffb330106c fix battery default icon 2022-03-03 14:19:37 +01:00
140df0d258 allow systemd user services to access keyring 2022-03-03 14:19:37 +01:00
437196a6e0 fix current alacritty version 2022-03-03 14:19:37 +01:00
b8273ae550 document sections 2022-03-03 14:19:37 +01:00
eb792b55e5 cleanup private config 2022-02-26 02:17:36 +01:00
490ac47d46 cleanup private config 2022-02-26 02:15:47 +01:00
e19e87289f fix qt5 styles 2022-02-26 02:15:19 +01:00
0856dd6118 fix vim fzf 2022-02-26 02:14:17 +01:00
0b615ebd34 fix notcoal package 2022-02-26 02:13:40 +01:00
b30e69334a fix alacritty opacity 2022-02-14 08:57:43 +01:00
2e10a00830 nixfmt 2022-02-13 00:31:58 +01:00
4146b5aece reice a lot 2022-02-13 00:28:15 +01:00
beb7d2def1 a little ricing 2022-02-12 20:52:20 +01:00
448da283ee cleanup i3status rust 2022-02-12 01:06:57 +01:00
b907855018 cleanup font handling 2022-02-12 01:06:27 +01:00
c4739ab3fb skip 32 bit 2022-02-11 18:02:58 +01:00
b97933df7e add lorri gfvs 2022-02-11 18:02:58 +01:00
5ace716b24 add certmanager 2022-02-11 16:10:17 +01:00
b2a8623e5f fix emacs fonts 2022-02-11 13:48:32 +01:00
69459cf910 auto garbage collect 2022-01-31 14:44:15 +01:00
0ff07ffde9 better locales 2022-01-31 14:05:28 +01:00
ba1a15b953 kind is nice for local testing 2022-01-31 14:05:28 +01:00
a71dd12124 group autostarts 2022-01-31 14:05:27 +01:00
00b092d396 add quick calculators 2022-01-31 14:05:27 +01:00
091ebc9424 add work monitor via name 2022-01-31 14:03:22 +01:00
3f34e58a84 use zfs features in docker 2022-01-22 15:33:38 +01:00
a1710f0f8f update hosts 2022-01-03 16:10:44 +01:00
3c8239a55f vim & zoxide 2022-01-03 16:10:44 +01:00
135c93c226 keepass and clipboard history 2022-01-03 16:10:44 +01:00
c8a58b150e fix home screen resolution 2022-01-03 16:10:44 +01:00
4b20513a86 desktop config 2021-12-19 17:16:19 +01:00
21e353adcc add nnn 2021-12-07 14:14:47 +01:00
447aeca1ed fix stdenv deprications 2021-12-06 14:53:12 +01:00
4d99a375f0 add lazygit 2021-11-12 22:55:20 +01:00
77d8dd3d9a fwupd 2021-11-12 22:46:50 +01:00
d10bad91b8 x220 zfs rename 2021-11-12 22:46:42 +01:00
e4a06a40d4 add user stefan to input group 2021-10-27 19:29:14 +02:00
b3e03b3cc4 set vision14 keyboard to german 2021-10-11 07:52:07 +02:00
c87e02acba rename zfs to not conflict with work 2021-10-08 00:34:20 +02:00
1866ce4ea9 tuxedo control center working (only 1.0.14) 2021-10-08 00:34:20 +02:00
c305b70f83 wip multitouch gestures 2021-10-08 00:34:20 +02:00
9cd555cfc9 fix polkit 2021-10-08 00:34:20 +02:00
0ee4a2f862 cleanup wallpaper handling 2021-10-08 00:34:20 +02:00
984ec393aa use functions instead of aliases for vsink 2021-10-07 14:58:22 +02:00
de4fafc2e2 add initial vision14 hw and kernel module 2021-10-06 00:30:20 +02:00
bab83119cc add wdisplays for graphical display management 2021-10-04 10:33:14 +02:00
dc3064b545 use unstable alias for astroid 2021-10-04 10:31:35 +02:00
9deaa5ff53 set default sample-rate to 48khz 2021-10-04 10:31:35 +02:00
edae67a33a vsink alias for values sink in helm 2021-10-04 10:31:35 +02:00
3f022996ae k = kubectl alias 2021-10-04 10:31:35 +02:00
9f948b954b auto-update nixos 2021-10-04 10:31:35 +02:00
8b27c46829 use python 3.8 for nagstamon 2021-10-04 10:31:35 +02:00
6c8b927277 add black for autoformating python documents 2021-09-16 20:44:47 +02:00
5f71c6b1b7 install kubeseal 2021-09-16 20:44:47 +02:00
8f919c7ad9 thunderbird is nice to have 2021-08-17 14:58:09 +02:00
c733471a49 fix borken starship config 2021-08-17 14:57:49 +02:00
4315356f37 readd black for python 2021-08-17 14:57:32 +02:00
d8189922f6 add cli syncing of calendars 2021-08-17 14:57:16 +02:00
e88bd2f565 fix obs for current nixos release 2021-08-12 20:35:32 +02:00
43f1e60f41 add some 3d packages 2021-08-12 20:31:05 +02:00
9d44ab40b1 remove i3config 2021-08-12 20:31:05 +02:00
7482d92923 Revert "remove bazel"
This reverts commit 3733a42641a6e9ac3e031b5184247eecc1d10f34.
2021-08-12 20:31:04 +02:00
da350e3e7c remove bazel 2021-08-12 20:30:21 +02:00
b428dcad09 add ntfs support 2021-08-12 20:29:05 +02:00
263638210a use stable kernel for zfs compatibility 2021-08-12 20:29:05 +02:00
f3f41f2246 move gvfs to base 2021-08-06 08:48:32 +02:00
a8264c3573 add dog dns 2021-08-05 15:35:43 +02:00
3e3a3a291a cleanup packages and work updates 2021-08-03 17:22:30 +02:00
6e6b8224b0 set audio to 44.1kHz 2021-08-03 17:21:37 +02:00
7c424815bc try fixing polkit 2021-08-03 17:20:40 +02:00
61454f6d0a cleanup cloudstation package 2021-08-03 17:02:43 +02:00
f75cf9bfa9 update cloudstation 2021-08-03 11:30:29 +02:00
b8c0044faa new dev dependencies 2021-07-08 09:59:41 +02:00
96c68a9e64 add k9s 2021-06-28 11:10:24 +02:00
c7e1cbe68b add libvirt 2021-06-28 11:09:44 +02:00
d0e007cd28 use firefox-wayland 2021-06-09 12:03:03 +02:00
6f711ca783 use python 3.9 for nagstamon 2021-06-09 12:02:45 +02:00
45e3a8d1cd pipewire switch 2021-06-08 10:22:54 +02:00
c9e7e0e77b fixes for nixos 21.05 2021-06-01 11:59:16 +02:00
330f6a2dad update to nixos 21.05 2021-06-01 11:18:32 +02:00
7d9fd562b6 alias for docker 2021-05-27 17:24:29 +02:00
eca605ab4f update nagstamon 2021-05-27 17:23:50 +02:00
a5f1d145d7 add cli jira client 2021-04-07 11:16:23 +02:00
5bbf694533 use alacritty unstable for mode indicator 2021-04-07 11:16:08 +02:00
caa16b9b5e more fonts 2021-04-07 11:14:43 +02:00
6de34eecea add alias for vault sink 2021-03-30 17:31:45 +02:00
71d2575ea8 use dynamic ssh agent 2021-03-30 17:31:25 +02:00
a31009b178 add docker compose 2021-03-30 17:31:13 +02:00
3c3b54c80c add mariadb-client to dev role 2021-02-17 10:37:45 +01:00
bf5e357930 fix openshift packages 2021-02-17 10:37:24 +01:00
d453e0fafd more software is more 2021-02-03 11:47:11 +01:00
e56b4f36ea migrate from podman to docker 2021-02-03 11:46:33 +01:00
7e711adeaf add qemu support 2021-01-26 14:32:45 +01:00
46a579dd50 update nagstamon 2021-01-26 14:32:31 +01:00
9faf7d4678 add shellcheck 2021-01-13 17:04:25 +01:00
74df467f4f support for forcusrite interface 2021-01-13 17:04:25 +01:00
972cda3dd2 add esphome 2021-01-08 16:35:51 +01:00
0d2145b8da add msdns 2021-01-08 16:35:01 +01:00
9801646710 add ydotool 2021-01-08 16:34:46 +01:00
71463342a4 obs and steam 2021-01-05 21:52:32 +01:00
7eee0503d5 floating firefox windows 2021-01-05 21:52:16 +01:00
27949605a6 add code action keybinding 2021-01-05 21:51:50 +01:00
5fb2d57754 fix python environment 2021-01-05 12:47:51 +01:00
5b3fee0d47 add helm2 2021-01-05 12:43:37 +01:00
fc72eed505 readd add lid switch 2021-01-05 12:42:53 +01:00
b92ad8584c fix cpu performance 2021-01-05 12:42:08 +01:00
d66e2900ee update skaffold 2021-01-05 12:41:39 +01:00
de2c484d2e add vault-sink 2020-11-30 12:03:11 +01:00
c4886b737e upgrade to python38 2020-11-30 12:02:42 +01:00
a7b12d2e18 add volman 2020-11-30 12:02:18 +01:00
1b91e430a2 solve keyboard issues 2020-11-18 16:45:59 +01:00
8625bae15e add ispell 2020-11-18 15:11:25 +01:00
d8784d4da5 add discord for devcamp 2020-11-09 11:29:19 +01:00
115596f2a2 add govc for vmware cli 2020-11-09 11:29:09 +01:00
0419f1b25c setup aliases 2020-11-09 11:28:49 +01:00
705464fd6d add dnsutils for dig 2020-11-09 11:28:40 +01:00
af10b49f39 add zfs auto snapshop 2020-11-03 17:48:17 +01:00
b44f659e96 update podman config for 20.09 2020-11-03 17:47:39 +01:00
3304bb3533 add argocd 2020-11-03 17:47:18 +01:00
cd1736f899 stm32 debugging 2020-10-31 11:45:30 +01:00
882f45a1d6 add mpv 2020-10-31 11:45:19 +01:00
d073ec8714 colors 2020-10-28 23:39:54 +01:00
c8b176751f more env 2020-10-28 22:50:27 +01:00
3b58151811 add thunar (works in 20.09) 2020-10-28 22:50:12 +01:00
745f613755 use systemd automount 2020-10-28 22:49:45 +01:00
c2406e4c7c use stable pkgs on nixos 20.09 2020-10-28 22:49:09 +01:00
56ab58a2ef add pwgen vault file and manix 2020-10-28 18:20:30 +01:00
b7545ff155 add mtr and nload for network checks 2020-10-27 16:32:33 +01:00
e037439611 use internal hostname for mon to work with vpn 2020-10-27 16:31:01 +01:00
364356c26e add tools for webcam based streaming 2020-10-27 16:31:01 +01:00
33e2dd9842 add kustomize 2020-10-27 16:31:01 +01:00
eab89a1e2f add bolt for thunderbold docking 2020-10-27 16:31:01 +01:00
b3cf816738 add video accelleration 2020-10-27 16:31:01 +01:00
c5b592afb3 add missing tools 2020-10-24 16:15:51 +02:00
de97a020a1 rename private stuff 2020-10-24 16:15:51 +02:00
620762f078 remove systemd managed nic 2020-10-21 11:36:10 +02:00
8327fd061b fix build flags 2020-10-21 11:35:41 +02:00
c65b69115c add mail sending support 2020-10-20 11:45:31 +02:00
ab9535556b add bluetooth support 2020-10-20 11:44:51 +02:00
91a4d2a516 add pv and sysstat 2020-10-20 11:35:15 +02:00
7e3f939ed3 add whois 2020-10-20 11:35:15 +02:00
b7f5317e76 update microcode 2020-10-13 15:08:05 +02:00
d39c1a3622 dirty fix for cloudstation 2020-10-12 08:46:48 +02:00
0f390344df add notcoal (wip) 2020-10-12 08:13:27 +02:00
066c275cba add google cloud sdk 2020-10-12 08:13:27 +02:00
9308bc4aba scale lockscreen 2020-10-09 10:08:10 +02:00
3fb358bacc initial discovery configuration 2020-10-08 22:19:45 +02:00
f8922c1cbd use unstable syncthing 2020-10-08 22:14:59 +02:00
1db3202ba6 update starship config 2020-10-08 22:12:22 +02:00
42 changed files with 15807 additions and 500 deletions

View file

@ -5,18 +5,22 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[ # custom modules
./modules/colors.nix
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
# roles
./roles/admin.nix ./roles/admin.nix
./roles/base.nix ./roles/base.nix
./roles/desktop.nix ./roles/desktop.nix
./roles/dev.nix ./roles/dev.nix
./roles/mail.nix ./roles/mail.nix
./roles/vpn.nix
./roles/network.nix ./roles/network.nix
./roles/nix.nix
./roles/vpn.nix
./roles/work.nix ./roles/work.nix
]; ];
@ -26,12 +30,16 @@
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
services.openssh.enable = true; services.openssh.enable = true;
networking.firewall.enable = true; networking.firewall.enable = true;
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"openssl-1.0.2u" "openssl-1.0.2u"
"python3.10-kerberos-1.3.1"
]; ];
# removed for mobile working
# system.autoUpgrade.enable = true;
system.stateVersion = "20.03"; # We can stay here system.stateVersion = "20.03"; # We can stay here
} }

View file

@ -1,37 +1,38 @@
font: font:
normal: normal:
family: Cascadia Code family: CaskaydiaCove Nerd Font
size: 12 size: 8
background_opacity: 0.9
draw_bold_text_with_bright_colors: true draw_bold_text_with_bright_colors: true
colors: colors:
primary: primary:
background: "0x2D2A2E" background: '0xf8f8f8'
foreground: "0xFCFCFA" foreground: '0x2a2b33'
normal: normal:
black: "0x2d2a2e" black: '0x000000'
red: "0xcc6666" red: '0xde3d35'
green: "0xa9dc76" green: '0x3e953a'
yellow: "0xffd866" yellow: '0xd2b67b'
blue: "0x78dce8" blue: '0x2f5af3'
magenta: "0xff6181" magenta: '0xa00095'
cyan: "0x55dbbe" cyan: '0x3e953a'
white: "0xd6d6d6" white: '0xbbbbbb'
bright: bright:
black: "0x757878" black: '0x000000'
red: "0xcc6666" red: '0xde3d35'
green: "0xa9dc76" green: '0x3e953a'
yellow: "0xffd866" yellow: '0xd2b67b'
blue: "0x78dce8" blue: '0x2f5af3'
magenta: "0xff6181" magenta: '0xa00095'
cyan: "0x55dbbe" cyan: '0x3e953a'
white: "0xd6d6d6" white: '0xffffff'
window: window:
dynamic_title: true dynamic_title: true
opacity: 0.9
env: env:
TERM: xterm-256color TERM: xterm-256color

View file

@ -1,28 +1,30 @@
add_newline = false add_newline = false
prompt_order = [ format = """
"username", $username\
"hostname", $hostname\
"kubernetes", $kubernetes\
"directory", $directory\
"git_branch", $git_branch\
"git_commit", $git_commit\
"git_state", $git_state\
"git_status", $git_status\
"nix_shell", $nix_shell\
"cmd_duration", $cmd_duration\
"custom", $custom\
"line_break", $line_break\
"jobs", $jobs\
"battery", $battery\
"character", $character\
] """
[username] [username]
show_always = true show_always = true
format = "[$user]($style)@"
[hostname] [hostname]
ssh_only = false ssh_only = false
format = "[$hostname]($style) "
[character] [git_branch]
use_symbol_for_status = false format = "[$symbol$branch]($style)"

View file

@ -1,29 +1,48 @@
# colors
set $black #000000
set $red #e75544
set $cyan #3c74f6
set $white #fafafa
set $yellow #908550
set $violet #a73ca6
#set $black2 #323232
set $white2 #f0f0f0
# config # config
set $mod Mod1 set $mod Mod1
set $left h set $left h
set $down j set $down j
set $up k set $up k
set $right l set $right l
#set $term wezterm
set $term alacritty set $term alacritty
set $wallpaper /home/stefan/wall.png
# echo -- bemenu -H 23 -b -p run --{ff,nf}=#eeeeeee --{tf,hf}=#78dce8 --{tb,fb,nb,hb,sb}=#2d2a2e set $lock swaylock -t -i $wallpaper --scaling=fill
set $font CaskaydiaCove Nerd Font 10
set $menu bemenu-run -H 23 -b -p run \ set $menucolor -H 23 -b \
--ff=#eeeeeee \ --tf=$white --tb=$cyan \
--nf=#eeeeeee \ --ff=$black --fb=$white \
--tf=#78dce8 \ --cf=$cyan --cb=$white \
--hf=#78dce8 \ --nf=$black --nb=$white \
--tb=#2d2a2e \ --af=$black --ab=$white2 \
--fb=#2d2a2e \ --hf=$white --hb=$cyan \
--nb=#2d2a2e \ --sf=$white --sb=$cyan
--hb=#2d2a2e \ set $menu bemenu-run -p run $menucolor
--sb=#2d2a2e set $otpmenu ykman oath accounts code -s "$(ykman oath accounts list | bemenu -i $menucolor)" | wl-copy
font $font
input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de
input "0:0:TUXEDO_Keyboard" xkb_layout de
input 1130:35:HID_046a:0023 xkb_layout de
input "2362:628:PIXA3854:00_093A:0274_Touchpad" click_method clickfinger
input * xkb_options compose:paus
output * bg /home/stefan/Downloads/bg.jpg fill output * bg $wallpaper fill
#output * bg /home/stefan/Sync/wall/nasa-yZygONrUBe8-unsplash.jpg fill output "BenQ Corporation BenQ SW2700 83H03922SL0" res --custom 2560x1440@60Hz
output DP-1 res 5120x1440 output "BenQ Corporation BenQ SW2700 83H03922SL0" pos 1440 720
output "BNQ BenQ PD2705Q W4N00777019" pos 0 0
output "Dell Inc. Dell U4919DW HZVZWP2" res 5120x1440
output eDP-1 scale 1.25
# user keybinds # user keybinds
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
@ -32,42 +51,31 @@ bindsym $mod+d exec $menu
floating_modifier $mod normal floating_modifier $mod normal
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym $mod+Shift+p exec keepassxc bindsym $mod+o exec keepassxc
bindsym $mod+z exec swaylock -t -i /home/stefan/Downloads/bg.jpg bindsym $mod+Shift+o exec $otpmenu
bindsym $mod+z exec $lock
bindsym $mod+Up exec light -A 5 bindsym $mod+Up exec light -A 5
bindsym $mod+Down exec light -U 5 bindsym $mod+Down exec light -U 5
bindsym $mod+c exec alacritty --class float -t pyCalc -e python
bindsym $mod+i exec alacritty --class float -t numbat -e numbat
bindsym $mod+m exec swayr switch-to
bindsym $mod+n exec emacsclient -cn
bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png
bindswitch --reload --locked lid:on output eDP-1 disable
bindswitch --reload --locked lid:off output eDP-1 enable
# app rules # app rules
for_window [app_id="org.keepassxc.KeePassXC"] floating enable for_window [app_id="org.keepassxc.KeePassXC"] floating enable
for_window [title="Firefox — Sharing Indicator"] floating enable
for_window [title="Picture-in-Picture"] floating enable
for_window [title="pyCalc"] floating enable
for_window [title="numbat"] floating enable
# font # border backgnd text indicator childborder
font Cascadia Code 10 client.focused $cyan $white $black $violet $cyan
client.focused_inactive $white2 $white2 $black $white2 $white
# colors client.unfocused $white2 $white2 $black $white2 $white
set $black #2d2a2e client.urgent $red $red $white $white2 $black
set $base00 #2d2a2e
set $base01 #cc6666
set $base02 #a9dc76
set $base03 #ffd866
set $base04 #78dce8
set $base05 #55dbbe
set $base06 #ff6181
set $base07 #eeeeee
set $base08 #323232
set $base09 #cc6666
set $base0A #ffd866
set $base0B #78dce8
set $base0C #55dbbe
set $base0D #ff6181
set $base0E #a6dc76
set $base0F #ffffff
# border background text indicator
client.focused $base04 $base00 $base07 $base04 $base04
client.focused_inactive $base00 $base00 $base07 $base00 $base00
client.unfocused $black $black $base07 $base00 $base00
client.urgent $base01 $base01 $base00 $base08 $base07
# movement # movement
@ -124,32 +132,56 @@ mode "resize" {
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
mode "umlaut" {
bindsym s exec wtype ß
bindsym a exec wtype ä
bindsym o exec wtype ö
bindsym u exec wtype ü
bindsym Shift+a exec wtype Ä
bindsym Shift+o exec wtype Ö
bindsym Shift+u exec wtype Ü
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+u mode "umlaut"
bar { bar {
font $font
position bottom position bottom
colors { colors {
background $black background $white
statusline $base07 statusline $black
separator $base04 separator $cyan
# border back text # border back text
focused_workspace $base04 $base04 $base00 focused_workspace $cyan $cyan $white
active_workspace $base04 $base04 $base00 active_workspace $cyan $cyan $white
urgent_workspace $base01 $base01 $base07 urgent_workspace $red $red $black
inactive_workspace $base00 $base00 $base07 inactive_workspace $white $white $black
} }
status_command i3status-rs /etc/sway/status.toml status_command i3status-rs /etc/sway/status.toml
} }
include /etc/sway/config.d/*
exec mako --border-color=#cc6666 \
--background-color=#2d2a2eee
exec emacs --daemon
set $gnome-schema org.gnome.desktop.interface set $gnome-schema org.gnome.desktop.interface
exec_always { exec_always {
gsettings set $gnome-schema gtk-theme 'Arc-Dark' gsettings set $gnome-schema cursor-theme Adwaita
gsettings set $gnome-schema icon-theme 'elementary Xfce' gsettings set $gnome-schema icon-theme 'capitaine-cursors-white'
gsettings set $gnome-schema cursor-theme 'Capitaine Cursors - White' gsettings set $gnome-schema cursor-theme 'capitaine-cursors-white'
} }
# autostarts
exec swaync
exec emacs --daemon
exec swayidle before-sleep "$lock"
exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1
exec systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
exec bash -c '[ "$HOSTNAME" == sphere ] && cloudstation'
exec swayrd
exec xinput set-prop "PIXA3854:00 093A:0274 Touchpad" 365 1
# pastebin
exec wl-paste --primary -t text --watch clipman store
bindsym $mod+p exec clipman pick -t "bemenu" --tool-args='-b --fn "$font" -l 10 $menucolor'

View file

@ -1,66 +1,61 @@
[theme] [theme]
name = "plain" theme = "plain"
[theme.overrides] [theme.overrides]
idle_bg = "#2d2a2e" idle_bg = "#fafafa"
idle_fg = "#eeeeee" idle_fg = "#000000"
info_bg = "#2d2a2e" info_bg = "#fafafa"
info_fg = "#eeeeee" info_fg = "#000000"
good_bg = "#2d2a2e" good_bg = "#fafafa"
good_fg = "#a9dc76" good_fg = "#000000"
warning_bg = "#2d2a2e" warning_bg = "#fafafa"
warning_fg = "#ffd866" warning_fg = "#908550"
critical_bg = "#2a2e38" critical_bg = "#fafafa"
critical_fg = "#ff665c" critical_fg = "#e75544"
separator_bg = "#2d2a2e" separator_bg = "#fafafa"
separator_fg = "#555555" separator_fg = "#3c74f6"
separator = "|" separator = "|"
[icons] [icons]
name = "none" icons = "none"
[icons.overrides] [icons.overrides]
bat = "  " backlight = [
bat_full = "  " "󰌶",
bat_charging = "   " "󱩏",
bat_discharging = "  " "󱩒",
backlight_empty = "  " "󱩕",
backlight_partial1 = "  " "󰛨",
backlight_partial2 = "  " ]
backlight_partial3 = "  " bat = [
backlight_full = "  " "󱃍 ",
volume_full = "  " "󰁻",
volume_half = "  " "󰁾",
volume_empty = "  " "󰂁",
volume_muted= "MUTE" "󰁹",
cogs = "  " ]
memory_mem = "  " bat_charging = ""
cogs = ""
disk_drive = "󱛟"
headphones = "  " headphones = "  "
net_wireless = " " memory_mem = "󰍛"
net_down = "󰅛"
net_up = "󰱓"
net_vpn = " " net_vpn = " "
net_wired = "" net_wired = ""
net_up = "UP" net_wireless = " 󰖩"
net_down = "DOWN" thermometer = " 󰔏 "
thermometer = "  " time = "󰥔"
volume_muted = "󰖁 MUTE"
volume = [
"",
"󰕾",
"",
]
[[block]] [[block]]
block = "net" block = "net"
device = "wg" device = "wlp166s0"
ip = true format = " $icon $ip$frequency "
ssid = false
speed_up = false
speed_down = false
hide_inactive = true
hide_missing = true
[[block]]
block = "net"
device = "wlo1"
ip = true
ssid = true
speed_up = false
speed_down = false
hide_inactive = true
hide_missing = true
[[block]] [[block]]
block = "custom" block = "custom"
@ -69,23 +64,20 @@ command = '''echo " $(cat /sys/class/thermal/thermal_zone0/temp | head -c 2)
[[block]] [[block]]
block = "disk_space" block = "disk_space"
path = "/" path = "/"
alias = " /"
info_type = "available" info_type = "available"
unit = "GB" format = " $icon $available "
interval = 20 interval = 20
warning = 20.0 warning = 20.0
alert = 10.0 alert = 10.0
[[block]] [[block]]
block = "memory" block = "memory"
display_type = "memory" format = " $icon $mem_used/$mem_total "
format_mem = "{Mup}%"
clickable = false
[[block]] [[block]]
block = "load" block = "load"
interval = 1 interval = 1
format = "{1m}" format = " $icon $1m "
[[block]] [[block]]
block = "sound" block = "sound"
@ -96,11 +88,23 @@ block = "backlight"
[[block]] [[block]]
block = "battery" block = "battery"
device = "BAT0" device = "BAT1"
interval = 10 interval = 10
format = "{percentage}% {time}" format = " $icon $percentage ($time) "
full_format = " $icon $percentage "
[[block]] [[block]]
block = "time" block = "time"
interval = 60 interval = 60
format = "%Y-%m-%d %H:%M" format = " $timestamp.datetime(f:'%Y-%m-%d %H:%M') "
[[block]]
block = "notify"
driver = "swaync"
format = " $icon {($notification_count.eng(w:1)) |}"
[[block.click]]
button = "left"
action = "show"
[[block.click]]
button = "right"
action = "toggle_paused"

39
dotfiles/wezterm.lua Normal file
View file

@ -0,0 +1,39 @@
local wezterm = require 'wezterm';
return {
audible_bell = "Disabled",
bold_brightens_ansi_colors = true,
color_scheme = "One Light (base16)",
enable_tab_bar = false,
enable_wayland = true,
font_size = 12,
font = wezterm.font("CaskaydiaCove Nerd Font"),
window_background_opacity = 0.97,
window_close_confirmation = 'NeverPrompt',
default_prog = { '/run/current-system/sw/bin/bash' },
keys = {
{
key = 'Escape',
mods = 'CTRL',
action = wezterm.action.QuickSelect,
},
},
window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
},
quick_select_patterns = {
'^([^ ]+) +(?:ClusterIP|Bound)',
'^([^ ]+) +(?:[0-9]+/[0-9]+)',
'^([^ ]+) +(?:[0-9]+ )',
'^([^ ]+) +(?:Opaque|kubernetes\\.io|helm\\.sh)',
'^([^ ]+) +(?:Active)',
'[^ ]+@[^ ]+.service',
'git push.*',
},
}

42
hardware/desktop.nix Normal file
View file

@ -0,0 +1,42 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
in {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "tank/root/nixos";
fsType = "zfs";
};
fileSystems."/home" = {
device = "tank/root/home";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/587C-36F9";
fsType = "vfat";
};
swapDevices = [ ];
# custom
boot.extraModprobeConfig = ''
options snd_usb_audio device_setup=1
'';
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
networking.hostId = "ef3a5d57";
networking.hostName = "home";
hardware.opengl.enable = true;
}

83
hardware/framework.nix Normal file
View file

@ -0,0 +1,83 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
let
#nixkernel = import <nixos-kernel> {};
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "uas" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "i915" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "workpool/nixos/root";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "workpool/nixos/home";
fsType = "zfs";
};
fileSystems."/var/lib/docker" =
{ device = "workpool/nixos/docker";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AA17-42AD";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/18ae41eb-e32e-46a3-9e22-3395c37782df"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# custom
boot.loader.systemd-boot.enable = true;
networking.hostId = "f0000001";
networking.hostName = "sphere";
services.tlp.enable = true;
services.hardware.bolt.enable = true;
# framework hardware
#boot.kernelPackages = nixkernel.linuxPackages_5_19;
#boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.kernelParams = [
"nvme.noacpi=1"
"i915.enable_psr=1"
];
boot.blacklistedKernelModules = [ "hid-sensor-hub" ];
hardware.acpilight.enable = true;
services.xserver.dpi = 125;
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
};
hardware.graphics.extraPackages = with pkgs; [
vaapiIntel
libvdpau-va-gl
intel-media-driver
];
services.tlp.settings = {
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "performance";
};
}

52
hardware/vison14.nix Normal file
View file

@ -0,0 +1,52 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
let
tuxedo-keyboard =
pkgs.callPackage (import ../packages/tuxedo-keyboard.nix) { };
tuxedo-cc =
pkgs.callPackage (import ../packages/tuxedo-control-center/default.nix) { };
in {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ tuxedo-keyboard ];
environment.systemPackages = with pkgs; [ tuxedo-cc ];
fileSystems."/" = {
device = "private/root/nixos";
fsType = "zfs";
};
fileSystems."/home" = {
device = "private/root/home";
fsType = "zfs";
};
fileSystems."/tmp" = {
device = "private/root/tmp";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7E36-C774";
fsType = "vfat";
};
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# custom
boot.loader.systemd-boot.enable = true;
hardware.cpu.intel.updateMicrocode = true;
networking.hostId = "eff291c7";
networking.hostName = "ds9";
services.tlp.enable = true;
}

View file

@ -0,0 +1,50 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
let unstable = import <nixos-unstable> { config.allowUnfree = true; };
in {
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "cube/root/nixos";
fsType = "zfs";
};
fileSystems."/home" = {
device = "cube/home";
fsType = "zfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2AD7-4F18";
fsType = "vfat";
};
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
# custom
boot.loader.systemd-boot.enable = true;
networking.hostId = "ef3a5d57";
networking.hostName = "discovery";
powerManagement.powertop.enable = true;
services.tlp.enable = true;
}

View file

@ -3,8 +3,7 @@
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let unstable = import <nixos-unstable> { config.allowUnfree = true; };
unstable = import <nixos-unstable> { config.allowUnfree = true; };
in { in {
imports = [ imports = [
<nixpkgs/nixos/modules/installer/scan/not-detected.nix> <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
@ -19,14 +18,8 @@ in {
"w /sys/class/drm/card0/device/power_dpm_force_performance_level - - - - low" "w /sys/class/drm/card0/device/power_dpm_force_performance_level - - - - low"
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules =
"nvme" [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
@ -35,7 +28,6 @@ in {
boot.kernelPackages = unstable.linuxPackages_latest; boot.kernelPackages = unstable.linuxPackages_latest;
#boot.kernelPackages = unstable.linux_testing; #boot.kernelPackages = unstable.linux_testing;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@ -45,18 +37,18 @@ in {
networking.interfaces.wlo1.useDHCP = true; networking.interfaces.wlo1.useDHCP = true;
networking.resolvconf.useLocalResolver = true; networking.resolvconf.useLocalResolver = true;
fileSystems."/" = fileSystems."/" = {
{ device = "tank/root/nixos"; device = "tank/root/nixos";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "tank/home"; device = "tank/home";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/B048-FBC8"; device = "/dev/disk/by-uuid/B048-FBC8";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -3,30 +3,48 @@
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let unstable = import <nixos-unstable> { config.allowUnfree = true; };
unstable = import <nixos-unstable> { config.allowUnfree = true; };
in { in {
imports = imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelParams = [ "intel_pstate=active" ];
boot.extraModprobeConfig = ''
options snd_usb_audio device_setup=1
'';
fileSystems."/" = nixpkgs.config.packageOverrides = pkgs: {
{ device = "tank/work/nixos"; vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965
vaapiVdpau
libvdpau-va-gl
];
};
environment.variables = {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
};
fileSystems."/" = {
device = "tank/work/nixos";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "tank/work/home"; device = "tank/work/home";
fsType = "zfs"; fsType = "zfs";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/DC7B-5E2D"; device = "/dev/disk/by-uuid/DC7B-5E2D";
fsType = "vfat"; fsType = "vfat";
}; };
@ -36,12 +54,11 @@ in {
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# custom # custom
boot.kernelPackages = unstable.linuxPackages_latest;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
hardware.cpu.intel.updateMicrocode = true;
networking.hostId = "eff291c4"; networking.hostId = "eff291c4";
networking.hostName = "sphere"; networking.hostName = "sphere";
networking.interfaces.enp0s20f0u1.useDHCP = true;
powerManagement.powertop.enable = true;
services.tlp.enable = true; services.tlp.enable = true;
services.hardware.bolt.enable = true;
} }

48
modules/colors.nix Normal file
View file

@ -0,0 +1,48 @@
{ config, lib, pkgs, ... }:
with lib; {
options = {
colors = {
background = mkOption {
type = types.str;
default = "19181A";
};
foreground = mkOption {
type = types.str;
default = "FCFCFA";
};
black = mkOption {
type = types.str;
default = "19181A";
};
red = mkOption {
type = types.str;
default = "cc6666";
};
green = mkOption {
type = types.str;
default = "a9dc76";
};
yellow = mkOption {
type = types.str;
default = "ffd866";
};
cyan = mkOption {
type = types.str;
default = "78dce8";
};
magenta = mkOption {
type = types.str;
default = "FC9867";
};
blue = mkOption {
type = types.str;
default = "AB9DF2";
};
white = mkOption {
type = types.str;
default = "FCFCFA";
};
};
};
}

28
packages/certmanager.nix Normal file
View file

@ -0,0 +1,28 @@
with import <nixpkgs> { };
stdenv.mkDerivation rec {
name = "cert-manager";
version = "v1.7.1";
src = fetchurl {
url =
"https://github.com/cert-manager/cert-manager/releases/download/${version}/cmctl-linux-amd64.tar.gz";
sha256 = "1z5n2rcfhrl1vm5vxqa1759m3prlv08mmg96n16p4gwkdxycznx4";
};
nativeBuildInputs = [ autoPatchelfHook ];
unpackPhase = ''
tar xvpzf $src
'';
installPhase = ''
install -m 755 -D cmctl $out/bin/cmctl
'';
meta = with lib; {
homepage = "https://cert-manager.io";
description = "cert-manager CLI";
platforms = platforms.linux;
maintainers = with maintainers; [ foosinn ];
};
}

View file

@ -1,97 +1,66 @@
{ stdenv { stdenv, buildFHSUserEnv, fetchurl, lib, pkgs, writeScript }:
, autoPatchelfHook
, dbus_libs
, dpkg
, fetchurl
, fontconfig
, freetype
, glib
, libICE
, libSM
, xorg
, openssl_1_0_2
, openssl
, libX11
, makeWrapper
, sqlite
, wrapQtAppsHook
, xkeyboard_config
, zlib
, curl
}:
stdenv.mkDerivation rec { let
name = "cloudstation";
version = "4.3.3"; version = "4.3.3";
release = "4469"; release = "4469";
cloudstation = stdenv.mkDerivation rec {
name = "cloudstation-unpack";
buildInputs = [ pkgs.dpkg pkgs.qt5.qtbase ];
src = fetchurl { src = fetchurl {
url = "https://global.download.synology.com/download/Tools/CloudStationDrive/${version}-${release}/Ubuntu/Installer/x86_64/synology-cloud-station-drive-${release}.x86_64.deb"; url =
"https://global.download.synology.com/download/Tools/CloudStationDrive/${version}-${release}/Ubuntu/Installer/x86_64/synology-cloud-station-drive-${release}.x86_64.deb";
sha256 = "0v84yb70knmmjzp7lyn6jgy5bnfsfd47wmqh29phybqg4zk3d47j"; sha256 = "0v84yb70knmmjzp7lyn6jgy5bnfsfd47wmqh29phybqg4zk3d47j";
}; };
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
wrapQtAppsHook
];
buildInputs = [
dbus_libs
fontconfig
freetype
glib
libICE
libSM
libX11
sqlite
stdenv.cc.cc.lib
zlib
openssl_1_0_2
xorg.libxcb
curl
];
ldpath = stdenv.lib.makeLibraryPath [
dbus_libs
fontconfig
freetype
glib
libICE
libSM
libX11
sqlite
stdenv.cc.cc.lib
zlib
openssl_1_0_2
openssl
xorg.libxcb
curl
];
unpackPhase = '' unpackPhase = ''
dpkg-deb -x $src . dpkg-deb -x $src .
find
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp -R opt $out cp -R opt/Synology/CloudStation/* $out/
chmod +x $out/opt/Synology/CloudStation/lib/* ls -lah $out
chmod +x $out/lib/*
cp $out/lib/plugins/platforms/libqxcb.so $out/lib/plugins/
#ln -s $out/opt/Synology/CloudStation/bin/launcher $out/bin/cloudstation # fix xcb plugin
makeWrapper \ echo -e "[Paths]\nPlugins = ${pkgs.qt5.qtbase.bin}/${pkgs.qt5.qtbase.qtPluginPrefix}" > $out/bin/qt.conf
$out/opt/Synology/CloudStation/bin/launcher \
$out/bin/cloudstation \
--set QT_PLUGIN_PATH $out/opt/Synology/CloudStationBackup/lib/plugins/platforms \
--set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
--set LD_LIBRARY_PATH $out/opt/Synology/CloudStation/lib:${ldpath}
''; '';
dontWrapQtApps = true;
meta = with stdenv.lib; {
homepage = "https://www.synology.com/de-de/support/download/RS815#utilities";
description = "Synology Cloud Station Drive";
platforms = platforms.linux;
maintainers = with maintainers; [ foosinn ];
}; };
in buildFHSUserEnv {
name = "cloudstation";
targetPkgs = pkgs:
with pkgs;
with xorg; [
cloudstation
curl
dbus
fontconfig
freetype
glib
libICE
libSM
libX11
libxcb
openssl
qt5.qtbase
qt5.qttools
qt5.qtwayland
qt5.qtx11extras
sqlite
stdenv.cc.cc.lib
xkeyboard_config
zlib
];
runScript = writeScript "cloudstation" ''
#!/usr/bin/env bash
export QT_PLUGIN_PATH="${pkgs.qt5.qtbase.bin}/${pkgs.qt5.qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM=xcb
${cloudstation}/bin/launcher
export LD_LIBRARY_PATH="/home/stefan/.CloudStation/CloudStation.app/lib:$LD_LIBRARY_PATH"
~/.CloudStation/CloudStation.app/bin/cloud-drive-ui
'';
} }

View file

@ -1,45 +1,47 @@
{ stdenv, fetchFromGitHub, python37Packages, wrapQtAppsHook }: { lib, fetchFromGitHub, python311Packages, wrapQtAppsHook, pkgs }:
python37Packages.buildPythonApplication rec { let
pname = "nagstamon"; pname = "nagstamon";
version = "3.4.1"; version = "v3.12.0";
in python311Packages.buildPythonApplication rec {
inherit pname;
inherit version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "foosinn"; owner = "HenriWahl";
repo = "Nagstamon"; repo = "Nagstamon";
rev = "nixos"; rev = version;
sha256 = "0m2hlnz7brcvin451y09l73lghhdjs8zwd7wn7k2ahv3829lksfq"; sha256 = "sha256-SI0FPTqJquaVyl/gpp883eGLq7tZ6J0fqn0jp77M8GM=";
}; };
# Test assumes darwin
doCheck = false; doCheck = false;
nativeBuildInputs = [ wrapQtAppsHook ]; nativeBuildInputs = [ wrapQtAppsHook ];
dontWrapQtApps = true;
postFixup = '' postFixup = ''
wrapQtApp $out/bin/nagstamon.py makeQtWrapper $out/bin/nagstamon.py $out/bin/nagstamon
''; '';
propagatedBuildInputs = with python37Packages; [ propagatedBuildInputs = [
beautifulsoup4 python311Packages.beautifulsoup4
configparser python311Packages.configparser
dateutil python311Packages.dateutil
kerberos python311Packages.keyring
keyring python311Packages.lxml
lxml python311Packages.psutil
psutil python311Packages.pyqt5_with_qtmultimedia
pyqt5_with_qtmultimedia python311Packages.requests
requests python311Packages.requests-kerberos
requests-kerberos python311Packages.setuptools
xlib python311Packages.xlib
pkgs.libsForQt5.qt5.qtwayland
]; ];
meta = with stdenv.lib; { meta = with lib; {
description = "A status monitor for the desktop"; description = "A status monitor for the desktop";
homepage = "https://nagstamon.ifw-dresden.de/"; homepage = "https://nagstamon.ifw-dresden.de/";
license = licenses.gpl2; license = licenses.gpl2;
maintainers = with maintainers; [ pSub ]; maintainers = with maintainers; [ foosinn ];
inherit version; inherit version;
}; };
} }

View file

@ -1,8 +1,12 @@
with import <nixos-unstable> { }; with import <nixos-unstable> { };
neovim.override { neovim.override {
vimAlias = true;
configure = { configure = {
customRC = '' customRC = ''
source ${pkgs.fzf}/share/vim-plugins/fzf/plugin/fzf.vim
set hidden set hidden
" langserver " langserver
@ -27,6 +31,7 @@ neovim.override {
set relativenumber set relativenumber
set mouse=a set mouse=a
set shortmess+=c set shortmess+=c
set clipboard=unnamedplus
" better search " better search
set incsearch set incsearch
@ -64,8 +69,9 @@ neovim.override {
let g:which_key_map = {} let g:which_key_map = {}
let g:which_key_map.f = { 'name': '+files' } let g:which_key_map.f = { 'name': '+files' }
noremap <leader>ff :FZF<cr> noremap <leader>ff :Files<cr>
noremap <leader>fc :saveas noremap <leader>fn :NnnPicker %:p:h<cr>
noremap <leader>fc :saveas %:p:h
let g:which_key_map.y = { 'name': '+yank' } let g:which_key_map.y = { 'name': '+yank' }
noremap <leader>yp :read !wl-paste<cr> noremap <leader>yp :read !wl-paste<cr>
@ -79,7 +85,8 @@ neovim.override {
noremap <leader>bn :bn<cr> noremap <leader>bn :bn<cr>
noremap <leader>bp :bp<cr> noremap <leader>bp :bp<cr>
let g:which_key_map.b = { 'name': '+lang' } let g:which_key_map.m = { 'name': '+lang' }
noremap <leader>md :call LanguageClient_textDocument_codeAction()<cr>
noremap <leader>mc :call LanguageClient#textDocument_references()<cr> noremap <leader>mc :call LanguageClient#textDocument_references()<cr>
noremap <leader>mf :call LanguageClient#textDocument_formatting()<cr> noremap <leader>mf :call LanguageClient#textDocument_formatting()<cr>
noremap <leader>mgg :call LanguageClient#textDocument_definition()<cr> noremap <leader>mgg :call LanguageClient#textDocument_definition()<cr>
@ -87,6 +94,11 @@ neovim.override {
noremap <leader>mm :call LanguageClient#textDocument_hover()<cr> noremap <leader>mm :call LanguageClient#textDocument_hover()<cr>
noremap <leader>mr :call LanguageClient#textDocument_rename()<cr> noremap <leader>mr :call LanguageClient#textDocument_rename()<cr>
noremap <leader>ms :call LanguageClient#workspace_symbol()<cr> noremap <leader>ms :call LanguageClient#workspace_symbol()<cr>
noremap <leader>ma :fzf_lsp_action<cr>
noremap <leader>ml :fzf_lsp_layout<cr>
let g:which_key_map.g = { 'name': '+git' }
noremap <leader>gs :call LazyGit<cr>
" lang specifics " lang specifics
let g:rustfmt_autosave = 1 let g:rustfmt_autosave = 1
@ -98,10 +110,13 @@ neovim.override {
airline airline
easymotion easymotion
editorconfig-vim editorconfig-vim
fugitive fzf-lsp-nvim
fzf fzf-vim
fzfWrapper
LanguageClient-neovim LanguageClient-neovim
lazygit-nvim
ncm2 ncm2
nnn-vim
surround surround
syntastic syntastic
vim-addon-nix vim-addon-nix

View file

@ -0,0 +1,549 @@
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..a7de0d9
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,543 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aho-corasick"
+version = "0.7.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "ansi_term"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
+
+[[package]]
+name = "arrayvec"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "base64"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643"
+dependencies = [
+ "byteorder",
+ "safemem",
+]
+
+[[package]]
+name = "base64"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "blake2b_simd"
+version = "0.5.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "constant_time_eq",
+]
+
+[[package]]
+name = "byteorder"
+version = "1.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "clap"
+version = "2.34.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+dependencies = [
+ "ansi_term",
+ "atty",
+ "bitflags",
+ "strsim",
+ "textwrap",
+ "unicode-width",
+ "vec_map",
+]
+
+[[package]]
+name = "constant_time_eq"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
+dependencies = [
+ "cfg-if",
+ "lazy_static",
+]
+
+[[package]]
+name = "dirs"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901"
+dependencies = [
+ "libc",
+ "redox_users",
+ "winapi",
+]
+
+[[package]]
+name = "encoding"
+version = "0.2.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
+dependencies = [
+ "encoding-index-japanese",
+ "encoding-index-korean",
+ "encoding-index-simpchinese",
+ "encoding-index-singlebyte",
+ "encoding-index-tradchinese",
+]
+
+[[package]]
+name = "encoding-index-japanese"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-korean"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-simpchinese"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-singlebyte"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding-index-tradchinese"
+version = "1.20141219.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
+dependencies = [
+ "encoding_index_tests",
+]
+
+[[package]]
+name = "encoding_index_tests"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "heck"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
+
+[[package]]
+name = "mailparse"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99c0af7aaefb167bb908763399ea2904dab08ca4fd8c2a3277516d4e488b5fe3"
+dependencies = [
+ "base64 0.9.3",
+ "encoding",
+ "quoted_printable",
+]
+
+[[package]]
+name = "memchr"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
+
+[[package]]
+name = "notcoal"
+version = "0.3.0"
+dependencies = [
+ "dirs",
+ "mailparse",
+ "notmuch",
+ "regex",
+ "rust-ini",
+ "serde",
+ "serde_json",
+ "structopt",
+]
+
+[[package]]
+name = "notmuch"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "831623c1b68968505126423f34dc887aa610daf543efc05df948c673e4e022e9"
+dependencies = [
+ "libc",
+ "supercow",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "0.4.30"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
+dependencies = [
+ "unicode-xid 0.1.0",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
+dependencies = [
+ "unicode-xid 0.2.2",
+]
+
+[[package]]
+name = "quote"
+version = "0.6.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
+dependencies = [
+ "proc-macro2 0.4.30",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
+dependencies = [
+ "proc-macro2 1.0.36",
+]
+
+[[package]]
+name = "quoted_printable"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fee2dce59f7a43418e3382c766554c614e06a552d53a8f07ef499ea4b332c0f"
+
+[[package]]
+name = "redox_syscall"
+version = "0.1.57"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
+
+[[package]]
+name = "redox_users"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
+dependencies = [
+ "getrandom",
+ "redox_syscall",
+ "rust-argon2",
+]
+
+[[package]]
+name = "regex"
+version = "1.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
+
+[[package]]
+name = "rust-argon2"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
+dependencies = [
+ "base64 0.13.0",
+ "blake2b_simd",
+ "constant_time_eq",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "rust-ini"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2"
+
+[[package]]
+name = "ryu"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
+
+[[package]]
+name = "safemem"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
+
+[[package]]
+name = "serde"
+version = "1.0.136"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.136"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
+dependencies = [
+ "proc-macro2 1.0.36",
+ "quote 1.0.15",
+ "syn 1.0.86",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.79"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "strsim"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+
+[[package]]
+name = "structopt"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7"
+dependencies = [
+ "clap",
+ "structopt-derive",
+]
+
+[[package]]
+name = "structopt-derive"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53010261a84b37689f9ed7d395165029f9cc7abb9f56bbfe86bee2597ed25107"
+dependencies = [
+ "heck",
+ "proc-macro2 0.4.30",
+ "quote 0.6.13",
+ "syn 0.15.44",
+]
+
+[[package]]
+name = "supercow"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "171758edb47aa306a78dfa4ab9aeb5167405bd4e3dc2b64e88f6a84bbe98bd63"
+
+[[package]]
+name = "syn"
+version = "0.15.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
+dependencies = [
+ "proc-macro2 0.4.30",
+ "quote 0.6.13",
+ "unicode-xid 0.1.0",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.86"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
+dependencies = [
+ "proc-macro2 1.0.36",
+ "quote 1.0.15",
+ "unicode-xid 0.2.2",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
+
+[[package]]
+name = "unicode-xid"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
+
+[[package]]
+name = "vec_map"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

View file

@ -0,0 +1,24 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkgs }:
rustPlatform.buildRustPackage rec {
pname = "notcoal";
version = "0.3.0";
src = fetchFromGitHub {
owner = "eaon";
repo = pname;
rev = "v${version}";
sha256 = "19gaba6asid5vplcy9q0ama40dvwwxglc40ks5240lydrvgfrimq";
};
cargoPatches = [ ./Cargo.lock.patch ];
cargoSha256 = "09bmlpl6rx2pk5w6vv2i1lsl6vr1733zy9jjvi5kkk1mqwinq8ai";
cargoBuildFlags = [ "--features=standalone" ];
buildInputs = with pkgs; [ bash notmuch ];
meta = with lib; {
description = "An email tagger for notmuch";
homepage = "https://ghom.niij.org/eaon/notcoal";
};
}

View file

@ -4,13 +4,12 @@ stdenv.mkDerivation {
name = "oc311"; name = "oc311";
version = "3.11"; version = "3.11";
src = fetchurl { src = fetchurl {
url = "https://artifacts-openshift-release-3-11.svc.ci.openshift.org/zips/openshift-origin-client-tools-v3.11.0-8aa4c38-492-linux-64bit.tar.gz"; url =
sha256 = "e8fde584995657e359ddaa5b25e70af2bde4cd494322c712a8cd46bfef00f07f"; "https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz";
sha256 = "4b0f07428ba854174c58d2e38287e5402964c9a9355f6c359d1242efd0990da3";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ autoPatchelfHook ];
autoPatchelfHook
];
unpackPhase = '' unpackPhase = ''
tar xvpzf $src --strip-components=1 tar xvpzf $src --strip-components=1
@ -20,7 +19,7 @@ stdenv.mkDerivation {
install -m 755 -D oc $out/bin/oc3 install -m 755 -D oc $out/bin/oc3
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://www.odk.io"; homepage = "https://www.odk.io";
description = "openshift311 client"; description = "openshift311 client";
platforms = platforms.linux; platforms = platforms.linux;

View file

@ -4,13 +4,12 @@ stdenv.mkDerivation rec {
name = "oc46"; name = "oc46";
version = "4.6"; version = "4.6";
src = fetchurl { src = fetchurl {
url = "https://mirror.openshift.com/pub/openshift-v4/clients/oc/${version}/linux/oc.tar.gz"; url =
sha256 = "60de3dbb6cf085a201c5b9490a6d5066248bfd5d3c42486a8fd43abdbdb731e6"; "https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz";
sha256 = "741c456f1d5227eb40722b0dac328c78dceba5103fd306cf7fe57a9474eb3d35";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ autoPatchelfHook ];
autoPatchelfHook
];
unpackPhase = '' unpackPhase = ''
tar xvpzf $src tar xvpzf $src
@ -20,7 +19,7 @@ stdenv.mkDerivation rec {
install -m 755 -D oc $out/bin/oc install -m 755 -D oc $out/bin/oc
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://www.odk.io"; homepage = "https://www.odk.io";
description = "openshift 4.6 client"; description = "openshift 4.6 client";
platforms = platforms.linux; platforms = platforms.linux;

View file

@ -0,0 +1,23 @@
{ pkgs, lib, rustPlatform }:
let
pname = "openscad-language-server";
version = "0.1.0";
src = pkgs.fetchFromGitHub {
owner = "dzhu";
repo = pname;
rev = version;
sha256 = "00msajwwy531ji93xk83lbnbp19asyk1b8ai0hi2awb63vpdr4xg";
};
in
rustPlatform.buildRustPackage {
inherit pname;
inherit version;
inherit src;
cargoSha256 = "0w245d5n0v8b02y0rc1lqx1svi9dnif4gvsas46h9g68206yijcf";
meta = with lib; {
description = "openscad language server";
};
}

View file

@ -5,13 +5,12 @@ stdenv.mkDerivation rec {
version = "4.5.0-0"; version = "4.5.0-0";
release = "2020-10-03-012432"; release = "2020-10-03-012432";
src = fetchurl { src = fetchurl {
url = "https://github.com/openshift/okd/releases/download/${version}.okd-${release}/openshift-install-linux-${version}.okd-${release}.tar.gz"; url =
"https://github.com/openshift/okd/releases/download/${version}.okd-${release}/openshift-install-linux-${version}.okd-${release}.tar.gz";
sha256 = "f497193e8918840a4fd3267839affdc91ec166c5fd2ae3fdc64f498b5fc56f55"; sha256 = "f497193e8918840a4fd3267839affdc91ec166c5fd2ae3fdc64f498b5fc56f55";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ autoPatchelfHook ];
autoPatchelfHook
];
unpackPhase = '' unpackPhase = ''
tar xvpzf $src tar xvpzf $src
@ -21,7 +20,7 @@ stdenv.mkDerivation rec {
install -m 755 -D openshift-install $out/bin/openshift-install install -m 755 -D openshift-install $out/bin/openshift-install
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://www.odk.io"; homepage = "https://www.odk.io";
description = "openshift 4.5 installer"; description = "openshift 4.5 installer";
platforms = platforms.linux; platforms = platforms.linux;

30
packages/skaffold.nix Normal file
View file

@ -0,0 +1,30 @@
with import <nixpkgs> { };
stdenv.mkDerivation rec {
name = "skaffold";
version = "1.17.2";
src = fetchurl {
url =
"https://github.com/GoogleContainerTools/skaffold/releases/download/v${version}/skaffold-linux-amd64";
sha256 = "55dea8be16fa3abd81820a6a03f5d708beb5e152fe71e00f00744a4dd321c55a";
};
nativeBuildInputs = [ autoPatchelfHook ];
unpackPhase = ''
cp $src skaffold
'';
installPhase = ''
install -m 755 -D skaffold $out/bin/skaffold
echo $out/bin/skaffold
ls -lah $out/bin/skaffold
'';
meta = with lib; {
homepage = "https://skaffold.dev";
description = "skaffold";
platforms = platforms.linux;
maintainers = with maintainers; [ foosinn ];
};
}

94
packages/tuxedo-cc.nix Normal file
View file

@ -0,0 +1,94 @@
{ lib, stdenv, makeWrapper, fetchurl, rpmextract, autoPatchelfHook, alsa-lib
, cups, gdk-pixbuf, glib, gtk3, libnotify, libuuid, libX11, libXScrnSaver
, libXcomposite, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr
, libXrender, libXtst, libxcb, libxshmfence, mesa, nspr, nss, pango, systemd
, libappindicator-gtk3, libdbusmenu
}:
stdenv.mkDerivation rec {
pname = "tuxedo-control-center";
version = "1.1.0";
src = fetchurl {
url =
"https://rpm.tuxedocomputers.com/opensuse/15.2/x86_64/tuxedo-control-center_${version}.rpm";
sha256 = "0rqhfi1slnh0kkn1vnxqynxm6yb4w1mhk4vi92vj0lrxlwdxf80c";
};
nativeBuildInputs = [
rpmextract
makeWrapper
alsa-lib
autoPatchelfHook
cups
libXdamage
libX11
libXScrnSaver
libXtst
libxshmfence
mesa
nss
libXrender
gdk-pixbuf
gtk3
systemd
];
libPath = lib.makeLibraryPath [
alsa-lib
gdk-pixbuf
glib
gtk3
libnotify
libX11
libXcomposite
libuuid
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
nspr
nss
libxcb
pango
systemd
libXScrnSaver
libappindicator-gtk3
libdbusmenu
];
unpackPhase = ''
mkdir -p $out/bin
cd $out
rpmextract $src
'';
installPhase = ''
runHook preInstall
#wrapProgram $out/opt/${pname}/${pname} \
# --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${pname}
#wrapProgram $out/opt/${pname}/resources/dist/${pname}/data/service/tccd \
# --prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${pname}
ln -s $out/opt/${pname}/${pname} $out/bin/
ln -s $out/opt/${pname}/resources/dist/${pname}/data/service/tccd $out/bin/
find $out
runHook postInstall
'';
meta = with lib; {
description =
"A tool to help you control performance, energy, fan and comfort settings on TUXEDO laptops.";
homepage = "github.com/tuxedocomputers/tuxedo-control-center";
license = licenses.gpl3Only;
maintainers = with maintainers; [ ];
};
}

View file

@ -0,0 +1,157 @@
{ pkgs, lib, stdenv, makeDesktopItem, desktop-file-utils,
python,
makeWrapper, nodejs, electron_9, fetchFromGitHub }:
let
baseName = "tuxedo-control-center";
version = "1.0.14";
baseNodePackages = (import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
});
nodePackages = baseNodePackages.package.override {
src = fetchFromGitHub {
owner = "tuxedocomputers";
repo = "tuxedo-control-center";
rev = "v${version}";
sha256 = "00gpsvjbli9f6vj31lbs7flmcz215r91iz6rg1kbzklc3y5k2ifj";
};
# Electron tries to download itself if this isn't set. We don't
# like that in nix so let's prevent it.
#
# This means we have to provide our own electron binaries when
# wrapping this program.
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
# Angular prompts for analytics, which in turn fails the build.
#
# We can disable analytics using false or empty string
# (See https://github.com/angular/angular-cli/blob/1a39c5202a6fe159f8d7db85a1c186176240e437/packages/angular/cli/models/analytics.ts#L506)
NG_CLI_ANALYTICS = "false";
};
desktopItem = makeDesktopItem {
name = "tuxedo-control-center";
exec = "tuxedo-control-center %U";
comment = "An application helping you to tune your TUXEDO";
desktopName = "TUXEDO Control Center";
icon = "tuxedo-control-center";
categories = "System;";
};
in stdenv.mkDerivation rec {
name = "${baseName}-${version}";
src = "${nodePackages}/lib/node_modules/tuxedo-control-center/";
nativeBuildInputs = [
desktop-file-utils # for desktop-file-validate
];
buildInputs = [
nodejs
makeWrapper
# For node-gyp
python
];
# TCC by default writes its config to /etc/tcc, which is
# inconvenient. Change this to a more standard location.
#
# It also hardcodes binary path.
postPatch = ''
substituteInPlace src/common/classes/TccPaths.ts \
--replace "/etc/tcc" "/var/lib/tcc" \
--replace "/opt/tuxedo-control-center/resources/dist/tuxedo-control-center/data/service/tccd" "$out/bin/tccd"
'';
buildPhase = ''
set -x
# We already have `node_modules` in the current directory but we
# need it's binaries on `PATH` so we can use them!
export PATH="./node_modules/.bin:$PATH"
# Prevent npm from checking for updates
export NO_UPDATE_NOTIFIER=true
# The order of `npm` commands matches what `npm run build-prod` does but we split
# it out so we can customise the native builds in `npm run build-service`.
npm run clean
npm run build-electron
# We don't use `npm run build-service` here because it uses `pkg` which packages
# node binaries in a way unsuitable for nix. Instead we're doing it ourself.
tsc -p ./src/service-app
cp ./src/package.json ./dist/tuxedo-control-center/service-app/package.json
# We need to tell npm where to find node or `node-gyp` will try to download it.
# This also _needs_ to be lowercase or `npm` won't detect it
export npm_config_nodedir=${nodejs}
npm run build-native # Builds to ./build/Release/TuxedoIOAPI.node
npm run build-ng-prod
'';
installPhase = ''
mkdir -p $out
cp -R ./dist/tuxedo-control-center/* $out
ln -s $src/node_modules $out/node_modules
# Parts of the code expect the icons to live under `data/dist-data`. Let's just
# copy the whole thing since the system assumes it has access to all the `dist-data`
# files.
mkdir -p $out/data/dist-data
cp -R ./src/dist-data/* $out/data/dist-data/
# Install `tccd`
mkdir -p $out/data/service
cp ./build/Release/TuxedoIOAPI.node $out/data/service/TuxedoIOAPI.node
makeWrapper ${nodejs}/bin/node $out/data/service/tccd \
--add-flags "$out/service-app/service-app/main.js" \
--prefix NODE_PATH : $out/data/service \
--prefix NODE_PATH : $out/node_modules
mkdir -p $out/bin
ln -s $out/data/service/tccd $out/bin/tccd
# Install `tuxedo-control-center`
#
# We use `--no-tccd-version-check` because the app uses the electron context
# to determine the app version, but the electron context is wrong if electron
# is invoked directly on a JavaScript file.
#
# The fix is to run electron on a folder with a `package.json` but the `tuxedo-control-center`
# package.json expects all files to live under `dist/` and I'm not a huge fan of that
# structure so we just disable the check and call it a day.
makeWrapper ${electron_9}/bin/electron $out/bin/tuxedo-control-center \
--add-flags "$out/e-app/e-app/main.js" \
--add-flags "--no-tccd-version-check" \
--prefix NODE_PATH : $out/node_modules
mkdir -p $out/share/polkit-1/actions/
cp $out/data/dist-data/de.tuxedocomputers.tcc.policy $out/share/polkit-1/actions/de.tuxedocomputers.tcc.policy
mkdir -p $out/etc/dbus-1/system.d/
cp $out/data/dist-data/com.tuxedocomputers.tccd.conf $out/etc/dbus-1/system.d/com.tuxedocomputers.tccd.conf
# Put our icons in the right spot
mkdir -p $out/share/icons/hicolor/scalable/apps/
cp $out/data/dist-data/tuxedo-control-center_256.svg \
$out/share/icons/hicolor/scalable/apps/tuxedo-control-center.svg
${desktopItem.buildCommand}
'';
meta = with lib; {
description = "Fan and power management GUI for Tuxedo laptops";
homepage = "https://github.com/tuxedocomputers/tuxedo-control-center/";
license = licenses.gpl3Plus;
maintainers = [ maintainers.blitz ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,16 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
, nodejs ? pkgs."nodejs-14_x" }:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View file

@ -0,0 +1,559 @@
# This file originates from node2nix
{ lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile }:
let
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux;
python = if nodejs ? python then nodejs.python else python2;
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
tarWrapper = runCommand "tarWrapper" { } ''
mkdir -p $out/bin
cat > $out/bin/tar <<EOF
#! ${stdenv.shell} -e
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
EOF
chmod +x $out/bin/tar
'';
# Function that generates a TGZ file from a NPM project
buildNodeSourceDist = { name, version, src, ... }:
stdenv.mkDerivation {
name = "node-tarball-${name}-${version}";
inherit src;
buildInputs = [ nodejs ];
buildPhase = ''
export HOME=$TMPDIR
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
'';
installPhase = ''
mkdir -p $out/tarballs
mv $tgzFile $out/tarballs
mkdir -p $out/nix-support
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
'';
};
includeDependencies = { dependencies }:
lib.optionalString (dependencies != [ ]) (lib.concatMapStrings
(dependency: ''
# Bundle the dependencies of the package
mkdir -p node_modules
cd node_modules
# Only include dependencies if they don't exist. They may also be bundled in the package.
if [ ! -e "${dependency.name}" ]
then
${composePackage dependency}
fi
cd ..
'') dependencies);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [ ], ... }@args:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
DIR=$(pwd)
cd $TMPDIR
unpackFile ${src}
# Make the base dir in which the target dependency resides first
mkdir -p "$(dirname "$DIR/${packageName}")"
if [ -f "${src}" ]
then
# Figure out what directory has been unpacked
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
# Restore write permissions to make building work
find "$packageDir" -type d -exec chmod u+x {} \;
chmod -R u+w "$packageDir"
# Move the extracted tarball into the output folder
mv "$packageDir" "$DIR/${packageName}"
elif [ -d "${src}" ]
then
# Get a stripped name (without hash) of the source directory.
# On old nixpkgs it's already set internally.
if [ -z "$strippedName" ]
then
strippedName="$(stripHash ${src})"
fi
# Restore write permissions to make building work
chmod -R u+w "$strippedName"
# Move the extracted directory into the output folder
mv "$strippedName" "$DIR/${packageName}"
fi
# Unset the stripped name to not confuse the next unpack step
unset strippedName
# Include the dependencies of the package
cd "$DIR/${packageName}"
${includeDependencies { inherit dependencies; }}
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
'';
pinpointDependencies = { dependencies, production }:
let
pinpointDependenciesFromPackageJSON = writeTextFile {
name = "pinpointDependencies.js";
text = ''
var fs = require('fs');
var path = require('path');
function resolveDependencyVersion(location, name) {
if(location == process.env['NIX_STORE']) {
return null;
} else {
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
if(fs.existsSync(dependencyPackageJSON)) {
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
if(dependencyPackageObj.name == name) {
return dependencyPackageObj.version;
}
} else {
return resolveDependencyVersion(path.resolve(location, ".."), name);
}
}
}
function replaceDependencies(dependencies) {
if(typeof dependencies == "object" && dependencies !== null) {
for(var dependency in dependencies) {
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
if(resolvedVersion === null) {
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
} else {
dependencies[dependency] = resolvedVersion;
}
}
}
}
/* Read the package.json configuration */
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
/* Pinpoint all dependencies */
replaceDependencies(packageObj.dependencies);
if(process.argv[2] == "development") {
replaceDependencies(packageObj.devDependencies);
}
replaceDependencies(packageObj.optionalDependencies);
/* Write the fixed package.json file */
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
'';
};
in ''
node ${pinpointDependenciesFromPackageJSON} ${
if production then "production" else "development"
}
${lib.optionalString (dependencies != [ ]) ''
if [ -d node_modules ]
then
cd node_modules
${
lib.concatMapStrings
(dependency: pinpointDependenciesOfPackage dependency)
dependencies
}
cd ..
fi
''}
'';
# Recursively traverses all dependencies of a package and pinpoints all
# dependencies in the package.json file to the versions that are actually
# being used.
pinpointDependenciesOfPackage =
{ packageName, dependencies ? [ ], production ? true, ... }@args: ''
if [ -d "${packageName}" ]
then
cd "${packageName}"
${pinpointDependencies { inherit dependencies production; }}
cd ..
${
lib.optionalString (builtins.substring 0 1 packageName == "@")
"cd .."
}
fi
'';
# Extract the Node.js source code which is used to compile packages with
# native bindings
nodeSources = runCommand "node-sources" { } ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv node-* $out
'';
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
addIntegrityFieldsScript = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
function augmentDependencies(baseDir, dependencies) {
for(var dependencyName in dependencies) {
var dependency = dependencies[dependencyName];
// Open package.json and augment metadata fields
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
var packageJSONPath = path.join(packageJSONDir, "package.json");
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
console.log("Adding metadata fields to: "+packageJSONPath);
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
if(dependency.integrity) {
packageObj["_integrity"] = dependency.integrity;
} else {
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
}
if(dependency.resolved) {
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
} else {
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
}
if(dependency.from !== undefined) { // Adopt from property if one has been provided
packageObj["_from"] = dependency.from;
}
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
}
// Augment transitive dependencies
if(dependency.dependencies !== undefined) {
augmentDependencies(packageJSONDir, dependency.dependencies);
}
}
}
if(fs.existsSync("./package-lock.json")) {
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
if(![1, 2].includes(packageLock.lockfileVersion)) {
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
}
if(packageLock.dependencies !== undefined) {
augmentDependencies(".", packageLock.dependencies);
}
}
'';
};
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
reconstructPackageLock = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
var packageObj = JSON.parse(fs.readFileSync("package.json"));
var lockObj = {
name: packageObj.name,
version: packageObj.version,
lockfileVersion: 1,
requires: true,
dependencies: {}
};
function augmentPackageJSON(filePath, dependencies) {
var packageJSON = path.join(filePath, "package.json");
if(fs.existsSync(packageJSON)) {
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
dependencies[packageObj.name] = {
version: packageObj.version,
integrity: "sha1-000000000000000000000000000=",
dependencies: {}
};
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
}
}
function processDependencies(dir, dependencies) {
if(fs.existsSync(dir)) {
var files = fs.readdirSync(dir);
files.forEach(function(entry) {
var filePath = path.join(dir, entry);
var stats = fs.statSync(filePath);
if(stats.isDirectory()) {
if(entry.substr(0, 1) == "@") {
// When we encounter a namespace folder, augment all packages belonging to the scope
var pkgFiles = fs.readdirSync(filePath);
pkgFiles.forEach(function(entry) {
if(stats.isDirectory()) {
var pkgFilePath = path.join(filePath, entry);
augmentPackageJSON(pkgFilePath, dependencies);
}
});
} else {
augmentPackageJSON(filePath, dependencies);
}
}
});
}
}
processDependencies("node_modules", lockObj.dependencies);
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
'';
};
prepareAndInvokeNPM =
{ packageName, bypassCache, reconstructLock, npmFlags, production }:
let
forceOfflineFlag = if bypassCache then
"--offline"
else
"--registry http://www.example.com";
in ''
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
source $pinpointDependenciesScriptPath
# Patch the shebangs of the bundled modules to prevent them from
# calling executables outside the Nix store as much as possible
patchShebangs .
# Deploy the Node.js package by running npm install. Since the
# dependencies have been provided already by ourselves, it should not
# attempt to install them again, which is good, because we want to make
# it Nix's responsibility. If it needs to install any dependencies
# anyway (e.g. because the dependency parameters are
# incomplete/incorrect), it fails.
#
# The other responsibilities of NPM are kept -- version checks, build
# steps, postprocessing etc.
export HOME=$TMPDIR
cd "${packageName}"
runHook preRebuild
${lib.optionalString bypassCache ''
${lib.optionalString reconstructLock ''
if [ -f package-lock.json ]
then
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
rm package-lock.json
else
echo "No package-lock.json file found, reconstructing..."
fi
node ${reconstructPackageLock}
''}
node ${addIntegrityFieldsScript}
''}
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${
lib.optionalString production "--production"
} rebuild
if [ "''${dontNpmInstall-}" != "1" ]
then
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${
lib.optionalString production "--production"
} install
fi
'';
# Builds and composes an NPM package including all its dependencies
buildNodePackage = { name, packageName, version, dependencies ? [ ]
, buildInputs ? [ ], production ? true, npmFlags ? ""
, dontNpmInstall ? false, bypassCache ? false, reconstructLock ? false
, preRebuild ? "", dontStrip ? true, unpackPhase ? "true"
, buildPhase ? "true", meta ? { }, ... }@args:
let
extraArgs = removeAttrs args [
"name"
"dependencies"
"buildInputs"
"dontStrip"
"dontNpmInstall"
"preRebuild"
"unpackPhase"
"buildPhase"
"meta"
];
in stdenv.mkDerivation ({
name = "${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs;
inherit nodejs;
inherit
dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
${prepareAndInvokeNPM {
inherit packageName bypassCache reconstructLock npmFlags production;
}}
# Create symlink to the deployed executable folder, if applicable
if [ -d "$out/lib/node_modules/.bin" ]
then
ln -s $out/lib/node_modules/.bin $out/bin
fi
# Create symlinks to the deployed manual page folders, if applicable
if [ -d "$out/lib/node_modules/${packageName}/man" ]
then
mkdir -p $out/share
for dir in "$out/lib/node_modules/${packageName}/man/"*
do
mkdir -p $out/share/man/$(basename "$dir")
for page in "$dir"/*
do
ln -s $page $out/share/man/$(basename "$dir")
done
done
fi
# Run post install hook, if provided
runHook postInstall
'';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs);
# Builds a node environment (a node_modules folder and a set of binaries)
buildNodeDependencies = { name, packageName, version, src, dependencies ? [ ]
, buildInputs ? [ ], production ? true, npmFlags ? ""
, dontNpmInstall ? false, bypassCache ? false, reconstructLock ? false
, dontStrip ? true, unpackPhase ? "true", buildPhase ? "true", ... }@args:
let extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
in stdenv.mkDerivation ({
name = "node-dependencies-${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool ++ buildInputs;
inherit
dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall unpackPhase buildPhase;
includeScript = includeDependencies { inherit dependencies; };
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
installPhase = ''
mkdir -p $out/${packageName}
cd $out/${packageName}
source $includeScriptPath
# Create fake package.json to make the npm commands work properly
cp ${src}/package.json .
chmod 644 package.json
${lib.optionalString bypassCache ''
if [ -f ${src}/package-lock.json ]
then
cp ${src}/package-lock.json .
fi
''}
# Go to the parent folder to make sure that all packages are pinpointed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@")
"cd .."}
${prepareAndInvokeNPM {
inherit packageName bypassCache reconstructLock npmFlags production;
}}
# Expose the executables that were installed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@")
"cd .."}
mv ${packageName} lib
ln -s $out/lib/node_modules/.bin $out/bin
'';
} // extraArgs);
# Builds a development shell
buildNodeShell = { name, packageName, version, src, dependencies ? [ ]
, buildInputs ? [ ], production ? true, npmFlags ? ""
, dontNpmInstall ? false, bypassCache ? false, reconstructLock ? false
, dontStrip ? true, unpackPhase ? "true", buildPhase ? "true", ... }@args:
let nodeDependencies = buildNodeDependencies args;
in stdenv.mkDerivation {
name = "node-shell-${name}-${version}";
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux
++ buildInputs;
buildCommand = ''
mkdir -p $out/bin
cat > $out/bin/shell <<EOF
#! ${stdenv.shell} -e
$shellHook
exec ${stdenv.shell}
EOF
chmod +x $out/bin/shell
'';
# Provide the dependencies in a development shell through the NODE_PATH environment variable
inherit nodeDependencies;
shellHook = lib.optionalString (dependencies != [ ]) ''
export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="${nodeDependencies}/bin:$PATH"
'';
};
in {
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
buildNodePackage = lib.makeOverridable buildNodePackage;
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
buildNodeShell = lib.makeOverridable buildNodeShell;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
{ stdenv, lib, linuxPackages, fetchurl }:
let
kernel = linuxPackages.kernel;
kernelDir = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
in stdenv.mkDerivation rec {
name = "tuxedo-keyboard";
version = "v3.0.8";
src = builtins.fetchGit {
url = "git://github.com/tuxedocomputers/tuxedo-keyboard";
ref = "refs/tags/${version}";
};
nativeBuildInputs = kernel.moduleBuildDependencies;
buildPhase = ''
make KDIR='${kernelDir}' all
'';
installPhase = ''
install -v -D -m 644 \
-t "$out/lib/modules/${kernel.modDirVersion}/extra/" \
./src/tuxedo_keyboard.ko \
./src/clevo_wmi.ko \
./src/tuxedo_io/tuxedo_io.ko \
./src/clevo_acpi.ko
find -name '*.ko'
echo ${kernel.modDirVersion}
'';
meta = {
homepage =
"https://github.com/tuxedocomputers/tuxedo-keyboard/blob/master/Makefile";
};
}

24
packages/vaultsink.nix Normal file
View file

@ -0,0 +1,24 @@
with import <nixpkgs> { };
stdenv.mkDerivation rec {
name = "vaultsink";
version = "0.1.8";
src = fetchurl {
url =
"https://github.com/cookiefactory/vault-sink/releases/download/v${version}/vault-sink-linux-amd64";
sha256 = "057799e7f907186993b591e3b2f743b69d7a9fed";
};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
install -m 755 -D vault-sink-linux-amd64 $out/bin/sink
'';
meta = with lib; {
homepage = "https://github.com/cookiefactory/vault-sink";
description = "Vault Secret helper for yaml files";
platforms = platforms.linux;
maintainers = with maintainers; [ foosinn ];
};
}

View file

@ -1,50 +1,54 @@
{ pkgs, options, ... }: { pkgs, options, ... }:
let let
unstable = import <nixos-unstable> {};
in { in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
kubectl
cryptsetup cryptsetup
unstable.kubernetes-helm dnsutils
dogdns
k9s
kind
kubectl
kubectx
kubeseal
nmap
pwgen
terraform
terraform-docs
whois
ipcalc
# podman argocd
conmon kubernetes-helm
kustomize
pre-commit
terraform-ls
vault
yaml-language-server
docker-compose
fuse-overlayfs fuse-overlayfs
podman qemu
podman-compose virt-manager
runc
slirp4netns (import ../packages/skaffold.nix)
(import ../packages/certmanager.nix)
]; ];
users.users.stefan.subUidRanges = [{ startUid = 100000; count = 65536; }]; programs.bash.shellAliases = {
users.users.stefan.subGidRanges = [{ startGid = 100000; count = 65536; }]; kx = "kubectx";
kns = "kubens";
environment.etc."containers/policy.json" = {
mode="0644";
text=''
{
"default": [
{
"type": "insecureAcceptAnything"
}
],
"transports":
{
"docker-daemon":
{
"": [{"type":"insecureAcceptAnything"}]
}
}
}
'';
}; };
environment.etc."containers/registries.conf" = { virtualisation.docker = {
mode="0644"; enable = true;
text='' storageDriver = "zfs";
[registries.search] };
registries = ['docker.io', 'quay.io'] virtualisation.libvirtd = {
''; enable = true;
qemu = {
swtpm.enable = true;
ovmf.enable = true;
};
}; };
} }

View file

@ -1,34 +1,55 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let unstable = import <nixos-unstable> { };
unstable = import <nixos-unstable> {};
in { in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
acpi
aspell
aspellDicts.de
aspellDicts.en
bash bash
bash-completion bash-completion
bat bat
borgbackup
curl
direnv direnv
fd fd
file
fzf fzf
git git
gnupg gnupg
htop htop
jq jq
mtr
ncdu ncdu
nix-index
nload
nnn
ntfs3g
openssl openssl
patchelf
pv
restic
ripgrep ripgrep
starship
sysstat
tcpdump tcpdump
tmux tmux
wget
z-lua
unzip unzip
unstable.starship wget
zoxide
(import ../packages/neovim.nix) (import ../packages/neovim.nix)
]; ];
environment = { environment = {
etc = { etc = { "starship.toml".source = ../dotfiles/starship.toml; };
"starship.toml".source = ../dotfiles/starship.toml;
variables = {
BAT_THEME = "ansi";
EDITOR = "nvim";
STARSHIP_CONFIG = "/etc/starship.toml";
HISTCONTROL = "ignoreboth";
NIXOS_OZONE_WL = "y";
}; };
}; };
@ -37,11 +58,18 @@ in {
. <(starship init bash) . <(starship init bash)
''; '';
interactiveShellInit = '' interactiveShellInit = ''
export EDITOR=nvim
export STARSHIP_CONFIG=/etc/starship.toml
if [ -z "$SSH_AUTH_SOCK" ]; then if [ -f ~/.ssh/agent.env ] ; then
eval $(ssh-agent) . ~/.ssh/agent.env > /dev/null
if ! kill -0 "$SSH_AGENT_PID" > /dev/null 2>&1; then
echo "Stale agent file found. Spawning a new agent. "
eval `ssh-agent | tee ~/.ssh/agent.env`
ssh-add
fi
else
echo "Starting ssh-agent"
eval `ssh-agent | tee ~/.ssh/agent.env`
ssh-add
fi fi
set_win_title() { set_win_title() {
@ -51,10 +79,33 @@ in {
. "$(fzf-share)/key-bindings.bash" . "$(fzf-share)/key-bindings.bash"
. "$(fzf-share)/completion.bash" . "$(fzf-share)/completion.bash"
. <(z --init bash) . <(zoxide init bash)
. <(direnv hook bash) . <(direnv hook bash)
. ${pkgs.bash-completion}/etc/profile.d/bash_completion.sh . ${pkgs.bash-completion}/etc/profile.d/bash_completion.sh
alias cat="bat -pp"
alias docker="sudo -g docker docker"
alias docker-compose="sudo -g docker docker-compose"
alias less="bat -p"
alias ls="ls --color=auto"
alias vim="nvim"
alias k="kubectl"
alias n="nix-shell -p"
alias nu="nix-shell -I nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos-unstable -p"
sink() {
VAULT_TOKEN=$(vault token lookup -format=json | jq -r .data.id) \
ENVIRONMENTS=staging \
~/git/bitsbeats/vault-sink/sink
}
vsink() {
if ! grep -q /values.yaml .gitignore; then
echo refusing to sink with missing gitignore
return 1
fi
sink < ./helm/*/values.yaml > ./values.yaml
}
for script in "$HOME"/dotfiles/bashrc/*.sh; do for script in "$HOME"/dotfiles/bashrc/*.sh; do
. "$script" . "$script"
done done
@ -77,7 +128,7 @@ in {
}; };
users.users.stefan = { users.users.stefan = {
extraGroups = [ "wheel" "dialout" ]; extraGroups = [ "wheel" "dialout" "libvirtd" "input" ];
home = "/home/stefan"; home = "/home/stefan";
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
@ -88,6 +139,47 @@ in {
Defaults env_keep+=SSH_AUTH_SOCK Defaults env_keep+=SSH_AUTH_SOCK
''; '';
services.fwupd.enable = true;
services.resolved.enable = true; services.resolved.enable = true;
services.lorri.enable = true; services.lorri.enable = true;
systemd.user.services.lorri.serviceConfig = {
ProtectSystem = pkgs.lib.mkForce "full";
ProtectHome = pkgs.lib.mkForce false;
};
security.wrappers.gvfsd-nfs = {
source = "${pkgs.gnome.gvfs}/libexec/gvfsd-nfs";
owner = "nobody";
group = "nogroup";
capabilities = "cap_net_bind_service+ep";
};
services.gvfs = {
enable = true;
package = lib.mkForce (pkgs.gnome.gvfs.overrideAttrs (oldAttrs: {
postInstall = ''
ln -sf /run/wrappers/bin/gvfsd-nfs $out/libexec/gvfsd-nfs
'';
}));
};
services.zfs.autoSnapshot = {
enable = true;
frequent = 8;
monthly = 6;
};
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_TIME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
};
};
} }

View file

@ -1,50 +1,132 @@
# Do not modify this file! It was generated by nixos-generate-config #g Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
unstable = import <nixos-unstable> { config.allowUnfree = true; }; colors = config.colors;
in { schema = pkgs.gsettings-desktop-schemas;
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
in
{
programs.droidcam.enable = true;
programs.sway = { programs.sway = {
enable = true; enable = true;
wrapperFeatures.gtk = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
bemenu bemenu
brightnessctl brightnessctl
gammastep
grim grim
i3status-rust i3status-rust
kanshi kanshi
mako mako
picom
slurp slurp
swayidle swayidle
swaylock swaylock
xwayland swaynotificationcenter
swayr
wf-recorder
wofi
]; ];
extraSessionCommands = "";
};
xdg.portal.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
colors = {
background = "#282a36";
foreground = "#f8f8f2";
black = "#1E2029";
red = "#ff5555";
green = "#50fa7b";
yellow = "#f1fa8c";
cyan = "#8be9fd";
magenta = "#bd93f9";
blue = "#61bfff";
white = "#ffffff";
}; };
environment = { environment = {
etc = { etc = {
"sway/config".source = ../dotfiles/sway/config; "sway/config".source = ../dotfiles/sway/config;
"sway/status.toml".source = ../dotfiles/sway/status.toml; "sway/status.toml".source = ../dotfiles/sway/status.toml;
"xdg/alacritty/alacritty.yml".source = ../dotfiles/alacritty.yml; "xdg/alacritty/alacritty.yml".text = ''
font:
normal:
family: CaskaydiaCove Nerd Font
size: 12
draw_bold_text_with_bright_colors: true
colors:
primary:
background: "${colors.background}"
foreground: "${colors.foreground}"
normal:
black: "${colors.black}"
red: "${colors.red}"
green: "${colors.green}"
yellow: "${colors.yellow}"
cyan: "${colors.cyan}"
magenta: "${colors.magenta}"
blue: "${colors.blue}"
white: "${colors.white}"
window:
dynamic_title: true
opacity: 0.98
env:
TERM: xterm-256color
key_bindings:
- { key: Escape, mods: Control, action: ToggleViMode }
'';
"wezterm.lua".source = ../dotfiles/wezterm.lua;
}; };
}; };
sound.enable = true; qt.platformTheme = "qt5ct";
hardware.pulseaudio.enable = true;
fonts.enableDefaultFonts = true; hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
services.udev.packages = [
(pkgs.writeTextFile {
name = "uinput.rules";
text = ''
KERNEL=="uinput", GROUP="users", MODE="0660", OPTIONS+="static_node=uinput"
'';
destination = "/etc/udev/rules.d/80-uinput.rules";
})
];
services.ratbagd.enable = true;
fonts.enableDefaultPackages = true;
fonts.fontconfig.antialias = true; fonts.fontconfig.antialias = true;
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
cascadia-code corefonts
font-awesome emacs-all-the-icons-fonts
fira-code
noto-fonts noto-fonts
noto-fonts-emoji noto-fonts-emoji
(nerdfonts.override { fonts = [ "CascadiaCode" "Meslo" ]; })
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.pathsToLink = [ "/libexec" ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
polkit_gnome
# firefox also needs: # firefox also needs:
# #
# gfx.webrenderer.enabled = true # gfx.webrenderer.enabled = true
@ -52,7 +134,7 @@ in {
# #
# check in `about:support` that # check in `about:support` that
# * Composing -> Webrenderer # * Composing -> Webrenderer
firefox-bin firefox-wayland
libva libva
libva-utils libva-utils
mesa mesa
@ -61,70 +143,96 @@ in {
mypaint mypaint
mypaint-brushes mypaint-brushes
gsettings-desktop-schemas
glib # provides gsettings
arc-theme arc-theme
capitaine-cursors capitaine-cursors
dracula-theme
elementary-xfce-icon-theme elementary-xfce-icon-theme
glib
gsettings-desktop-schemas
gtk-engine-murrine
gtk_engines
hicolor-icon-theme hicolor-icon-theme
libsForQt5.qtstyleplugins
lxappearance
numix-icon-theme numix-icon-theme
numix-cursor-theme
unstable.alacritty alacritty
gimp
imv imv
inkscape inkscape
keepassxc
libreoffice libreoffice
libsecret libsecret
lxappearance mpv
mumble mumble
neofetch neofetch
numbat
pavucontrol pavucontrol
pcmanfm pcmanfm
pulseaudio qrencode
pulsemixer remmina
unstable.keepassxc uxplay
wezterm
solaar
gdk-pixbuf
clipman
wdisplays
wl-clipboard wl-clipboard
xdg_utils xdg-utils
( xfce.thunar
pkgs.writeTextFile { xfce.thunar-volman
wtype
(pkgs.writeTextFile {
name = "startsway"; name = "startsway";
destination = "/bin/startsway"; destination = "/bin/startsway";
executable = true; executable = true;
text = '' text = ''
#! ${pkgs.bash}/bin/bash #! ${pkgs.bash}/bin/bash
export GTK_ICON_THEME=Dracula
export GTK_THEME=Dracula
export _JAVA_AWT_WM_NOREPARENTING=1 export _JAVA_AWT_WM_NOREPARENTING=1
export MOZ_ENABLE_WAYLAND=1 export QT_AUTO_SCREEN_SCALE_FACTOR=0 export MOZ_DBUS_REMOTE=1
export QT_WAYLAND_FORCE_DPI=96 export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_QPA_PLATFORM=wayland-egl export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_FORCE_DPI=96
export SDL_VIDEODRIVER=wayland export SDL_VIDEODRIVER=wayland
export WEZTERM_CONFIG_FILE=/etc/wezterm.lua
export XDG_CURRENT_DESKTOP=sway
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
export XDG_SESSION_TYPE=wayland
${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway ${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway
''; '';
} })
)
]; ];
services.gvfs = { hardware.bluetooth.enable = true;
enable = true; services.blueman.enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
};
services.syncthing = { services.syncthing = {
enable = true; enable = true;
dataDir = "/home/stefan";
openDefaultPorts = true; openDefaultPorts = true;
user = "stefan"; user = "stefan";
group = "users"; group = "users";
dataDir = "/home/stefan";
}; };
services.avahi.enable = true;
services.printing.enable = true; services.printing.enable = true;
services.printing.drivers = [ services.printing.drivers = [ pkgs.gutenprint ];
pkgs.gutenprint services.avahi = {
];
hardware.opengl = {
enable = true; enable = true;
nssmdns4 = true;
publish = {
enable = true;
addresses = true;
workstation = true;
userServices = true;
};
}; };
} }

View file

@ -1,25 +1,49 @@
{ config, lib, pkgs, ... }: { config, lib, buildPythonPackage, pkgs, fetchPypi,... }:
let let
unstable = import <nixos-unstable> { }; unstable = import <nixos-unstable> { };
in { in {
services.emacs.package = pkgs.emacs-pgtk;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnumake gnumake
go go
python37 phpactor
python37Packages.pyls-black
python37Packages.pyls-isort
python37Packages.pyls-mypy
rustup rustup
shellcheck
unstable.golangci-lint unstable.golangci-lint
unstable.gopls unstable.gopls
unstable.rust-analyzer
(python311.withPackages
(python-packages: with python-packages; [
black
diagrams
pymemcache
pyyaml
requests
ruff-lsp
])
)
mariadb-client
musl
dbeaver-bin
emacs-pgtk
gitAndTools.delta
lazygit
ltrace
parallel
sops sops
tig tig
ltrace
unstable.emacs
openssl pkg-config nasm cmake zlib gcc binutils-unwrapped openssl
pkg-config
nasm
cmake
zlib
gcc
binutils-unwrapped
]; ];
} }

View file

@ -1,14 +0,0 @@
{ config, lib, pkgs, ... }:
let
unstable = import <nixos-unstable> {};
in {
environment.systemPackages = with pkgs; [
arduino
avrdude
pkgsCross.avr.avrlibc
pkgsCross.avr.libcCross
pkgsCross.avr.buildPackages.gcc8
pkgsCross.avr.buildPackages.binutils
];
}

View file

@ -1,9 +1,16 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ let
notcoal = pkgs.callPackage ../packages/notcoal { };
in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
astroid
isync isync
khal
msmtp
notmuch notmuch
notcoal
thunderbird
astroid
vdirsyncer
]; ];
} }

View file

@ -1,8 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
unstable = import <nixos-unstable> { config.allowUnfree = true; };
cloudstation = pkgs.libsForQt5.callPackage (import ../packages/cloudstation.nix) {};
in { in {
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -11,5 +9,6 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
networkmanagerapplet networkmanagerapplet
networkmanager-vpnc networkmanager-vpnc
openconnect_openssl
]; ];
} }

11
roles/nix.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
}

27
roles/private.nix Normal file
View file

@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:
let
openscad-ls = pkgs.callPackage ../packages/openscad-language-server.nix { };
in
{
environment.systemPackages = with pkgs;
[
openscad
openscad-ls
];
# stm32 debugger
users.extraGroups.plugdev = { };
users.extraUsers.stefan.extraGroups = [ "plugdev" "dialout" ];
services.udev.packages = [ pkgs.openocd ];
fileSystems."/mnt/nfs" = {
device = "10.1.20.29:/srv/nfs";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=120" ];
};
networking.extraHosts = ''
162.55.40.34 mail.f2o.io
'';
}

View file

@ -2,7 +2,5 @@
{ {
networking.wireguard.enable = true; networking.wireguard.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ wireguard-tools ];
wireguard
];
} }

View file

@ -2,28 +2,85 @@
let let
unstable = import <nixos-unstable> { config.allowUnfree = true; }; unstable = import <nixos-unstable> { config.allowUnfree = true; };
cloudstation = pkgs.libsForQt5.callPackage (import ../packages/cloudstation.nix) {}; cloudstation = pkgs.callPackage (import ../packages/cloudstation.nix) { };
bbnagstamon = pkgs.libsForQt5.callPackage (import ../packages/nagstamon.nix) {}; nagstamon = pkgs.libsForQt5.callPackage (import ../packages/nagstamon.nix) { };
myslack = pkgs.slack.overrideAttrs (oldAttrs: rec {
fixupPhase = ''
sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' $out/lib/slack/resources/app.asar
rm $out/bin/slack
makeWrapper $out/lib/slack/slack $out/bin/slack \
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
--suffix PATH : ${lib.makeBinPath [ pkgs.xdg-utils ]} \
--add-flags "--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer"
'';
});
in { in {
environment.variables = {
USE_GKE_GCLOUD_AUTH_PLUGIN = "True";
};
services.tailscale = {
enable = true;
package = unstable.tailscale;
};
security.pki.certificateFiles = [ security.pki.certificateFiles = [
../dotfiles/certs/NetzmarktCA.crt ../dotfiles/certs/NetzmarktCA.crt
../dotfiles/certs/vcenter.netzmarkt.lan.crt ../dotfiles/certs/vcenter.netzmarkt.lan.crt
]; ];
networking.extraHosts = '' networking.extraHosts = ''
35.234.109.94 fsi.thomann.de 10.100.7.11 mon.netzmarkt.de
85.10.233.162 live.bonedo.de
172.20.0.2 hubble.kind
172.20.0.2 dashboard.kind
172.20.0.2 grafana.kind
172.20.0.2 alert.kind
#192.168.2.111 hass.home.f2o.io
#192.168.2.111 sync.home.f2o.io
192.168.2.111 pl.home.f2o.io
#127.0.0.1 auth-dev.thobits.com
127.0.0.1 database
127.0.0.1 youtube.com
127.0.0.1 www.youtube.com
''; '';
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(import ../packages/oc311.nix) (import ../packages/oc311.nix)
(import ../packages/oc46.nix) (import ../packages/oc46.nix)
(import ../packages/openshift-install-4.5.nix) (import ../packages/openshift-install-4.5.nix)
astroid # (import ../packages/vaultsink.nix) needs opensource verson
cloudstation cloudstation
nagstamon
yubikey-manager
anydesk
chromium
nodejs
vscodium
git-lfs
drone-cli drone-cli
bbnagstamon govc
unstable.slack ttyd
unstable.velero discord
(google-cloud-sdk.withExtraComponents [
google-cloud-sdk.components.gke-gcloud-auth-plugin
])
myslack
velero
obs-studio
obs-studio-plugins.wlrobs
prusa-slicer
]; ];
# yubikey support
services.udev.packages = [ pkgs.yubikey-personalization ];
services.pcscd.enable = true;
} }