1
0
Fork 0

Update config

This commit is contained in:
Malte Brandy 2019-10-19 23:12:20 +02:00
parent 1ff64b2644
commit 4dd27dfcf6
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
8 changed files with 140 additions and 11 deletions

View file

@ -18,6 +18,7 @@ in {
../../system/boot-key.nix
../../system/standalone
../../system/use-cache.nix
../../system/local-nix-cache.nix
];
networking = {

View file

@ -1,5 +1,26 @@
rec {
pkgs = import <nixpkgs> { };
colors = {
"foreground" = "#dddbff";
"background" = "#000000";
"black" = "#000000";
"brightBlack" = "#55508f";
"red" = "#e34b4f";
"brightRed" = "#e34b4f";
"green" = "#67b779";
"brightGreen" = "#45b75e";
"yellow" = "#ff9c00";
"brightYellow" = "#ff9c00";
"blue" = "#5c67ff";
"brightBlue" = "#5c67ff";
"magenta" = "#cb85ff";
"brightMagenta" = "#cb85ff";
"cyan" = "#17d0f4";
"brightCyan" = "#17d0f4";
"white" = "#dddbff";
"brightWhite" = "#ffffff";
};
pkgs = import <nixpkgs> {
};
unstable = import <unstable> { };
sources = import ../nix/sources.nix;
unBreak = pkg:

View file

@ -5,10 +5,10 @@
"homepage": null,
"owner": "andir",
"repo": "ate",
"rev": "4536fc5972d90e9719418d9752e1f7a720be123f",
"sha256": "0iapbb8fxkks55lqn2s3nab0j4q3hn8pb7sx29sy3pkq068yx5a4",
"rev": "880f628638355bfaafa8948e03e93fd64bce9a40",
"sha256": "02di5sfqri093rk9gjnbv2jq6jj84r5l62ggypxv1n1ip4aaa2dj",
"type": "tarball",
"url": "https://github.com/andir/ate/archive/744efd87524497a335f4b041a9c646f3cb166dee.tar.gz",
"url": "https://github.com/andir/ate/archive/880f628638355bfaafa8948e03e93fd64bce9a40.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cachix": {
@ -47,6 +47,18 @@
"url": "https://github.com/rycee/home-manager/archive/ef64bc598f28818d56c86629dad98b468af9c071.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"local-nix-cache": {
"branch": "master",
"description": "A poor and hacky attempt at re-serving local nix packages that came from trusted sources",
"homepage": null,
"owner": "andir",
"repo": "local-nix-cache",
"rev": "45e0ba0e93b8fc7f7bfbf4bdc7daf205f24221f3",
"sha256": "12xqzl797nv24a1sp1wwc0dflbgcplj4aa322yds6kpln4hh30dd",
"type": "tarball",
"url": "https://github.com/andir/local-nix-cache/archive/45e0ba0e93b8fc7f7bfbf4bdc7daf205f24221f3.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"lorri": {
"branch": "rolling-release",
"description": "Your project's nix-env",

View file

@ -47,6 +47,10 @@ with rec
# annoyingly this means we have to specify them
fetchzip = { url, sha256 }@attrs: pkgs.fetchzip attrs;
# A wrapper around pkgs.fetchurl that has inspectable arguments,
# annoyingly this means we have to specify them
fetchurl = { url, sha256 }@attrs: pkgs.fetchurl attrs;
hasNixpkgsPath = (builtins.tryEval <nixpkgs>).success;
hasThisAsNixpkgsPath =
(builtins.tryEval <nixpkgs>).success && <nixpkgs> == ./.;
@ -71,7 +75,7 @@ with rec
in builtins.getAttr fetcherName {
"tarball" = fetchzip;
"builtin-tarball" = builtins_fetchTarball;
"file" = pkgs.fetchurl;
"file" = fetchurl;
"builtin-url" = builtins_fetchurl;
};
};

View file

@ -1,9 +1,36 @@
let
my-lib = import ../lib;
inherit (my-lib)
pkgs unstable sources writeHaskellScript gcRetentionDays unBreak;
pkgs unstable sources writeHaskellScript gcRetentionDays unBreak colors;
in rec {
ate = pkgs.callPackage (import sources.ate) { };
ate = pkgs.callPackage (import sources.ate) {
config.ate = {
options = {
BLACK = colors.black;
RED = colors.red;
GREEN = colors.green;
YELLOW = colors.yellow;
BLUE = colors.blue;
MAGENTA = colors.magenta;
CYAN = colors.cyan;
WHITE = colors.white;
BRIGHT_BLACK = colors.brightBlack;
BRIGHT_RED = colors.brightRed;
BRIGHT_GREEN = colors.brightGreen;
BRIGHT_YELLOW = colors.brightYellow;
BRIGHT_BLUE = colors.brightBlue;
BRIGHT_MAGENTA = colors.brightMagenta;
BRIGHT_CYAN = colors.brightCyan;
BRIGHT_WHITE = colors.brightWhite;
FOREGROUND_COLOR = colors.foreground;
BACKGROUND_COLOR = colors.background;
};
keybindings = {
DECREMENT_FONT =
"control+shift+minus"; # Das ist neo für control+minus, k.A. warum.
};
};
};
gitstatus = pkgs.callPackage ./powerlevel10k/gitstatus.nix {
libgit2 = pkgs.libgit2.overrideAttrs (attrs: {
@ -63,7 +90,7 @@ in rec {
inherit neovim;
inherit (pkgs)
gitFull gnumake python3 mkpasswd file wget curl wireguard gnupg mutt bind
liboping psmisc unzip rename whois lsof;
liboping psmisc unzip rename whois lsof parted;
};
extra-system-pkgs = {
@ -168,7 +195,9 @@ in rec {
ncpamixer pavucontrol deluge mpd gmpc calibre mpv youtubeDL
# games
minetest;
minetest
gparted;
};
my-home-pkgs = {

View file

@ -9,7 +9,7 @@ n.override {
inherit ((import <nixpkgs> { }).vimPlugins)
vim-nix vimtex airline rust-vim fugitive vim-trailing-whitespace
vim-airline-themes vim-pandoc vim-pandoc-syntax haskell-vim
vim-autoformat vim-ledger papercolor-theme nerdcommenter;
vim-autoformat vim-ledger papercolor-theme nerdcommenter vundle;
inherit ((import <unstable> { }).vimPlugins)
coc-nvim coc-python coc-rls coc-yaml coc-vimtex coc-css coc-json
coc-html coc-git;

View file

@ -1,3 +1,33 @@
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'zxqfl/tabnine-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
set spell spelllang=de,en
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
@ -17,6 +47,14 @@ set mouse=
set dir=~/.vimhist/
set backupdir=~/.vimhist/bak
set showcmd
augroup focus
au!
au TabLeave * silent! wall
au FocusLost * silent! wall
au BufLeave * silent! wall
augroup END
nnoremap <silent><cr> :nohlsearch<CR>
vnoremap < <gv
vnoremap > >gv
@ -55,9 +93,13 @@ let g:formatters_cabal = ['my_cabal']
let g:formatdef_my_nix = '"nixfmt"'
let g:formatters_nix = ['my_nix']
au BufWrite * :Autoformat
if (index(["c"], &filetype) >= 0)
au BufWrite * :Autoformat
endif
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
colorscheme PaperColor
" if hidden is not set, TextEdit might fail.

View file

@ -0,0 +1,20 @@
{ config, pkgs, lib, ... }:
let inherit (import ../lib) sources;
local-nix-cache = import sources.local-nix-cache { };
in {
imports = [ (local-nix-cache.path + "/module.nix") ];
local-nix-cache = {
server.enable = true;
client.enable = true;
};
networking.firewall.allowedTCPPorts = [ config.local-nix-cache.server.port ];
systemd.services.local-nix-cache.path = [ local-nix-cache.nix ];
systemd.services.local-nix-cache.serviceConfig.Restart = "always";
services.avahi.enable = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
}