Merge branch 'main' into feature/basic-iso

This commit is contained in:
teutat3s 2022-02-02 04:38:30 +01:00
commit 74b4ec148c
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
40 changed files with 266 additions and 208 deletions

View file

@ -67,7 +67,6 @@ steps:
image: plugins/matrix image: plugins/matrix
when: when:
status: status:
- success
- failure - failure
event: event:
- cron - cron

View file

@ -2,7 +2,7 @@ name: "Check & Cachix"
on: on:
push: push:
branches: branches:
- master - main
- trying - trying
- staging - staging
jobs: jobs:

View file

@ -3,7 +3,7 @@ name: Deploy Docs to GitHub Pages
on: on:
push: push:
branches: branches:
- master - main
jobs: jobs:
deploy: deploy:

View file

@ -19,7 +19,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
ref: master ref: main
- name: Update Changelog - name: Update Changelog
uses: heinrichreimer/github-changelog-generator-action@v2.1.1 uses: heinrichreimer/github-changelog-generator-action@v2.1.1
with: with:
@ -49,7 +49,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
ref: master ref: main
- name: Get Changelog Entry - name: Get Changelog Entry
id: changelog_reader id: changelog_reader

View file

@ -84,7 +84,7 @@ DevOS is licensed under the [MIT License][mit].
[giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants [giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants
[home-manager]: https://nix-community.github.io/home-manager [home-manager]: https://nix-community.github.io/home-manager
[mit]: https://mit-license.org [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 [nix]: https://nixos.org/manual/nix/stable
[nixos]: https://nixos.org/manual/nixos/stable [nixos]: https://nixos.org/manual/nixos/stable
[nixpkgs]: https://github.com/NixOS/nixpkgs [nixpkgs]: https://github.com/NixOS/nixpkgs

View file

@ -1 +0,0 @@
nix flake new -t "github:divnix/devos/main" "${2:-devos}"

View file

@ -45,5 +45,32 @@ deploy '.#hostName' --hostname host.example.com
> ##### _Note:_ > ##### _Note:_
> Your user will need **passwordless** sudo access > 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 [d-rs]: https://github.com/serokell/deploy-rs

View file

@ -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 _Note: nothing prevents you from remotely executing the boostrapping
process. See below._ 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]. and format your disk according to the [official manual][manual].
## Mount partitions ## Mount partitions

View file

@ -47,8 +47,5 @@ This calls `nixos-rebuild` with sudo to build and install your configuration.
> ##### _Notes:_ > ##### _Notes:_
> - Instead of `switch`, you can pass `build`, `test`, `boot`, etc just as with > - Instead of `switch`, you can pass `build`, `test`, `boot`, etc just as with
> `nixos-rebuild`. > `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.

View file

@ -150,7 +150,7 @@
} }
// //
{ {
budModules = { devos = import ./bud; }; budModules = { devos = import ./shell/bud; };
} }
; ;
} }

View file

@ -15,7 +15,6 @@ in
services.pcscd.enable = true; services.pcscd.enable = true;
services.gnome.gnome-keyring.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 ] { 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; systemd.user.services.polkit-gnome-authentication-agent = import ./polkit-gnome-authentication-agent.service.nix pkgs;

View file

@ -19,6 +19,8 @@ in
home.packages = [ home.packages = [
playonlinux playonlinux
godot godot
obs-studio
obs-studio-plugins.wlrobs
]; ];
}; };
}; };

View file

@ -55,7 +55,7 @@
style = "Italic"; style = "Italic";
}; };
size = 18.0; size = 16.0;
offset = { offset = {
x = 0; x = 0;

View file

@ -49,15 +49,7 @@ in
}; };
}; };
services.greetd = { services.getty.autologinUser = "${psCfg.user.name}";
enable = true;
restart = false;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${pkgs.sway-service}/bin/sway-service";
};
};
};
qt5 = { qt5 = {
enable = true; enable = true;

View file

@ -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" bindsym $mod+0 mode "$mode_system"
mode "$mode_system" { mode "$mode_system" {
bindsym l exec swaylock-bg, mode "default" 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 s exec systemctl suspend, mode "default"
bindsym h exec systemctl hibernate, mode "default" bindsym h exec systemctl hibernate, mode "default"
bindsym r exec systemctl reboot, mode "default" bindsym r exec systemctl reboot, mode "default"

View file

@ -3,4 +3,6 @@
# systemctl import-environment is complete, and services that require certain variables # systemctl import-environment is complete, and services that require certain variables
# will fail to run. # will fail to run.
# https://github.com/swaywm/sway/wiki/Systemd-integration # 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"

View file

@ -72,7 +72,6 @@ in
swaylock-bg swaylock-bg
sway-launcher sway-launcher
sway-service
import-gtk-settings import-gtk-settings
s s
wcwd wcwd
@ -82,7 +81,6 @@ in
#programs.waybar.systemd.enable = true; #programs.waybar.systemd.enable = true;
systemd.user.services.mako = import ./mako.service.nix pkgs; 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.swayidle = import ./swayidle.service.nix pkgs;
systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs; systemd.user.services.xsettingsd = import ./xsettingsd.service.nix pkgs;
systemd.user.services.waybar = import ./waybar.service.nix pkgs; systemd.user.services.waybar = import ./waybar.service.nix pkgs;

View file

@ -9,6 +9,7 @@ pkgs:
}; };
Service = { Service = {
Type = "simple"; 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 \ ExecStart = ''${pkgs.swayidle}/bin/swayidle -w \
timeout 600 'swaylock-bg' \ timeout 600 'swaylock-bg' \
timeout 900 'swaymsg "output * dpms off"' \ timeout 900 'swaymsg "output * dpms off"' \

View file

@ -10,6 +10,7 @@ pkgs:
Service = { Service = {
Type = "dbus"; Type = "dbus";
Environment = "PATH=${pkgs.bash}/bin:${pkgs.pavucontrol}/bin";
BusName = "fr.arouillard.waybar"; BusName = "fr.arouillard.waybar";
ExecStart = "${pkgs.waybar}/bin/waybar"; ExecStart = "${pkgs.waybar}/bin/waybar";
}; };

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, self, ... }:
with lib; with lib;
let let
psCfg = config.pub-solar; psCfg = config.pub-solar;
@ -18,28 +18,30 @@ in
environment.shells = with pkgs; [ environment.shells = with pkgs; [
zsh zsh
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
screen screen
]; ];
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
ag
ack ack
asciinema asciinema
ag
bat bat
exa exa
fd
gh gh
glow
nnn
powerline powerline
vifm vifm
watson watson
nnn
fd
]; ];
programs.neovim = import ./nvim { inherit config; inherit pkgs; }; programs.neovim = import ./nvim { inherit config; inherit pkgs; };
programs.fzf = import ./fzf { 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; };
}; };
}; };
} }

View file

@ -3,6 +3,18 @@ let
psCfg = config.pub-solar; psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg; 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 { sonokai = pkgs.vimUtils.buildVimPlugin {
name = "sonokai"; name = "sonokai";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -51,6 +63,81 @@ in
withRuby = true; withRuby = true;
withPython3 = 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" [ extraConfig = builtins.concatStringsSep "\n" [
'' ''
" Persistent undo " Persistent undo
@ -66,82 +153,10 @@ in
(builtins.readFile ./ui.vim) (builtins.readFile ./ui.vim)
(builtins.readFile ./quickfixopenall.vim) (builtins.readFile ./quickfixopenall.vim)
(builtins.readFile ./lsp.vim) (builtins.readFile ./lsp.vim)
]; ''
" fzf with file preview
extraPackages = with pkgs; [ command! -bang -nargs=? -complete=dir Files
nodejs \ call fzf#vim#files(<q-args>, { 'options': ['--keep-right', '--cycle', '--layout', 'reverse', '--preview', '${preview-file}/bin/preview-file {}'] }, <bang>0)
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
]; ];
} }

View file

@ -94,47 +94,6 @@ imap <c-x><c-l> <plug>(fzf-complete-line)
" Clear quickfix shortcut " Clear quickfix shortcut
nmap <Leader>c :ccl<CR> 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 " Remember cursor position
" Vim jumps to the last position when reopening a file " Vim jumps to the last position when reopening a file
if has("autocmd") if has("autocmd")

View file

@ -51,6 +51,7 @@ lua <<EOF
-- Add additional capabilities supported by nvim-cmp -- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(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 -- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
@ -190,7 +191,7 @@ let g:diagnostic_trimmed_virtual_text = '40'
let g:diagnostic_insert_delay = 1 let g:diagnostic_insert_delay = 1
" Show diagnostic popup on cursor hold " 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 " Goto previous/next diagnostic warning/error
" nnoremap <silent> g[ <cmd>PrevDiagnosticCycle<cr> " nnoremap <silent> g[ <cmd>PrevDiagnosticCycle<cr>

View file

@ -43,3 +43,36 @@ nnoremap <leader>gP :! git push<CR> " git Push
" http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/ " http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/
nmap <Leader>[ :diffget //2<CR> nmap <Leader>[ :diffget //2<CR>
nmap <Leader>] :diffget //3<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

View 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
''

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, self, ... }:
let let
psCfg = config.pub-solar; psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg; xdg = config.home-manager.users."${psCfg.user.name}".xdg;
@ -36,7 +36,8 @@ in
drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone"; drone = "DRONE_TOKEN=$(secret-tool lookup drone token) drone";
no = "manix \"\" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview=\"manix '{}'\" | xargs manix"; no = "manix \"\" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview=\"manix '{}'\" | xargs manix";
# fix nixos-option # 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 = { zplug = {
enable = true; enable = true;

View file

@ -11,6 +11,11 @@ in
type = types.nullOr types.str; type = types.nullOr types.str;
default = "nixos"; default = "nixos";
}; };
description = mkOption {
description = "User description";
type = types.nullOr types.str;
default = "The main PubSolarOS user";
};
password = mkOption { password = mkOption {
description = "User password"; description = "User password";
type = types.nullOr types.str; type = types.nullOr types.str;

View file

@ -3,6 +3,8 @@ with lib;
let let
psCfg = config.pub-solar; psCfg = config.pub-solar;
cfg = config.pub-solar.virtualisation; cfg = config.pub-solar.virtualisation;
doesGaming = config.pub-solar.gaming.enable;
extraObsPlugins = if doesGaming then [ pkgs.obs-studio-plugins.looking-glass-obs ] else [ ];
in in
{ {
options.pub-solar.virtualisation = { options.pub-solar.virtualisation = {
@ -32,17 +34,26 @@ in
virt-manager virt-manager
python38Packages.libvirt python38Packages.libvirt
gvfs gvfs
scream
edk2 edk2
OVMF OVMF
win-virtio win-virtio
looking-glass-client
lgcl
]; ];
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
xdg.dataFile."libvirt/.keep".text = "# this file is here to generate the directory"; 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.tmpfiles.rules = [
systemd.user.services.scream-ivshmem-pulse = import ./scream-ivshmem-pulse.service.nix pkgs; "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; }
];
};
}; };
} }

View file

@ -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;
}

View file

@ -1,9 +1,10 @@
final: prev: final: prev:
with final; { with final; {
# keep sources this first # keep sources this first
sources = prev.callPackage (import ./_sources/generated.nix) { }; sources = prev.callPackage (import ./_sources/generated.nix) { };
# then, call packages with `final.callPackage` # then, call packages with `final.callPackage`
import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.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); mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final);
mopidy-jellyfin = import ./mopidy-jellyfin.nix final; mopidy-jellyfin = import ./mopidy-jellyfin.nix final;
mu = writeShellScriptBin "mu" (import ./mu.nix final); mu = writeShellScriptBin "mu" (import ./mu.nix final);

View file

@ -1,5 +1,10 @@
self: with self; '' 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 -- "$@"
'' ''

View file

@ -14,14 +14,14 @@ in
pol = pull 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 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 # 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] [mergetool]
prompt = false prompt = false
[merge]
tool = nvim
[mergetool "nvim"]
cmd = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim -f -c \"Gdiffsplit!\" \"$MERGED\"
[commit] [commit]
gpgsign = true gpgsign = true
[tag] [tag]

View file

@ -15,7 +15,7 @@ in
# This automatically sets group to users, createHome to true, # This automatically sets group to users, createHome to true,
# home to /home/username, useDefaultShell to true, and isSystemUser to false. # home to /home/username, useDefaultShell to true, and isSystemUser to false.
isNormalUser = true; isNormalUser = true;
description = ""; description = psCfg.user.description;
extraGroups = [ "wheel" "docker" "input" "audio" "networkmanager" "lp" "scanner" ]; extraGroups = [ "wheel" "docker" "input" "audio" "networkmanager" "lp" "scanner" ];
initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else ""; initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else "";
shell = pkgs.zsh; shell = pkgs.zsh;

View file

@ -49,7 +49,7 @@ let
CARGO_HOME = "${xdg.dataHome}/cargo"; CARGO_HOME = "${xdg.dataHome}/cargo";
# Java # Java
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot = '${xdg.configHome}/java'"; _JAVA_OPTIONS = "-Djava.util.prefs.userRoot='${xdg.configHome}/java'";
_JAVA_AWT_WM_NONREPARENTING = "1"; _JAVA_AWT_WM_NONREPARENTING = "1";
# docker # docker

View file

@ -11,6 +11,7 @@ in
pub-solar.crypto.enable = true; pub-solar.crypto.enable = true;
pub-solar.devops.enable = true; pub-solar.devops.enable = true;
# This is just a representation of the nix default
nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
environment = { environment = {

View file

@ -1,4 +0,0 @@
* filter=git-crypt diff=git-crypt
.gitattributes !filter !diff
secrets.nix !filter !diff
README.md !filter !diff

View file

@ -1,12 +0,0 @@
{ hmUsers, ... }:
{
home-manager.users = { inherit (hmUsers) nixos; };
users.users.nixos = {
uid = 1000;
password = "nixos";
description = "default";
isNormalUser = true;
extraGroups = [ "wheel" ];
};
}

View file

@ -3,7 +3,6 @@
enable = true; enable = true;
nix-direnv = { nix-direnv = {
enable = true; enable = true;
enableFlakes = true;
}; };
}; };
} }