From 8397aa7aa396bc99b380fe69120950022e88bbfd Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Thu, 21 Oct 2021 23:39:19 +0200 Subject: [PATCH 01/49] workflows: switch to new default branch main --- .github/workflows/check.yml | 2 +- .github/workflows/mdbook_docs.yml | 2 +- .github/workflows/release.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8fdf8d1c..756aa2bf 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,7 @@ name: "Check & Cachix" on: push: branches: - - master + - main - trying - staging jobs: diff --git a/.github/workflows/mdbook_docs.yml b/.github/workflows/mdbook_docs.yml index 9d15cc18..5faf9c28 100644 --- a/.github/workflows/mdbook_docs.yml +++ b/.github/workflows/mdbook_docs.yml @@ -3,7 +3,7 @@ name: Deploy Docs to GitHub Pages on: push: branches: - - master + - main jobs: deploy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 111be319..8cabd128 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: master + ref: main - name: Update Changelog uses: heinrichreimer/github-changelog-generator-action@v2.1.1 with: @@ -49,7 +49,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 with: - ref: master + ref: main - name: Get Changelog Entry id: changelog_reader From 1b1bc8eb97fc346f65ef96b580544a987e35ab3a Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Thu, 21 Oct 2021 23:39:38 +0200 Subject: [PATCH 02/49] digga: fix link to new default branch main --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d813821..275714ca 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ DevOS is licensed under the [MIT License][mit]. [giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants [home-manager]: https://nix-community.github.io/home-manager [mit]: https://mit-license.org -[mk-flake]: https://github.com/divnix/digga/tree/master/src/mkFlake +[mk-flake]: https://github.com/divnix/digga/tree/main/src/mkFlake [nix]: https://nixos.org/manual/nix/stable [nixos]: https://nixos.org/manual/nixos/stable [nixpkgs]: https://github.com/NixOS/nixpkgs From 65db5d30ae4df02b9cef6620e72ed34a2082fc31 Mon Sep 17 00:00:00 2001 From: Karolis Labrencis Date: Sun, 24 Oct 2021 01:33:04 +0300 Subject: [PATCH 03/49] docs: remove outdated `nix-rebuild` notes --- doc/start/from-nixos.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/start/from-nixos.md b/doc/start/from-nixos.md index ce79063b..3e8c84d6 100644 --- a/doc/start/from-nixos.md +++ b/doc/start/from-nixos.md @@ -47,8 +47,5 @@ This calls `nixos-rebuild` with sudo to build and install your configuration. > ##### _Notes:_ > - Instead of `switch`, you can pass `build`, `test`, `boot`, etc just as with > `nixos-rebuild`. -> -> - It is convenient to have the template living at `/etc/nixos` so you can -> simply `sudo nixos-rebuild switch` from anywhere on the system, but it is -> not required. + From 243116e2288005c90824a6d0d0ac400b973629ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 24 Oct 2021 19:36:56 +0200 Subject: [PATCH 04/49] Remove git crypt, update docs --- doc/secrets.md | 6 +----- shell/devos.nix | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/doc/secrets.md b/doc/secrets.md index 6afe2f6a..996f4180 100644 --- a/doc/secrets.md +++ b/doc/secrets.md @@ -1,11 +1,8 @@ # Secrets -Secrets are managed using [git-crypt][git-crypt] and [agenix][agenix] +Secrets are managed using [agenix][agenix] so you can keep your flake in a public repository like GitHub without exposing your password or other sensitive data. -By default, everything in the secrets folder is automatically encrypted. Just -be sure to run `git-crypt init` before putting anything in here. - ## Agenix Currently, there is [no mechanism][secrets-issue] in nix itself to deploy secrets within the nix store because it is world-readable. @@ -104,7 +101,6 @@ secrets get decrypted. You can learn about them by looking at the > You can take a look at the [agenix repository][agenix] for more information > about the tool. -[git-crypt]: https://github.com/AGWA/git-crypt [agenix]: https://github.com/ryantm/agenix [age module]: https://github.com/ryantm/agenix/blob/master/modules/age.nix [secrets-issue]: https://github.com/NixOS/nix/issues/8 diff --git a/shell/devos.nix b/shell/devos.nix index 90901435..6f01267f 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -30,10 +30,6 @@ in unset _PATH ''); - packages = with pkgs; [ - git-crypt - ]; - commands = with pkgs; [ (devos nixUnstable) (devos agenix) From 6962aab06c1b679163e41cd70a697807b199548e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 24 Oct 2021 19:39:23 +0200 Subject: [PATCH 05/49] Remove .gitattributes files --- secrets/.gitattributes | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 secrets/.gitattributes diff --git a/secrets/.gitattributes b/secrets/.gitattributes deleted file mode 100644 index 901863e3..00000000 --- a/secrets/.gitattributes +++ /dev/null @@ -1,4 +0,0 @@ -* filter=git-crypt diff=git-crypt -.gitattributes !filter !diff -secrets.nix !filter !diff -README.md !filter !diff From c059af5248c67353953f95052aaa9c238180c538 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 29 Oct 2021 16:43:36 +0200 Subject: [PATCH 06/49] terminal-life: add upstream nixos-option gc fix --- modules/terminal-life/default.nix | 4 ++-- modules/terminal-life/zsh/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 4d36655f..87b2ee45 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, config, pkgs, self, ... }: with lib; let psCfg = config.pub-solar; @@ -37,7 +37,7 @@ in programs.neovim = import ./nvim { inherit config; inherit pkgs; }; programs.fzf = import ./fzf { inherit config; inherit pkgs; }; - programs.zsh = import ./zsh { inherit config; inherit pkgs; }; + programs.zsh = import ./zsh { inherit config; inherit pkgs; inherit self; }; }; }; } diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index 0ff87812..f4923c50 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, self, ... }: let psCfg = config.pub-solar; xdg = config.home-manager.users."${psCfg.user.name}".xdg; @@ -32,7 +32,7 @@ in drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone"; no = "manix \"\" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview=\"manix '{}'\" | xargs manix"; # fix nixos-option - nixos-option = "nixos-option -I nixpkgs=/etc/nixos/lib/compat"; + nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; }; zplug = { enable = true; From 9bd3f7d871ac240b777f2625086e2446a75f4181 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 29 Oct 2021 16:44:35 +0200 Subject: [PATCH 07/49] nvim: sort alphabetically, add gopls (go lsp) --- modules/terminal-life/nvim/default.nix | 45 +++++++++++++------------- modules/terminal-life/nvim/plugins.vim | 2 +- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 4647a76c..8d1be99d 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -69,73 +69,74 @@ in ]; extraPackages = with pkgs; [ - nodejs + ccls code-minimap + gopls + nodejs nodePackages.bash-language-server nodePackages.dockerfile-language-server-nodejs nodePackages.svelte-language-server - nodePackages.typescript-language-server nodePackages.typescript + nodePackages.typescript-language-server nodePackages.vim-language-server nodePackages.vue-language-server - nodePackages.yaml-language-server - nodePackages.vscode-json-languageserver-bin - nodePackages.vscode-html-languageserver-bin nodePackages.vscode-css-languageserver-bin - python3Full + nodePackages.vscode-html-languageserver-bin + nodePackages.vscode-json-languageserver-bin + nodePackages.yaml-language-server python-language-server + python3Full solargraph - rust-analyzer - universal-ctags - ccls rnix-lsp + rust-analyzer terraform-ls + universal-ctags ]; plugins = with pkgs.vimPlugins; [ - nvim-lspconfig - lsp_extensions-nvim completion-nvim + lsp_extensions-nvim + nvim-lspconfig - suda ack-vim - syntastic airline - workspace editorconfig-vim - vim-vinegar - vim-gutentags minimap-vim nnn-vim + suda + syntastic + vim-gutentags + vim-vinegar + workspace sonokai fugitive - vim-rhubarb vim-gitgutter + vim-rhubarb vimagit - vim-highlightedyank fzf-vim fzfWrapper + vim-highlightedyank beautify vim-surround - vim-sensible vim-bufkill + vim-sensible ansible-vim emmet-vim rust-vim vim-go - vim-vue vim-javascript vim-json vim-markdown - yats-vim + vim-nix vim-ruby vim-toml - vim-nix + vim-vue + yats-vim ]; } diff --git a/modules/terminal-life/nvim/plugins.vim b/modules/terminal-life/nvim/plugins.vim index b174531e..1ff28d6c 100644 --- a/modules/terminal-life/nvim/plugins.vim +++ b/modules/terminal-life/nvim/plugins.vim @@ -6,7 +6,7 @@ let g:gutentags_file_list_command = 'git ls-files' " Golang " Go test shortcut -nmap got :GoTest +nmap got :GoTest:botright copen " Go formatting autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist From 89b3cf78fd7af80e4dce4bfa9b3e6120e8d323e0 Mon Sep 17 00:00:00 2001 From: Karolis Labrencis Date: Tue, 2 Nov 2021 23:42:38 +0200 Subject: [PATCH 08/49] Document using deploy-rs to deploy home-manager --- doc/integrations/deploy.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/integrations/deploy.md b/doc/integrations/deploy.md index 642267c8..2282eb7f 100644 --- a/doc/integrations/deploy.md +++ b/doc/integrations/deploy.md @@ -45,5 +45,32 @@ deploy '.#hostName' --hostname host.example.com > ##### _Note:_ > Your user will need **passwordless** sudo access +### Home Manager + +Digga's `lib.mkDeployNodes` provides only `system` profile. +In order to deploy your `home-manager` configuration you should provide additional profile(s) to deploy-rs config: +```nix +# Initially, this line looks like this: deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; +deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations + { + = { + profilesOrder = [ "system" "" ""]; + profiles. = { + user = ""; + path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.; + }; + profiles. = { + user = ""; + path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.; + }; + }; + }; +``` + +Substitute ``, `` and `` placeholders (omitting the `<>`). + +`` is there to illustrate deploying multiple `home-manager` configurations. Either substitute those as well, +or remove them altogether. Don't forget the `profileOrder` variable. + [d-rs]: https://github.com/serokell/deploy-rs From 767592185bbdb0c6443f787bf65a0006db7cd209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Fri, 5 Nov 2021 23:43:01 +0100 Subject: [PATCH 09/49] Fix mailto-mutt EDITOR variable --- pkgs/mailto-mutt.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/mailto-mutt.nix b/pkgs/mailto-mutt.nix index a17d2409..80543277 100644 --- a/pkgs/mailto-mutt.nix +++ b/pkgs/mailto-mutt.nix @@ -1,5 +1,10 @@ self: with self; '' - echo "$@" >> $XDG_CACHE_HOME/log/mailto.log + mkdir -p $XDG_CACHE_HOME/log - exec ${alacritty}/bin/alacritty -e neomutt -- "$@" + LOGFILE=$XDG_CACHE_HOME/log/mailto.log + echo "$@" >> $LOGFILE + + EDITOR=/etc/profiles/per-user/$USER/bin/nvim + + ${alacritty}/bin/alacritty -e neomutt -- "$@" '' From 7ea95e90f51738a68869847008a4fb5283ab82fe Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 7 Nov 2021 19:17:10 +0100 Subject: [PATCH 10/49] terminal-life: add glow, a tui markdown viewer; sort packages --- modules/terminal-life/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 87b2ee45..135766cd 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -23,16 +23,17 @@ in home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.packages = [ - ag ack + ag bat exa + fd gh + glow + nnn powerline vifm watson - nnn - fd ]; programs.neovim = import ./nvim { inherit config; inherit pkgs; }; From d670aee07db3e2425828c30f420ccfe3356b28bd Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 7 Nov 2021 19:26:30 +0100 Subject: [PATCH 11/49] neovim: fix jsonls, fix cursor jumping into diagnostics buffer --- modules/terminal-life/nvim/lsp.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/terminal-life/nvim/lsp.vim b/modules/terminal-life/nvim/lsp.vim index 87c15ce5..519330f8 100644 --- a/modules/terminal-life/nvim/lsp.vim +++ b/modules/terminal-life/nvim/lsp.vim @@ -42,7 +42,9 @@ lua < g[ PrevDiagnosticCycle From b890e2d04a3cb9d98e4b89e4099437c91323934b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 15 Nov 2021 11:37:56 +0100 Subject: [PATCH 12/49] Fix java session variable --- profiles/base-user/session-variables.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index 4e745bba..264d787f 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -49,7 +49,7 @@ let CARGO_HOME = "${xdg.dataHome}/cargo"; # Java - _JAVA_OPTIONS = "-Djava.util.prefs.userRoot = '${xdg.configHome}/java'"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot='${xdg.configHome}/java'"; _JAVA_AWT_WM_NONREPARENTING = "1"; # docker From 0768353f08e4023d2b35a9ef319da37351bbcfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 15 Nov 2021 11:39:24 +0100 Subject: [PATCH 13/49] Use fixed telegram-desktop from unstable --- overlays/overrides.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 1c5070db..34c46f45 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -14,6 +14,10 @@ channels: final: prev: { signal-desktop starship deploy-rs + tdesktop + xdg-desktop-portal + xdg-desktop-portal-gtk + xdg-desktop-portal-wlr ; From 91163d38ed9aedccf0e7b9a714f19b30ff367a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Wed, 17 Nov 2021 12:05:50 +0100 Subject: [PATCH 14/49] Allow changing the user description --- modules/user/default.nix | 5 +++++ profiles/base-user/default.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/user/default.nix b/modules/user/default.nix index d2edd476..79e32eca 100644 --- a/modules/user/default.nix +++ b/modules/user/default.nix @@ -11,6 +11,11 @@ in type = types.nullOr types.str; default = "nixos"; }; + description = mkOption { + description = "User description"; + type = types.nullOr types.str; + default = "The main PubSolarOS user"; + }; password = mkOption { description = "User password"; type = types.nullOr types.str; diff --git a/profiles/base-user/default.nix b/profiles/base-user/default.nix index e327a736..80ac262e 100644 --- a/profiles/base-user/default.nix +++ b/profiles/base-user/default.nix @@ -15,7 +15,7 @@ in # This automatically sets group to users, createHome to true, # home to /home/username, useDefaultShell to true, and isSystemUser to false. isNormalUser = true; - description = ""; + description = psCfg.user.description; extraGroups = [ "wheel" "docker" "input" "audio" "networkmanager" "lp" "scanner" ]; initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else ""; shell = pkgs.zsh; From 70545abd1bf263c6c5f575fee41ec137af630f95 Mon Sep 17 00:00:00 2001 From: Michael Reddick Date: Sat, 20 Nov 2021 15:58:37 -0600 Subject: [PATCH 15/49] docs: fix typo in start/bootstrapping --- doc/start/bootstrapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/start/bootstrapping.md b/doc/start/bootstrapping.md index f4c5190e..b8a0ad04 100644 --- a/doc/start/bootstrapping.md +++ b/doc/start/bootstrapping.md @@ -6,7 +6,7 @@ This will help you boostrap a bare host with the help of the _Note: nothing prevents you from remotely executing the boostrapping process. See below._ -Once your target host has booted into the live iso, you need to partion +Once your target host has booted into the live iso, you need to partition and format your disk according to the [official manual][manual]. ## Mount partitions From b15b8bf86551f0b4ed2c7ac2c569d6784cd25fd7 Mon Sep 17 00:00:00 2001 From: Dmytro Kostiuchenko Date: Mon, 29 Nov 2021 08:44:15 +0200 Subject: [PATCH 16/49] Do not hardcode UID for the exemplary user uid = 1000 is an unreasonable default for an examplary user nixos, because someone trying DevOs on a working NixOS installation likely has their own user with uid=1000 already. The code thus renders /etc/passwd invalid preventing user from logging in --- users/nixos/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/users/nixos/default.nix b/users/nixos/default.nix index 5c037fe8..077a52e4 100644 --- a/users/nixos/default.nix +++ b/users/nixos/default.nix @@ -3,7 +3,6 @@ home-manager.users = { inherit (hmUsers) nixos; }; users.users.nixos = { - uid = 1000; password = "nixos"; description = "default"; isNormalUser = true; From b84d88fc92c6710cff8e294315eb23ceb7ecf40e Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Nov 2021 14:10:21 +0100 Subject: [PATCH 17/49] graphical, sway: disable greetd, auto-login directly to desktop --- modules/crypto/default.nix | 1 - modules/graphical/default.nix | 10 +--------- modules/sway/config/config.d/custom-keybindings.conf | 2 +- modules/sway/config/config.d/systemd.conf | 4 +++- modules/sway/default.nix | 2 -- modules/sway/swayidle.service.nix | 1 + modules/sway/waybar.service.nix | 1 + modules/terminal-life/default.nix | 4 +++- modules/terminal-life/zsh/default.nix | 5 +++++ 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/crypto/default.nix b/modules/crypto/default.nix index 5d14dcc2..8e9c5ee9 100644 --- a/modules/crypto/default.nix +++ b/modules/crypto/default.nix @@ -15,7 +15,6 @@ in services.pcscd.enable = true; services.gnome.gnome-keyring.enable = true; - security.pam.services.greetd.enableGnomeKeyring = true; home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { systemd.user.services.polkit-gnome-authentication-agent = import ./polkit-gnome-authentication-agent.service.nix pkgs; diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index ef628f9a..bbf8f59d 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -49,15 +49,7 @@ in }; }; - services.greetd = { - enable = true; - restart = false; - settings = { - default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.sway-service}/bin/sway-service"; - }; - }; - }; + services.getty.autologinUser = "${psCfg.user.name}"; qt5 = { enable = true; diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 2b7ba20d..6218d900 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -37,7 +37,7 @@ set $mode_system (l)ock, (e)xit, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutd bindsym $mod+0 mode "$mode_system" mode "$mode_system" { bindsym l exec swaylock-bg, mode "default" - bindsym e exec systemctl --user stop graphical-session.target, mode "default" + bindsym e exec swaymsg exit, mode "default" bindsym s exec systemctl suspend, mode "default" bindsym h exec systemctl hibernate, mode "default" bindsym r exec systemctl reboot, mode "default" diff --git a/modules/sway/config/config.d/systemd.conf b/modules/sway/config/config.d/systemd.conf index 3fecd355..d6380d41 100644 --- a/modules/sway/config/config.d/systemd.conf +++ b/modules/sway/config/config.d/systemd.conf @@ -3,4 +3,6 @@ # systemctl import-environment is complete, and services that require certain variables # will fail to run. # https://github.com/swaywm/sway/wiki/Systemd-integration -exec "systemctl --user import-environment; systemctl --user start sway-session.target; dbus-update-activation-environment WAYLAND_DISPLAY" +# Also, import the most important environment variables into the D-Bus and systemd +# user environments (e.g. required for screen sharing and Pinentry prompts): +exec "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemctl --user start sway-session.target; exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; systemd-cat --identifier=sway sway" diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 21f017c0..cfc5733c 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -62,7 +62,6 @@ in swaylock-bg sway-launcher - sway-service import-gtk-settings s wcwd @@ -72,7 +71,6 @@ in #programs.waybar.systemd.enable = true; systemd.user.services.mako = import ./mako.service.nix pkgs; - systemd.user.services.sway = import ./sway.service.nix pkgs; systemd.user.services.swayidle = import ./swayidle.service.nix pkgs; systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs; systemd.user.services.waybar = import ./waybar.service.nix pkgs; diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index a750eacb..0762d3f1 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -9,6 +9,7 @@ pkgs: }; Service = { Type = "simple"; + Environment = "PATH=${pkgs.bash}/bin:${pkgs.sway}/bin:${pkgs.swaylock}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ timeout 600 'swaylock-bg' \ timeout 900 'swaymsg "output * dpms off"' \ diff --git a/modules/sway/waybar.service.nix b/modules/sway/waybar.service.nix index f508f144..ee5e8938 100644 --- a/modules/sway/waybar.service.nix +++ b/modules/sway/waybar.service.nix @@ -10,6 +10,7 @@ pkgs: Service = { Type = "dbus"; + Environment = "PATH=${pkgs.bash}/bin:${pkgs.pavucontrol}/bin"; BusName = "fr.arouillard.waybar"; ExecStart = "${pkgs.waybar}/bin/waybar"; }; diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 135766cd..17262f77 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -15,7 +15,9 @@ in # Needed to get zsh completion for system packages (e.g. systemd). environment.pathsToLink = [ "/share/zsh" ]; - services.lorri.enable = true; + environment.shells = with pkgs; [ + zsh + ]; environment.systemPackages = with pkgs; [ screen diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index f4923c50..d892170c 100644 --- a/modules/terminal-life/zsh/default.nix +++ b/modules/terminal-life/zsh/default.nix @@ -18,6 +18,11 @@ in size = 10000; }; + loginExtra = '' + [ "$(tty)" = "/dev/tty1" ] && exec sway + ''; + + shellAliases = { nano = "nvim"; vi = "nvim"; From e84fb19a20fa93e18037d6ab1d8b03f741e40f26 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Nov 2021 14:50:46 +0100 Subject: [PATCH 18/49] sway: hotfix for swayidle, swaylock-bg missing in PATH --- modules/sway/swayidle.service.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sway/swayidle.service.nix b/modules/sway/swayidle.service.nix index 0762d3f1..597a8779 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -9,7 +9,7 @@ pkgs: }; Service = { Type = "simple"; - Environment = "PATH=${pkgs.bash}/bin:${pkgs.sway}/bin:${pkgs.swaylock}/bin"; + Environment = "PATH=/run/current-system/sw/bin:${pkgs.sway}/bin:${pkgs.swaylock}/bin:${pkgs.swaylock-bg}/bin"; ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \ timeout 600 'swaylock-bg' \ timeout 900 'swaymsg "output * dpms off"' \ From 65c8894f47129e1de575f5b83b406afc8b9c2d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 29 Nov 2021 17:15:00 +0100 Subject: [PATCH 19/49] Remove minimap from nvim, fix mergetool config for git --- modules/terminal-life/nvim/default.nix | 3 +-- profiles/base-user/.config/git/config.nix | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 8d1be99d..f66ce597 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -70,7 +70,6 @@ in extraPackages = with pkgs; [ ccls - code-minimap gopls nodejs nodePackages.bash-language-server @@ -101,7 +100,6 @@ in ack-vim airline editorconfig-vim - minimap-vim nnn-vim suda syntastic @@ -112,6 +110,7 @@ in sonokai fugitive + diffview-nvim vim-gitgutter vim-rhubarb vimagit diff --git a/profiles/base-user/.config/git/config.nix b/profiles/base-user/.config/git/config.nix index 6b099f87..95812623 100644 --- a/profiles/base-user/.config/git/config.nix +++ b/profiles/base-user/.config/git/config.nix @@ -13,14 +13,14 @@ in pol = pull ack = -c color.grep.linenumber=\"bold yellow\"\n -c color.grep.filename=\"bold green\"\n -c color.grep.match=\"reverse yellow\"\n grep --break --heading --line-number # define command which will be used when "nvim"is set as a merge tool -[mergetool "nvim"] - cmd = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim -f -c \"Gdiffsplit!\" \"$MERGED\" -# set "nvim" as tool for merging -[merge] - tool = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim -# automatically launch merge tool without displaying a prompt + [mergetool] prompt = false +[merge] + tool = nvim +[mergetool "nvim"] + cmd = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim -f -c \"Gdiffsplit!\" \"$MERGED\" + [commit] gpgsign = true [tag] From ea282db4eb3ef18f0bb5fbba4f65150c387f69ca Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 29 Nov 2021 17:25:55 +0100 Subject: [PATCH 20/49] nvim: remove diffview-nvim --- modules/terminal-life/nvim/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index f66ce597..c304c687 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -110,7 +110,6 @@ in sonokai fugitive - diffview-nvim vim-gitgutter vim-rhubarb vimagit From b5500d5e9e1b4dbae09014f7549e72e86df3130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 29 Nov 2021 19:06:10 +0100 Subject: [PATCH 21/49] Better terminal editing experience * Decrease alacritty font size * Improve file previews in fzf-nvim by removing some copyright notices * Use reverse layout in fzf-nvim to align with zsh file completion --- modules/graphical/alacritty.nix | 2 +- modules/terminal-life/nvim/default.nix | 10 +++++ modules/terminal-life/nvim/init.vim | 41 --------------------- modules/terminal-life/nvim/plugins.vim | 32 ++++++++++++++++ modules/terminal-life/nvim/preview-file.nix | 35 ++++++++++++++++++ 5 files changed, 78 insertions(+), 42 deletions(-) create mode 100644 modules/terminal-life/nvim/preview-file.nix diff --git a/modules/graphical/alacritty.nix b/modules/graphical/alacritty.nix index ef6c6956..f08be710 100644 --- a/modules/graphical/alacritty.nix +++ b/modules/graphical/alacritty.nix @@ -55,7 +55,7 @@ style = "Italic"; }; - size = 18.0; + size = 16.0; offset = { x = 0; diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index f66ce597..d25c1173 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -3,6 +3,8 @@ let psCfg = config.pub-solar; xdg = config.home-manager.users."${psCfg.user.name}".xdg; + preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs); + sonokai = pkgs.vimUtils.buildVimPlugin { name = "sonokai"; src = pkgs.fetchFromGitHub { @@ -66,6 +68,11 @@ in (builtins.readFile ./ui.vim) (builtins.readFile ./quickfixopenall.vim) (builtins.readFile ./lsp.vim) + '' + " fzf with file preview + command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, { 'options': ['--keep-right', '--cycle', '--layout', 'reverse', '--preview', '${preview-file}/bin/preview-file {}'] }, 0) + '' ]; extraPackages = with pkgs; [ @@ -93,6 +100,9 @@ in ]; plugins = with pkgs.vimPlugins; [ + # Lua async programming library + plenary-nvim + completion-nvim lsp_extensions-nvim nvim-lspconfig diff --git a/modules/terminal-life/nvim/init.vim b/modules/terminal-life/nvim/init.vim index b32a5022..9d4ac597 100644 --- a/modules/terminal-life/nvim/init.vim +++ b/modules/terminal-life/nvim/init.vim @@ -94,47 +94,6 @@ imap (fzf-complete-line) " Clear quickfix shortcut nmap c :ccl -" netrw -let g:netrw_fastbrowse=0 - -" fzf with file preview -command! -bang -nargs=? -complete=dir Files - \ call fzf#vim#files(, fzf#vim#with_preview(), 0) -"command! -bang -nargs=? -complete=dir Files -" \ call fzf#vim#files(, fzf#vim#with_preview({'options': '--preview "' . "grep -Pzo '.*See docs/COPYRIGHT.rdoc for more details(.*\n)*' {}" . '"'}), 0) - -" Auto-FMT rust code on save -let g:rustfmt_autosave = 1 - -" Indenting in html template tags -let g:html_indent_style1 = "inc" - -" yank highlight duration -let g:highlightedyank_highlight_duration = 200 - -" Markdown options -let g:vim_markdown_folding_disabled = 1 - -" Haskell options -let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` -let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` -let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` -let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern` -let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles -let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static` -let g:haskell_backpack = 1 " to enable highlighting of backpack keywords - -" Emmet -let g:user_emmet_leader_key='' - -" Minimap settings -let g:minimap_auto_start = 1 - -" Ack -if executable('ag') - let g:ackprg = 'ag --vimgrep' -endif - " Remember cursor position " Vim jumps to the last position when reopening a file if has("autocmd") diff --git a/modules/terminal-life/nvim/plugins.vim b/modules/terminal-life/nvim/plugins.vim index 1ff28d6c..2386826a 100644 --- a/modules/terminal-life/nvim/plugins.vim +++ b/modules/terminal-life/nvim/plugins.vim @@ -41,3 +41,35 @@ nnoremap gP :! git push " git Push " http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/ nmap [ :diffget //2 nmap ] :diffget //3 + +" netrw +let g:netrw_fastbrowse=0 + +" Auto-FMT rust code on save +let g:rustfmt_autosave = 1 + +" Indenting in html template tags +let g:html_indent_style1 = "inc" + +" yank highlight duration +let g:highlightedyank_highlight_duration = 200 + +" Markdown options +let g:vim_markdown_folding_disabled = 1 + +" Haskell options +let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` +let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` +let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` +let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern` +let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles +let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static` +let g:haskell_backpack = 1 " to enable highlighting of backpack keywords + +" Emmet +let g:user_emmet_leader_key='' + +" Ack +if executable('ag') + let g:ackprg = 'ag --vimgrep' +endif diff --git a/modules/terminal-life/nvim/preview-file.nix b/modules/terminal-life/nvim/preview-file.nix new file mode 100644 index 00000000..35f608fd --- /dev/null +++ b/modules/terminal-life/nvim/preview-file.nix @@ -0,0 +1,35 @@ +self: with self; '' +IFS=':' read -r -a INPUT <<< "$1" +FILE=''${INPUT[0]} +CENTER=''${INPUT[1]} + +if [[ "$1" =~ ^[A-Za-z]:\\ ]]; then + FILE=$FILE:''${INPUT[1]} + CENTER=''${INPUT[2]} +fi + +if [[ -n "$CENTER" && ! "$CENTER" =~ ^[0-9] ]]; then + exit 1 +fi +CENTER=''${CENTER/[^0-9]*/} + +FILE="''${FILE/#\~\//$HOME/}" +if [ ! -r "$FILE" ]; then + echo "File not found ''${FILE}" + exit 1 +fi + +if [ -z "$CENTER" ]; then + CENTER=0 +fi + +exec cat "$FILE" \ + | sed -e '/[#|\/\/ ?]-- copyright/,/[#\/\/]++/c\\' \ + | ${pkgs.coreutils}/bin/tr -s '\n' \ + | ${pkgs.bat}/bin/bat \ + --style="''${BAT_STYLE:-numbers}" \ + --color=always \ + --pager=never \ + --file-name=''$FILE \ + --highlight-line=$CENTER +'' From dc580d30b75a4c1d09c5966ca0aa1bb2faea9ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 29 Nov 2021 19:07:39 +0100 Subject: [PATCH 22/49] Remove useless nvim plugin plenary This dependency plugin is not needed anymore --- modules/terminal-life/nvim/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 6dc7e468..b5ebe743 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -100,9 +100,6 @@ in ]; plugins = with pkgs.vimPlugins; [ - # Lua async programming library - plenary-nvim - completion-nvim lsp_extensions-nvim nvim-lspconfig From 40dab652fbb605e238ae5a3c5119e6a3a68285fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 2 Dec 2021 12:19:37 +0100 Subject: [PATCH 23/49] Cleanup nvim config, add instant.nvim --- modules/terminal-life/nvim/default.nix | 56 ++++++++++++++++---------- modules/terminal-life/nvim/plugins.vim | 1 + 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index b5ebe743..2d4a8ee9 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -5,6 +5,16 @@ let preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs); + instant-nvim = pkgs.vimUtils.buildVimPlugin { + name = "instant"; + src = pkgs.fetchFromGitHub { + owner = "jbyuki"; + repo = "instant.nvim"; + rev = "c02d72267b12130609b7ad39b76cf7f4a3bc9554"; + sha256 = "sha256-7Pr2Au/oGKp5kMXuLsQY4BK5Wny9L1EBdXtyS5EaZPI="; + }; + }; + sonokai = pkgs.vimUtils.buildVimPlugin { name = "sonokai"; src = pkgs.fetchFromGitHub { @@ -53,28 +63,6 @@ in withRuby = true; withPython3 = true; - extraConfig = builtins.concatStringsSep "\n" [ - '' - " Persistent undo - set undofile - set undodir=${xdg.cacheHome}/nvim/undo - - set backupdir=${xdg.dataHome}/nvim/backup - set directory=${xdg.dataHome}/nvim/swap/ - '' - (builtins.readFile ./init.vim) - (builtins.readFile ./plugins.vim) - (builtins.readFile ./clipboard.vim) - (builtins.readFile ./ui.vim) - (builtins.readFile ./quickfixopenall.vim) - (builtins.readFile ./lsp.vim) - '' - " fzf with file preview - command! -bang -nargs=? -complete=dir Files - \ call fzf#vim#files(, { 'options': ['--keep-right', '--cycle', '--layout', 'reverse', '--preview', '${preview-file}/bin/preview-file {}'] }, 0) - '' - ]; - extraPackages = with pkgs; [ ccls gopls @@ -104,6 +92,8 @@ in lsp_extensions-nvim nvim-lspconfig + instant-nvim + ack-vim airline editorconfig-vim @@ -144,4 +134,26 @@ in vim-vue yats-vim ]; + + extraConfig = builtins.concatStringsSep "\n" [ + '' + " Persistent undo + set undofile + set undodir=${xdg.cacheHome}/nvim/undo + + set backupdir=${xdg.dataHome}/nvim/backup + set directory=${xdg.dataHome}/nvim/swap/ + '' + (builtins.readFile ./init.vim) + (builtins.readFile ./plugins.vim) + (builtins.readFile ./clipboard.vim) + (builtins.readFile ./ui.vim) + (builtins.readFile ./quickfixopenall.vim) + (builtins.readFile ./lsp.vim) + '' + " fzf with file preview + command! -bang -nargs=? -complete=dir Files + \ call fzf#vim#files(, { 'options': ['--keep-right', '--cycle', '--layout', 'reverse', '--preview', '${preview-file}/bin/preview-file {}'] }, 0) + '' + ]; } diff --git a/modules/terminal-life/nvim/plugins.vim b/modules/terminal-life/nvim/plugins.vim index 2386826a..2086bfd7 100644 --- a/modules/terminal-life/nvim/plugins.vim +++ b/modules/terminal-life/nvim/plugins.vim @@ -73,3 +73,4 @@ let g:user_emmet_leader_key='' if executable('ag') let g:ackprg = 'ag --vimgrep' endif + From c825128eb4ba0a12f57aad081116d55caa134c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 11 Dec 2021 21:08:20 +0100 Subject: [PATCH 24/49] Add looking glass for VMs, switch from scream-ivshmem to qemu-pulse --- modules/gaming/default.nix | 2 ++ modules/virtualisation/default.nix | 17 +++++++++--- ...e.service.nix => scream-pulse.service.nix} | 0 overlays/overrides.nix | 4 +++ pkgs/default.nix | 27 ++++++++++--------- pkgs/lgcl.nix | 3 +++ 6 files changed, 37 insertions(+), 16 deletions(-) rename modules/virtualisation/{scream-ivshmem-pulse.service.nix => scream-pulse.service.nix} (100%) create mode 100644 pkgs/lgcl.nix diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index 21c54bac..00939e82 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -19,6 +19,8 @@ in home.packages = [ playonlinux godot + obs-studio + obs-studio-plugins.wlrobs ]; }; }; diff --git a/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index c97db9d2..4d588622 100644 --- a/modules/virtualisation/default.nix +++ b/modules/virtualisation/default.nix @@ -3,6 +3,8 @@ with lib; let psCfg = config.pub-solar; cfg = config.pub-solar.virtualisation; + doesGaming = config.pub-solar.gaming.enable; + extraObsPlugins = if doesGaming then [ pkgs.obs-studio-plugins.looking-glass-obs ] else [ ]; in { options.pub-solar.virtualisation = { @@ -32,17 +34,26 @@ in virt-manager python38Packages.libvirt gvfs - scream edk2 OVMF win-virtio + looking-glass-client + lgcl ]; home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { xdg.dataFile."libvirt/.keep".text = "# this file is here to generate the directory"; + home.packages = extraObsPlugins; }; - systemd.tmpfiles.rules = [ "f /dev/shm/scream-ivshmem 0660 ${psCfg.user.name} kvm" ]; - systemd.user.services.scream-ivshmem-pulse = import ./scream-ivshmem-pulse.service.nix pkgs; + systemd.tmpfiles.rules = [ + "f /dev/shm/looking-glass 0660 ${psCfg.user.name} kvm" + ]; + networking.bridges.virbr1.interfaces = [ ]; + networking.interfaces.virbr1 = { + ipv4.addresses = [ + { address = "192.168.123.1"; prefixLength = 24; } + ]; + }; }; } diff --git a/modules/virtualisation/scream-ivshmem-pulse.service.nix b/modules/virtualisation/scream-pulse.service.nix similarity index 100% rename from modules/virtualisation/scream-ivshmem-pulse.service.nix rename to modules/virtualisation/scream-pulse.service.nix diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 34c46f45..d2d7793c 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -12,12 +12,16 @@ channels: final: prev: { nixpkgs-fmt qutebrowser signal-desktop + tdesktop starship deploy-rs tdesktop xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-wlr + obs-studio + obs-studio-plugins + looking-glass-client ; diff --git a/pkgs/default.nix b/pkgs/default.nix index a096f93e..312e685f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,18 +1,19 @@ final: prev: - with final; { +with final; { # keep sources this first sources = prev.callPackage (import ./_sources/generated.nix) { }; # then, call packages with `final.callPackage` - import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.nix final); - mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final); - mopidy-jellyfin = import ./mopidy-jellyfin.nix final; - mu = writeShellScriptBin "mu" (import ./mu.nix final); - psos = writeShellScriptBin "psos" (import ./psos.nix final); - s = writeShellScriptBin "s" (import ./s.nix final); - sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final); - sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final); - swaylock-bg = writeScriptBin "swaylock-bg" (import ./swaylock-bg.nix final); - toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); - uhk-agent = import ./uhk-agent.nix final; - wcwd = writeShellScriptBin "wcwd" (import ./wcwd.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); + mopidy-jellyfin = import ./mopidy-jellyfin.nix final; + mu = writeShellScriptBin "mu" (import ./mu.nix final); + psos = writeShellScriptBin "psos" (import ./psos.nix final); + s = writeShellScriptBin "s" (import ./s.nix final); + sway-launcher = writeScriptBin "sway-launcher" (import ./sway-launcher.nix final); + sway-service = writeShellScriptBin "sway-service" (import ./sway-service.nix final); + swaylock-bg = writeScriptBin "swaylock-bg" (import ./swaylock-bg.nix final); + toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final); + uhk-agent = import ./uhk-agent.nix final; + wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final); } diff --git a/pkgs/lgcl.nix b/pkgs/lgcl.nix new file mode 100644 index 00000000..4ef2dac9 --- /dev/null +++ b/pkgs/lgcl.nix @@ -0,0 +1,3 @@ +self: with self; '' + ${self.looking-glass-client}/bin/looking-glass-client -f /dev/shm/looking-glass input:ignoreWindowsKeys=yes input:grabKeyboardOnFocus=no +'' From 8abf715ca9dd7145b6dbf1ee809ff1a5a631cbbd Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 14 Dec 2021 15:15:56 +0100 Subject: [PATCH 25/49] Prevent merge conflicts with upstream in overlays --- overlays/overrides.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index d2d7793c..5c114143 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -6,15 +6,16 @@ channels: final: prev: { cachix dhall discord - element-desktop-wayland + element-desktop rage - neovim-unwrapped nixpkgs-fmt qutebrowser signal-desktop - tdesktop starship deploy-rs + + element-desktop-wayland + neovim-unwrapped tdesktop xdg-desktop-portal xdg-desktop-portal-gtk From e45744d6feceab6af9003860aa62afc14657a19b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 16 Dec 2021 18:12:27 +0100 Subject: [PATCH 26/49] Only notify upon drone step failure --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 8dcf9bbb..3b63dc6f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -67,7 +67,6 @@ steps: image: plugins/matrix when: status: - - success - failure event: - cron From 6151d02b8dd9c74f0ce645cdd0c6309adbf57673 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 29 Nov 2021 17:37:02 -0500 Subject: [PATCH 27/49] rm: use of patched nix for nixos 21.11 enabled digga - patched nix held the follows patch which is now upstreamed --- flake.lock | 101 +++++++++++++++++++---------------------------------- flake.nix | 5 ++- 2 files changed, 37 insertions(+), 69 deletions(-) diff --git a/flake.lock b/flake.lock index 02e7a7d2..0465ccb7 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1620877075, - "narHash": "sha256-XvgTqtmQZHegu9UMDSR50gK5cHEM2gbnRH0qecmdN54=", + "lastModified": 1637793790, + "narHash": "sha256-oPXavjxETEWGXq8g7kQHyRLKUmLX2yPtGn+t3V0mrTY=", "owner": "ryantm", "repo": "agenix", - "rev": "e543aa7d68f222e1e771165da9e9a64b5bf7b3e3", + "rev": "f85eea0e29fa9a8924571d0e398215e175f80d55", "type": "github" }, "original": { @@ -70,11 +70,11 @@ ] }, "locked": { - "lastModified": 1633373878, - "narHash": "sha256-9+ziZ8l6rq3yXyY6B0wYXrVdfxr6cdpEbPEGRHywBKc=", + "lastModified": 1633877936, + "narHash": "sha256-+o3n6s7fR8dBGRldTGelyp2j3jSyTlrniOXwNfmMG20=", "owner": "divnix", "repo": "bud", - "rev": "4e709a2fcf19df500ba87d9c3b1b1481401cd53b", + "rev": "15df091133ff95216c321b09be04905c0a0944c4", "type": "github" }, "original": { @@ -90,11 +90,11 @@ ] }, "locked": { - "lastModified": 1622060422, - "narHash": "sha256-hPVlvrAyf6zL7tTx0lpK+tMxEfZeMiIZ/A2xaJ41WOY=", + "lastModified": 1634994402, + "narHash": "sha256-xmlCVVOYGpZoxgOqsDOVF0B0ASrnbNGVAEzID9qh2xo=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "007d700e644ac588ad6668e6439950a5b6e2ff64", + "rev": "44da835ac40dab5fd231298b59d83487382d2fab", "type": "github" }, "original": { @@ -165,11 +165,11 @@ ] }, "locked": { - "lastModified": 1632959483, - "narHash": "sha256-jXogai6e+QRtiZFBOrMmYdeLXejzVT91kuDKu2RuJ10=", + "lastModified": 1634161492, + "narHash": "sha256-7OZz7DqAhO+3axY68xsMXAyD+b5gJgVXuKjslTSCM3Y=", "owner": "divnix", "repo": "digga", - "rev": "6549cf4c87d1a77138cbecbc6bb9483c20572cd7", + "rev": "a55450a16d362b6e1c50bb4025aaa604b385d3ba", "type": "github" }, "original": { @@ -245,27 +245,6 @@ "type": "github" } }, - "home": { - "inputs": { - "nixpkgs": [ - "nixos" - ] - }, - "locked": { - "lastModified": 1624228557, - "narHash": "sha256-wwOqe73BsrXfRv1PhyXQFNC8iTET50KvE/HitdkRgxs=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "35a24648d155843a4d162de98c17b1afd5db51e4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-21.05", - "repo": "home-manager", - "type": "github" - } - }, "latest": { "locked": { "lastModified": 1632660378, @@ -284,11 +263,11 @@ }, "latest_2": { "locked": { - "lastModified": 1627942574, - "narHash": "sha256-guUcGRWvY2mfiVSet2x/zeHIyflm2wgglj0ldg0mMio=", + "lastModified": 1638198142, + "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c464dc811babfe316ed4ab7bbc12351122e69dd7", + "rev": "8a308775674e178495767df90c419425474582a1", "type": "github" }, "original": { @@ -322,11 +301,11 @@ ] }, "locked": { - "lastModified": 1623927034, - "narHash": "sha256-sGxlmfp5eXL5sAMNqHSb04Zq6gPl+JeltIZ226OYN0w=", + "lastModified": 1638203339, + "narHash": "sha256-Sz3iCvbWrVWOD/XfYQeRJgP/7MVYL3/VKsNXvDeWBFc=", "owner": "nmattia", "repo": "naersk", - "rev": "e09c320446c5c2516d430803f7b19f5833781337", + "rev": "c3e56b8a4ffb6d906cdfcfee034581f9a8ece571", "type": "github" }, "original": { @@ -357,22 +336,6 @@ "type": "github" } }, - "nixos": { - "locked": { - "lastModified": 1628203131, - "narHash": "sha256-jQgXeJ9NQQS0Eobb/qQOvS+RRULkqRikAeXkkFKOPDA=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "178da37860823d35e801c7df2f73d7866d3d598a", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-21.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixos-generators": { "inputs": { "nixlib": [ @@ -400,11 +363,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1625333638, - "narHash": "sha256-M6J9RN60XJyv6nUfDFCwnz5aVjhe8+GJnV8Q9VpdQQQ=", + "lastModified": 1638182287, + "narHash": "sha256-vBzf+hbTJz2ZdXV/DWirl6wOO7tjdqzTIU+0FANt65U=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "41775780a0b6b32b3d32dcc32bb9bc6df809062d", + "rev": "6b3f79de09c3de7c91ab51e55e87879f61b6faec", "type": "github" }, "original": { @@ -415,11 +378,11 @@ }, "nur": { "locked": { - "lastModified": 1626378135, - "narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=", + "lastModified": 1638219753, + "narHash": "sha256-xARa9i5KHtpfekdHMo556BmlI/BCV4jz+qHZVhUx4Wg=", "owner": "nix-community", "repo": "NUR", - "rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d", + "rev": "95c40f4ecb1238bae0a179a4d02b43e1ce8af554", "type": "github" }, "original": { @@ -444,11 +407,11 @@ ] }, "locked": { - "lastModified": 1632700276, - "narHash": "sha256-XABvQUq2qv+YcQxW93DnU8mgtVsGJWyhcznny/Lbp0Q=", + "lastModified": 1634524567, + "narHash": "sha256-v9ZTZj1WNQaaVfs1P1mUPuh518mmwpqszj1EjdeGUmc=", "owner": "berberman", "repo": "nvfetcher", - "rev": "248fe98ed1bc352ce164d08a9e76fdc5f301ba2d", + "rev": "807513f4bbd0e3b5863f4c3b91f8ac846ed6da9b", "type": "github" }, "original": { @@ -506,14 +469,20 @@ "digga", "flake-utils-plus" ], - "home": "home", + "home": [ + "digga", + "home-manager" + ], "latest": "latest_2", "naersk": "naersk", "nixlib": [ "digga", "nixlib" ], - "nixos": "nixos", + "nixos": [ + "digga", + "nixpkgs" + ], "nixos-hardware": "nixos-hardware", "nixpkgs": [ "nixos" diff --git a/flake.nix b/flake.nix index d87fdce1..ffc744c3 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ inputs = { - nixos.url = "github:nixos/nixpkgs/release-21.05"; + nixos.url = "github:nixos/nixpkgs/release-21.11"; latest.url = "github:nixos/nixpkgs/nixos-unstable"; digga.url = "github:divnix/digga"; @@ -19,7 +19,7 @@ bud.inputs.nixpkgs.follows = "nixos"; bud.inputs.devshell.follows = "digga/devshell"; - home.url = "github:nix-community/home-manager/release-21.05"; + home.url = "github:nix-community/home-manager/release-21.11"; home.inputs.nixpkgs.follows = "nixos"; darwin.url = "github:LnL7/nix-darwin"; @@ -73,7 +73,6 @@ nixos = { imports = [ (digga.lib.importOverlays ./overlays) ]; overlays = [ - digga.overlays.patchedNix nur.overlay agenix.overlay nvfetcher.overlay From 838bcd1f5114c93473fdd920d49dc5abba6577bf Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 29 Nov 2021 18:07:21 -0500 Subject: [PATCH 28/49] nix-direnv: rm enableFlakes and pass nixUnstable > Failed assertions: - The option definition `programs.direnv.nix-direnv.enableFlakes' in `/nix/store/pv3vi4n7x83r4sc3ljqdgg9qifr4n5gp-source/users/profiles/direnv' no longer has any effect; please remove it. Flake support is now always enabled. --- overlays/overrides.nix | 2 ++ overlays/various-flake-fixes.nix | 11 ----------- users/profiles/direnv/default.nix | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 overlays/various-flake-fixes.nix diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 597817b2..4b48b6d1 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -15,6 +15,8 @@ channels: final: prev: { deploy-rs ; + # nix is set to 2.3 in 21.11 + nix-direnv = prev.nix-direnv.override { nix = prev.nixUnstable; }; haskellPackages = prev.haskellPackages.override (old: { diff --git a/overlays/various-flake-fixes.nix b/overlays/various-flake-fixes.nix deleted file mode 100644 index 7dbfc18b..00000000 --- a/overlays/various-flake-fixes.nix +++ /dev/null @@ -1,11 +0,0 @@ -final: prev: { - # Since: https://github.com/NixOS/nixpkgs/pull/126137 - nix-direnv = - if builtins.hasAttr "enableFlakes" prev.nix-direnv.override.__functionArgs - then - prev.nix-direnv.override - { - enableFlakes = true; - } - else prev.nix-direnv; -} diff --git a/users/profiles/direnv/default.nix b/users/profiles/direnv/default.nix index d345e2d3..67ff2113 100644 --- a/users/profiles/direnv/default.nix +++ b/users/profiles/direnv/default.nix @@ -3,7 +3,6 @@ enable = true; nix-direnv = { enable = true; - enableFlakes = true; }; }; } From a319aed9f4e21ac096891077bc217af1a38803c7 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Mon, 29 Nov 2021 19:38:56 -0500 Subject: [PATCH 29/49] imp: move follows responsibility downstream - also remove unimportant (small) depenencies from follows management - so that it is less complex as errors occur, since: - it seems there are still follows issues present upstream --- flake.lock | 402 ++++++++++++++++++++++++++++++++---------------- flake.nix | 31 ++-- shell/devos.nix | 7 +- 3 files changed, 277 insertions(+), 163 deletions(-) diff --git a/flake.lock b/flake.lock index 0465ccb7..2a3e6163 100644 --- a/flake.lock +++ b/flake.lock @@ -3,7 +3,7 @@ "agenix": { "inputs": { "nixpkgs": [ - "latest" + "nixos" ] }, "locked": { @@ -23,10 +23,7 @@ "beautysh": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "bud", - "nixpkgs" - ], + "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix" }, "locked": { @@ -86,7 +83,7 @@ "darwin": { "inputs": { "nixpkgs": [ - "latest" + "nixos" ] }, "locked": { @@ -105,37 +102,34 @@ }, "deploy": { "inputs": { + "fenix": "fenix", "flake-compat": "flake-compat", "nixpkgs": [ - "digga", - "latest" + "nixos" ], - "utils": [ - "digga", - "flake-utils" - ] + "utils": "utils" }, "locked": { - "lastModified": 1632822684, - "narHash": "sha256-lt7eayYmgsD5OQwpb1XYfHpxttn43bWo7G7hIJs+zJw=", - "owner": "serokell", + "lastModified": 1637357482, + "narHash": "sha256-mMRxOlcQs3V9cZYsKGKWEjl+oqclhaH1SKT3QGeTQ0Q=", + "owner": "input-output-hk", "repo": "deploy-rs", - "rev": "9a02de4373e0ec272d08a417b269a28ac8b961b4", + "rev": "5a6db26726ec8c7904aea5bcdf13589342386f9d", "type": "github" }, "original": { - "owner": "serokell", + "owner": "input-output-hk", "repo": "deploy-rs", "type": "github" } }, "devshell": { "locked": { - "lastModified": 1632436039, - "narHash": "sha256-OtITeVWcKXn1SpVEnImpTGH91FycCskGBPqmlxiykv4=", + "lastModified": 1637575296, + "narHash": "sha256-ZY8YR5u8aglZPe27+AJMnPTG6645WuavB+w0xmhTarw=", "owner": "numtide", "repo": "devshell", - "rev": "7a7a7aa0adebe5488e5abaec688fd9ae0f8ea9c6", + "rev": "0e56ef21ba1a717169953122c7415fa6a8cd2618", "type": "github" }, "original": { @@ -147,15 +141,16 @@ "digga": { "inputs": { "blank": "blank", - "deploy": "deploy", + "deploy": [ + "deploy" + ], "devshell": "devshell", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "flake-utils-plus": "flake-utils-plus", "home-manager": [ "home" ], "latest": "latest", - "nix": "nix", "nixlib": [ "nixos" ], @@ -165,11 +160,11 @@ ] }, "locked": { - "lastModified": 1634161492, - "narHash": "sha256-7OZz7DqAhO+3axY68xsMXAyD+b5gJgVXuKjslTSCM3Y=", + "lastModified": 1640031018, + "narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=", "owner": "divnix", "repo": "digga", - "rev": "a55450a16d362b6e1c50bb4025aaa604b385d3ba", + "rev": "3157889810e51a1ae03f82bf6bf6657ba8cf93c6", "type": "github" }, "original": { @@ -178,6 +173,25 @@ "type": "github" } }, + "fenix": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1637303083, + "narHash": "sha256-e2A5JBjxYNpjoGd53K0oVUUaS9ojwOT5rnThyPNS46M=", + "owner": "nix-community", + "repo": "fenix", + "rev": "8294ceadbbbe1a886640bfcc15f5a02a2b471955", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -194,6 +208,22 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1627913399, + "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1623875721, @@ -211,17 +241,14 @@ }, "flake-utils-plus": { "inputs": { - "flake-utils": [ - "digga", - "flake-utils" - ] + "flake-utils": "flake-utils_4" }, "locked": { - "lastModified": 1630859749, - "narHash": "sha256-qkoU2rIbbP2+T0dfcqXW35GCWNsi0Y1IgN9BELmt4Zo=", + "lastModified": 1638994888, + "narHash": "sha256-iz/ynGNZlvqKCOnFrEKqGA+BVKGQMG+g2JT+e3OOLN8=", "owner": "divnix", "repo": "flake-utils-plus", - "rev": "a4e267e3fc87e60c5029c6c3855935ff1ff3018e", + "rev": "b4f9f517574cb7bd6ee3f19c72c19634c9f536e1", "type": "github" }, "original": { @@ -232,11 +259,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", "owner": "numtide", "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", "type": "github" }, "original": { @@ -245,13 +272,79 @@ "type": "github" } }, + "flake-utils_3": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1631561581, + "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home": { + "inputs": { + "nixpkgs": [ + "nixos" + ] + }, + "locked": { + "lastModified": 1637917557, + "narHash": "sha256-3u5bLyGn5NUG3RJA7/v1Bqa/QCFGqp/01Bh/4REf9m4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "4daff26495ca9ac67476cba8cf15c3e36d91ab18", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-21.11", + "repo": "home-manager", + "type": "github" + } + }, "latest": { "locked": { - "lastModified": 1632660378, - "narHash": "sha256-sjA8eQlnyDjDLyAyq3XlJmN0nqW0ftl/pb7VnMg86L0=", + "lastModified": 1638198142, + "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497", + "rev": "8a308775674e178495767df90c419425474582a1", "type": "github" }, "original": { @@ -277,27 +370,10 @@ "type": "github" } }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1617481909, - "narHash": "sha256-SqnfOFuLuVRRNeVJr1yeEPJue/qWoCp5N6o5Kr///p4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "148f9b2f586c41b7e36e73009db43ea68c7a1a4d", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "ref": "VERSION_0_8_4", - "repo": "lowdown", - "type": "github" - } - }, "naersk": { "inputs": { "nixpkgs": [ - "latest" + "nixos" ] }, "locked": { @@ -314,45 +390,48 @@ "type": "github" } }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, + "nixlib": { "locked": { - "lastModified": 1630335771, - "narHash": "sha256-eljjEPJdLK3aDskF7qX4YM/6KCq+w9nr+IKhrKW/AIQ=", + "lastModified": 1640478849, + "narHash": "sha256-S4lNc3fb9UpYgVtTa/mZZXphq7+xGy74YGIlOWB1ceE=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "c85a293f7d094a799dcf1197c31925bc44e94d6b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixos": { + "locked": { + "lastModified": 1638231428, + "narHash": "sha256-Sm5loBKdeusSvIAC+LtzRT6I7tAcqZdIPnHcxZt7NaE=", "owner": "nixos", - "repo": "nix", - "rev": "50a35860ee9237d341948437c5f70a7f0987d393", + "repo": "nixpkgs", + "rev": "393c5357a0071d51668bcdc69dfc25ddacbd5840", "type": "github" }, "original": { "owner": "nixos", - "repo": "nix", + "ref": "release-21.11", + "repo": "nixpkgs", "type": "github" } }, "nixos-generators": { "inputs": { - "nixlib": [ - "digga", - "nixlib" - ], - "nixpkgs": [ - "digga", - "blank" - ] + "nixlib": "nixlib", + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1624973746, - "narHash": "sha256-11JbJRduNwyf556gndGErR5/12ceyHOHBfEuha5Vws4=", + "lastModified": 1637655461, + "narHash": "sha256-kXZPbclN3gKwjhp2/RYFDFpAsSBwzX1iLF4EcnHZsPQ=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "022ef440af8dc237ab1f59fa363cb1e25783ec3e", + "rev": "05a3eb158a9c7746a5d463726d7f7cccf07500e4", "type": "github" }, "original": { @@ -376,13 +455,76 @@ "type": "github" } }, + "nixpkgs": { + "locked": { + "lastModified": 1640599962, + "narHash": "sha256-j/M2VunVu+h8entxSi/OUlz2AVP4SxHIBzs6bI++tRs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4e3c158740c2a7bfbfb4b2956d5782c4bff19f9c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1640635827, + "narHash": "sha256-Sltztf2a07hiNzdHECOL43RVDRdNKm5RdsSYS7iNxz4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ad86f7d78fa8e48a0ee096b2bdf7d6f842ca9317", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1636976544, + "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "931ab058daa7e4cd539533963f95e2bb0dbd41e6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1640418986, + "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5c37ad87222cfc1ec36d6cd1364514a9efc2f7f2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { - "lastModified": 1638219753, - "narHash": "sha256-xARa9i5KHtpfekdHMo556BmlI/BCV4jz+qHZVhUx4Wg=", + "lastModified": 1638231901, + "narHash": "sha256-XzuvFTmsXULdWynQWzgaPHikepNhjEpK4o5WXfmRqek=", "owner": "nix-community", "repo": "NUR", - "rev": "95c40f4ecb1238bae0a179a4d02b43e1ce8af554", + "rev": "4e68fb3d8f48e91196deb13f44bcfb421da25afb", "type": "github" }, "original": { @@ -392,18 +534,10 @@ }, "nvfetcher": { "inputs": { - "flake-compat": [ - "digga", - "deploy", - "flake-compat" - ], - "flake-utils": [ - "digga", - "flake-utils-plus", - "flake-utils" - ], + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_5", "nixpkgs": [ - "latest" + "nixos" ] }, "locked": { @@ -422,16 +556,8 @@ }, "poetry2nix": { "inputs": { - "flake-utils": [ - "bud", - "beautysh", - "flake-utils" - ], - "nixpkgs": [ - "bud", - "beautysh", - "nixpkgs" - ] + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1625240517, @@ -450,46 +576,50 @@ "root": { "inputs": { "agenix": "agenix", - "blank": [ - "digga", - "blank" - ], "bud": "bud", "darwin": "darwin", - "deploy": [ - "digga", - "deploy" - ], + "deploy": "deploy", "digga": "digga", - "flake-utils": [ - "digga", - "flake-utils" - ], - "flake-utils-plus": [ - "digga", - "flake-utils-plus" - ], - "home": [ - "digga", - "home-manager" - ], + "home": "home", "latest": "latest_2", "naersk": "naersk", - "nixlib": [ - "digga", - "nixlib" - ], - "nixos": [ - "digga", - "nixpkgs" - ], + "nixos": "nixos", "nixos-hardware": "nixos-hardware", - "nixpkgs": [ - "nixos" - ], "nur": "nur", "nvfetcher": "nvfetcher" } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1637268320, + "narHash": "sha256-lxB1r+7cmZisiGLx0tZ2LaC6X/EcQTbRIWZfnLIIgs4=", + "owner": "rust-analyzer", + "repo": "rust-analyzer", + "rev": "f0da9406bcbde1bc727242b481d8de825e84f59a", + "type": "github" + }, + "original": { + "owner": "rust-analyzer", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1637014545, + "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ffc744c3..550d3436 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "A highly structured configuration database."; - nixConfig.extra-experimental-features = "nix-command flakes ca-references"; + nixConfig.extra-experimental-features = "nix-command flakes"; nixConfig.extra-substituters = "https://nrdxp.cachix.org https://nix-community.cachix.org"; nixConfig.extra-trusted-public-keys = "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="; @@ -14,6 +14,7 @@ digga.inputs.nixpkgs.follows = "nixos"; digga.inputs.nixlib.follows = "nixos"; digga.inputs.home-manager.follows = "home"; + digga.inputs.deploy.follows = "deploy"; bud.url = "github:divnix/bud"; bud.inputs.nixpkgs.follows = "nixos"; @@ -23,31 +24,21 @@ home.inputs.nixpkgs.follows = "nixos"; darwin.url = "github:LnL7/nix-darwin"; - darwin.inputs.nixpkgs.follows = "latest"; + darwin.inputs.nixpkgs.follows = "nixos"; - deploy.follows = "digga/deploy"; + deploy.url = "github:input-output-hk/deploy-rs"; + deploy.inputs.nixpkgs.follows = "nixos"; agenix.url = "github:ryantm/agenix"; - agenix.inputs.nixpkgs.follows = "latest"; + agenix.inputs.nixpkgs.follows = "nixos"; nvfetcher.url = "github:berberman/nvfetcher"; - nvfetcher.inputs.nixpkgs.follows = "latest"; - nvfetcher.inputs.flake-compat.follows = "digga/deploy/flake-compat"; - nvfetcher.inputs.flake-utils.follows = "digga/flake-utils-plus/flake-utils"; + nvfetcher.inputs.nixpkgs.follows = "nixos"; naersk.url = "github:nmattia/naersk"; - naersk.inputs.nixpkgs.follows = "latest"; + naersk.inputs.nixpkgs.follows = "nixos"; nixos-hardware.url = "github:nixos/nixos-hardware"; - - # start ANTI CORRUPTION LAYER - # remove after https://github.com/NixOS/nix/pull/4641 - nixpkgs.follows = "nixos"; - nixlib.follows = "digga/nixlib"; - blank.follows = "digga/blank"; - flake-utils-plus.follows = "digga/flake-utils-plus"; - flake-utils.follows = "digga/flake-utils"; - # end ANTI CORRUPTION LAYER }; outputs = @@ -79,11 +70,7 @@ ./pkgs/default.nix ]; }; - latest = { - overlays = [ - deploy.overlay - ]; - }; + latest = { }; }; lib = import ./lib { lib = digga.lib // nixos.lib; }; diff --git a/shell/devos.nix b/shell/devos.nix index 6f01267f..dd6f75ef 100644 --- a/shell/devos.nix +++ b/shell/devos.nix @@ -1,4 +1,4 @@ -{ pkgs, extraModulesPath, ... }: +{ pkgs, extraModulesPath, inputs, ... }: let hooks = import ./hooks; @@ -43,12 +43,9 @@ in (linter editorconfig-checker) # (docs python3Packages.grip) too many deps (docs mdbook) + (devos inputs.deploy.packages.${pkgs.system}.deploy-rs) ] - ++ lib.optional - (pkgs ? deploy-rs) - (devos deploy-rs.deploy-rs) - ++ lib.optional (system != "i686-linux") (devos cachix) From ceffec93925f2068f8d89ef79fa86797b6b59077 Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Wed, 29 Dec 2021 14:42:51 -0800 Subject: [PATCH 30/49] profiles/core: add comments for each option --- profiles/core/default.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index d2801d89..c1aed3fa 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -2,12 +2,21 @@ let inherit (lib) fileContents; in { + # Sets nrdxp.cachix.org binary cache which just speeds up some builds imports = [ ../cachix ]; + # For rage encryption, all hosts need a ssh key pair + services.openssh = { + enable = true; + openFirewall = lib.mkDefault false; + }; + + # This is just a representation of the nix default nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; environment = { + # Selection of sysadmin tools that can come in handy systemPackages = with pkgs; [ binutils coreutils @@ -33,6 +42,8 @@ in whois ]; + # Starship is a fast and featureful shell prompt + # starship.toml has sane defaults that can be changed there shellInit = '' export STARSHIP_CONFIG=${ pkgs.writeText "starship.toml" @@ -113,18 +124,18 @@ in nix = { + # Improve nix store disk usage autoOptimiseStore = true; - gc.automatic = true; - optimise.automatic = true; + # Prevents impurities in builds useSandbox = true; - allowedUsers = [ "@wheel" ]; - + # give root and @wheel special privileges with nix trustedUsers = [ "root" "@wheel" ]; + # Generally useful nix option defaults extraOptions = '' min-free = 536870912 keep-outputs = true @@ -135,20 +146,17 @@ in }; programs.bash = { + # Enable starship promptInit = '' eval "$(${pkgs.starship}/bin/starship init bash)" ''; + # Enable direnv, a tool for managing shell environments interactiveShellInit = '' eval "$(${pkgs.direnv}/bin/direnv hook bash)" ''; }; - # For rage encryption, all hosts need a ssh key pair - services.openssh = { - enable = true; - openFirewall = lib.mkDefault false; - }; - + # Service that makes Out of Memory Killer more effective services.earlyoom.enable = true; } From 87f1d7da18e44a8386bf31a0ee82da8f3ad0ae51 Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Wed, 29 Dec 2021 15:41:58 -0800 Subject: [PATCH 31/49] bud: move to shell and use git clone for get --- bud/get.bash | 1 - flake.nix | 2 +- {bud => shell/bud}/default.nix | 0 shell/bud/get.bash | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 bud/get.bash rename {bud => shell/bud}/default.nix (100%) create mode 100644 shell/bud/get.bash diff --git a/bud/get.bash b/bud/get.bash deleted file mode 100644 index b88081b4..00000000 --- a/bud/get.bash +++ /dev/null @@ -1 +0,0 @@ -nix flake new -t "github:divnix/devos/main" "${2:-devos}" diff --git a/flake.nix b/flake.nix index 550d3436..50402527 100644 --- a/flake.nix +++ b/flake.nix @@ -141,7 +141,7 @@ } // { - budModules = { devos = import ./bud; }; + budModules = { devos = import ./shell/bud; }; } ; } diff --git a/bud/default.nix b/shell/bud/default.nix similarity index 100% rename from bud/default.nix rename to shell/bud/default.nix diff --git a/shell/bud/get.bash b/shell/bud/get.bash new file mode 100644 index 00000000..7c10d1ba --- /dev/null +++ b/shell/bud/get.bash @@ -0,0 +1 @@ +git clone https://github.com/divnix/devos.git "${2:-devos}" From 1cbf28f445caabc4f89798a7447ee0bee580b81b Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Wed, 29 Dec 2021 19:49:19 -0800 Subject: [PATCH 32/49] flake: update bud input fixes #406 --- flake.lock | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index 2a3e6163..774055b5 100644 --- a/flake.lock +++ b/flake.lock @@ -23,7 +23,10 @@ "beautysh": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "bud", + "nixpkgs" + ], "poetry2nix": "poetry2nix" }, "locked": { @@ -67,11 +70,11 @@ ] }, "locked": { - "lastModified": 1633877936, - "narHash": "sha256-+o3n6s7fR8dBGRldTGelyp2j3jSyTlrniOXwNfmMG20=", + "lastModified": 1640836100, + "narHash": "sha256-My9Lay6BCDwAZgrL4SuVXHkYPHIU7ypnuiS/pd7eg1M=", "owner": "divnix", "repo": "bud", - "rev": "15df091133ff95216c321b09be04905c0a0944c4", + "rev": "b1d8ab3970f4dfb5fb90d7d8a9ab493c75d031fc", "type": "github" }, "original": { @@ -175,7 +178,7 @@ }, "fenix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "rust-analyzer-src": "rust-analyzer-src" }, "locked": { @@ -424,7 +427,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1637655461, @@ -457,36 +460,20 @@ }, "nixpkgs": { "locked": { - "lastModified": 1640599962, - "narHash": "sha256-j/M2VunVu+h8entxSi/OUlz2AVP4SxHIBzs6bI++tRs=", + "lastModified": 1640831728, + "narHash": "sha256-KK5SKqqfAt+ev3bHLrVXJ6i4zx9YQW6k19oUInY8T2M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4e3c158740c2a7bfbfb4b2956d5782c4bff19f9c", + "rev": "5d90841dd0179430db010dfc2c58b2a7de4371be", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { - "locked": { - "lastModified": 1640635827, - "narHash": "sha256-Sltztf2a07hiNzdHECOL43RVDRdNKm5RdsSYS7iNxz4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ad86f7d78fa8e48a0ee096b2bdf7d6f842ca9317", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1636976544, "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", @@ -502,7 +489,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1640418986, "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", @@ -557,7 +544,7 @@ "poetry2nix": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { "lastModified": 1625240517, From e0e7c4c42d77f0469b494b531ba733d4d7512435 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Jan 2022 22:56:03 +0100 Subject: [PATCH 33/49] neovim: fix completion, fix python lsp --- modules/terminal-life/nvim/default.nix | 8 +- modules/terminal-life/nvim/lsp.vim | 111 +++++++++++++++++++++---- 2 files changed, 100 insertions(+), 19 deletions(-) diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 2d4a8ee9..e46c82e2 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -78,7 +78,7 @@ in nodePackages.vscode-html-languageserver-bin nodePackages.vscode-json-languageserver-bin nodePackages.yaml-language-server - python-language-server + python39Packages.python-lsp-server python3Full solargraph rnix-lsp @@ -88,7 +88,11 @@ in ]; plugins = with pkgs.vimPlugins; [ - completion-nvim + nvim-cmp + cmp-nvim-lsp + cmp_luasnip + luasnip + lsp_extensions-nvim nvim-lspconfig diff --git a/modules/terminal-life/nvim/lsp.vim b/modules/terminal-life/nvim/lsp.vim index 519330f8..1d5bf4d4 100644 --- a/modules/terminal-life/nvim/lsp.vim +++ b/modules/terminal-life/nvim/lsp.vim @@ -14,11 +14,44 @@ set shortmess+=c " https://gitlab.com/Iron_E/dotfiles/-/blob/master/.config/nvim/lua/_config/plugin/nvim_lsp.lua lua < + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + local opts = { noremap=true, silent=true } + + -- See `:help vim.lsp.*` for documentation on any of the below functions + buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) + buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) + buf_set_keymap('n', 'K', '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', '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) + end + -- Add additional capabilities supported by nvim-cmp + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) + for lsp_key, lsp_settings in pairs({ 'bashls', ------------------------------- Bash 'ccls', --------------------------------- C / C++ / Objective-C @@ -46,7 +79,7 @@ lua <'] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, + [''] = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, + } EOF " Visualize diagnostics @@ -105,14 +193,3 @@ autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics({ focusable = " have a fixed column for the diagnostics to appear in " this removes the jitter when warnings/errors flow in set signcolumn=yes - -" NeoVim 0.5 Code navigation shortcuts -nnoremap gd lua vim.lsp.buf.definition() -nnoremap K lua vim.lsp.buf.hover() -nnoremap gD lua vim.lsp.buf.implementation() -nnoremap lua vim.lsp.buf.signature_help() -nnoremap 1gD lua vim.lsp.buf.type_definition() -nnoremap gr lua vim.lsp.buf.references() -nnoremap g0 lua vim.lsp.buf.document_symbol() -nnoremap gW lua vim.lsp.buf.workspace_symbol() -nnoremap lua vim.lsp.buf.declaration() From b3d764ba6e36998fb3daaea5fe3b9ffc1ce94309 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Jan 2022 23:02:05 +0100 Subject: [PATCH 34/49] audio: rename pulseeffects to easyeffects, follow upstream: https://github.com/wwmm/easyeffects --- modules/audio/default.nix | 13 ++++++++++--- modules/audio/easyeffects.service.nix | 8 ++++++++ modules/audio/pulseeffects.service.nix | 8 -------- 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 modules/audio/easyeffects.service.nix delete mode 100644 modules/audio/pulseeffects.service.nix diff --git a/modules/audio/default.nix b/modules/audio/default.nix index ce8c2f34..51ec0b7e 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -13,26 +13,33 @@ in config = mkIf cfg.enable { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.packages = [ + # easyeffects, e.g. for microphone noise filtering + easyeffects mu pavucontrol pa_applet playerctl # Needed for pactl cmd, until pw-cli is more mature (vol up/down hotkeys?) pulseaudio - # pulseeffects for microphone noise filtering - pulseeffects-pw vimpc ]; xdg.configFile."vimpc/vimpcrc".source = ./.config/vimpc/vimpcrc; - systemd.user.services.pulseeffects = import ./pulseeffects.service.nix pkgs; + systemd.user.services.easyeffects = import ./easyeffects.service.nix pkgs; }; # Enable sound using pipewire-pulse services.pipewire = { + enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; + config.pipewire = { + context.default.clock = { + allowed-rates = [ 44100 48000 88200 96000 ]; + rate = 44100; + }; + }; config.pipewire-pulse = builtins.fromJSON (builtins.readFile ./pipewire-pulse.conf.json); # Bluetooth configuration for pipewire diff --git a/modules/audio/easyeffects.service.nix b/modules/audio/easyeffects.service.nix new file mode 100644 index 00000000..e94d0abd --- /dev/null +++ b/modules/audio/easyeffects.service.nix @@ -0,0 +1,8 @@ +pkgs: +{ + Service = { + Type = "dbus"; + BusName = "com.github.wwmm.easyeffects"; + ExecStart = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service"; + }; +} diff --git a/modules/audio/pulseeffects.service.nix b/modules/audio/pulseeffects.service.nix deleted file mode 100644 index 632fbb54..00000000 --- a/modules/audio/pulseeffects.service.nix +++ /dev/null @@ -1,8 +0,0 @@ -pkgs: -{ - Service = { - Type = "dbus"; - BusName = "com.github.wwmm.pulseeffects"; - ExecStart = "${pkgs.pulseeffects-pw}/bin/pulseeffects --gapplication-service"; - }; -} From d50ef271e6c7a8d5e7531e8426f311bf8bfd711b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Jan 2022 23:17:09 +0100 Subject: [PATCH 35/49] devops: add pgcli --- modules/devops/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/devops/default.nix b/modules/devops/default.nix index c862af61..04f886a0 100644 --- a/modules/devops/default.nix +++ b/modules/devops/default.nix @@ -14,6 +14,7 @@ in home.packages = [ drone-cli nmap + pgcli python38Packages.ansible restic shellcheck From f45a51805a06fafb6a91f3aa1331c9fcdbc71e87 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Jan 2022 23:20:06 +0100 Subject: [PATCH 36/49] base user: init global gitignore, update mimeapps --- profiles/base-user/.config/git/config.nix | 1 + .../.config/git/global_gitignore.nix | 4 ++++ profiles/base-user/home.nix | 1 + profiles/base-user/mimeapps.nix | 23 ++++++++++--------- 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 profiles/base-user/.config/git/global_gitignore.nix diff --git a/profiles/base-user/.config/git/config.nix b/profiles/base-user/.config/git/config.nix index 95812623..53c53a77 100644 --- a/profiles/base-user/.config/git/config.nix +++ b/profiles/base-user/.config/git/config.nix @@ -9,6 +9,7 @@ in ${if user.gpgKeyId != null then "signingkey = ${user.gpgKeyId}" else ""} [core] editor = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim + excludesFile = /home/${config.pub-solar.user.name}/.config/git/global_gitignore [alias] pol = pull ack = -c color.grep.linenumber=\"bold yellow\"\n -c color.grep.filename=\"bold green\"\n -c color.grep.match=\"reverse yellow\"\n grep --break --heading --line-number diff --git a/profiles/base-user/.config/git/global_gitignore.nix b/profiles/base-user/.config/git/global_gitignore.nix new file mode 100644 index 00000000..1ee11f34 --- /dev/null +++ b/profiles/base-user/.config/git/global_gitignore.nix @@ -0,0 +1,4 @@ +{ config, pkgs, ... }: +let +in +''tags'' diff --git a/profiles/base-user/home.nix b/profiles/base-user/home.nix index 6d7c87d2..4becfab3 100644 --- a/profiles/base-user/home.nix +++ b/profiles/base-user/home.nix @@ -32,6 +32,7 @@ in xdg.mimeApps = import ./mimeapps.nix; xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; }; + xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix { inherit config; inherit pkgs; }; xdg.configFile."dircolors".source = ./.config/dircolors; xdg.configFile."xmodmap".source = ./.config/xmodmap; xdg.configFile."user-dirs.dirs".source = ./.config/user-dirs.dirs; diff --git a/profiles/base-user/mimeapps.nix b/profiles/base-user/mimeapps.nix index ea2333ce..395c1b87 100644 --- a/profiles/base-user/mimeapps.nix +++ b/profiles/base-user/mimeapps.nix @@ -1,25 +1,26 @@ { enable = true; defaultApplications = { - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - "x-scheme-handler/ftp" = [ "firefox.desktop" ]; - "x-scheme-handler/chrome" = [ "firefox.desktop" ]; - "text/html" = [ "firefox.desktop" ]; + "application/octet-stream" = [ "firefox.desktop" ]; + "application/pdf" = [ "org.gnome.Evince.desktop" ]; + "application/x-bittorrent" = [ "deluge.desktop" ]; "application/x-extension-htm" = [ "firefox.desktop" ]; "application/x-extension-html" = [ "firefox.desktop" ]; "application/x-extension-shtml" = [ "firefox.desktop" ]; - "application/xhtml+xml" = [ "firefox.desktop" ]; "application/x-extension-xhtml" = [ "firefox.desktop" ]; "application/x-extension-xht" = [ "firefox.desktop" ]; + "application/xhtml+xml" = [ "firefox.desktop" ]; "image/jpeg" = [ "org.gnome.eog.desktop" ]; "image/png" = [ "org.gnome.eog.desktop" ]; - "video/mp4" = [ "vlc.desktop" ]; - "text/plain" = [ "firefox.desktop" ]; - "x-scheme-handler/mailto" = [ "userapp-Thunderbird.desktop" ]; "message/rfc822" = [ "userapp-Thunderbird.desktop" ]; - "application/pdf" = [ "org.gnome.Evince.desktop" ]; - "application/x-bittorrent" = [ "deluge.desktop" ]; + "text/html" = [ "firefox.desktop" ]; + "text/plain" = [ "firefox.desktop" ]; + "video/mp4" = [ "vlc.desktop" ]; + "x-scheme-handler/chrome" = [ "firefox.desktop" ]; + "x-scheme-handler/ftp" = [ "firefox.desktop" ]; + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "x-scheme-handler/mailto" = [ "userapp-Thunderbird.desktop" ]; "x-scheme-handler/msteams" = [ "teams.desktop" ]; "x-scheme-handler/tg" = [ "userapp-Telegram Desktop-JBKFU0.desktop" ]; }; From a0aa1065655c9301f7e39bf912ef4c2205d82db1 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 5 Jan 2022 23:20:38 +0100 Subject: [PATCH 37/49] core: add gitFull, nix-tree --- profiles/core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index c4247377..1e62186b 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -28,10 +28,9 @@ in inetutils pciutils usbutils - git + gitFull git-lfs git-bug - git-crypt wget openssl openssh @@ -68,6 +67,7 @@ in niv manix nix-index + nix-tree # Build broken, python2.7-PyJWT-2.0.1.drv' failed #nixops psos From ad99c6152a28b7f48cdab2ad456aa6b2e9f68271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Thu, 6 Jan 2022 14:14:53 +0100 Subject: [PATCH 38/49] Use correct overrides for nix 2.4 --- overlays/overrides.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index f42dc2ab..cf036d8c 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -26,7 +26,7 @@ channels: final: prev: { ; # 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: { From a7fae1dbcc2ca5b2287611bce2ec5bc87d455acf Mon Sep 17 00:00:00 2001 From: Ben Merritt Date: Sun, 9 Jan 2022 00:14:24 -0800 Subject: [PATCH 39/49] Update secrets path See https://github.com/ryantm/agenix/commit/e5386644356a3f686f7fceac8645f0a9f94a2de6 --- doc/secrets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/secrets.md b/doc/secrets.md index 996f4180..47ca43d4 100644 --- a/doc/secrets.md +++ b/doc/secrets.md @@ -90,7 +90,7 @@ In any profile that uses a NixOS module that requires a secret you can enable a ``` -Then you can just pass the path `/run/secrets/mysecret` to the module. +Then you can just pass the path `/run/agenix/mysecret` to the module. You can make use of the many options provided by the age module to customize where and how secrets get decrypted. You can learn about them by looking at the From fbfb84b96c899af918e72cf82016161f3b46a210 Mon Sep 17 00:00:00 2001 From: Ben Merritt Date: Mon, 4 Oct 2021 08:54:27 -0700 Subject: [PATCH 40/49] Fix outdated option name --- doc/concepts/users.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/concepts/users.md b/doc/concepts/users.md index 3ab7c39c..b2a6c2a3 100644 --- a/doc/concepts/users.md +++ b/doc/concepts/users.md @@ -37,9 +37,10 @@ User profiles can be collected in a similar fashion as system ones into a `suite argument that gets passed to your home-manager users. ### Example +`flake.nix` ```nix { - home-manager.users.nixos = { suites, ... }: { + home.users.nixos = { suites, ... }: { imports = suites.base; }; } From 868818d4a4515f52ad38be8b60022154651ee4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sun, 16 Jan 2022 17:09:18 +0100 Subject: [PATCH 41/49] Fix mopidy jellyfin --- pkgs/mopidy-jellyfin.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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="; }; From 070664bb722d6af67b294a764eb5213798b9e75d Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Thu, 13 Jan 2022 19:57:34 -0800 Subject: [PATCH 42/49] README: Add more flakes to "in the wild" Remove the nrd branch, since that doesn't exist anymore --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 275714ca..29d450dc 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ expected. There are unstable versions (0._x_._x_) to help users keep track of changes and progress, and a [`develop`](https://github.com/divnix/devos/tree/develop) branch for the brave 😜 ## In the Wild -* The original [authors][please] +* @Pacman99: [Personal](https://gitlab.com/coffeetables/lower), [Server](https://gitlab.com/coffeetables/myrdd) +* [@danielphan2003](https://github.com/danielphan2003/flk) and make sure to also check out [devos-ext-lib][devos-ext-lib] +* [PubSolarOS](https://git.sr.ht/~b12f/pub-solar-os) ## Shoulders This work does not reinvent the wheel. It stands on the [shoulders of the @@ -89,3 +91,4 @@ DevOS is licensed under the [MIT License][mit]. [nvfetcher]: https://github.com/berberman/nvfetcher [please]: https://github.com/nrdxp/devos/tree/nrd [matrix]: https://matrix.to/#/#devos:nixos.org +[devos-ext-lib]: https://github.com/divnix/devos-ext-lib From adf005b5c83514fb572144aac851026360400156 Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Sat, 29 Jan 2022 11:57:55 -0800 Subject: [PATCH 43/49] flake: update digga, home, nixos, latest --- flake.lock | 120 +++++++++++++++++++++++------------------------------ 1 file changed, 52 insertions(+), 68 deletions(-) diff --git a/flake.lock b/flake.lock index 774055b5..67701251 100644 --- a/flake.lock +++ b/flake.lock @@ -23,10 +23,7 @@ "beautysh": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": [ - "bud", - "nixpkgs" - ], + "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix" }, "locked": { @@ -148,7 +145,6 @@ "deploy" ], "devshell": "devshell", - "flake-utils": "flake-utils_3", "flake-utils-plus": "flake-utils-plus", "home-manager": [ "home" @@ -163,11 +159,11 @@ ] }, "locked": { - "lastModified": 1640031018, - "narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=", + "lastModified": 1643510242, + "narHash": "sha256-9C9DyJhQ5bevk0CEEjGct+U9EqUgHg8T70nxz47zjMI=", "owner": "divnix", "repo": "digga", - "rev": "3157889810e51a1ae03f82bf6bf6657ba8cf93c6", + "rev": "33bfb05b8a148d8ad6a842de74e22209bf9fe5d7", "type": "github" }, "original": { @@ -178,7 +174,7 @@ }, "fenix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "rust-analyzer-src": "rust-analyzer-src" }, "locked": { @@ -244,29 +240,29 @@ }, "flake-utils-plus": { "inputs": { - "flake-utils": "flake-utils_4" + "flake-utils": "flake-utils_3" }, "locked": { - "lastModified": 1638994888, - "narHash": "sha256-iz/ynGNZlvqKCOnFrEKqGA+BVKGQMG+g2JT+e3OOLN8=", - "owner": "divnix", + "lastModified": 1639385028, + "narHash": "sha256-oqorKz3mwf7UuDJwlbCEYCB2LfcWLL0DkeCWhRIL820=", + "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "b4f9f517574cb7bd6ee3f19c72c19634c9f536e1", + "rev": "be1be083af014720c14f3b574f57b6173b4915d0", "type": "github" }, "original": { - "owner": "divnix", + "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", "type": "github" } }, "flake-utils_2": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", "owner": "numtide", "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", "type": "github" }, "original": { @@ -291,21 +287,6 @@ } }, "flake-utils_4": { - "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { "locked": { "lastModified": 1631561581, "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", @@ -327,11 +308,11 @@ ] }, "locked": { - "lastModified": 1637917557, - "narHash": "sha256-3u5bLyGn5NUG3RJA7/v1Bqa/QCFGqp/01Bh/4REf9m4=", + "lastModified": 1642653493, + "narHash": "sha256-22mGPjiHUo2Jmze4IjXCJLjeK2mbvvCztHmUyUMr4yw=", "owner": "nix-community", "repo": "home-manager", - "rev": "4daff26495ca9ac67476cba8cf15c3e36d91ab18", + "rev": "28b9ae40c45c5e7711c353fee1b7af734e293979", "type": "github" }, "original": { @@ -359,11 +340,11 @@ }, "latest_2": { "locked": { - "lastModified": 1638198142, - "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", + "lastModified": 1643347846, + "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a308775674e178495767df90c419425474582a1", + "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", "type": "github" }, "original": { @@ -395,11 +376,11 @@ }, "nixlib": { "locked": { - "lastModified": 1640478849, - "narHash": "sha256-S4lNc3fb9UpYgVtTa/mZZXphq7+xGy74YGIlOWB1ceE=", + "lastModified": 1641688481, + "narHash": "sha256-6L+EU12xLDHby7y8elgFtRKVBxix+7qV8DhVgXqrKZo=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "c85a293f7d094a799dcf1197c31925bc44e94d6b", + "rev": "f697717b3d3a074ffc16c8c8227504f0db292886", "type": "github" }, "original": { @@ -410,11 +391,11 @@ }, "nixos": { "locked": { - "lastModified": 1638231428, - "narHash": "sha256-Sm5loBKdeusSvIAC+LtzRT6I7tAcqZdIPnHcxZt7NaE=", + "lastModified": 1643463207, + "narHash": "sha256-W0azAxucUq84BvWqDPt3gX8kyc8wYvGUynZV9COfByQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "393c5357a0071d51668bcdc69dfc25ddacbd5840", + "rev": "03098169624f487eef37186b3214c40e6b6e919d", "type": "github" }, "original": { @@ -427,7 +408,10 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "digga", + "blank" + ] }, "locked": { "lastModified": 1637655461, @@ -460,11 +444,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1640831728, - "narHash": "sha256-KK5SKqqfAt+ev3bHLrVXJ6i4zx9YQW6k19oUInY8T2M=", + "lastModified": 1643428210, + "narHash": "sha256-ympCeHuXeGitpnegE0raAtWLNg3vZbjj5QbbMvvBGCQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5d90841dd0179430db010dfc2c58b2a7de4371be", + "rev": "e1b353e890801a759efe9a4c42f6984e47721f0d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1643513770, + "narHash": "sha256-Q64SabfQLuhHQfhpIHS/fLCEO2NUFnI+EKsB5GnfWh8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "66ab3568d67b90275c0720aae8b911bad82c24fe", "type": "github" }, "original": { @@ -473,7 +473,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1636976544, "narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", @@ -489,22 +489,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1640418986, - "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5c37ad87222cfc1ec36d6cd1364514a9efc2f7f2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "locked": { "lastModified": 1638231901, @@ -522,7 +506,7 @@ "nvfetcher": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_4", "nixpkgs": [ "nixos" ] @@ -544,7 +528,7 @@ "poetry2nix": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1625240517, From 9fd3a1085e10e6272082c21cab6baad21e0ffeaa Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Sat, 29 Jan 2022 11:49:16 -0800 Subject: [PATCH 44/49] bud: switch back to pulling devos as template --- shell/bud/get.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/bud/get.bash b/shell/bud/get.bash index 7c10d1ba..89e2af3d 100644 --- a/shell/bud/get.bash +++ b/shell/bud/get.bash @@ -1 +1 @@ -git clone https://github.com/divnix/devos.git "${2:-devos}" + nix flake new -t "github:divnix/devos/main" "${2:-devos}" From 6de02a64be14a1109828f5989c8e726c8914db3a Mon Sep 17 00:00:00 2001 From: Parthiv Seetharaman Date: Sat, 29 Jan 2022 19:58:36 -0800 Subject: [PATCH 45/49] overrides: remove nix-direnv line --- overlays/overrides.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 4b48b6d1..e35ad7e4 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -15,9 +15,6 @@ channels: final: prev: { deploy-rs ; - # nix is set to 2.3 in 21.11 - nix-direnv = prev.nix-direnv.override { nix = prev.nixUnstable; }; - haskellPackages = prev.haskellPackages.override (old: { overrides = prev.lib.composeExtensions (old.overrides or (_: _: { })) (hfinal: hprev: From 7becfcd913aac24f11d52a67884e5ab9b5da1a27 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 14:42:02 +0100 Subject: [PATCH 46/49] Fix last upstream merge, add back openssh service Dont't autoUpgrade by default --- profiles/core/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 87b79740..eca35b4e 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -117,7 +117,11 @@ in ''; }; - system.autoUpgrade.enable = true; + # For rage encryption, all hosts need a ssh key pair + services.openssh = { + enable = true; + openFirewall = lib.mkDefault false; + }; # Service that makes Out of Memory Killer more effective services.earlyoom.enable = true; From a4dbe4fa785ac542382d5de9f61ae6090a8227c0 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 16:19:36 +0100 Subject: [PATCH 47/49] Reference nix-dram package directly from inputs This should avoid patches not working because our pkgs follows nixos = release-21.11 and nix-dram follows nixos-unstable --- flake.nix | 1 - profiles/core/default.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index b50837b4..26e442ad 100644 --- a/flake.nix +++ b/flake.nix @@ -71,7 +71,6 @@ nur.overlay agenix.overlay nvfetcher.overlay - nix-dram.overlay ./pkgs/default.nix ]; }; diff --git a/profiles/core/default.nix b/profiles/core/default.nix index eca35b4e..dca063f4 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -93,7 +93,7 @@ in nix = { # use nix-dram, a patched nix command, see: https://github.com/dramforever/nix-dram - package = pkgs.nix-dram; + package = inputs.nix-dram.packages.${pkgs.system}.nix-dram; # Improve nix store disk usage autoOptimiseStore = true; From 2748fbcdee0df2e6ef10fa849bd518385c8a1f40 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:09:49 +0100 Subject: [PATCH 48/49] wayland: use NIXOS_OZONE_WL instead of *-wayland packages --- modules/social/default.nix | 2 +- modules/sway/config/config.d/custom-keybindings.conf | 2 +- overlays/overrides.nix | 1 - profiles/base-user/session-variables.nix | 3 +++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/social/default.nix b/modules/social/default.nix index 90a23c3e..f3aa63b7 100644 --- a/modules/social/default.nix +++ b/modules/social/default.nix @@ -15,7 +15,7 @@ in #mySignalDesktop signal-desktop tdesktop - element-desktop-wayland + element-desktop irssi ]; }; diff --git a/modules/sway/config/config.d/custom-keybindings.conf b/modules/sway/config/config.d/custom-keybindings.conf index 6218d900..5faddece 100644 --- a/modules/sway/config/config.d/custom-keybindings.conf +++ b/modules/sway/config/config.d/custom-keybindings.conf @@ -18,7 +18,7 @@ bindsym $mod+F2 exec firefox bindsym $mod+F3 exec $term -e vifm bindsym $mod+Shift+F3 exec gksu $term -e vifm bindsym $mod+F4 exec nautilus -w -bindsym $mod+Shift+F4 exec signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland +bindsym $mod+Shift+F4 exec signal-desktop bindsym $mod+F5 exec $term -e 'mocp -C $XDG_CONFIG_DIR/mocp/config' bindsym $mod+Shift+m exec mu bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf diff --git a/overlays/overrides.nix b/overlays/overrides.nix index 5c114143..c0cb58ad 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -14,7 +14,6 @@ channels: final: prev: { starship deploy-rs - element-desktop-wayland neovim-unwrapped tdesktop xdg-desktop-portal diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index 264d787f..cc3aa69f 100644 --- a/profiles/base-user/session-variables.nix +++ b/profiles/base-user/session-variables.nix @@ -58,6 +58,9 @@ let # experimental wayland in firefox/thunderbird MOZ_ENABLE_WAYLAND = "1"; + # chromium / electron on wayland: enable ozone (native wayland mode) + NIXOS_OZONE_WL = "1"; + # Vagrant VAGRANT_HOME = "${xdg.dataHome}/vagrant"; VAGRANT_DEFAULT_PROVIDER = "libvirt"; From ad3fc6126da2dc47fa29abdb3f24c1dfe25d7cc3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 31 Jan 2022 17:37:21 +0100 Subject: [PATCH 49/49] core: add missing argument inputs --- profiles/core/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/core/default.nix b/profiles/core/default.nix index dca063f4..f45e7a78 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -1,4 +1,4 @@ -{ self, config, lib, pkgs, ... }: +{ self, config, lib, pkgs, inputs, ... }: let inherit (lib) fileContents; in {