enable nix autoformat in vim
This commit is contained in:
parent
40e662779e
commit
40cc63c50d
3 changed files with 19 additions and 20 deletions
|
@ -5,9 +5,6 @@ let g:airline#extensions#tabline#enabled = 1
|
||||||
|
|
||||||
au BufWrite * :Autoformat
|
au BufWrite * :Autoformat
|
||||||
|
|
||||||
" plugins: rust
|
|
||||||
let g:rustfmt_autosave = 1
|
|
||||||
|
|
||||||
" searching
|
" searching
|
||||||
let $FZF_DEFAULT_COMMAND = 'rga --files --no-messages "" .'
|
let $FZF_DEFAULT_COMMAND = 'rga --files --no-messages "" .'
|
||||||
set grepprg=rga\ --vimgrep
|
set grepprg=rga\ --vimgrep
|
||||||
|
|
35
flake.nix
35
flake.nix
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
description = "NixOS configuration with flakes";
|
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
|
let
|
||||||
mkServer = pkgs: system: hostname:
|
mkServer = pkgs: system: hostname:
|
||||||
|
@ -16,9 +17,7 @@
|
||||||
mkRaspi = pkgs: hostname:
|
mkRaspi = pkgs: hostname:
|
||||||
pkgs.lib.nixosSystem {
|
pkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [ (./. + "/nixos/boxes/${hostname}") ];
|
||||||
(./. + "/nixos/boxes/${hostname}")
|
|
||||||
];
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
mkWorkstation = pkgs: system: hostname:
|
mkWorkstation = pkgs: system: hostname:
|
||||||
|
@ -42,12 +41,14 @@
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system;
|
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 = {
|
nixosConfigurations = {
|
||||||
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
|
||||||
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
|
||||||
|
@ -59,12 +60,13 @@
|
||||||
|
|
||||||
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
|
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [ (./. + "/nixos/boxes/bootstrap") ];
|
||||||
(./. + "/nixos/boxes/bootstrap")
|
|
||||||
];
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system;
|
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
|
# nix build .#nixosConfigurations.raspiimage.config.system.build.sdImage
|
||||||
|
@ -72,11 +74,13 @@
|
||||||
raspiimage = nixpkgs-stable.lib.nixosSystem {
|
raspiimage = nixpkgs-stable.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
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 = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
permitRootLogin = inputs.nixpkgs-stable.lib.mkForce "prohibit-password";
|
permitRootLogin =
|
||||||
|
inputs.nixpkgs-stable.lib.mkForce "prohibit-password";
|
||||||
passwordAuthentication = false;
|
passwordAuthentication = false;
|
||||||
};
|
};
|
||||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||||
|
@ -117,9 +121,7 @@
|
||||||
owner = "nix-community";
|
owner = "nix-community";
|
||||||
repo = "home-manager";
|
repo = "home-manager";
|
||||||
ref = "release-21.11";
|
ref = "release-21.11";
|
||||||
inputs = {
|
inputs = { nixpkgs.follows = "nixpkgs-stable"; };
|
||||||
nixpkgs.follows = "nixpkgs-stable";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
flake-utils = {
|
flake-utils = {
|
||||||
|
@ -160,4 +162,3 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
minicom
|
minicom
|
||||||
nix-index
|
nix-index
|
||||||
nix-top
|
nix-top
|
||||||
|
nixfmt
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
pciutils
|
pciutils
|
||||||
powertop
|
powertop
|
||||||
|
|
Loading…
Reference in a new issue