From 40cc63c50d05bb978a39e0638669f87f8fffdd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Tue, 8 Mar 2022 00:17:06 +0000 Subject: [PATCH] enable nix autoformat in vim --- .vimrc.plugins-settings | 3 --- flake.nix | 35 ++++++++++++++++++----------------- nixos/home-manager/cli.nix | 1 + 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.vimrc.plugins-settings b/.vimrc.plugins-settings index 40c74b4f..a403efd2 100644 --- a/.vimrc.plugins-settings +++ b/.vimrc.plugins-settings @@ -5,9 +5,6 @@ let g:airline#extensions#tabline#enabled = 1 au BufWrite * :Autoformat -" plugins: rust -let g:rustfmt_autosave = 1 - " searching let $FZF_DEFAULT_COMMAND = 'rga --files --no-messages "" .' set grepprg=rga\ --vimgrep diff --git a/flake.nix b/flake.nix index 7d38e6f9..9ce1a656 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { description = "NixOS configuration with flakes"; - outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable, nixpkgs-stable, nixos-hardware, nur, agenix, neuron, sops } @ inputs: + outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable + , nixpkgs-stable, nixos-hardware, nur, agenix, neuron, sops }@inputs: let mkServer = pkgs: system: hostname: @@ -16,9 +17,7 @@ mkRaspi = pkgs: hostname: pkgs.lib.nixosSystem { system = "aarch64-linux"; - modules = [ - (./. + "/nixos/boxes/${hostname}") - ]; + modules = [ (./. + "/nixos/boxes/${hostname}") ]; specialArgs = { inherit inputs; }; }; mkWorkstation = pkgs: system: hostname: @@ -42,12 +41,14 @@ ]; specialArgs = { inherit inputs system; - nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable { inherit system; config = { allowUnfree = true; }; }; + nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable { + inherit system; + config = { allowUnfree = true; }; + }; }; }; - in - { + in { nixosConfigurations = { foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty"; skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv"; @@ -59,12 +60,13 @@ bootstrap = nixpkgs-stable.lib.nixosSystem rec { system = "x86_64-linux"; - modules = [ - (./. + "/nixos/boxes/bootstrap") - ]; + modules = [ (./. + "/nixos/boxes/bootstrap") ]; specialArgs = { inherit inputs system; - nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable { inherit system; config = { allowUnfree = true; }; }; + nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable { + inherit system; + config = { allowUnfree = true; }; + }; }; }; # nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage @@ -72,11 +74,13 @@ raspiimage = nixpkgs-stable.lib.nixosSystem { system = "aarch64-linux"; modules = [ - (import "${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") + (import + "${inputs.nixpkgs-nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") { services.openssh = { enable = true; - permitRootLogin = inputs.nixpkgs-stable.lib.mkForce "prohibit-password"; + permitRootLogin = + inputs.nixpkgs-stable.lib.mkForce "prohibit-password"; passwordAuthentication = false; }; users.extraUsers.root.openssh.authorizedKeys.keys = [ @@ -117,9 +121,7 @@ owner = "nix-community"; repo = "home-manager"; ref = "release-21.11"; - inputs = { - nixpkgs.follows = "nixpkgs-stable"; - }; + inputs = { nixpkgs.follows = "nixpkgs-stable"; }; }; flake-utils = { @@ -160,4 +162,3 @@ }; } - diff --git a/nixos/home-manager/cli.nix b/nixos/home-manager/cli.nix index 474c6149..c9c8c7c7 100644 --- a/nixos/home-manager/cli.nix +++ b/nixos/home-manager/cli.nix @@ -32,6 +32,7 @@ minicom nix-index nix-top + nixfmt nixpkgs-fmt pciutils powertop