Merge branch 'main' into feature/basic-iso
This commit is contained in:
commit
74b4ec148c
|
@ -67,7 +67,6 @@ steps:
|
|||
image: plugins/matrix
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
event:
|
||||
- cron
|
||||
|
|
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
@ -2,7 +2,7 @@ name: "Check & Cachix"
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
- trying
|
||||
- staging
|
||||
jobs:
|
||||
|
|
2
.github/workflows/mdbook_docs.yml
vendored
2
.github/workflows/mdbook_docs.yml
vendored
|
@ -3,7 +3,7 @@ name: Deploy Docs to GitHub Pages
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
nix flake new -t "github:divnix/devos/main" "${2:-devos}"
|
|
@ -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
|
||||
{
|
||||
<HOSTNAME> = {
|
||||
profilesOrder = [ "system" "<HM_PROFILE>" "<ANOTHER_HM_PROFILE>"];
|
||||
profiles.<HM_PROFILE> = {
|
||||
user = "<YOUR_USERNAME>";
|
||||
path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.<YOUR_USERNAME>;
|
||||
};
|
||||
profiles.<ANOTHER_HM_PROFILE> = {
|
||||
user = "<ANOTHER_USERNAME>";
|
||||
path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.<ANOTHER_USERNAME>;
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Substitute `<HOSTNAME>`, `<HM_PROFILE>` and `<YOUR_USERNAME>` placeholders (omitting the `<>`).
|
||||
|
||||
`<ANOTHER_HM_PROFILE>` 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
}
|
||||
//
|
||||
{
|
||||
budModules = { devos = import ./bud; };
|
||||
budModules = { devos = import ./shell/bud; };
|
||||
}
|
||||
;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -19,6 +19,8 @@ in
|
|||
home.packages = [
|
||||
playonlinux
|
||||
godot
|
||||
obs-studio
|
||||
obs-studio-plugins.wlrobs
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
style = "Italic";
|
||||
};
|
||||
|
||||
size = 18.0;
|
||||
size = 16.0;
|
||||
|
||||
offset = {
|
||||
x = 0;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"' \
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -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; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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(<q-args>, { 'options': ['--keep-right', '--cycle', '--layout', 'reverse', '--preview', '${preview-file}/bin/preview-file {}'] }, <bang>0)
|
||||
''
|
||||
];
|
||||
}
|
||||
|
|
|
@ -94,47 +94,6 @@ imap <c-x><c-l> <plug>(fzf-complete-line)
|
|||
" Clear quickfix shortcut
|
||||
nmap <Leader>c :ccl<CR>
|
||||
|
||||
" netrw
|
||||
let g:netrw_fastbrowse=0
|
||||
|
||||
" fzf with file preview
|
||||
command! -bang -nargs=? -complete=dir Files
|
||||
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
|
||||
"command! -bang -nargs=? -complete=dir Files
|
||||
" \ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': '--preview "' . "grep -Pzo '.*See docs/COPYRIGHT.rdoc for more details(.*\n)*' {}" . '"'}), <bang>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='<c-n>'
|
||||
|
||||
" 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")
|
||||
|
|
|
@ -51,6 +51,7 @@ lua <<EOF
|
|||
-- Add additional capabilities supported by nvim-cmp
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
|
||||
-- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
|
@ -190,7 +191,7 @@ let g:diagnostic_trimmed_virtual_text = '40'
|
|||
let g:diagnostic_insert_delay = 1
|
||||
|
||||
" Show diagnostic popup on cursor hold
|
||||
autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics()
|
||||
autocmd CursorHold * lua vim.lsp.diagnostic.show_line_diagnostics({ focusable = false })
|
||||
|
||||
" Goto previous/next diagnostic warning/error
|
||||
" nnoremap <silent> g[ <cmd>PrevDiagnosticCycle<cr>
|
||||
|
|
|
@ -43,3 +43,36 @@ nnoremap <leader>gP :! git push<CR> " git Push
|
|||
" http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/
|
||||
nmap <Leader>[ :diffget //2<CR>
|
||||
nmap <Leader>] :diffget //3<CR>
|
||||
|
||||
" 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='<c-n>'
|
||||
|
||||
" Ack
|
||||
if executable('ag')
|
||||
let g:ackprg = 'ag --vimgrep'
|
||||
endif
|
||||
|
||||
|
|
35
modules/terminal-life/nvim/preview-file.nix
Normal file
35
modules/terminal-life/nvim/preview-file.nix
Normal file
|
@ -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
|
||||
''
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 -- "$@"
|
||||
''
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
4
secrets/.gitattributes
vendored
4
secrets/.gitattributes
vendored
|
@ -1,4 +0,0 @@
|
|||
* filter=git-crypt diff=git-crypt
|
||||
.gitattributes !filter !diff
|
||||
secrets.nix !filter !diff
|
||||
README.md !filter !diff
|
|
@ -1,12 +0,0 @@
|
|||
{ hmUsers, ... }:
|
||||
{
|
||||
home-manager.users = { inherit (hmUsers) nixos; };
|
||||
|
||||
users.users.nixos = {
|
||||
uid = 1000;
|
||||
password = "nixos";
|
||||
description = "default";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
enable = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
enableFlakes = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue