enable nix autoformat in vim

This commit is contained in:
Cyryl Płotnicki 2022-03-08 00:17:06 +00:00
parent 40e662779e
commit 40cc63c50d
3 changed files with 19 additions and 20 deletions

View file

@ -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

View file

@ -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 @@
};
}

View file

@ -32,6 +32,7 @@
minicom
nix-index
nix-top
nixfmt
nixpkgs-fmt
pciutils
powertop