Compare commits

..

8 commits

Author SHA1 Message Date
teutat3s 756845c187
Bump flake.lock 2022-11-27 22:01:36 +01:00
teutat3s 7655260456
Pull in upstream commits from https://github.com/divnix/digga/pull/490
Improved flake-compat

Get the rev from the flake.lock file. Shouldn't be an issue for
first time users as the guide instructs users to generate a lock
file. `builtins.file` was used in accordance with nix.dev
reccommendations.

https://nix.dev/anti-patterns/language#reproducibility-referencing-top-level-directory-with

Rm tempfix
2022-11-27 22:01:21 +01:00
Hendrik Sokolowski b3f4727354
Update drone-config 2022-11-27 22:01:21 +01:00
teutat3s c345cb8af4
zsh: fetch plugins using nvfetcher 2022-11-27 22:01:21 +01:00
teutat3s 8fb95ce9dc
neovim: use nvfetcher for custom plugins 2022-11-27 22:01:21 +01:00
Hendrik Sokolowski cb829d0972
Make resume_offset optional 2022-11-27 22:01:21 +01:00
teutat3s ca22046f75
drone: use our custom drone-scp image 2022-11-27 22:01:20 +01:00
teutat3s 24c699698f
Bump flake.lock 2022-11-27 22:01:18 +01:00
12 changed files with 249 additions and 141 deletions

View file

@ -1,11 +1,12 @@
---
kind: pipeline
type: docker
type: exec
name: Check
node:
hosttype: baremetal
steps:
- name: "Check"
image: docker.nix-community.org/nixpkgs/nix-flakes:latest
when:
event:
- pull_request
@ -20,6 +21,8 @@ steps:
kind: pipeline
type: exec
name: Tests
node:
hosttype: baremetal
steps:
- name: "Tests"
@ -108,7 +111,9 @@ steps:
- nix run nixpkgs#gnused -- --in-place "s/$ISO_NAME/PubSolarOS-latest.iso/" PubSolarOS-latest.iso.sha256
- name: "Publish ISO"
image: appleboy/drone-scp
# custom drone-scp image, source: https://git.b12f.io/pub-solar/drone-scp/
# docker build --tag registry.greenbaum.cloud/library/drone-scp:v1.6.5 --file ./docker/Dockerfile.linux.amd64 .
image: registry.greenbaum.cloud/library/drone-scp:v1.6.5
volumes:
- name: file-exchange
path: /var/nix/iso-cache
@ -125,7 +130,7 @@ steps:
source:
- /var/nix/iso-cache/*.iso
- /var/nix/iso-cache/*.iso.sha256
overwrite: true
unlink_first: true
strip_components: 3
depends_on:
@ -143,6 +148,6 @@ volumes:
---
kind: signature
hmac: 8823c7103f6a075bb291a497c7ab5d5db47a91f9bc7d8ef95329b5620c9cf91d
hmac: 291be33bbf2954d1f5e4bf569679e24a773e7d6f90db4765fb9dacb3686a825e
...

View file

@ -215,6 +215,22 @@
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1650374568,
@ -326,11 +342,11 @@
},
"fork": {
"locked": {
"lastModified": 1669519260,
"narHash": "sha256-eXuHtd+D2/gOQ1QcMbb7InKdwYPPp/+CwQxSo0fW3s4=",
"lastModified": 1669557692,
"narHash": "sha256-UgaVtppJ2CVtdQibM4wp0vr6hp/H+zVa8CwdgPr814w=",
"owner": "teutat3s",
"repo": "nixpkgs",
"rev": "9836531dcac8630bbe54b6a4897de7b1ce8a2858",
"rev": "6033e4e5ed285759726050faaf6f75fbdbb33b20",
"type": "github"
},
"original": {
@ -370,11 +386,11 @@
]
},
"locked": {
"lastModified": 1669558652,
"narHash": "sha256-97WIgaqh8LHlerRn83JCOUwejy/p8h44y8Suth22/t4=",
"lastModified": 1669581521,
"narHash": "sha256-VkzMVjI6omyRmsjf6XP/Mk/iF1d+oge898Vz9FQbYQc=",
"ref": "main",
"rev": "3c8ef7c3d2c025a4dced88190dec2307641e8b26",
"revCount": 11,
"rev": "cac941a300f47fef2b88c298123d1a874631a278",
"revCount": 12,
"type": "git",
"url": "https://git.pub.solar/pub-solar/keycloak-theme"
},
@ -547,7 +563,7 @@
},
"nvfetcher": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixos"
@ -573,6 +589,7 @@
"darwin": "darwin",
"deploy": "deploy",
"digga": "digga",
"flake-compat": "flake-compat_3",
"fork": "fork",
"home": "home",
"keycloak-theme-pub-solar": "keycloak-theme-pub-solar",

View file

@ -12,6 +12,9 @@
latest.url = "github:nixos/nixpkgs/nixos-unstable";
fork.url = "github:teutat3s/nixpkgs/fix/gitea-needs-gpg-in-path";
flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false;
digga.url = "github:pub-solar/digga/fix/bootstrap-iso";
digga.inputs.nixpkgs.follows = "nixos";
digga.inputs.nixlib.follows = "nixos";

View file

@ -1,14 +1,14 @@
let
rev = "e7e5d481a0e15dcd459396e55327749989e04ce0";
lock = builtins.fromJSON (builtins.readFile builtins.path { path = ../../flake.lock; name = "lockPath"; });
flake = (import
(
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz";
sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x";
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{
src = ../../.;
src = builtins.path { path = ../../.; name = "projectRoot"; };
});
in
flake

View file

@ -27,9 +27,7 @@ in
config = {
boot = mkIf cfg.enable {
resumeDevice = cfg.resumeDevice;
kernelParams =
if (cfg.resumeOffset == null && cfg.enable) then builtins.abort "config.pub-solar.resumeOffset has to be set if config.pub-solar.enable is true."
else [ "resume_offset=${builtins.toString cfg.resumeOffset}" ];
kernelParams = mkIf (cfg.resumeOffset != null) [ "resume_offset=${builtins.toString cfg.resumeOffset}" ];
};
};
}

View file

@ -5,66 +5,6 @@ let
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs);
vimagit-master = pkgs.vimUtils.buildVimPlugin {
name = "vimagit-master";
src = pkgs.fetchFromGitHub {
owner = "jreybert";
repo = "vimagit";
rev = "308650ddc1e9a94e49fae0ea04bbc1c45f23d4c4";
sha256 = "sha256-fhazQQqyFaO0fdoeNI9nBshwTDhKNHH262H/QThtuO0=";
};
};
instant-nvim = pkgs.vimUtils.buildVimPlugin {
name = "instant";
src = pkgs.fetchFromGitHub {
owner = "jbyuki";
repo = "instant.nvim";
rev = "c02d72267b12130609b7ad39b76cf7f4a3bc9554";
sha256 = "sha256-7Pr2Au/oGKp5kMXuLsQY4BK5Wny9L1EBdXtyS5EaZPI=";
};
};
vim-caddyfile = pkgs.vimUtils.buildVimPlugin {
name = "vim-caddyfile";
src = pkgs.fetchFromGitHub {
owner = "isobit";
repo = "vim-caddyfile";
rev = "24fe0720551883e407cb70ae1d7c03f162d1d5a0";
sha256 = "sha256-rRYv3vnt31g7hNTxttTD6BWdv5JJ+ko3rPNyDUEOZ9o=";
};
};
workspace = pkgs.vimUtils.buildVimPlugin {
name = "vim-workspace";
src = pkgs.fetchFromGitHub {
owner = "thaerkh";
repo = "vim-workspace";
rev = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
sha256 = "sha256-XV7opLyfkHIDO0+JJaO/x0za0gsHuklrzapTGdLHJmI=";
};
};
beautify = pkgs.vimUtils.buildVimPlugin {
name = "vim-beautify";
src = pkgs.fetchFromGitHub {
owner = "zeekay";
repo = "vim-beautify";
rev = "e0691483927dc5a0c051433602397419f9628623";
sha256 = "QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
};
};
apprentice = pkgs.vimUtils.buildVimPlugin {
name = "vim-apprentice";
src = pkgs.fetchFromGitHub {
owner = "romainl";
repo = "Apprentice";
rev = "ecd41698037f15a58125b349be76dbd2595bfb6d";
sha256 = "sha256-9s7Yzn3IEJBjcyUq9NBIQ9wb45Xr7jOkEIoWf0lAYYg=";
};
};
in
{
enable = true;
@ -108,7 +48,7 @@ in
lsp_extensions-nvim
nvim-lspconfig
instant-nvim
instant-nvim-nvfetcher
ack-vim
vim-airline
@ -119,23 +59,23 @@ in
syntastic
vim-gutentags
vim-vinegar
workspace
vim-workspace-nvfetcher
sonokai
vim-hybrid-material
vim-airline-themes
apprentice
vim-apprentice-nvfetcher
fugitive
vim-gitgutter
vim-rhubarb
vimagit-master
vimagit-nvfetcher
fzf-vim
fzfWrapper
vim-highlightedyank
beautify
vim-beautify-nvfetcher
vim-surround
vim-bufkill
@ -144,7 +84,7 @@ in
ansible-vim
emmet-vim
rust-vim
vim-caddyfile
vim-caddyfile-nvfetcher
vim-go
vim-javascript
vim-json

View file

@ -40,46 +40,27 @@ in
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
};
plugins = [
# src gets fetched by nvfetcher, see: ./pkgs/sources.toml
{
# will source ohmyzsh/plugins/z/
name = "zsh-plugins-z";
file = "plugins/z/z.sh";
src = pkgs.fetchFromGitHub {
owner = "ohmyzsh";
repo = "ohmyzsh";
rev = "249c708ed3a4a7a63d16a6e911a46b6fb9623cbd";
sha256 = "sha256-NAVotL5RxpS/zKnO+ngMIjv787lqc1dj/c4blQrQcvU=";
};
file = "plugins/z/z.plugin.zsh";
src = pkgs.sources.ohmyzsh.src;
}
{
name = "zsh-powerlevel10k";
file = "powerlevel10k.zsh-theme";
src = pkgs.fetchFromGitHub {
owner = "romkatv";
repo = "powerlevel10k";
rev = "2dd6a29e4d7a33bfef10973d6550e087be37ddee";
sha256 = "sha256-9vc4cMBCNOmPOyzGwnPeMrXXyQUq4pC9Du3AWl9+Rys=";
};
src = pkgs.sources.powerlevel10k.src;
}
{
name = "zsh-fast-syntax-highlighting";
file = "F-Sy-H.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "z-shell";
repo = "F-Sy-H";
rev = "c4bdc485b67b58351a24f21fcac92c9e0232b939";
sha256 = "sha256-uXBGIdJwubuueNhQRdGxPUi0eJN17cflYAuHTjeQ8FQ=";
};
src = pkgs.sources.F-Sy-H.src;
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
sha256 = "sha256-BjgMhILEL/qdgfno4LR64LSB8n9pC9R+gG7IQWwgyfQ=";
};
src = pkgs.sources.zsh-nix-shell.src;
}
];

View file

@ -0,0 +1,22 @@
final: prev: {
vimPlugins = prev.vimPlugins // {
instant-nvim-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.instant-nvim-nvfetcher) pname version src;
};
vimagit-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vimagit-nvfetcher) pname version src;
};
vim-caddyfile-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-caddyfile-nvfetcher) pname version src;
};
vim-workspace-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-workspace-nvfetcher) pname version src;
};
vim-beautify-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-beautify-nvfetcher) pname version src;
};
vim-apprentice-nvfetcher = prev.vimUtils.buildVimPluginFrom2Nix {
inherit (prev.sources.vim-apprentice-nvfetcher) pname version src;
};
};
}

View file

@ -1,13 +1,6 @@
final: prev: {
rnix-lsp = prev.rnix-lsp.overrideAttrs (oldAttrs: rec {
version = "unstable-2022-07-28";
src = prev.fetchFromGitHub {
owner = "nix-community";
repo = "rnix-lsp";
rev = "ff18e04551a39ccdab0ff9c83926db3807b23478";
sha256 = "sha256-4OIpATLdPQvryyhRQPELeqNYC0n6PCyjD6LCPdwOztc=";
};
inherit (prev.sources.rnix-lsp-nvfetcher) pname version src;
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (prev.lib.const {
name = "rnix-lsp-vendor.tar.gz";

View file

@ -1,16 +1,136 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl }:
{ fetchgit, fetchurl, fetchFromGitHub }:
{
F-Sy-H = {
pname = "F-Sy-H";
version = "b935a87a75560f8173dd78deee6717c59d464e06";
src = fetchFromGitHub ({
owner = "z-shell";
repo = "F-Sy-H";
rev = "b935a87a75560f8173dd78deee6717c59d464e06";
fetchSubmodules = false;
sha256 = "sha256-448OlDnrDkUjvaSLDhXsa9bkgYXzj1Ju8CTpJVjH8LM=";
});
};
instant-nvim-nvfetcher = {
pname = "instant-nvim-nvfetcher";
version = "294b6d08143b3db8f9db7f606829270149e1a786";
src = fetchFromGitHub ({
owner = "jbyuki";
repo = "instant.nvim";
rev = "294b6d08143b3db8f9db7f606829270149e1a786";
fetchSubmodules = false;
sha256 = "sha256-DXJWji/NR8ZCxe014rD51v3EHJHMhRQeOoI3SsY8mR4=";
});
};
manix = {
pname = "manix";
version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
src = fetchgit {
url = "https://github.com/mlvzk/manix";
src = fetchFromGitHub ({
owner = "mlvzk";
repo = "manix";
rev = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
fetchSubmodules = false;
deepClone = false;
leaveDotGit = false;
sha256 = "1b7xi8c2drbwzfz70czddc4j33s7g1alirv12dwl91hbqxifx8qs";
};
sha256 = "sha256-GqPuYscLhkR5E2HnSFV4R48hCWvtM3C++3zlJhiK/aw=";
});
};
ohmyzsh = {
pname = "ohmyzsh";
version = "65a1e4edbe678cdac37ad96ca4bc4f6d77e27adf";
src = fetchFromGitHub ({
owner = "ohmyzsh";
repo = "ohmyzsh";
rev = "65a1e4edbe678cdac37ad96ca4bc4f6d77e27adf";
fetchSubmodules = false;
sha256 = "sha256-qyI7CU0vKhhADZfQtD73GsyAbqdMPhDQ1uA03h4erpw=";
});
};
powerlevel10k = {
pname = "powerlevel10k";
version = "8091c8a3a8a845c70046684235a01cd500075def";
src = fetchFromGitHub ({
owner = "romkatv";
repo = "powerlevel10k";
rev = "8091c8a3a8a845c70046684235a01cd500075def";
fetchSubmodules = false;
sha256 = "sha256-I0/tktXCbZ3hMYTNvPoWfOEYWRgmHoXsar/jcUB6bpo=";
});
};
rnix-lsp-nvfetcher = {
pname = "rnix-lsp-nvfetcher";
version = "6925256babec4307479a4080b44f2be38056f210";
src = fetchFromGitHub ({
owner = "nix-community";
repo = "rnix-lsp";
rev = "6925256babec4307479a4080b44f2be38056f210";
fetchSubmodules = false;
sha256 = "sha256-OKLyIXIXhUnRB3Xw+7zI3u6XkwF7Mrbfz1XaasV6i7Q=";
});
};
vim-apprentice-nvfetcher = {
pname = "vim-apprentice-nvfetcher";
version = "9942d0bb0a5d82f7a24450b00051c1f2cc008659";
src = fetchFromGitHub ({
owner = "romainl";
repo = "Apprentice";
rev = "9942d0bb0a5d82f7a24450b00051c1f2cc008659";
fetchSubmodules = false;
sha256 = "sha256-Xs+vTdnihNbBFPOKsW+NB40pqN9eaadqzc0DIeNoOFo=";
});
};
vim-beautify-nvfetcher = {
pname = "vim-beautify-nvfetcher";
version = "e0691483927dc5a0c051433602397419f9628623";
src = fetchFromGitHub ({
owner = "zeekay";
repo = "vim-beautify";
rev = "e0691483927dc5a0c051433602397419f9628623";
fetchSubmodules = false;
sha256 = "sha256-QPTCl6KaGcAjTS5yVDov9yxmv0fDaFoPLMsrtVIG6GQ=";
});
};
vim-caddyfile-nvfetcher = {
pname = "vim-caddyfile-nvfetcher";
version = "24fe0720551883e407cb70ae1d7c03f162d1d5a0";
src = fetchFromGitHub ({
owner = "isobit";
repo = "vim-caddyfile";
rev = "24fe0720551883e407cb70ae1d7c03f162d1d5a0";
fetchSubmodules = false;
sha256 = "sha256-rRYv3vnt31g7hNTxttTD6BWdv5JJ+ko3rPNyDUEOZ9o=";
});
};
vim-workspace-nvfetcher = {
pname = "vim-workspace-nvfetcher";
version = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
src = fetchFromGitHub ({
owner = "thaerkh";
repo = "vim-workspace";
rev = "c26b473f9b073f24bacecd38477f44c5cd1f5a62";
fetchSubmodules = false;
sha256 = "sha256-XV7opLyfkHIDO0+JJaO/x0za0gsHuklrzapTGdLHJmI=";
});
};
vimagit-nvfetcher = {
pname = "vimagit-nvfetcher";
version = "308650ddc1e9a94e49fae0ea04bbc1c45f23d4c4";
src = fetchFromGitHub ({
owner = "jreybert";
repo = "vimagit";
rev = "308650ddc1e9a94e49fae0ea04bbc1c45f23d4c4";
fetchSubmodules = false;
sha256 = "sha256-fhazQQqyFaO0fdoeNI9nBshwTDhKNHH262H/QThtuO0=";
});
};
zsh-nix-shell = {
pname = "zsh-nix-shell";
version = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
src = fetchFromGitHub ({
owner = "chisui";
repo = "zsh-nix-shell";
rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
fetchSubmodules = false;
sha256 = "sha256-BjgMhILEL/qdgfno4LR64LSB8n9pC9R+gG7IQWwgyfQ=";
});
};
}

View file

@ -2,3 +2,47 @@
[manix]
src.git = "https://github.com/mlvzk/manix"
fetch.github = "mlvzk/manix"
[ohmyzsh]
src.git = "https://github.com/ohmyzsh/ohmyzsh"
fetch.github = "ohmyzsh/ohmyzsh"
[powerlevel10k]
src.git = "https://github.com/romkatv/powerlevel10k"
fetch.github = "romkatv/powerlevel10k"
[F-Sy-H]
src.git = "https://github.com/z-shell/F-Sy-H"
fetch.github = "z-shell/F-Sy-H"
[zsh-nix-shell]
src.git = "https://github.com/chisui/zsh-nix-shell"
fetch.github = "chisui/zsh-nix-shell"
[rnix-lsp-nvfetcher]
src.git = "https://github.com/nix-community/rnix-lsp"
fetch.github = "nix-community/rnix-lsp"
[vimagit-nvfetcher]
src.git = "https://github.com/jreybert/vimagit"
fetch.github = "jreybert/vimagit"
[instant-nvim-nvfetcher]
src.git = "https://github.com/jbyuki/instant.nvim"
fetch.github = "jbyuki/instant.nvim"
[vim-caddyfile-nvfetcher]
src.git = "https://github.com/isobit/vim-caddyfile"
fetch.github = "isobit/vim-caddyfile"
[vim-workspace-nvfetcher]
src.git = "https://github.com/thaerkh/vim-workspace"
fetch.github = "thaerkh/vim-workspace"
[vim-beautify-nvfetcher]
src.git = "https://github.com/zeekay/vim-beautify"
fetch.github = "zeekay/vim-beautify"
[vim-apprentice-nvfetcher]
src.git = "https://github.com/romainl/Apprentice"
fetch.github = "romainl/Apprentice"

View file

@ -28,21 +28,6 @@ in
# override for our own welcome
devshell.name = pkgs.lib.mkForce "PubSolarOS";
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
# PATH is devshell's exorbitant privilige:
# fence against its pollution
_PATH=''${PATH}
# Load installed profiles
for file in "$DEVSHELL_DIR/etc/profile.d/"*.sh; do
# If that folder doesn't exist, bash loves to return the whole glob
[[ -f "$file" ]] && source "$file"
done
# Exert exorbitant privilige and leave no trace
export PATH=''${_PATH}
unset _PATH
'');
commands = with pkgs; [
(devos nix)
(devos agenix)