diff --git a/.drone.yml b/.drone.yml index 2b514c21..efeeac92 100644 --- a/.drone.yml +++ b/.drone.yml @@ -67,7 +67,6 @@ steps: image: plugins/matrix when: status: - - success - failure event: - cron 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 diff --git a/README.md b/README.md index b166d710..29d450dc 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,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 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/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 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 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. + diff --git a/flake.nix b/flake.nix index 0089a3ba..022c5a02 100644 --- a/flake.nix +++ b/flake.nix @@ -150,7 +150,7 @@ } // { - budModules = { devos = import ./bud; }; + budModules = { devos = import ./shell/bud; }; } ; } 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/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/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/graphical/default.nix b/modules/graphical/default.nix index c07e627e..f2e2ffcf 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 d5887e3e..5faddece 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 6f19f66e..b690d9c0 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -72,7 +72,6 @@ in swaylock-bg sway-launcher - sway-service import-gtk-settings s wcwd @@ -82,7 +81,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..597a8779 100644 --- a/modules/sway/swayidle.service.nix +++ b/modules/sway/swayidle.service.nix @@ -9,6 +9,7 @@ pkgs: }; Service = { Type = "simple"; + 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"' \ 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 84e39c4c..75ca2bd3 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; @@ -18,28 +18,30 @@ in environment.shells = with pkgs; [ zsh ]; + environment.systemPackages = with pkgs; [ screen ]; home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.packages = [ - ag ack asciinema + ag bat exa + fd gh + glow + nnn powerline vifm watson - nnn - fd ]; 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/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 931e71e6..02102c49 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -3,6 +3,18 @@ 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); + + 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 { @@ -51,6 +63,81 @@ in withRuby = true; withPython3 = true; + extraPackages = with pkgs; [ + ccls + gopls + nodejs + nodePackages.bash-language-server + nodePackages.dockerfile-language-server-nodejs + nodePackages.svelte-language-server + nodePackages.typescript + nodePackages.typescript-language-server + nodePackages.vim-language-server + nodePackages.vue-language-server + nodePackages.vscode-langservers-extracted + nodePackages.yaml-language-server + python39Packages.python-lsp-server + python3Full + solargraph + rnix-lsp + rust-analyzer + terraform-ls + universal-ctags + ]; + + plugins = with pkgs.vimPlugins; [ + nvim-cmp + cmp-nvim-lsp + cmp_luasnip + luasnip + + lsp_extensions-nvim + nvim-lspconfig + + instant-nvim + + ack-vim + airline + editorconfig-vim + nnn-vim + suda + syntastic + vim-gutentags + vim-vinegar + workspace + + sonokai + + fugitive + vim-gitgutter + vim-rhubarb + vimagit + + fzf-vim + fzfWrapper + vim-highlightedyank + + beautify + vim-surround + + vim-bufkill + vim-sensible + + ansible-vim + emmet-vim + rust-vim + vim-go + vim-javascript + vim-json + SchemaStore-nvim + vim-markdown + vim-nix + vim-ruby + vim-toml + vim-vue + yats-vim + ]; + extraConfig = builtins.concatStringsSep "\n" [ '' " Persistent undo @@ -66,82 +153,10 @@ in (builtins.readFile ./ui.vim) (builtins.readFile ./quickfixopenall.vim) (builtins.readFile ./lsp.vim) - ]; - - extraPackages = with pkgs; [ - nodejs - code-minimap - nodePackages.bash-language-server - nodePackages.dockerfile-language-server-nodejs - nodePackages.svelte-language-server - nodePackages.typescript-language-server - nodePackages.typescript - nodePackages.vim-language-server - nodePackages.vue-language-server - nodePackages.vscode-langservers-extracted - nodePackages.yaml-language-server - python39Packages.python-lsp-server - python3Full - python-language-server - solargraph - rust-analyzer - universal-ctags - ccls - rnix-lsp - terraform-ls - ]; - - plugins = with pkgs.vimPlugins; [ - nvim-cmp - cmp-nvim-lsp - cmp_luasnip - luasnip - - lsp_extensions-nvim - nvim-lspconfig - lsp_extensions-nvim - completion-nvim - - suda - ack-vim - syntastic - airline - workspace - editorconfig-vim - vim-vinegar - vim-gutentags - minimap-vim - nnn-vim - - sonokai - - fugitive - vim-rhubarb - vim-gitgutter - vimagit - - vim-highlightedyank - fzf-vim - fzfWrapper - - beautify - vim-surround - - vim-sensible - vim-bufkill - - ansible-vim - emmet-vim - rust-vim - vim-go - vim-vue - vim-javascript - vim-json - SchemaStore-nvim - vim-markdown - yats-vim - vim-ruby - vim-toml - vim-nix + '' + " 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/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/lsp.vim b/modules/terminal-life/nvim/lsp.vim index 9252dd89..8cd64361 100644 --- a/modules/terminal-life/nvim/lsp.vim +++ b/modules/terminal-life/nvim/lsp.vim @@ -51,6 +51,7 @@ lua < g[ PrevDiagnosticCycle diff --git a/modules/terminal-life/nvim/plugins.vim b/modules/terminal-life/nvim/plugins.vim index c029e1e9..abbc4c73 100644 --- a/modules/terminal-life/nvim/plugins.vim +++ b/modules/terminal-life/nvim/plugins.vim @@ -43,3 +43,36 @@ 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 +'' diff --git a/modules/terminal-life/zsh/default.nix b/modules/terminal-life/zsh/default.nix index aed4b806..c53377ea 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; @@ -36,7 +36,8 @@ 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"; + myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; }; zplug = { enable = true; diff --git a/modules/user/default.nix b/modules/user/default.nix index 74c1d915..2fd5958e 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/modules/virtualisation/default.nix b/modules/virtualisation/default.nix index 1ebaa031..ad3db4e7 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/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/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/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 -- "$@" '' diff --git a/profiles/base-user/.config/git/config.nix b/profiles/base-user/.config/git/config.nix index 47cfc1d6..53c53a77 100644 --- a/profiles/base-user/.config/git/config.nix +++ b/profiles/base-user/.config/git/config.nix @@ -14,14 +14,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] diff --git a/profiles/base-user/default.nix b/profiles/base-user/default.nix index 1ec8f13d..71babfee 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; diff --git a/profiles/base-user/session-variables.nix b/profiles/base-user/session-variables.nix index a180da6e..cc3aa69f 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 diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 3dc8ea42..6ccd540f 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -11,6 +11,7 @@ in pub-solar.crypto.enable = true; pub-solar.devops.enable = true; + # This is just a representation of the nix default nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; environment = { 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 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/users/nixos/default.nix b/users/nixos/default.nix deleted file mode 100644 index 5c037fe8..00000000 --- a/users/nixos/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ hmUsers, ... }: -{ - home-manager.users = { inherit (hmUsers) nixos; }; - - users.users.nixos = { - uid = 1000; - password = "nixos"; - description = "default"; - isNormalUser = true; - extraGroups = [ "wheel" ]; - }; -} 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; }; }; }