From a98fdd1ced18ab2c779acb5ccb5458cfd802d36c Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Mon, 11 Jan 2021 22:32:59 +0000 Subject: [PATCH] Reorganize home --- home/config | 6 ------ home/default.nix | 8 +++++--- home/{ => files}/alacritty.yml | 0 home/files/mimeapps.list | 14 ++++++++++++++ home/{ => files}/mpv.conf | 0 home/{ => files}/xp.jpg | Bin home/git.nix | 1 + {sets => home}/neovim/default.nix | 17 +++++++++++------ {sets => home}/neovim/init.vim | 0 sets/packages.nix | 1 + sets/workstation.nix | 1 - 11 files changed, 32 insertions(+), 16 deletions(-) delete mode 100644 home/config rename home/{ => files}/alacritty.yml (100%) create mode 100644 home/files/mimeapps.list rename home/{ => files}/mpv.conf (100%) rename home/{ => files}/xp.jpg (100%) rename {sets => home}/neovim/default.nix (59%) rename {sets => home}/neovim/init.vim (100%) diff --git a/home/config b/home/config deleted file mode 100644 index 834ff92..0000000 --- a/home/config +++ /dev/null @@ -1,6 +0,0 @@ -daemonize -ignore-empty-password -image=/home/artemis/.config/swaylock/xp.jpg -indicator-caps-lock -show-failed-attempts -show-keyboard-layout diff --git a/home/default.nix b/home/default.nix index b50b24e..8c850bc 100644 --- a/home/default.nix +++ b/home/default.nix @@ -9,19 +9,21 @@ home-manager.users.artemis = { pkgs, ... }: { imports = [ ./git.nix + ./neovim ]; xdg.enable = true; xdg.configFile = { - "alacritty/alacritty.yml".source = ./alacritty.yml; - "mpv/mpv.conf".source = ./mpv.conf; + "alacritty/alacritty.yml".source = ./files/alacritty.yml; + "mpv/mpv.conf".source = ./files/mpv.conf; + "mimeapps.list".source = ./files/mimeapps.list; "swaylock/config".text = '' daemonize ignore-empty-password indicator-caps-lock show-failed-attempts show-keyboard-layout - image=${./xp.jpg} + image=${./files/xp.jpg} ''; }; }; diff --git a/home/alacritty.yml b/home/files/alacritty.yml similarity index 100% rename from home/alacritty.yml rename to home/files/alacritty.yml diff --git a/home/files/mimeapps.list b/home/files/mimeapps.list new file mode 100644 index 0000000..76184a0 --- /dev/null +++ b/home/files/mimeapps.list @@ -0,0 +1,14 @@ +[Default Applications] +application/pdf=org.gnome.Evince.desktop +application/xml=code.desktop +audio/flac=mpv.desktop +image/png=org.gnome.eog.desktop +image/jpeg=org.gnome.eog.desktop +text/html=firefox.desktop +x-scheme-handler/about=firefox.desktop +x-scheme-handler/discord-455712169795780630=discord-455712169795780630.desktop +x-scheme-handler/http=firefox.desktop +x-scheme-handler/https=firefox.desktop +x-scheme-handler/steam=steam.desktop +x-scheme-handler/unknown=firefox.desktop +x-scheme-handler/zoommtg=us.zoom.Zoom.desktop diff --git a/home/mpv.conf b/home/files/mpv.conf similarity index 100% rename from home/mpv.conf rename to home/files/mpv.conf diff --git a/home/xp.jpg b/home/files/xp.jpg similarity index 100% rename from home/xp.jpg rename to home/files/xp.jpg diff --git a/home/git.nix b/home/git.nix index 9797ca0..4712dba 100644 --- a/home/git.nix +++ b/home/git.nix @@ -16,6 +16,7 @@ transfer.fsckObjects = true; advice.detachedHead = false; + pull.rebase = true; format.signOff = true; init.defaultBranch = "canon"; log.showSignature = true; diff --git a/sets/neovim/default.nix b/home/neovim/default.nix similarity index 59% rename from sets/neovim/default.nix rename to home/neovim/default.nix index 24d4d7d..548476c 100644 --- a/sets/neovim/default.nix +++ b/home/neovim/default.nix @@ -4,7 +4,7 @@ programs.neovim = { enable = true; vimAlias = true; - defaultEditor = true; + withNodeJs = true; configure = { customRC = builtins.readFile ./init.vim; packages.default.start = with pkgs.vimPlugins; [ @@ -27,11 +27,16 @@ }; }; - environment.systemPackages = with pkgs; [ + home.sessionVariables.EDITOR = "nvim"; + home.packages = with pkgs; [ nixpkgs-fmt - nodejs - python3Packages.python-language-server - rnix-lsp - rust-analyzer ]; + + xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON { + rust-analyzer.serverPath = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + languageserver.nix = { + command = "${pkgs.rnix-lsp}/bin/rnix-lsp"; + filetypes = [ "nix" ]; + }; + }; } diff --git a/sets/neovim/init.vim b/home/neovim/init.vim similarity index 100% rename from sets/neovim/init.vim rename to home/neovim/init.vim diff --git a/sets/packages.nix b/sets/packages.nix index 4b306f2..5d30690 100644 --- a/sets/packages.nix +++ b/sets/packages.nix @@ -83,6 +83,7 @@ in libarchive lsof mercurialFull + neovim nix-index openssl p7zip diff --git a/sets/workstation.nix b/sets/workstation.nix index bbcf210..4159b7d 100644 --- a/sets/workstation.nix +++ b/sets/workstation.nix @@ -5,7 +5,6 @@ ./sway.nix ./packages.nix ./pipewire.nix - ./neovim ../home ];