update flake, add mail backup and fix formatting

This commit is contained in:
fuckwit 2024-11-17 20:55:11 +01:00
parent 391c15be69
commit cd7cc0cea1
12 changed files with 487 additions and 434 deletions

189
flake.lock generated
View File

@ -83,18 +83,12 @@
}
},
"crane": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1721842668,
"narHash": "sha256-k3oiD2z2AAwBFLa4+xfU+7G5fisRXfkvrMTCJrjZzXo=",
"lastModified": 1730652660,
"narHash": "sha256-+XVYfmVXAiYA0FZT7ijHf555dxCe+AoAT5A6RU+6vSo=",
"owner": "ipetkov",
"repo": "crane",
"rev": "529c1a0b1f29f0d78fa3086b8f6a134c71ef3aaf",
"rev": "a4ca93905455c07cb7e3aca95d4faf7601cba458",
"type": "github"
},
"original": {
@ -136,11 +130,11 @@
"pre-commit-hooks": "pre-commit-hooks_2"
},
"locked": {
"lastModified": 1727882181,
"narHash": "sha256-14hqEeVy72nYDOFn7HK6Mff7L49kUI5K6wMLVHG3A90=",
"lastModified": 1729190222,
"narHash": "sha256-FhlknassIb3rKEucqnfFAzgny1ANmenJcTyRaXYwbA0=",
"owner": "cachix",
"repo": "devenv",
"rev": "a4d2abb0d6fb5a9733da981105b794bcf92a0874",
"rev": "e6464200390e502e3cff45f82b6dbe8c6760fab5",
"type": "github"
},
"original": {
@ -243,16 +237,15 @@
},
"emacs": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1728612252,
"narHash": "sha256-qGHK+YmJ9FQFa34ln/2u8VcApg96vBdWdOt6JiXrxsE=",
"lastModified": 1731811021,
"narHash": "sha256-MNBAEaFceE8IkNTn0YbxN6MmJsiBob7g/A1ATBTZ5CE=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "4b3d8ab182d381b581de10a76754d453c0ae39dc",
"rev": "e39c7cf39e1d2c31f8cce19ab3ecbb1e02d3bb65",
"type": "github"
},
"original": {
@ -408,11 +401,11 @@
]
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
@ -499,11 +492,11 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -513,24 +506,6 @@
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
@ -545,9 +520,9 @@
"type": "github"
}
},
"flake-utils_6": {
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1726560853,
@ -670,11 +645,11 @@
]
},
"locked": {
"lastModified": 1728598744,
"narHash": "sha256-sSfvyO5xH3HObHHmh6lp/hcvo7tMjFKd/HXpxyrRnoE=",
"lastModified": 1731832479,
"narHash": "sha256-icDDuYwJ0avTMZTxe1qyU/Baht5JOqw4pb5mWpR+hT0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "342a1d682386d3a1d74f9555cb327f2f311dda6e",
"rev": "5056a1cf0ce7c2a08ab50713b6c4af77975f6111",
"type": "github"
},
"original": {
@ -745,11 +720,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1728632221,
"narHash": "sha256-LnBVdKPsreziZkYbeFqiSYP7tPFlprt9ej2QGd2aNlw=",
"lastModified": 1730739295,
"narHash": "sha256-aYeJ/P/9AuK6Kee63ZdsmDjEwhnksF+gIv/OyGtlBJE=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "3326a0b3974fc04d991990f6497fe1a7d9892439",
"rev": "cef39a78679c266300874e7a7000b4da066228d4",
"type": "github"
},
"original": {
@ -966,11 +941,11 @@
"parts": "parts"
},
"locked": {
"lastModified": 1728615051,
"narHash": "sha256-gbYoL+LtNxp40YcMb0FxCaEPuPxD4CzaRJ1dCX2YDgA=",
"lastModified": 1731812528,
"narHash": "sha256-L+JXK8RKnfa+nXmElk6RnpEsrAzWcG2ogKc81ni5gVk=",
"owner": "fortuneteller2k",
"repo": "nixpkgs-f2k",
"rev": "fe8709c0ba494b2be161ecf72d15a0b1eff529f4",
"rev": "8755fba5e3fb74dbba55af8ce97bd29b109d866c",
"type": "github"
},
"original": {
@ -982,7 +957,7 @@
"nixpkgs-fmt": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_5",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs-f2k",
"nixpkgs"
@ -1004,14 +979,14 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1727825735,
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"lastModified": 1730504152,
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
}
},
"nixpkgs-lib_2": {
@ -1108,11 +1083,11 @@
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1728500571,
"narHash": "sha256-dOymOQ3AfNI4Z337yEwHGohrVQb4yPODCW9MDUyAc4w=",
"lastModified": 1731652201,
"narHash": "sha256-XUO0JKP1hlww0d7mm3kpmIr4hhtR4zicg5Wwes9cPMg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d51c28603def282a24fa034bcb007e2bcb5b5dd0",
"rev": "c21b77913ea840f8bcf9adf4c41cecc2abffd38d",
"type": "github"
},
"original": {
@ -1138,22 +1113,6 @@
"type": "github"
}
},
"nixpkgs-stable_5": {
"locked": {
"lastModified": 1728156290,
"narHash": "sha256-uogSvuAp+1BYtdu6UWuObjHqSbBohpyARXDWqgI12Ss=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "17ae88b569bb15590549ff478bab6494dde4a907",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717432640,
@ -1172,11 +1131,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1722264024,
"narHash": "sha256-gomyYQrlOltr2/prDRikRDQoPz+J5Qq6SEJrqVC5x2c=",
"lastModified": 1730642263,
"narHash": "sha256-UXqvGZOHUDeAo8Sv5A5oObiQgBPELVgHQi130TU0jMU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc5e08c73022f96cfeaefa2e087e8b713d47d201",
"rev": "650fe87347086b30a6dbcc32b55987ce5a23c6ae",
"type": "github"
},
"original": {
@ -1188,11 +1147,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"lastModified": 1731676054,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"type": "github"
},
"original": {
@ -1204,11 +1163,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"lastModified": 1731676054,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"type": "github"
},
"original": {
@ -1236,11 +1195,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1728093190,
"narHash": "sha256-CAZF2NRuHmqTtRTNAruWpHA43Gg2UvuCNEIzabP0l6M=",
"lastModified": 1731763621,
"narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e2f08f4d8b3ecb5cf5c9fd9cb2d53bb3c71807da",
"rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d",
"type": "github"
},
"original": {
@ -1300,11 +1259,11 @@
},
"nurpkgs": {
"locked": {
"lastModified": 1728635778,
"narHash": "sha256-P0lNNBexaUCpGnJ+xfZ+A4HRudT+BvMz54t6MkcnNq0=",
"lastModified": 1731872711,
"narHash": "sha256-2vj0E55Ckfo8eiPqImADvBEHwtIoOx8ufiRnXElQf0w=",
"owner": "nix-community",
"repo": "NUR",
"rev": "abf82f0f0338c25322e0653c2b7e09814da7b2f7",
"rev": "25e6cfc7d6260864f5f5dfe2617b39a6afb6ea5e",
"type": "github"
},
"original": {
@ -1315,7 +1274,7 @@
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_6",
"flake-utils": "flake-utils_5",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
@ -1342,11 +1301,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1727826117,
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
@ -1432,11 +1391,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1721042469,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"lastModified": 1730302582,
"narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
"type": "github"
},
"original": {
@ -1514,11 +1473,11 @@
]
},
"locked": {
"lastModified": 1722219664,
"narHash": "sha256-xMOJ+HW4yj6e69PvieohUJ3dBSdgCfvI0nnCEe6/yVc=",
"lastModified": 1730601085,
"narHash": "sha256-Sgax33jGuvVHTjl1P78IwzlhAGyOxtx5Q26inKja8S4=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "a6fbda5d9a14fb5f7c69b8489d24afeb349c7bb4",
"rev": "8d1b40f8dfd7539aaa3de56e207e22b3cc451825",
"type": "github"
},
"original": {
@ -1538,11 +1497,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1728635421,
"narHash": "sha256-+xtIJ8ajd9txYA3UWoYbMeifS4j6/3M0QmatdAQV9PY=",
"lastModified": 1731816193,
"narHash": "sha256-Y/u1O6GpvOYRbGOnwGo0Gofg5jjfaHNGP9G7yGFFfzg=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "ed83d55acd74c44f1be38852f22684b19848aa4c",
"rev": "02c98c9ba4491db49ab759161fcc0ba9830d7aa0",
"type": "gitlab"
},
"original": {
@ -1578,15 +1537,14 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_7",
"nixpkgs-stable": "nixpkgs-stable_5"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1728345710,
"narHash": "sha256-lpunY1+bf90ts+sA2/FgxVNIegPDKCpEoWwOPu4ITTQ=",
"lastModified": 1731862312,
"narHash": "sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "06535d0e3d0201e6a8080dd32dbfde339b94f01b",
"rev": "472741cf3fee089241ac9ea705bb2b9e0bfa2978",
"type": "github"
},
"original": {
@ -1655,21 +1613,6 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [

View File

@ -14,31 +14,35 @@
nameValuePair "home-manager-webapp-${name}" {
id = cfg.id;
userChrome = /* css */ ''
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
userChrome =
/*
css
*/
''
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
browser {
margin-right: 0px; margin-bottom: 0px;
}
browser {
margin-right: 0px; margin-bottom: 0px;
}
#TabsToolbar {
visibility: collapse !important;
}
#TabsToolbar {
visibility: collapse !important;
}
#nav-bar {
margin-top: 0;
margin-bottom: -42px;
z-index: -100;
}
#nav-bar {
margin-top: 0;
margin-bottom: -42px;
z-index: -100;
}
#main-window[windowtype="navigator:browser"] {
background-color: transparent !important;
}
#main-window[windowtype="navigator:browser"] {
background-color: transparent !important;
}
.tab-background[selected="true"] {
background: ${cfg.backgroundColor} !important;
}
'';
.tab-background[selected="true"] {
background: ${cfg.backgroundColor} !important;
}
'';
settings =
cfg.extraSettings

View File

@ -8,7 +8,7 @@
}: let
pkgs = import nixpkgs rec {
system = "x86_64-linux";
overlays = [(final: prev: { nixvim = nixvim.packages.${system}.default; })];
overlays = [(final: prev: {nixvim = nixvim.packages.${system}.default;})];
};
nur = import nurpkgs {

View File

@ -14,6 +14,7 @@
moonlight-qt
vesktop
telegram-desktop
nixvim
];
sessionPath = ["~/.local/bin"];
sessionVariables = {

View File

@ -12,47 +12,10 @@
privacy-badger
ublock-origin
tree-style-tab
tridactyl
# tridactyl
];
customChrome = ''
@-moz-document url(chrome://browser/content/browser.xhtml) {
/* tabs on bottom of window */
/* requires that you set
* toolkit.legacyUserProfileCustomizations.stylesheets = true
* in about:config
*/
#main-window body { flex-direction: column-reverse !important; }
#navigator-toolbox { flex-direction: column-reverse !important; }
#urlbar {
top: unset !important;
bottom: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important;
box-shadow: none !important;
display: flex !important;
flex-direction: column !important;
}
#urlbar-input-container {
order: 2;
}
#urlbar > .urlbarView {
order: 1;
border-bottom: 1px solid #666;
}
#urlbar-results {
display: flex;
flex-direction: column-reverse;
}
.search-one-offs { display: none !important; }
.tab-background { border-top: none !important; }
#navigator-toolbox::after { border: none; }
#TabsToolbar .tabbrowser-arrowscrollbox,
#tabbrowser-tabs, .tab-stack { min-height: 28px !important; }
.tabbrowser-tab { font-size: 80%; }
.tab-content { padding: 0 5px; }
.tab-close-button .toolbarbutton-icon { width: 12px !important; height: 12px !important; }
toolbox[inFullscreen=true] { display: none; }
}
'';
customChrome = builtins.readFile ./userChrome.css;
userChrome = customChrome;

View File

@ -0,0 +1,88 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/toolbars_below_content.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Moves tabs toolbar, bookmarks toolbar and main toolbar to the bottom of the window, and makes tabs be the bottom-most toolbar */
/* By default, menubar will stay on top with two options to select it's behavior - see below */
@-moz-document url(chrome://browser/content/browser.xhtml){
#titlebar{ -moz-appearance: none !important; }
#navigator-toolbox > div{ display: contents }
.global-notificationbox,
#mainPopupSet,
#browser,
#customization-container,
#tab-notification-deck{
order: -1;
}
/* Remove the next row if you want tabs to be the top-most row */
#titlebar{
order: 2;
}
#toolbar-menubar{
position: fixed;
display: flex;
width: 100vw;
top: 0px;
-moz-window-dragging: drag;
}
/* Remove bottom border that won't do anything useful when at bottom of the window */
#navigator-toolbox{ border-bottom: none !important; }
#toolbar-menubar > spacer{ flex-grow: 1 }
#urlbar[breakout][breakout-extend]{
display: flex !important;
flex-direction: column-reverse;
bottom: 0px !important; /* Change to 3-5 px if using compact_urlbar_megabar.css depending on toolbar density */
top: auto !important;
}
.urlbarView-body-inner{ border-top-style: none !important; }
/* Yeah, removes window controls. Likely not wanted on bottom row */
#TabsToolbar > .titlebar-buttonbox-container{ display: none }
#toolbar-menubar > .titlebar-buttonbox-container{ order: 1000 }
/* Fix panels sizing */
.panel-viewstack{ max-height: unset !important; }
/* Fullscreen mode support */
:root[sizemode="fullscreen"] #navigator-toolbox{ margin-top: 0 !important }
:root[sizemode="fullscreen"] #navigator-toolbox[style*="margin-top"]{ visibility: collapse }
#fullscr-toggler{ bottom: 0; top: unset !important; }
/* These three rules exist for compatibility with autohide_toolbox.css */
#navigator-toolbox{ bottom: 0px; transform-origin: bottom }
#main-window > body > box{ margin-top: 0 !important; }
#toolbar-menubar{ z-index: 1; background-color: var(--lwt-accent-color,black); }
:root[BookmarksToolbarOverlapsBrowser] #navigator-toolbox{
margin-block: calc(-1 * var(--bookmarks-toolbar-height)) 0 !important;
}
:root[BookmarksToolbarOverlapsBrowser] .newTabBrowserPanel{
padding-block: 0 var(--bookmarks-toolbar-height) !important;
}
/**************
Menubar options - By default, menubar is overlayed on top of web-content
***************/
/* Uncomment the following if you want static menubar on top of the window (make menubar enabled)
* Use when menubar is enabled to always show it */
/*
#browser,#customization-container{ padding-top: var(--uc-menubar-spacer,28px) }
*/
/* OR, uncomment the following if you want menubar to appear below content, above tabs toolbar */
#toolbar-menubar{ position: static; display: flex; margin-top: 0px !important; background-color: transparent }
/* set to "column-reverse" (without quotes) if you want tabs above menubar with the above option */
#titlebar{ flex-direction: column }
}

View File

@ -8,7 +8,7 @@
stateVersion = "22.11";
username = "patrick";
homeDirectory = "/home/${config.home.username}";
packages = (pkgs.callPackage ./pkgs.nix {});
packages = pkgs.callPackage ./pkgs.nix {};
# packages = (pkgs.callPackage ./pkgs.nix {}) ++ [devenv.packages.${pkgs.system}.devenv];
sessionPath = ["~/.local/bin"];
sessionVariables = {

View File

@ -9,10 +9,14 @@
rescue = "ssh-wrapper rescue";
};
initExtra = /* bash */ ''
source ${pkgs.blesh}/share/blesh/ble.sh
export PATH=$PATH:~/.local/bin
export SSH_AUTH_SOCK=/run/user/1000/ssh-agent
'';
initExtra =
/*
bash
*/
''
source ${pkgs.blesh}/share/blesh/ble.sh
export PATH=$PATH:~/.local/bin
export SSH_AUTH_SOCK=/run/user/1000/ssh-agent
'';
};
}

View File

@ -22,303 +22,331 @@
{
plugin = fidget-nvim;
type = "lua";
config = /* lua */ ''
require('fidget').setup {}
'';
config =
/*
lua
*/
''
require('fidget').setup {}
'';
}
{
plugin = symbols-outline-nvim;
type = "lua";
config = /* lua */ ''
require('symbols-outline').setup()
'';
config =
/*
lua
*/
''
require('symbols-outline').setup()
'';
}
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config = /* lua */ ''
require('nvim-treesitter.configs').setup {
highlight = {
enable = true, -- false will disable the whole extension
},
incremental_selection = {
enable = false,
keymaps = {
init_selection = 'gnn',
node_incremental = 'grn',
scope_incremental = 'grc',
node_decremental = 'grm',
config =
/*
lua
*/
''
require('nvim-treesitter.configs').setup {
highlight = {
enable = true, -- false will disable the whole extension
},
},
indent = {
enable = true,
incremental_selection = {
enable = false,
keymaps = {
init_selection = 'gnn',
node_incremental = 'grn',
scope_incremental = 'grc',
node_decremental = 'grm',
},
},
indent = {
enable = true,
}
}
}
'';
'';
}
{
plugin = nvim-tree-lua;
type = "lua";
config = /* lua */ ''
local function my_on_attach(bufnr)
local api = require "nvim-tree.api"
config =
/*
lua
*/
''
local function my_on_attach(bufnr)
local api = require "nvim-tree.api"
local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- default mappings
api.config.mappings.default_on_attach(bufnr)
-- custom mappings
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
vim.keymap.set('n', 's', api.node.open.horizontal, opts('Paste File'))
vim.keymap.set('n', 'ma', api.fs.create, opts('New File'))
vim.keymap.set('n', 'md', api.fs.remove, opts('Delete File'))
vim.keymap.set('n', 'me', api.fs.rename_node, opts('Rename File'))
vim.keymap.set('n', 'yy', api.fs.copy.node, opts('Copy File'))
vim.keymap.set('n', 'mp', api.fs.paste, opts('Paste File'))
end
-- default mappings
api.config.mappings.default_on_attach(bufnr)
-- custom mappings
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
vim.keymap.set('n', 's', api.node.open.horizontal, opts('Paste File'))
vim.keymap.set('n', 'ma', api.fs.create, opts('New File'))
vim.keymap.set('n', 'md', api.fs.remove, opts('Delete File'))
vim.keymap.set('n', 'me', api.fs.rename_node, opts('Rename File'))
vim.keymap.set('n', 'yy', api.fs.copy.node, opts('Copy File'))
vim.keymap.set('n', 'mp', api.fs.paste, opts('Paste File'))
end
require("nvim-tree").setup {
on_attach = my_on_attach,
}
'';
require("nvim-tree").setup {
on_attach = my_on_attach,
}
'';
}
{
plugin = nvim-cmp;
type = "lua";
config = /* lua */ ''
-- local luasnip = require 'luasnip'
local cmp = require 'cmp'
config =
/*
lua
*/
''
-- local luasnip = require 'luasnip'
local cmp = require 'cmp'
cmp.setup {
-- snippet = {
-- expand = function(args)
-- require('luasnip').lsp_expand(args.body)
-- end,
-- },
window = {
-- documentation = true,
},
mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
cmp.setup {
-- snippet = {
-- expand = function(args)
-- require('luasnip').lsp_expand(args.body)
-- end,
-- },
window = {
-- documentation = true,
},
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
}),
sources = {
{ name = 'nvim_lsp' },
-- { name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
-- { name = 'latex_symbols' },
},
}
'';
mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
['<S-Tab>'] = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
}),
sources = {
{ name = 'nvim_lsp' },
-- { name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' },
-- { name = 'latex_symbols' },
},
}
'';
}
{
plugin = nvim-lspconfig;
type = "lua";
config = /* lua */ ''
function hi(name, opts)
local options = ""
for k, v in pairs(opts) do
options = options.." "..k.."="..v
end
vim.cmd("highlight "..name..options)
end
local u = require('utils')
local lspc = require('lspconfig')
local ih = require("inlay-hints")
ih.setup()
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
local opts = { noremap=true, silent=true }
buf_set_keymap('n', '<c-]>', ':lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', ':lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gD', ':lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<c-k>', ':lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '1gD', ':lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', 'gr', ':lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', 'g0', ':lua vim.lsp.buf.document_symbol()<CR>', opts)
buf_set_keymap('n', 'gW', ':lua vim.lsp.buf.workspace_symbol()<CR>', opts)
buf_set_keymap('n', 'gd', ':lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'ga', ':lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', 'ff', ':lua vim.lsp.buf.format({async = true})<CR>', opts)
buf_set_keymap('n', 'gn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
--require'completion'.on_attach(client)
-- Set highlight colors
local highlights = {
Error = "Red",
Warning = "Yellow",
Information = "Blue",
Hint = "Green",
}
for typ, color in pairs(highlights) do
hi('LspDiagnosticsDefault'..typ, {ctermfg = color})
hi('LspDiagnosticsUnderline'..typ, {cterm = 'underline'})
config =
/*
lua
*/
''
function hi(name, opts)
local options = ""
for k, v in pairs(opts) do
options = options.." "..k.."="..v
end
vim.cmd("highlight "..name..options)
end
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics,
{
virtual_text = true,
signs = true,
update_in_insert = true,
underline = true
local u = require('utils')
local lspc = require('lspconfig')
local ih = require("inlay-hints")
ih.setup()
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
local opts = { noremap=true, silent=true }
buf_set_keymap('n', '<c-]>', ':lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', ':lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gD', ':lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<c-k>', ':lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '1gD', ':lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', 'gr', ':lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', 'g0', ':lua vim.lsp.buf.document_symbol()<CR>', opts)
buf_set_keymap('n', 'gW', ':lua vim.lsp.buf.workspace_symbol()<CR>', opts)
buf_set_keymap('n', 'gd', ':lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'ga', ':lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', 'ff', ':lua vim.lsp.buf.format({async = true})<CR>', opts)
buf_set_keymap('n', 'gn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
--require'completion'.on_attach(client)
-- Set highlight colors
local highlights = {
Error = "Red",
Warning = "Yellow",
Information = "Blue",
Hint = "Green",
}
)
require "lsp_signature".on_attach({doc_lines = 0})
ih.on_attach(client, bufnr)
end
-- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
for typ, color in pairs(highlights) do
hi('LspDiagnosticsDefault'..typ, {ctermfg = color})
hi('LspDiagnosticsUnderline'..typ, {cterm = 'underline'})
end
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics,
{
virtual_text = true,
signs = true,
update_in_insert = true,
underline = true
}
)
require "lsp_signature".on_attach({doc_lines = 0})
ih.on_attach(client, bufnr)
end
-- nvim-cmp supports additional completion capabilities
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local config = {
on_attach = on_attach,
capabilities = capabilities,
flags = {debounce_text_changes = 150}
}
local config = {
on_attach = on_attach,
capabilities = capabilities,
flags = {debounce_text_changes = 150}
}
lspc.bashls.setup(config)
lspc.nixd.setup(config)
lspc.solargraph.setup(config)
lspc.bashls.setup(config)
lspc.nixd.setup(config)
lspc.solargraph.setup(config)
lspc.rust_analyzer.setup{
on_attach = on_attach,
capabilities = capabilities,
flags = {debounce_text_changes = 150},
settings = {
['rust-analyzer'] = {
assist = {
importGranularity = "module",
importPrefix = "by_self",
},
cargo = {
loadOutDirsFromCheck = true
},
procMacro = {
enable = true
},
checkOnSave = {
command = "clippy"
},
lspc.rust_analyzer.setup{
on_attach = on_attach,
capabilities = capabilities,
flags = {debounce_text_changes = 150},
settings = {
['rust-analyzer'] = {
assist = {
importGranularity = "module",
importPrefix = "by_self",
},
cargo = {
loadOutDirsFromCheck = true
},
procMacro = {
enable = true
},
checkOnSave = {
command = "clippy"
},
}
}
}
}
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
'';
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
'';
}
];
extraLuaConfig = /* lua */ ''
local onedark = require('onedark')
onedark.setup { style = 'warmer' }
onedark.load()
vim.cmd('set background=dark')
extraLuaConfig =
/*
lua
*/
''
local onedark = require('onedark')
onedark.setup { style = 'warmer' }
onedark.load()
vim.cmd('set background=dark')
local llc = require('lualine').get_config()
llc.options.theme = 'onedark'
require('lualine').setup(llc)
local llc = require('lualine').get_config()
llc.options.theme = 'onedark'
require('lualine').setup(llc)
local key = vim.api.nvim_set_keymap
local o = vim.o
local wo = vim.wo
local bo = vim.bo
local cmd = vim.cmd
local key = vim.api.nvim_set_keymap
local o = vim.o
local wo = vim.wo
local bo = vim.bo
local cmd = vim.cmd
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float({focusable = false})]])
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float({focusable = false})]])
key('n', ';', ':Telescope find_files<CR>', {})
key('n', '<C-n>', ':NvimTreeToggle<CR>', {})
key('n', 'gh', '/<c-r>=expand("<cword>")<CR><CR>N', {})
key('n', ';', ':Telescope find_files<CR>', {})
key('n', '<C-n>', ':NvimTreeToggle<CR>', {})
key('n', 'gh', '/<c-r>=expand("<cword>")<CR><CR>N', {})
key('i', '<TAB>', 'pumvisible() ? "<C-n>" : "<Tab>"', { expr = true, silent = true })
key('i', '<S-TAB>', 'pumvisible() ? "<C-p>" : "<S-Tab>"', { expr = true, silent = true })
key('n', '<leader>g', ':lua require"telescope.builtin".live_grep{}<CR>', {})
key('v', '<leader>c', ':w !wl-copy<CR><CR>', { silent = true })
key('i', '<TAB>', 'pumvisible() ? "<C-n>" : "<Tab>"', { expr = true, silent = true })
key('i', '<S-TAB>', 'pumvisible() ? "<C-p>" : "<S-Tab>"', { expr = true, silent = true })
key('n', '<leader>g', ':lua require"telescope.builtin".live_grep{}<CR>', {})
key('v', '<leader>c', ':w !wl-copy<CR><CR>', { silent = true })
vim.api.nvim_exec(
[[
augroup YankHighlight
autocmd!
autocmd TextYankPost * silent! lua vim.highlight.on_yank()
augroup end
]] ,
false
)
vim.api.nvim_exec(
[[
augroup YankHighlight
autocmd!
autocmd TextYankPost * silent! lua vim.highlight.on_yank()
augroup end
]] ,
false
)
vim.api.nvim_create_autocmd("BufEnter", {
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
vim.cmd 'quit'
vim.api.nvim_create_autocmd("BufEnter", {
nested = true,
callback = function()
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
vim.cmd 'quit'
end
end
end
})
})
cmd('syntax on')
cmd('set number')
cmd('set completeopt=menuone,noinsert,noselect')
cmd('set shortmess+=c')
cmd("autocmd CursorHold,CursorHoldI *.rs :lua require'lsp_extensions'.inlay_hints{ only_current_line = true }")
cmd('syntax on')
cmd('set number')
cmd('set completeopt=menuone,noinsert,noselect')
cmd('set shortmess+=c')
cmd("autocmd CursorHold,CursorHoldI *.rs :lua require'lsp_extensions'.inlay_hints{ only_current_line = true }")
o.startofline = true
wo.cursorline = true
o.startofline = true
wo.cursorline = true
o.updatetime = 300
wo.signcolumn='yes'
o.showcmd = true
o.updatetime = 300
wo.signcolumn='yes'
o.showcmd = true
o.shell = 'bash'
o.mouse = 'a'
o.shell = 'bash'
o.mouse = 'a'
o.smarttab = true
bo.tabstop = 2
bo.shiftwidth = 2
bo.expandtab = true
o.smarttab = true
bo.tabstop = 2
bo.shiftwidth = 2
bo.expandtab = true
wo.relativenumber = true
o.hidden = true
wo.relativenumber = true
o.hidden = true
'';
'';
extraPackages = with pkgs; [
shfmt

View File

@ -14,7 +14,7 @@
pkiBundle = "/etc/secureboot";
};
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_6_9;
boot.kernelPackages = pkgs.linuxPackages_6_11;
nixpkgs.config.allowUnfree = true;

View File

@ -12,6 +12,8 @@ in {
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets."gitea.env" = {};
sops.secrets."keycloak_db_pw" = {};
sops.secrets."restic_mail_repository_password" = {};
sops.secrets."restic_ssh_key" = {};
imports = [
./mail.nix
@ -248,6 +250,24 @@ in {
};
};
restic = {
backups = {
mail = {
repository = "sftp:u169497-sub5@u169497.your-storagebox.de:mail";
initialize = true;
extraOptions = [
"sftp.command='ssh -p23 u169497-sub5@u169497.your-storagebox.de -i ${config.sops.secrets."restic_ssh_key".path} -s sftp'"
];
passwordFile = config.sops.secrets."restic_mail_repository_password".path;
paths = ["/var/vmail" "/var/dkim"];
timerConfig = {
OnCalendar = "00:05";
RandomizedDelaySec = "1h";
};
};
};
};
# keycloak = {
# enable = true;
#

View File

@ -1,5 +1,7 @@
gitea.env: ENC[AES256_GCM,data:wkSPzLQtL3vGNIjG+jG6I3+R7wLBBdXeaCHbKxMbpVOldo8zrPLu8HdoryneRro58d7D9Cao9x+n5SvYNfGwHPgDJG8saXTeyEffIWIKNC+5+8fjiWwIkAvstckmZjSLitVxcwhifs49jmZgW/xQBPEPiAHzVkjeueV7p/Jm9WgyD2ycPrKUvNEYJ6DWZqQq9r10Y/KsRZsvRzF2cp6YeX7YGjW7E2wuQz9yy8gOFHxmoJxAc4zM7XaKZWKtow1UPCjTtxiY7qRkWK7KQt21Xf3FCsU=,iv:qQv7hbqh3Kl6sE/XW37D9AbYt4gLJw5BnfbbLIkzOd4=,tag:g6Cecvdb67W01HvIULNzsQ==,type:str]
keycloak_db_pw: ENC[AES256_GCM,data:1oBqzpFokAmjkT770YKYwzCllaGTprtDR9W4B/+V6ZUXPhJ1R9DNWZHqpQ==,iv:dK36GBiDj12HVjUkZqTVk/rR6s1sf6dmQTk1ZJQwi+I=,tag:6Ix9QSf+A0U82sG0z8wSmw==,type:str]
restic_mail_repository_password: ENC[AES256_GCM,data:B2XAP9tnztl/c7HB7bHywfJcwV9sLahfqCfI0TajWaWHPhRsZow4yxhn813FN4pINb5i1kYyiRG/sMXMKAFo9g==,iv:pQnVRVtuhcVtH/Kot9hcx8DSA4qlkksuUiY8HaOawfk=,tag:4lbmh8bQDSVNbI06/gNUlQ==,type:str]
restic_ssh_key: ENC[AES256_GCM,data:HpS73OEFvqSLYg8Qh1syJEjCfv5og5VxxzK2VPmAFRk5BzM4xF3Dn0cmJtQpwMMwaRGRWFdCTMrQCBWRrLgDt7wUyMpBn1HivLr4nwEOU4oDStv+1zKmrNbWLSYw3TbHoNJ2K+C46lfpV9CBdb+8dmv2vto6HoKFrOYc5/ftYd7lD9zMhueAMCc3q7aPsIFGb2TRGNz1wrF6Cn9ew1Oqh/P7xlUuIgS0kAKRrybhiIO9IUgQsTV3qqZIXogP4Yy2OLSyhbtDuvtLAncL2pJ/ZsGme47G8HoFomyqEIf0eq7YKqlpTqKPbbnxfWSlWYGg+l9OtCJOeyp5oEZ6sjPNdTUYjpcVZpHNEEa2zkaZzRj5Jo/GIiJfCu4F0kk4opbqEUTeDQHgesylxwpd/v5zaplGEqpYZ7y/DAud+YUw7XWYWjy60kjlZdkbKwrL/Cg4dxWY8Cc7v42Ve7aADgSEpEhwo5rHxM3JSVHHHunfC6y+/Qin26wQZhF1w+d8/yqSaJidx6FsDSipGCJtXa9liIG7oG2vUlmYm4rE,iv:d/AFzPAJGSGv1WzQY4+p8mImFoWKkaoMRtIBNAYiU0E=,tag:mdE/e2VX5zdrFT43NZaYNQ==,type:str]
sops:
kms: []
gcp_kms: []
@ -15,8 +17,8 @@ sops:
V1h2NGxyNVc3WnF2ZFBpQm1oK1AzeGcK4GoD2E8nwOl/WKtgMgs0Y1Q8abRX4mpy
GdHGDQUWvySCisJo4JXsooYkLjOyKvir+vcVbX4nDd4L1W2OMULkrg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-03-25T19:17:29Z"
mac: ENC[AES256_GCM,data:Qnou0/umwMX2XD7gDF6SceFI5tLjOO30OVhFSXhxc2yuFj/gB0R1bPplLm5j/wmxfRQDvvm2zLgGFMqt+8i4Z+6OYgbuwFcv4FR2E001aWVj1zh+F8pRZVTxqnsvegoKWQwoXkhZe5S/fjX9N09SMYhBkjLUh9fboGXajEpDws8=,iv:hTQgeyli/MPaUVxJSzhDK+ssxv78w7hRBtQ1pnZGASg=,tag:HDKQ2duHMYvGa74Vp0fIjw==,type:str]
lastmodified: "2024-11-17T19:36:07Z"
mac: ENC[AES256_GCM,data:htvYIuHrOZ8jyVPVW7mVeTtf1eefwYkkZJ0l3xLFsVcCBlU3CjDgx+J9WN0kHw6TP+cP/+StYOtAthFe6UpoF8pmCvI+dKysrN6iLmqZySmh576YOY0Aq83WO4UOawZbarx8VUqTFdBrdp2bnMEjJ4bYvoTRuvAkQZocP8BK460=,iv:W8W8IZeviuUjE1Zz0x5m1/py/Zmx6rwl1ndVXfaR+DE=,tag:QXj9FZVk+H8ztI1VEFLyOQ==,type:str]
pgp:
- created_at: "2024-01-25T11:10:44Z"
enc: |-
@ -31,4 +33,4 @@ sops:
-----END PGP MESSAGE-----
fp: 5FA64909521A5C85992F26E0F819AEFF941BB849
unencrypted_suffix: _unencrypted
version: 3.8.1
version: 3.9.1