From 621cab576f017db507c8ed7f2ce4160451a92a3a Mon Sep 17 00:00:00 2001 From: Bad Date: Fri, 9 Apr 2021 19:51:39 +0200 Subject: [PATCH] a --- flake.lock | 24 ++++++------- overrides/default.nix | 2 +- profiles/flatpak/default.nix | 6 ++++ profiles/torrents/default.nix | 6 ++++ suites/default.nix | 2 +- users/mae/default.nix | 67 +++++++---------------------------- users/mae/vim.nix | 57 +++++++++++++++++++++++++++++ 7 files changed, 95 insertions(+), 69 deletions(-) create mode 100644 profiles/flatpak/default.nix create mode 100644 profiles/torrents/default.nix create mode 100644 users/mae/vim.nix diff --git a/flake.lock b/flake.lock index e46ddf9..289bc8e 100644 --- a/flake.lock +++ b/flake.lock @@ -118,11 +118,11 @@ ] }, "locked": { - "lastModified": 1617824750, - "narHash": "sha256-C5iZZAFqyVhenqc4/Osfyrm5DdvHZ+QTondSJ2hEE4g=", + "lastModified": 1617894699, + "narHash": "sha256-zlG3xNXgqo5pbMmfq8YaqGoVjElHnTDnEz13A+pUbZY=", "owner": "nix-community", "repo": "home-manager", - "rev": "be56b6f2c5df6a4da8c91d4a3174f77d66c35533", + "rev": "56f5f41ed42f7d476a7c79fa8ec71f5605487abf", "type": "github" }, "original": { @@ -153,11 +153,11 @@ }, "nixos": { "locked": { - "lastModified": 1617636226, - "narHash": "sha256-iZhBWrOR2DoDs1C+0FlnM9AQLMol/qoGQ+d+S43CKJM=", + "lastModified": 1617899217, + "narHash": "sha256-gd5JHH7IkeoIQ/oiGZSqDpGdGt7DMRJTQ8JiD8+hdOQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3d1a7716d7f1fccbd7d30ab3b2ed3db831f43bde", + "rev": "9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2", "type": "github" }, "original": { @@ -183,11 +183,11 @@ }, "nur": { "locked": { - "lastModified": 1617867336, - "narHash": "sha256-yvXbthop3QTusctBAnfdxqEstoD/lizEMkxV/iiVSYI=", + "lastModified": 1617957901, + "narHash": "sha256-aRaaSXPMwVircYKtK75jMCWf8RMD44t62Qx2MipApX0=", "owner": "nix-community", "repo": "NUR", - "rev": "b0d7be4deb6c1c4bb20b19666b43b1cf829e709f", + "rev": "0ba8bb129db0370eff1891b85c86fbdbd3188a64", "type": "github" }, "original": { @@ -197,11 +197,11 @@ }, "override": { "locked": { - "lastModified": 1617877974, - "narHash": "sha256-+vpQTptGNpRl90IPOA+R1+8eNr3fYxOYlq47hmgPfw4=", + "lastModified": 1617956877, + "narHash": "sha256-WaGyeE/T3gZuWs2NXYRoqdpDFTnQd+GVlO1e7nO4b0Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "034c49f514e0aa759eb3f320c1a8c78084b69eec", + "rev": "1d406295a3cff86d16bb27d3ae2b36021802ef1b", "type": "github" }, "original": { diff --git a/overrides/default.nix b/overrides/default.nix index 93fe0df..863bd19 100644 --- a/overrides/default.nix +++ b/overrides/default.nix @@ -8,6 +8,6 @@ # packages pulled from override packages = pkgs: final: prev: { - #inherit (pkgs) + # inherit (pkgs) tracker; }; } diff --git a/profiles/flatpak/default.nix b/profiles/flatpak/default.nix new file mode 100644 index 0000000..2812bf8 --- /dev/null +++ b/profiles/flatpak/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.flatpak + ]; +} diff --git a/profiles/torrents/default.nix b/profiles/torrents/default.nix new file mode 100644 index 0000000..680dc8a --- /dev/null +++ b/profiles/torrents/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + qbittorrent + ]; +} diff --git a/suites/default.nix b/suites/default.nix index 89355c5..ea3e76c 100644 --- a/suites/default.nix +++ b/suites/default.nix @@ -2,7 +2,7 @@ { system = with profiles; rec { base = [ users.mae users.root ]; - workstation = base ++ [ sway develop game profiles.workstation ssh ]; + workstation = base ++ [ sway develop game profiles.workstation ssh flatpak torrents ]; desktop = workstation ++ [ amd school three_dee ]; lap = workstation ++ [ laptop bluetooth print networkmanager ]; }; diff --git a/users/mae/default.nix b/users/mae/default.nix index b65b117..6a5d839 100644 --- a/users/mae/default.nix +++ b/users/mae/default.nix @@ -2,62 +2,19 @@ { home-manager.users.mae = { imports = [ ../profiles/git ]; - programs.neovim = { - enable = true; - vimdiffAlias = true; - withNodeJs = true; - - plugins = with pkgs.vimPlugins; [ - { - plugin = coc-nvim; - config = '' - nmap (coc-rename) - - inoremap pumvisible() ? "\" : "\" - inoremap pumvisible() ? "\" : "\" - - " Remap and for scroll float windows/popups. - if has('nvim-0.4.0') || has('patch-8.2.0750') - nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - endif - ''; - } - fzf-vim - { - plugin = iceberg-vim; - config = "colorscheme iceberg"; - } - vim-sleuth - coc-json - coc-html - coc-tsserver - neoformat - undotree - { - plugin = vim-jsdoc; - config = '' - let g:jsdoc_formatter = "tsdoc" - let g:typescript_indent_disable = 1 - ''; - } - ]; - extraConfig = '' - set background=dark - set termguicolors - - set ic - set number - set autoindent - - set completeopt=menuone,noinsert,noselect - set shortmess+=c - ''; + home.sessionVariables = { + XDG_DATA_DIRS = "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"; }; + programs.zsh = { + enable = true; + zplug = { + enable = true; + plugins = [ + { name = "romkatv/powerlevel10k"; tags = [ "as:theme" "depth:1" ]; } + ]; + }; + }; + programs.neovim = import ./vim.nix { pkgs = pkgs; }; }; users.users.mae = { uid = 1000; diff --git a/users/mae/vim.nix b/users/mae/vim.nix new file mode 100644 index 0000000..fe9538e --- /dev/null +++ b/users/mae/vim.nix @@ -0,0 +1,57 @@ +{ pkgs, ... }: +{ + enable = true; + vimdiffAlias = true; + withNodeJs = true; + + plugins = with pkgs.vimPlugins; [ + { + plugin = coc-nvim; + config = '' + nmap (coc-rename) + + inoremap pumvisible() ? "\" : "\" + inoremap pumvisible() ? "\" : "\" + + " Remap and for scroll float windows/popups. + if has('nvim-0.4.0') || has('patch-8.2.0750') + nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" + vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + endif + ''; + } + fzf-vim + { + plugin = iceberg-vim; + config = "colorscheme iceberg"; + } + vim-sleuth + coc-json + coc-html + coc-tsserver + neoformat + undotree + { + plugin = vim-jsdoc; + config = '' + let g:jsdoc_formatter = "tsdoc" + let g:typescript_indent_disable = 1 + ''; + } + ]; + extraConfig = '' + set background=dark + set termguicolors + + set ic + set number + set autoindent + + set completeopt=menuone,noinsert,noselect + set shortmess+=c + ''; +}