lint
This commit is contained in:
parent
5030dcf3b6
commit
2232ad3f31
12 changed files with 31 additions and 28 deletions
|
@ -3,4 +3,6 @@ root = true
|
|||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
|
|
@ -7,6 +7,7 @@ nix flake config! this is just used on my personal server at the moment
|
|||
this flake is built for a multi-user experience per host, enforced by [`modules/users.nix`](./modules/users.nix), and found in the `default.nix` file for each host.
|
||||
|
||||
## todo
|
||||
|
||||
- find a better way to do cloudflare ips
|
||||
- per-host architecture selection, atm it is hardcoded to `aarch64`
|
||||
- move common config such as bootloader and networking settings to [`default.nix`](./default.nix)
|
||||
|
|
10
default.nix
10
default.nix
|
@ -6,7 +6,7 @@ let
|
|||
inherit (lib.my) mapModulesRec';
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.vscode-server.nixosModules.default
|
||||
]
|
||||
|
@ -19,14 +19,14 @@ in {
|
|||
# might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
|
||||
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
|
@ -38,7 +38,7 @@ in {
|
|||
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
||||
|
||||
time.timeZone = mkDefault "America/Los_Angeles";
|
||||
|
||||
|
||||
i18n.defaultLocale = mkDefault "en_US.UTF-8";
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -15,7 +15,7 @@
|
|||
inherit (lib.my) mapModules mapModulesRec mapHosts;
|
||||
system = "aarch64-linux";
|
||||
|
||||
mkPkgs = pkgs: extraOverlays:
|
||||
mkPkgs = pkgs: extraOverlays:
|
||||
import pkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
|
@ -32,19 +32,19 @@
|
|||
});
|
||||
in {
|
||||
lib = lib.my;
|
||||
|
||||
overlays =
|
||||
|
||||
overlays =
|
||||
(mapModules ./overlays import)
|
||||
// {
|
||||
default = final: prev: {
|
||||
my = self.packages.${system};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
packages."${system}" = mapModules ./packages (p: pkgs.callPackage p {});
|
||||
|
||||
|
||||
nixosModules = mapModulesRec ./modules import;
|
||||
|
||||
|
||||
nixosConfigurations = mapHosts ./hosts {};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
# TODO: move bootloader, networking, boot speed to another file?
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
# TODO: move bootloader, networking, boot speed to another file?
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader = {
|
||||
# use u-boot over grub
|
||||
|
@ -25,7 +25,7 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
swapDevices =
|
||||
[ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
@ -19,7 +19,7 @@ in {
|
|||
nginx-config.enable = true;
|
||||
|
||||
staticSites = {
|
||||
"reidlab.pink".dataDir = "/var/www/reidlab.pink";
|
||||
"reidlab.pink".dataDir = "/var/www/reidlab.pink";
|
||||
};
|
||||
|
||||
matomo = {
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
mylib =
|
||||
makeExtensible (self:
|
||||
mapModules ./. (file: import file {inherit self lib pkgs inputs;}));
|
||||
in
|
||||
in
|
||||
mylib.extend (self: super: foldr (a: b: a // b) {} (attrValues super))
|
||||
|
|
|
@ -9,10 +9,10 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
boot = {
|
||||
tmp.useTmpfs = lib.mkDefault true;
|
||||
tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs);
|
||||
|
||||
boot = {
|
||||
tmp.useTmpfs = lib.mkDefault true;
|
||||
tmp.cleanOnBoot = lib.mkDefault (!config.boot.tmp.useTmpfs);
|
||||
|
||||
kernel.sysctl = {
|
||||
# magic sysrq key, allows low-level commands through keyboard input
|
||||
"kernel.sysrq" = 0;
|
||||
|
|
|
@ -26,4 +26,4 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ in {
|
|||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
|
||||
recommendedTlsSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
|
|
|
@ -17,4 +17,4 @@ scrape_configs:
|
|||
host: nixos-server-reid
|
||||
relabel_configs:
|
||||
- source_labels: ["__journal__systemd_unit"]
|
||||
target_label: "unit"
|
||||
target_label: "unit"
|
||||
|
|
|
@ -67,7 +67,7 @@ in {
|
|||
};
|
||||
|
||||
users.groups = mapAttrs (_: _: {}) config.normalUsers;
|
||||
|
||||
|
||||
users.users = mapAttrs (username: user: (mkMerge [
|
||||
(mkAliasDefinitions options.user)
|
||||
user.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue