From fcfa346eec1f2fb8cf0b3b87a5d2eccfc6dd8f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 23 Nov 2019 09:03:58 +0000 Subject: [PATCH] Split home config --- nixos/cli.nix | 15 +++++++ nixos/gui.nix | 17 ++++++++ nixos/home-other-os.nix | 97 ++++++----------------------------------- nixos/home.nix | 44 +++---------------- nixos/links.nix | 7 +++ nixos/programs.nix | 20 +++++++++ nixos/programs/vim.nix | 47 ++++++++++++++++++++ 7 files changed, 125 insertions(+), 122 deletions(-) create mode 100644 nixos/cli.nix create mode 100644 nixos/gui.nix create mode 100644 nixos/links.nix create mode 100644 nixos/programs.nix create mode 100644 nixos/programs/vim.nix diff --git a/nixos/cli.nix b/nixos/cli.nix new file mode 100644 index 00000000..15aba9d0 --- /dev/null +++ b/nixos/cli.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ + ( pass.withExtensions (ext: [ ext.pass-otp ext.pass-import ext.pass-genphrase ext.pass-audit ext.pass-update ])) + cabal-install stack hsetroot lm_sensors + wirelesstools ranger apvlv + fontconfig rustup gcc gdb + binutils veracrypt gitAndTools.diff-so-fancy + restic ghc jq awscli + hugo mercurial terraform + unzip aria + mono calcurse file python37Packages.binwalk-full + ]; +} diff --git a/nixos/gui.nix b/nixos/gui.nix new file mode 100644 index 00000000..0854ee02 --- /dev/null +++ b/nixos/gui.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: + +{ + home.packages = with pkgs; [ + passff-host + gnome3.gnome-screenshot + xpdf apvlv unstable.xidlehook blueman + fontconfig xclip gimp glxinfo + unstable.notable evince signal-desktop + libreoffice unstable.tor-browser-bundle-bin vlc + jetbrains.goland unstable.jetbrains.clion jetbrains.idea-ultimate unstable.android-studio + (wine.override { wineBuild = "wineWow"; }) winetricks + yubico-piv-tool yubikey-personalization yubikey-personalization-gui yubikey-manager-qt + slack discord obs-studio + ]; + +} diff --git a/nixos/home-other-os.nix b/nixos/home-other-os.nix index 7beeb531..46f0a056 100644 --- a/nixos/home-other-os.nix +++ b/nixos/home-other-os.nix @@ -13,89 +13,18 @@ in }; }; }; - home.packages = with pkgs; [ - ( - neovim.override { - vimAlias = true; - configure = { - customRC = '' - if filereadable($HOME . "/.vimrc") - source $HOME/.vimrc - endif - ''; - vam.knownPlugins = unstable.vimPlugins; - vam.pluginDictionaries = [ - { names = [ - "ack-vim" - "ctrlp-vim" - "editorconfig-vim" - "fzf-vim" - "nerdtree" - "nerdtree-git-plugin" - "rust-vim" - "tabular" - "vim-airline" - "vim-airline-themes" - "vim-autoformat" - "vim-colors-solarized" - "vim-dirdiff" - "vim-dispatch" - "vim-fugitive" - "vim-gitgutter" - "vim-markdown" - "vim-nix" - "vim-sensible" - "vim-startify" - "vim-surround" - "vim-toml" - ]; - } - ]; + home.sessionVariables = { + PASSWORD_STORE_ENABLE_EXTENSIONS="true"; + }; - };}) - wget git gnupg curl tmux python36Packages.glances htop atop powertop ripgrep-all fd dnsutils - ( pass.withExtensions (ext: [ ext.pass-otp ext.pass-import ext.pass-genphrase ext.pass-audit ext.pass-update ])) - passff-host - cabal-install stack hsetroot lm_sensors gnome3.gnome-screenshot - wirelesstools ranger xpdf apvlv unstable.xidlehook blueman - fontconfig nodejs rustup gcc gdb - binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy - restic glxinfo ghc - jq awscli - mercurial terraform unzip aria - mono calcurse fbreader file python37Packages.binwalk-full - ]; - - home.sessionVariables = { - PASSWORD_STORE_ENABLE_EXTENSIONS="true"; - }; - - home.file.".vimrc".source = ~/dev/dotfiles/.vimrc.nixos; - home.file.".config/nixpkgs/config.nix".source = ~/dev/dotfiles/nixos/shell-config.nix; - home.file.".mozilla/native-messaging-hosts/passff.json".source = "${pkgs.passff-host}/share/passff-host/passff.json"; - - imports = [ - ./programs/tmux.nix - ./programs/zsh.nix - ./programs/git.nix - ]; - - programs = { - home-manager.enable = true; - - z-lua = { - enable = true; - enableAliases = true; - enableBashIntegration = true; - enableZshIntegration = true; - }; - - rofi.enable = true; - fzf.enable = true; - chromium.enable = true; - go.enable = true; - bat.enable = true; - }; - - } + imports = [ + ./programs/tmux.nix + ./programs/zsh.nix + ./programs/git.nix + ./programs/vim.nix + ./programs.nix + ./links.nix + ./cli.nix + ]; + } diff --git a/nixos/home.nix b/nixos/home.nix index 5f0e7bdf..73412aea 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -13,23 +13,6 @@ in }; }; }; - home.packages = with pkgs; [ - ( pass.withExtensions (ext: [ ext.pass-otp ext.pass-import ext.pass-genphrase ext.pass-audit ext.pass-update ])) - passff-host - cabal-install stack hsetroot lm_sensors gnome3.gnome-screenshot - wirelesstools ranger xpdf apvlv unstable.xidlehook blueman - fontconfig nodejs rustup gcc gdb - binutils xclip pkgconfig veracrypt gitAndTools.diff-so-fancy - openjdk gimp restic glxinfo discord ghc - unstable.notable jq awscli evince signal-desktop - nodejs-10_x hugo mercurial terraform libreoffice - unzip unstable.tor-browser-bundle-bin aria vlc - jetbrains.goland unstable.jetbrains.clion jetbrains.idea-ultimate unstable.android-studio - (wine.override { wineBuild = "wineWow"; }) winetricks - yubico-piv-tool yubikey-personalization yubikey-personalization-gui yubikey-manager-qt - mono calcurse calibre fbreader file python37Packages.binwalk-full - slack discord obs-studio kpcli - ]; home.sessionVariables = { TERMINAL="termite"; @@ -37,39 +20,24 @@ in PASSWORD_STORE_ENABLE_EXTENSIONS="true"; }; - home.file.".vimrc".source = ~/dev/dotfiles/.vimrc.nixos; - home.file.".config/nixpkgs/config.nix".source = ~/dev/dotfiles/nixos/shell-config.nix; - home.file.".mozilla/native-messaging-hosts/passff.json".source = "${pkgs.passff-host}/share/passff-host/passff.json"; - imports = [ ./programs/tmux.nix ./programs/zsh.nix ./programs/termite.nix ./programs/git.nix + ./programs/vim.nix + ./programs.nix + ./links.nix ./user-xsession.nix + ./cli.nix + ./gui.nix ]; - programs = { - home-manager.enable = true; - - z-lua = { - enable = true; - enableAliases = true; - enableBashIntegration = true; - enableZshIntegration = true; - }; - - rofi.enable = true; - fzf.enable = true; - chromium.enable = true; - go.enable = true; - bat.enable = true; - }; - gtk = { enable = true; }; qt = { enable = true; }; + } diff --git a/nixos/links.nix b/nixos/links.nix new file mode 100644 index 00000000..a85ddd73 --- /dev/null +++ b/nixos/links.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + home.file.".vimrc".source = ~/dev/dotfiles/.vimrc.nixos; + home.file.".config/nixpkgs/config.nix".source = ~/dev/dotfiles/nixos/shell-config.nix; + home.file.".mozilla/native-messaging-hosts/passff.json".source = "${pkgs.passff-host}/share/passff-host/passff.json"; +} diff --git a/nixos/programs.nix b/nixos/programs.nix new file mode 100644 index 00000000..1a0ee499 --- /dev/null +++ b/nixos/programs.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +{ + programs = { + home-manager.enable = true; + + z-lua = { + enable = true; + enableAliases = true; + enableBashIntegration = true; + enableZshIntegration = true; + }; + + rofi.enable = true; + fzf.enable = true; + chromium.enable = true; + go.enable = true; + bat.enable = true; + }; +} diff --git a/nixos/programs/vim.nix b/nixos/programs/vim.nix new file mode 100644 index 00000000..20a73c38 --- /dev/null +++ b/nixos/programs/vim.nix @@ -0,0 +1,47 @@ +{ config, pkgs, ... }: + +{ + + home.packages = with pkgs; [ + ( + neovim.override { + vimAlias = true; + configure = { + customRC = '' + if filereadable($HOME . "/.vimrc") + source $HOME/.vimrc + endif + ''; + + vam.knownPlugins = unstable.vimPlugins; + vam.pluginDictionaries = [ + { names = [ + "ack-vim" + "ctrlp-vim" + "editorconfig-vim" + "fzf-vim" + "nerdtree" + "nerdtree-git-plugin" + "rust-vim" + "tabular" + "vim-airline" + "vim-airline-themes" + "vim-autoformat" + "vim-colors-solarized" + "vim-dirdiff" + "vim-dispatch" + "vim-fugitive" + "vim-gitgutter" + "vim-markdown" + "vim-nix" + "vim-sensible" + "vim-startify" + "vim-surround" + "vim-toml" + ]; + } + ]; + + };}) + ]; +} \ No newline at end of file