mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 18:19:11 +00:00
chore: reformat codebase
This commit is contained in:
parent
2f389641cd
commit
44090d6257
@ -22,5 +22,6 @@
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
@ -101,7 +101,8 @@ in
|
||||
# A set of bindings to be used for each jump direction.
|
||||
bindings:
|
||||
let
|
||||
mappings = builtins.map (motion:
|
||||
mappings = builtins.map
|
||||
(motion:
|
||||
let
|
||||
inherit (motion) region jumpDirection variant;
|
||||
jumpDirection' = lib.strings.toLower jumpDirection;
|
||||
@ -115,7 +116,8 @@ in
|
||||
query = "@${query}.${variant}";
|
||||
};
|
||||
};
|
||||
}) motions;
|
||||
})
|
||||
motions;
|
||||
in
|
||||
acc ++ mappings;
|
||||
in
|
||||
@ -127,7 +129,8 @@ in
|
||||
"conditional" = { previous = "D"; next = "d"; };
|
||||
"statement" = { previous = "S"; next = "s"; };
|
||||
"loop" = { previous = "L"; next = "l"; };
|
||||
}));
|
||||
}
|
||||
));
|
||||
select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
@ -161,7 +164,8 @@ in
|
||||
|
||||
let
|
||||
mappingsList =
|
||||
builtins.map (variant:
|
||||
builtins.map
|
||||
(variant:
|
||||
let
|
||||
prefixMap' = prefixMap.${variant};
|
||||
in
|
||||
@ -203,7 +207,8 @@ in
|
||||
|
||||
mkQueryMappings = acc: query: bindings:
|
||||
let
|
||||
mappings = builtins.map (motion:
|
||||
mappings = builtins.map
|
||||
(motion:
|
||||
let
|
||||
inherit (motion) jumpDirection variant;
|
||||
jumpDirection' = lib.strings.toLower jumpDirection;
|
||||
@ -217,7 +222,8 @@ in
|
||||
query = "@${query}.${variant}";
|
||||
};
|
||||
};
|
||||
}) motions;
|
||||
})
|
||||
motions;
|
||||
in
|
||||
acc ++ mappings;
|
||||
in
|
||||
@ -225,7 +231,9 @@ in
|
||||
"function" = { next = "f"; previous = "F"; };
|
||||
"parameter" = { next = "a"; previous = "A"; };
|
||||
"conditional" = { next = "d"; previous = "D"; };
|
||||
}));
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -7,7 +7,12 @@ let
|
||||
partsConfig = config;
|
||||
|
||||
# A thin wrapper around the home-manager configuration function.
|
||||
mkHome = { system, nixpkgsBranch ? "nixpkgs", homeManagerBranch ? "home-manager", extraModules ? [ ] }:
|
||||
mkHome =
|
||||
{ system
|
||||
, nixpkgsBranch ? "nixpkgs"
|
||||
, homeManagerBranch ? "home-manager"
|
||||
, extraModules ? [ ]
|
||||
}:
|
||||
let
|
||||
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
|
||||
in
|
||||
|
@ -41,7 +41,12 @@ let
|
||||
};
|
||||
|
||||
# A very very thin wrapper around `mkHost` to build with the given format.
|
||||
mkImage = { system, nixpkgsBranch ? "nixpkgs", extraModules ? [ ], format ? "iso" }:
|
||||
mkImage =
|
||||
{ system
|
||||
, nixpkgsBranch ? "nixpkgs"
|
||||
, extraModules ? [ ]
|
||||
, format ? "iso"
|
||||
}:
|
||||
let
|
||||
extraModules' =
|
||||
extraModules ++ [ inputs.nixos-generators.nixosModules.${format} ];
|
||||
@ -295,8 +300,7 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
modules = [
|
||||
config.modules = [
|
||||
# Bring in the required modules.
|
||||
inputs.${config.homeManagerBranch}.nixosModules.home-manager
|
||||
../../../configs/nixos/${name}
|
||||
@ -385,7 +389,8 @@ let
|
||||
setupConfig.homeManagerUsers.users);
|
||||
})
|
||||
];
|
||||
}))
|
||||
}
|
||||
))
|
||||
|
||||
# Next, we include the chosen NixVim configuration into NixOS.
|
||||
(lib.mkIf (config.nixvim.instance != null)
|
||||
@ -426,7 +431,6 @@ let
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.setups.nixos = {
|
||||
|
@ -11,7 +11,7 @@ let
|
||||
cfg = config.setups.nixvim;
|
||||
nixvimModules = ../../nixvim;
|
||||
|
||||
mkNixvimConfig = { system, pkgs, modules ? [] }:
|
||||
mkNixvimConfig = { system, pkgs, modules ? [ ] }:
|
||||
inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule {
|
||||
inherit pkgs;
|
||||
module = {
|
||||
@ -24,7 +24,7 @@ let
|
||||
|
||||
modulesOption = lib.mkOption {
|
||||
type = with lib.types; listOf raw;
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
modulesOption' = configEnv: modulesOption // {
|
||||
description = ''
|
||||
@ -84,7 +84,7 @@ in
|
||||
configType
|
||||
];
|
||||
});
|
||||
default = {};
|
||||
default = { };
|
||||
description = ''
|
||||
A set of NixVim configurations to be integrated into the declarative
|
||||
setups configuration. Each of them will be available as part of
|
||||
@ -101,14 +101,15 @@ in
|
||||
standaloneConfigModules = modulesOption' "standalone configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.configs != {}) {
|
||||
config = lib.mkIf (cfg.configs != { }) {
|
||||
setups.nixvim.sharedModules = [ nixvimModules ];
|
||||
|
||||
perSystem = { system, config, lib, ... }:
|
||||
(
|
||||
let
|
||||
validConfigs = lib.filterAttrs
|
||||
(_: metadata: lib.elem system metadata.systems) cfg.configs;
|
||||
(_: metadata: lib.elem system metadata.systems)
|
||||
cfg.configs;
|
||||
|
||||
nixvimConfigurations =
|
||||
let
|
||||
@ -135,7 +136,7 @@ in
|
||||
cfg.sharedModules
|
||||
++ cfg.standaloneConfigModules
|
||||
++ metadata.modules
|
||||
++ [ { package = neovimPkg; } ];
|
||||
++ [{ package = neovimPkg; }];
|
||||
});
|
||||
in
|
||||
builtins.map mkNixvimConfig' neovimPackages;
|
||||
|
@ -205,8 +205,9 @@ in
|
||||
TODO: Is `Type=notify` a good default?
|
||||
* `Service.Type=` is obviously not included since not all desktop
|
||||
components are the same either. Some of them could be a D-Bus service,
|
||||
some of them are oneshots, etc. Not to mention, this is already implied
|
||||
to be `Type=simple` by systemd anyways which is enough for most cases.
|
||||
some of them are oneshots, etc. Though, it might be better to have this
|
||||
as an explicit option set by the user instead of setting `Type=notify` as
|
||||
a default.
|
||||
|
||||
TODO: A good balance for this value, probably?
|
||||
* `Service.OOMScoreAdjust=` have different values for different
|
||||
|
@ -173,12 +173,10 @@ in
|
||||
environment.
|
||||
|
||||
::: {.tip}
|
||||
While you can make identifiers in any way, it is
|
||||
encouraged to stick to a naming scheme. Here's two common ways to name
|
||||
a desktop environment.
|
||||
|
||||
* Reverse DNS-like scheme (e.g., `com.example.MoseyBranch`).
|
||||
* Kebab-case (e.g., `mosey-branch`).
|
||||
While you can make identifiers in any way, it is encouraged to stick to
|
||||
a naming scheme. The recommended method is a reverse DNS-like scheme
|
||||
preferably with a domain name you own (e.g.,
|
||||
`com.example.MoseyBranch`).
|
||||
:::
|
||||
'';
|
||||
default = { };
|
||||
|
@ -3,7 +3,7 @@
|
||||
let
|
||||
cfg = config.keyunmaps;
|
||||
|
||||
keyunmapOption = { config, lib, ...}: {
|
||||
keyunmapOption = { config, lib, ... }: {
|
||||
options = {
|
||||
key = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
@ -9,7 +9,7 @@ in
|
||||
package = helpers.mkPackageOption "firenvim" pkgs.vimPlugins.firenvim;
|
||||
extraConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = {};
|
||||
default = { };
|
||||
example = {
|
||||
globalSettings = { alt = "all"; };
|
||||
localSettings = {
|
||||
|
Loading…
Reference in New Issue
Block a user