From 082e33c1edf7621a2dc70a5ee6f7e08fc2a31c15 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 19 Jan 2022 01:13:15 +0100 Subject: [PATCH] wip --- .envrc | 12 +- flake.lock | 205 +++++++++++------- flake.nix | 15 +- .../.config/sway/config.d/applications.conf | 14 -- .../con/.config/sway/config.d/autostart.conf | 6 - .../sway/config.d/custom-keybindings.conf | 5 - .../.config/sway/config.d/input-defaults.conf | 35 --- hosts/con/.config/sway/config.d/screens.conf | 41 ---- hosts/con/con.nix | 40 ---- hosts/con/default.nix | 6 - hosts/con/hardware-configuration.nix | 34 --- hosts/dumpyourvms/dumpyourvms.nix | 11 +- hosts/dumpyourvms/unbound.nix | 2 - hosts/fae.nix | 59 +++++ modules/audio/default.nix | 2 +- modules/graphical/default.nix | 1 + modules/social/default.nix | 3 +- modules/sway/default.nix | 12 +- modules/terminal-life/default.nix | 1 - modules/terminal-life/nvim/default.nix | 5 +- modules/terminal-life/nvim/lsp.vim | 42 ++-- modules/terminal-life/nvim/plugins.vim | 4 +- modules/terminal-life/zsh/default.nix | 16 +- modules/virtualisation/default.nix | 2 +- modules/x-os/boot.nix | 10 +- overlays/element-desktop.nix | 8 + overlays/overrides.nix | 18 +- pkgs/default.nix | 1 + pkgs/gpu-switch.nix | 69 ++++++ pkgs/mopidy-jellyfin.nix | 14 +- profiles/base-user/.config/waybar/config | 2 +- shell/bud/default.nix | 2 +- shell/devos.nix | 5 +- users/teutat3s/.config/git/config.nix | 8 +- users/teutat3s/.config/watson/config.nix | 29 +++ users/teutat3s/home.nix | 8 +- users/teutat3s/session-variables.nix | 1 + users/teutat3s/zshrc.nix | 4 +- 38 files changed, 414 insertions(+), 338 deletions(-) delete mode 100644 hosts/con/.config/sway/config.d/applications.conf delete mode 100644 hosts/con/.config/sway/config.d/autostart.conf delete mode 100644 hosts/con/.config/sway/config.d/custom-keybindings.conf delete mode 100644 hosts/con/.config/sway/config.d/input-defaults.conf delete mode 100644 hosts/con/.config/sway/config.d/screens.conf delete mode 100644 hosts/con/con.nix delete mode 100644 hosts/con/default.nix delete mode 100644 hosts/con/hardware-configuration.nix create mode 100644 hosts/fae.nix create mode 100644 overlays/element-desktop.nix create mode 100644 pkgs/gpu-switch.nix create mode 100644 users/teutat3s/.config/watson/config.nix diff --git a/.envrc b/.envrc index a6d5743c..c878da9a 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,10 @@ -watch_file shell/* flake.nix -use flake || use nix +# reload when these files change +watch_file flake.nix +watch_file shell.nix + +{ + # shell gc root dir + mkdir -p "$(direnv_layout_dir)" + + eval "$(nix print-dev-env --profile $(direnv_layout_dir)/flake-profile)" +} || use nix diff --git a/flake.lock b/flake.lock index dd3ae7e1..059e0070 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1637793790, - "narHash": "sha256-oPXavjxETEWGXq8g7kQHyRLKUmLX2yPtGn+t3V0mrTY=", + "lastModified": 1640802000, + "narHash": "sha256-ZiI94Zv/IgW64fqKrtVaQqfUCkn9STvAjgfFmvtqcQ8=", "owner": "ryantm", "repo": "agenix", - "rev": "f85eea0e29fa9a8924571d0e398215e175f80d55", + "rev": "c5558c88b2941bf94886dfdede6926b1ba5f5629", "type": "github" }, "original": { @@ -23,10 +23,7 @@ "beautysh": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "bud", - "nixpkgs" - ], + "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix" }, "locked": { @@ -90,11 +87,11 @@ ] }, "locked": { - "lastModified": 1634994402, - "narHash": "sha256-xmlCVVOYGpZoxgOqsDOVF0B0ASrnbNGVAEzID9qh2xo=", + "lastModified": 1640117230, + "narHash": "sha256-W7LXeJavyIzNfNaoEsK65sEaCGqE9MVWvK0xSzNR4ls=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "44da835ac40dab5fd231298b59d83487382d2fab", + "rev": "5851d9613edf8b2279746c7e5b9faac55ff17e8a", "type": "github" }, "original": { @@ -113,11 +110,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1637357482, - "narHash": "sha256-mMRxOlcQs3V9cZYsKGKWEjl+oqclhaH1SKT3QGeTQ0Q=", + "lastModified": 1639771334, + "narHash": "sha256-4hgZmsCPaL5QlcEijHmzaYYrEwHtUFqraCUrCqLGJOo=", "owner": "input-output-hk", "repo": "deploy-rs", - "rev": "5a6db26726ec8c7904aea5bcdf13589342386f9d", + "rev": "7267eab9139ca4476fd8ed49e2e8652bba4c037f", "type": "github" }, "original": { @@ -163,11 +160,11 @@ ] }, "locked": { - "lastModified": 1640031018, + "lastModified": 1640815524, "narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=", "owner": "divnix", "repo": "digga", - "rev": "3157889810e51a1ae03f82bf6bf6657ba8cf93c6", + "rev": "5c9417495d8ab8813377d7b990680258b9eb4cff", "type": "github" }, "original": { @@ -178,15 +175,15 @@ }, "fenix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1637303083, - "narHash": "sha256-e2A5JBjxYNpjoGd53K0oVUUaS9ojwOT5rnThyPNS46M=", + "lastModified": 1639117493, + "narHash": "sha256-67H9uXUdauaqMfkcKzpgHR3GeOKPAwOs6G3C1VpT67o=", "owner": "nix-community", "repo": "fenix", - "rev": "8294ceadbbbe1a886640bfcc15f5a02a2b471955", + "rev": "94b5686cad2ed210da106b0b7e1e212dab43fbf2", "type": "github" }, "original": { @@ -307,11 +304,26 @@ }, "flake-utils_5": { "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", "owner": "numtide", "repo": "flake-utils", - "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", "type": "github" }, "original": { @@ -327,11 +339,11 @@ ] }, "locked": { - "lastModified": 1637917557, - "narHash": "sha256-3u5bLyGn5NUG3RJA7/v1Bqa/QCFGqp/01Bh/4REf9m4=", + "lastModified": 1639871969, + "narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=", "owner": "nix-community", "repo": "home-manager", - "rev": "4daff26495ca9ac67476cba8cf15c3e36d91ab18", + "rev": "697cc8c68ed6a606296efbbe9614c32537078756", "type": "github" }, "original": { @@ -359,11 +371,11 @@ }, "latest_2": { "locked": { - "lastModified": 1638198142, - "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", + "lastModified": 1641887635, + "narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a308775674e178495767df90c419425474582a1", + "rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88", "type": "github" }, "original": { @@ -380,11 +392,11 @@ ] }, "locked": { - "lastModified": 1638203339, - "narHash": "sha256-Sz3iCvbWrVWOD/XfYQeRJgP/7MVYL3/VKsNXvDeWBFc=", + "lastModified": 1639947939, + "narHash": "sha256-pGsM8haJadVP80GFq4xhnSpNitYNQpaXk4cnA796Cso=", "owner": "nmattia", "repo": "naersk", - "rev": "c3e56b8a4ffb6d906cdfcfee034581f9a8ece571", + "rev": "2fc8ce9d3c025d59fee349c1f80be9785049d653", "type": "github" }, "original": { @@ -393,6 +405,25 @@ "type": "github" } }, + "nix-dram": { + "inputs": { + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1639413393, + "narHash": "sha256-OcmY7yw6gu+fb3J8UT9Qmj1+eyP8HaOF133ojEx0aq8=", + "owner": "pub-solar", + "repo": "nix-dram", + "rev": "07881073fcaa0fb394dbf8ce9fd1483afc376d95", + "type": "github" + }, + "original": { + "owner": "pub-solar", + "repo": "nix-dram", + "type": "github" + } + }, "nixlib": { "locked": { "lastModified": 1640478849, @@ -408,32 +439,13 @@ "type": "github" } }, - "nix-dram": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1628492639, - "narHash": "sha256-ffF/oEhLs/stAsXXobruKHyH9jnMC2rt/SM3ASrs2U8=", - "owner": "dramforever", - "repo": "nix-dram", - "rev": "fba426108ea6bdeb1e362bac9da06cbd33726f41", - "type": "github" - }, - "original": { - "owner": "dramforever", - "repo": "nix-dram", - "type": "github" - } - }, "nixos": { "locked": { - "lastModified": 1638231428, - "narHash": "sha256-Sm5loBKdeusSvIAC+LtzRT6I7tAcqZdIPnHcxZt7NaE=", + "lastModified": 1642068274, + "narHash": "sha256-uncr2I2z6Y2ghTdm0VDzTPjPtBsaGpsb17HgL/fGDdg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "393c5357a0071d51668bcdc69dfc25ddacbd5840", + "rev": "00d17d8ddc4c12bae0cd750eb2bb51ee813a5301", "type": "github" }, "original": { @@ -446,7 +458,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1637655461, @@ -464,11 +476,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1638182287, - "narHash": "sha256-vBzf+hbTJz2ZdXV/DWirl6wOO7tjdqzTIU+0FANt65U=", + "lastModified": 1640686209, + "narHash": "sha256-6glXUlKRDhEhNuYx6r3fXU6KH2/Vq9mJZjB9oUpwrmc=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "6b3f79de09c3de7c91ab51e55e87879f61b6faec", + "rev": "46df95ca81e7e4cf3458cdb4b7d1714b5fce9da5", "type": "github" }, "original": { @@ -479,11 +491,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1640831728, - "narHash": "sha256-KK5SKqqfAt+ev3bHLrVXJ6i4zx9YQW6k19oUInY8T2M=", + "lastModified": 1640861606, + "narHash": "sha256-AQ+84X0wbu8TqijaVcfAgldnV8AIFkbzXlyILuqub8o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5d90841dd0179430db010dfc2c58b2a7de4371be", + "rev": "c1792db42df222b0ec570bd774488f48aa0c91b1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1640897803, + "narHash": "sha256-FfBWDDz0/pgb+qtf6RGIkrsA1SW8lv77eUpm5xijTQQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e57783d3a9ff01d3ace41d9f75d84b865285746", "type": "github" }, "original": { @@ -492,13 +520,13 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { - "lastModified": 1636976544, - "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", + "lastModified": 1638986258, + "narHash": "sha256-OceRdctKZRSgqQxVRvvNB0MaEnFMzQqjUffecoDE9eI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "931ab058daa7e4cd539533963f95e2bb0dbd41e6", + "rev": "581d2d6c9cd5c289002203581d8aa0861963a933", "type": "github" }, "original": { @@ -508,7 +536,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1640418986, "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", @@ -524,14 +552,29 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1639399671, + "narHash": "sha256-KT+YqqPZsdzKNE4T8okeH8lV+a0vtFxD4w+P2CEZC40=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c95b2e99529891b1d52e065c34dd50c136151bcb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { - "lastModified": 1638231901, - "narHash": "sha256-XzuvFTmsXULdWynQWzgaPHikepNhjEpK4o5WXfmRqek=", - "owner": "nix-community", - "repo": "NUR", - "rev": "4e68fb3d8f48e91196deb13f44bcfb421da25afb", - "type": "github" + "lastModified": 1626378135, + "narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=", + "path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source", + "rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d", + "type": "path" }, "original": { "id": "nur", @@ -541,17 +584,17 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": [ "nixos" ] }, "locked": { - "lastModified": 1634524567, - "narHash": "sha256-v9ZTZj1WNQaaVfs1P1mUPuh518mmwpqszj1EjdeGUmc=", + "lastModified": 1640033174, + "narHash": "sha256-b8w7NgobOYLlFV9j+XGbF+51LpOll0QeatxEGRv7uhg=", "owner": "berberman", "repo": "nvfetcher", - "rev": "807513f4bbd0e3b5863f4c3b91f8ac846ed6da9b", + "rev": "8bbf1921a36343f9a78c68e2bbc9798ab8f3b768", "type": "github" }, "original": { @@ -563,7 +606,7 @@ "poetry2nix": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1625240517, @@ -590,10 +633,6 @@ "latest": "latest_2", "naersk": "naersk", "nix-dram": "nix-dram", - "nixlib": [ - "digga", - "nixlib" - ], "nixos": "nixos", "nixos-hardware": "nixos-hardware", "nur": "nur", @@ -603,11 +642,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1637268320, - "narHash": "sha256-lxB1r+7cmZisiGLx0tZ2LaC6X/EcQTbRIWZfnLIIgs4=", + "lastModified": 1639071661, + "narHash": "sha256-4YySLORuK0qGGIEJj78S7CZ4jy4GIHJ5ks17k5AWblo=", "owner": "rust-analyzer", "repo": "rust-analyzer", - "rev": "f0da9406bcbde1bc727242b481d8de825e84f59a", + "rev": "2534b7db1a093543d5bd759b3a1ca9e34418fa31", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d9b42967..08a9dc0a 100644 --- a/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ nixos-hardware.url = "github:nixos/nixos-hardware"; # PubSolarOS additions - nix-dram.url = "github:dramforever/nix-dram"; + nix-dram.url = "github:pub-solar/nix-dram"; }; outputs = @@ -108,6 +108,9 @@ hosts = { /* set host specific properties here */ NixOS = { }; + fae = { + system = "aarch64-linux"; + }; }; importables = rec { profiles = digga.lib.rakeLeaves ./profiles // { @@ -144,7 +147,15 @@ homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; - deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; + deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { + fae = { + profilesOrder = [ "system" "direnv" ]; + profiles.direnv = { + user = "nixos"; + path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.nixos; + }; + }; + }; defaultTemplate = self.templates.bud; templates.bud.path = ./.; diff --git a/hosts/con/.config/sway/config.d/applications.conf b/hosts/con/.config/sway/config.d/applications.conf deleted file mode 100644 index c528a114..00000000 --- a/hosts/con/.config/sway/config.d/applications.conf +++ /dev/null @@ -1,14 +0,0 @@ -assign [app_id="firefox"] $ws2 - -# seahorse -for_window [title="seahorse"] floating enabled - -# NetworkManager -for_window [title="Network Connections"] floating enabled - -# thunderbird -for_window [title="New Task:*"] floating enabled -for_window [title="Edit Task:*"] floating enabled -for_window [title="New Event:*"] floating enabled -for_window [title="Edit Event:*"] floating enabled - diff --git a/hosts/con/.config/sway/config.d/autostart.conf b/hosts/con/.config/sway/config.d/autostart.conf deleted file mode 100644 index 8ed35abb..00000000 --- a/hosts/con/.config/sway/config.d/autostart.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Autostart applications -# -# Example: -# exec swayidle - -#exec qMasterPassword diff --git a/hosts/con/.config/sway/config.d/custom-keybindings.conf b/hosts/con/.config/sway/config.d/custom-keybindings.conf deleted file mode 100644 index e678cb75..00000000 --- a/hosts/con/.config/sway/config.d/custom-keybindings.conf +++ /dev/null @@ -1,5 +0,0 @@ -# switch keyboard input language -bindsym $mod+tab exec swaymsg input "1:1:AT_Translated_Set_2_keyboard" xkb_switch_layout next - -bindsym $mod+Shift+F2 exec chromium --enable-features=UseOzonePlatform --ozone-platform=wayland - diff --git a/hosts/con/.config/sway/config.d/input-defaults.conf b/hosts/con/.config/sway/config.d/input-defaults.conf deleted file mode 100644 index 11773d48..00000000 --- a/hosts/con/.config/sway/config.d/input-defaults.conf +++ /dev/null @@ -1,35 +0,0 @@ -### Input configuration -# -# You can get the names of your inputs by running: swaymsg -t get_inputs -# Read `man 5 sway-input` for more information about this section. - -input "type:keyboard" { - xkb_layout us,de - xkb_model pc105 - xkb_options altwin:swap_alt_win -} - -input "type:touchpad" { - tap enabled - natural_scroll enabled -} - -# Touchpad controls -#bindsym XF86TouchpadToggle exec $HOME/Workspace/ben/toggletouchpad.sh # toggle touchpad - -# Screen brightness controls -bindsym XF86MonBrightnessUp exec "brightnessctl -d intel_backlight set +10%; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ {print $4}')" -bindsym XF86MonBrightnessDown exec "brightnessctl -d intel_backlight set 10%-; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ { print $4}')" - -# Keyboard backlight brightness controls -bindsym XF86KbdBrightnessDown exec "brightnessctl -d smc::kbd_backlight set 10%-; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')" -bindsym XF86KbdBrightnessUp exec "brightnessctl -d smc::kbd_backlight set +10%; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')" - -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. up' #increase sound volume -bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. down' #decrease sound volume -bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send 'Mute sound' # mute sound -# Media player controls -bindsym XF86AudioPlay exec "playerctl play-pause; notify-send 'Play/Pause'" -bindsym XF86AudioNext exec "playerctl next; notify-send 'Next'" -bindsym XF86AudioPrev exec "playerctl previous; notify-send 'Prev.'" diff --git a/hosts/con/.config/sway/config.d/screens.conf b/hosts/con/.config/sway/config.d/screens.conf deleted file mode 100644 index c5784e14..00000000 --- a/hosts/con/.config/sway/config.d/screens.conf +++ /dev/null @@ -1,41 +0,0 @@ -### Output configuration -# -# Example configuration: -# -# output HDMI-A-1 resolution 1920x1080 position 1920,0 -# -# You can get the names of your outputs by running: swaymsg -t get_outputs - -set $main_screen eDP-1 -set $displayport DP-1 -set $hmdi HDMI-A-1 - -output $main_screen -output $displayport scale 2 -output $hdmi scale 1 - -output $main_screen pos 0 1080 -output $displayport pos 0 0 -output $hdmi pos 1920 0 - -#bindswitch lid:on output $main_screen disable -#bindswitch lid:off output $main_screen enable -bindsym $mod+Shift+x output $main_screen toggle - -# TODO when using more monitors -## Manual management of external displays -# Set the shortcuts and what they do -#set $mode_display HDMI (i) top, (j) left, (k) bottom, (l) right, (o) off -#mode "$mode_display" { -# bindsym i output HDMI-A-1 enable; output HDMI-A-1 pos 0 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 1080, mode "default" -# bindsym j output HDMI-A-1 enable; output HDMI-A-1 pos 0 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 1920 0, mode "default" -# bindsym k output HDMI-A-1 enable; output HDMI-A-1 pos 0 900 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 0, mode "default" -# bindsym l output HDMI-A-1 enable; output HDMI-A-1 pos 1440 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 0, mode "default" -# bindsym o output HDMI-A-1 disable, mode "default" -# -# # back to normal: Enter or Escape -# bindsym Return mode "default" -# bindsym Escape mode "default" -#} -## Declare here the shortcut to bring the display selection menu -#bindsym $mod+x mode "$mode_display" diff --git a/hosts/con/con.nix b/hosts/con/con.nix deleted file mode 100644 index ede5188c..00000000 --- a/hosts/con/con.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - psCfg = config.pub-solar; - xdg = config.home-manager.users."${psCfg.user.name}".xdg; -in -{ - imports = [ - ./hardware-configuration.nix - ]; - - config = { - pub-solar.x-os.keyfile = "/etc/nixos/hosts/con/secrets/keyfile.bin"; - pub-solar.nextcloud.enable = mkForce false; - - home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { - home.sessionVariables = { - DOCKER_BUILDKIT = "1"; - }; - # Custom device sway configs - xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf; - "sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf; - "sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf; - }; - }; - networking.hosts = { - "127.0.0.1" = [ - "virtrex.test" - "api.virtrex.test" - "expo.test" - "proxy.test" - "dachfensterkonfigurator.test" - "handwerker.velux.test" - ]; - }; - }; -} diff --git a/hosts/con/default.nix b/hosts/con/default.nix deleted file mode 100644 index 2196635d..00000000 --- a/hosts/con/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ suites, ... }: -{ - imports = [ - ./con.nix - ] ++ suites.con; -} diff --git a/hosts/con/hardware-configuration.nix b/hosts/con/hardware-configuration.nix deleted file mode 100644 index 8adf9afd..00000000 --- a/hosts/con/hardware-configuration.nix +++ /dev/null @@ -1,34 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { - device = "/dev/disk/by-uuid/382ae29a-ed0d-4e18-99db-6efb6afaae64"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/fb2f9ace-ce72-4b0d-b8b5-a8792d374f3c"; - - fileSystems."/boot/efi" = - { - device = "/dev/disk/by-uuid/6BD6-50D2"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; -} diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix index a30c80aa..e1e8abff 100644 --- a/hosts/dumpyourvms/dumpyourvms.nix +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -18,11 +18,15 @@ in pub-solar.virtualisation.enable = true; - # fix backlight for keyboard and brightness, adjust function key binding + # fix backlight for keyboard and brightness, adjust function key binding, + # intel_pstate for cpu schedutil, resume offset for swapfile, disable amdgpu driver boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" "intel_pstate=passive" "resume_offset=47366144" ]; boot.loader.efi.canTouchEfiVariables = true; boot.resumeDevice = "/dev/mapper/cryptroot"; + boot.kernelPackages = pkgs.linuxPackages_5_15; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + systemd.sleep.extraConfig = '' HibernateMode=shutdown ''; @@ -43,8 +47,8 @@ in # https://ubuntuforums.org/showthread.php?t=2409856 services.cron.systemCronJobs = [ "@reboot root ${pkgs.util-linux}/bin/rfkill block bluetooth" - "@reboot root ${pkgs.coreutils}/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" - "@reboot root ${pkgs.coreutils}/bin/echo 510 > /sys/class/backlight/gmux_backlight/brightness" + "@reboot root ${pkgs.coreutils}/bin/sleep 10; ${pkgs.coreutils}/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" + "@reboot root ${pkgs.coreutils}/bin/sleep 11; ${pkgs.coreutils}/bin/echo 510 > /sys/class/backlight/gmux_backlight/brightness" ]; # Increase console font size for HiDPI display @@ -116,7 +120,6 @@ in hardware.firmware = with pkgs; [ wireless-regdb ]; boot.extraModprobeConfig = '' options cfg80211 ieee80211_regdom="DE" - blacklist amdgpu ''; # This value determines the NixOS release from which the default diff --git a/hosts/dumpyourvms/unbound.nix b/hosts/dumpyourvms/unbound.nix index 43e16aba..c7c0b519 100644 --- a/hosts/dumpyourvms/unbound.nix +++ b/hosts/dumpyourvms/unbound.nix @@ -30,13 +30,11 @@ forward-addr = [ "5.1.66.255@853#dot.ffmuc.net" "185.150.99.255@853#dot.ffmuc.net" - "145.100.185.18@853#dnsovertls3.sinodun.com" "89.233.43.71@853#unicast.censurfridns.dk" "94.130.110.185@853#ns1.dnsprivacy.at" "2001:678:e68:f000::@853#dot.ffmuc.net" "2001:678:ed0:f000::@853#dot.ffmuc.net" - "2001:610:1:40ba:145:100:185:18@853#dnsovertls3.sinodun.com" "2a01:3a0:53:53::0@853#unicast.censurfridns.dk" "2a01:4f8:c0c:3c03::2@853#ns1.dnsprivacy.at" "2a01:4f8:c0c:3bfc::2@853#ns2.dnsprivacy.at" diff --git a/hosts/fae.nix b/hosts/fae.nix new file mode 100644 index 00000000..45aab903 --- /dev/null +++ b/hosts/fae.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, profiles, ... }: +{ + imports = [ + # profiles.networking + #profiles.core + "${fetchTarball { + url = "https://github.com/NixOS/nixos-hardware/archive/8f1bf828d8606fe38a02df312cf14546ae200a72.tar.gz"; + sha256 = "11milap153g3f63fcrcv4777vd64f7wlfkk9p3kpxi6dqd2sxvh4"; + } + }/raspberry-pi/4" + profiles.users.root # make sure to configure ssh keys + profiles.users.nixos + ]; + + config = { + pub-solar.x-os.iso-options.enable = true; + + fileSystems = { + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + options = [ "noatime" ]; + }; + }; + + networking = { + hostName = "fae"; + }; + + environment.systemPackages = with pkgs; [ vim ]; + + services.openssh.enable = true; + + #users = { + # mutableUsers = false; + # users."${user}" = { + # isNormalUser = true; + # password = password; + # extraGroups = [ "wheel" ]; + # }; + #}; + + security.sudo.extraConfig = lib.mkAfter '' + %wheel ALL=(ALL) NOPASSWD:ALL + ''; + + + # Enable GPU acceleration + hardware.raspberry-pi."4".fkms-3d.enable = true; + + #services.xserver = { + # enable = true; + # displayManager.lightdm.enable = true; + # desktopManager.xfce.enable = true; + #}; + + hardware.pulseaudio.enable = true; + }; +} diff --git a/modules/audio/default.nix b/modules/audio/default.nix index 51ec0b7e..6a550cfd 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -74,6 +74,6 @@ in services.blueman.enable = true; # Enable audio server & client - services.mopidy = import ./mopidy.nix pkgs; + #services.mopidy = import ./mopidy.nix pkgs; }; } diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index bbf8f59d..f2e2ffcf 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -92,6 +92,7 @@ in gnome3.adwaita-icon-theme gnome.eog gnome3.nautilus + gnome.yelp wine diff --git a/modules/social/default.nix b/modules/social/default.nix index 90a23c3e..13a45166 100644 --- a/modules/social/default.nix +++ b/modules/social/default.nix @@ -12,10 +12,9 @@ in config = mkIf cfg.enable { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.packages = [ - #mySignalDesktop signal-desktop tdesktop - element-desktop-wayland + element-desktop-search-fixed irssi ]; }; diff --git a/modules/sway/default.nix b/modules/sway/default.nix index cfc5733c..b690d9c0 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -32,7 +32,17 @@ in xdg.portal = { enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; + wlr = { + enable = true; + settings = { + screencast = { + max_fps = 30; + chooser_type = "simple"; + chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; + }; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; gtkUsePortal = true; }; diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 17262f77..7ae57fab 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -18,7 +18,6 @@ in environment.shells = with pkgs; [ zsh ]; - environment.systemPackages = with pkgs; [ screen ]; diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index e46c82e2..02102c49 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -74,9 +74,7 @@ in nodePackages.typescript-language-server nodePackages.vim-language-server nodePackages.vue-language-server - nodePackages.vscode-css-languageserver-bin - nodePackages.vscode-html-languageserver-bin - nodePackages.vscode-json-languageserver-bin + nodePackages.vscode-langservers-extracted nodePackages.yaml-language-server python39Packages.python-lsp-server python3Full @@ -131,6 +129,7 @@ in vim-go vim-javascript vim-json + SchemaStore-nvim vim-markdown vim-nix vim-ruby diff --git a/modules/terminal-life/nvim/lsp.vim b/modules/terminal-life/nvim/lsp.vim index 1d5bf4d4..9b1e1b00 100644 --- a/modules/terminal-life/nvim/lsp.vim +++ b/modules/terminal-life/nvim/lsp.vim @@ -33,24 +33,26 @@ lua <lua vim.lsp.buf.hover()', opts) buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) + buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) + buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) + buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) + buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) + buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) + buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) + buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) + buf_set_keymap('n', 'dp', 'lua vim.lsp.diagnostic.goto_prev()', opts) + buf_set_keymap('n', 'dn', 'lua vim.lsp.diagnostic.goto_next()', opts) + buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) + buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) end -- Add additional capabilities supported by nvim-cmp local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) + -- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html + capabilities.textDocument.completion.completionItem.snippetSupport = true for lsp_key, lsp_settings in pairs({ 'bashls', ------------------------------- Bash @@ -76,10 +78,14 @@ lua <got :GoTest:botright copen +autocmd FileType go nmap gd :GoDef +autocmd FileType go nmap gD :GoDecls " Go formatting autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index d892170c..8a50e93b 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -22,7 +22,6 @@ in [ "$(tty)" = "/dev/tty1" ] && exec sway ''; - shellAliases = { nano = "nvim"; vi = "nvim"; @@ -71,13 +70,14 @@ in bindkey '^R' fzf-history-widget # ArrowUp/Down start searching history with current input - autoload -U history-search-end - zle -N history-beginning-search-backward-end history-search-end - zle -N history-beginning-search-forward-end history-search-end - bindkey "^[[A" history-beginning-search-backward-end - bindkey "^[[B" history-beginning-search-forward-end - bindkey "^P" history-beginning-search-backward-end - bindkey "^N" history-beginning-search-forward-end + autoload -U up-line-or-beginning-search + autoload -U down-line-or-beginning-search + zle -N up-line-or-beginning-search + zle -N down-line-or-beginning-search + bindkey "^[[A" up-line-or-beginning-search + bindkey "^[[B" down-line-or-beginning-search + bindkey "^P" up-line-or-beginning-search + bindkey "^N" down-line-or-beginning-search # MAKE CTRL+S WORK IN VIM stty -ixon diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index 4d588622..ad3db4e7 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -19,7 +19,7 @@ in virtualisation.libvirtd = { enable = true; - qemuOvmf = true; + qemu.ovmf.enable = true; }; users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] { extraGroups = [ "libvirtd" ]; diff --git a/modules/x-os/boot.nix b/modules/x-os/boot.nix index 51cd5b4b..0633bec4 100644 --- a/modules/x-os/boot.nix +++ b/modules/x-os/boot.nix @@ -1,16 +1,22 @@ { config, pkgs, lib, ... }: - +with lib; let cfg = config.pub-solar.x-os; in { + options.pub-solar.x-os.iso-options.enable = mkOption { + type = types.bool; + default = false; + description = "Feature flag for iso builds"; + }; config = { # Enable plymouth for better experience of booting boot.plymouth.enable = true; # Mount / luks device in initrd # Allow fstrim to work on it. - boot.initrd = { + # The ! makes this enabled by default + boot.initrd = mkIf (!cfg.iso-options.enable) { luks.devices."cryptroot" = { allowDiscards = true; }; diff --git a/overlays/element-desktop.nix b/overlays/element-desktop.nix new file mode 100644 index 00000000..dce8b8e4 --- /dev/null +++ b/overlays/element-desktop.nix @@ -0,0 +1,8 @@ +final: prev: { + element-desktop-search-fixed = prev.element-desktop-wayland.overrideAttrs (oldAttrs: { + fixupPhase = '' + wrapProgram $out/bin/element-desktop \ + --prefix LD_PRELOAD : ${prev.sqlcipher}/lib/libsqlcipher.so + ''; + }); +} diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 477c1f8a..7b313492 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -4,33 +4,28 @@ channels: final: prev: { inherit (channels.latest) cachix - deploy-rs - docker - docker-compose_2 dhall discord element-desktop rage nixpkgs-fmt - nomad - rage + qutebrowser signal-desktop starship deploy-rs + thunderbird + firefox-wayland element-desktop-wayland - neovim-unwrapped + nomad tdesktop - xdg-desktop-portal - xdg-desktop-portal-gtk - xdg-desktop-portal-wlr obs-studio obs-studio-plugins looking-glass-client ; # nix is set to 2.3 in 21.11 - nix-direnv = prev.nix-direnv.override { nix = prev.nixUnstable; }; + nix-direnv = prev.nix-direnv.override { nix_2_4 = true; }; haskellPackages = prev.haskellPackages.override (old: { @@ -43,4 +38,7 @@ channels: final: prev: { haskell-language-server; }); }); + + # Example to override node package + # nodePackages = prev.nodePackages // { inherit (channels.latest.nodePackages) manta; }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 312e685f..3f32f8b1 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -3,6 +3,7 @@ with final; { # keep sources this first sources = prev.callPackage (import ./_sources/generated.nix) { }; # then, call packages with `final.callPackage` + gpu-switch = writeShellScriptBin "gpu-switch" (import ./gpu-switch.nix final); import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.nix final); lgcl = writeShellScriptBin "lgcl" (import ./lgcl.nix final); mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final); diff --git a/pkgs/gpu-switch.nix b/pkgs/gpu-switch.nix new file mode 100644 index 00000000..a6045ff9 --- /dev/null +++ b/pkgs/gpu-switch.nix @@ -0,0 +1,69 @@ +self: with self; '' + # Copyright (c) 2014-2015 Bruno Bierbaumer, Andreas Heider + + readonly sysfs_efi_vars='/sys/firmware/efi/efivars' + readonly efi_gpu='gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9' + + usage(){ + cat <&2 + exit 1 + fi + + if ! mount | grep -q $sysfs_efi_vars; then + if ! mount -t efivarfs none $sysfs_efi_vars; then + printf "Fatal: Couldn't mount ''${sysfs_efi_vars}.\n" 1>&2 + exit 1 + fi + fi + chattr -i "''${sysfs_efi_vars}/''${efi_gpu}" 2> /dev/null + printf "\x07\x00\x00\x00\x''${1}\x00\x00\x00" > "''${sysfs_efi_vars}/''${efi_gpu}" + } + + if [ $# -ne 1 ]; then + usage 1>&2 + exit 1 + fi + + case "$1" in + -i|--integrated) + switch_gpu 1 + ;; + -d|--dedicated) + switch_gpu 0 + ;; + -h|--help) + usage + ;; + *) + usage 1>&2 + exit 1 + ;; + esac +'' diff --git a/pkgs/mopidy-jellyfin.nix b/pkgs/mopidy-jellyfin.nix index 8c99ac21..a3cde276 100644 --- a/pkgs/mopidy-jellyfin.nix +++ b/pkgs/mopidy-jellyfin.nix @@ -1,20 +1,20 @@ self: with self; let - websocket-client = python38.pkgs.buildPythonPackage rec { + websocket-client = python39.pkgs.buildPythonPackage rec { pname = "websocket-client"; - version = "1.0.0"; + version = "1.2.1"; doCheck = false; - src = python38.pkgs.fetchPypi { + src = python39.pkgs.fetchPypi { inherit pname version; - sha256 = "sha256-UFGzii9MJ/vXygd+uyPsaWWmJt7VqVY382vhs1tsT4E="; + sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0="; }; }; in -python38.pkgs.buildPythonPackage rec { +python39.pkgs.buildPythonPackage rec { pname = "Mopidy-Jellyfin"; version = "1.0.2"; doCheck = false; - propagatedBuildInputs = with python38.pkgs; [ + propagatedBuildInputs = with python39.pkgs; [ unidecode websocket-client requests @@ -22,7 +22,7 @@ python38.pkgs.buildPythonPackage rec { pykka mopidy ]; - src = python38.pkgs.fetchPypi { + src = python39.pkgs.fetchPypi { inherit pname version; sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g="; }; diff --git a/profiles/base-user/.config/waybar/config b/profiles/base-user/.config/waybar/config index f38c6946..9ab5229f 100644 --- a/profiles/base-user/.config/waybar/config +++ b/profiles/base-user/.config/waybar/config @@ -4,7 +4,7 @@ "height": 26, // Waybar height "modules-left": ["sway/workspaces", "sway/mode"], - "modules-center": ["mpd"], + //"modules-center": ["mpd"], "modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"], "sway/workspaces": { "disable-scroll": true diff --git a/shell/bud/default.nix b/shell/bud/default.nix index c486636b..f65e71ed 100644 --- a/shell/bud/default.nix +++ b/shell/bud/default.nix @@ -1,7 +1,7 @@ { pkgs, lib, budUtils, ... }: { bud.cmds = with pkgs; { get = { - writer = budUtils.writeBashWithPaths [ nixUnstable git coreutils ]; + writer = budUtils.writeBashWithPaths [ nixFlakes git coreutils ]; synopsis = "get [DEST]"; help = "Copy the desired template to DEST"; script = ./get.bash; diff --git a/shell/devos.nix b/shell/devos.nix index dd6f75ef..8702740a 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -15,6 +15,9 @@ in imports = [ "${extraModulesPath}/git/hooks.nix" ]; git = { inherit hooks; }; + # override for our own welcome + devshell.name = pkgs.lib.mkForce "PubSolarOS"; + # tempfix: remove when merged https://github.com/numtide/devshell/pull/123 devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry '' # PATH is devshell's exorbitant privilige: @@ -31,7 +34,7 @@ in ''); commands = with pkgs; [ - (devos nixUnstable) + (devos nixFlakes) (devos agenix) { category = "devos"; diff --git a/users/teutat3s/.config/git/config.nix b/users/teutat3s/.config/git/config.nix index 10cbd6f0..3993ce02 100644 --- a/users/teutat3s/.config/git/config.nix +++ b/users/teutat3s/.config/git/config.nix @@ -1,7 +1,13 @@ { config, pkgs, ... }: let in -pkgs.lib.mkAfter ''[includeIf "gitdir:~/CodeRoom/greenbaum.cloud/"] +pkgs.lib.mkAfter ''[sendemail] + smtpserver = smtp.mailbox.org + smtpuser = jhonas@mailbox.org + smtpencryption = tls + smtpserverport = 587 + +[includeIf "gitdir:~/CodeRoom/greenbaum.cloud/"] path = ~/.config/git/config_greenbaum.cloud [includeIf "gitdir:~/CodeRoom/git.b12f.io/"] diff --git a/users/teutat3s/.config/watson/config.nix b/users/teutat3s/.config/watson/config.nix new file mode 100644 index 00000000..83142743 --- /dev/null +++ b/users/teutat3s/.config/watson/config.nix @@ -0,0 +1,29 @@ +{ config, pkgs, ... }: +let +in +''# Watson configuration +# showing defaults commented out + +# not implemented yet as of 2.0.1 +#[backend] +#url = https://api.crick.fr +#token = yourapitoken + +[options] +#options.confirm_new_project = false +#options.confirm_new_tag = false +date_format = %d.%m.%Y +#log_current = false +#pager = true +#report_current = false +#reverse_log = true +stop_on_start = true +#stop_on_restart = false +time_format = %H:%M%z +#week_start = monday + +#[default_tags] +#project-name = tag1 tag2 +#python101 = teaching python +#voyager2 = nasa 'space mission' +'' diff --git a/users/teutat3s/home.nix b/users/teutat3s/home.nix index 6329042a..b54a01a2 100644 --- a/users/teutat3s/home.nix +++ b/users/teutat3s/home.nix @@ -15,17 +15,19 @@ in { key = "V"; mods = "Control|Super"; action = "Paste"; } { key = "C"; mods = "Control|Super"; action = "Copy"; } ]; - services.kbfs.enable = false; - services.keybase.enable = false; + services.kbfs.enable = true; + services.keybase.enable = true; services.yubikey-agent.enable = true; home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config_greenbaum.cloud".text = import ./.config/git/config_greenbaum.cloud.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config_git.b12f.io".text = import ./.config/git/config_git.b12f.io.nix { inherit config; inherit pkgs; }; + xdg.configFile."watson/config".text = import ./.config/watson/config.nix { inherit config; inherit pkgs; }; home.packages = with pkgs; [ AusweisApp2 consul + gpu-switch ifmetric ipmitool keybase-gui @@ -67,7 +69,7 @@ in }; programs.zsh = { - initExtra = import ./zshrc.nix pkgs; + initExtra = import ./zshrc.nix { inherit config; inherit pkgs; }; }; # xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg; diff --git a/users/teutat3s/session-variables.nix b/users/teutat3s/session-variables.nix index e9db7172..040e0b8f 100644 --- a/users/teutat3s/session-variables.nix +++ b/users/teutat3s/session-variables.nix @@ -7,6 +7,7 @@ in home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.sessionVariables = { DRONE_SERVER = "https://ci.b12f.io"; + GOPATH = "/home/${psCfg.user.name}/CodeRoom/go"; }; }; } diff --git a/users/teutat3s/zshrc.nix b/users/teutat3s/zshrc.nix index 97bc4861..8b6b3992 100644 --- a/users/teutat3s/zshrc.nix +++ b/users/teutat3s/zshrc.nix @@ -1,4 +1,4 @@ -pkgs: +{ config, pkgs, ... }: '' bindkey "^[[1;3D" backward-word bindkey "^[[1;3C" forward-word @@ -83,5 +83,5 @@ pkgs: complete -o nospace -C ${pkgs.waypoint}/bin/waypoint waypoint complete -C '${pkgs.awscli2}/bin/aws_completer' ${pkgs.awscli2}/bin/aws - source /run/secrets/environment-secrets + source ${config.age.secrets.environment-secrets.path} ''