nix fmt rcf-style

This commit is contained in:
Vinzenz Schroeter 2024-10-27 12:33:35 +01:00
parent b78e40ad6a
commit b9adba3225
35 changed files with 270 additions and 238 deletions

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./nixpkgs.nix
./globalinstalls.nix

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
config = {
environment = {
pathsToLink = [ "/share/zsh" ];

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
config = {
time.timeZone = "Europe/Berlin";
i18n = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
config = {
services.openssh = {
enable = true;

View file

@ -1,8 +1,5 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
options.allowedUnfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
@ -16,9 +13,15 @@
nix = {
settings = {
substituters = ["https://nix-community.cachix.org" "https://cache.nixos.org/"];
substituters = [
"https://nix-community.cachix.org"
"https://cache.nixos.org/"
];
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
experimental-features = ["nix-command" "flakes"];
experimental-features = [
"nix-command"
"flakes"
];
};
gc = {
automatic = true;

View file

@ -11,13 +11,16 @@
};
};
outputs = {
outputs =
{
nixpkgs,
home-manager,
lix-module,
...
}: {
nixosConfigurations = let
}:
{
nixosConfigurations =
let
host-params = {
inherit nixpkgs;
inherit home-manager;
@ -33,10 +36,16 @@
./modules/desktop-hardware.nix
];
};
in {
in
{
vinzenz-lpt2 = import ./hosts/vinzenz-lpt2 host-params;
vinzenz-pc2 = import ./hosts/vinzenz-pc2 host-params;
hetzner-vpn1 = import ./hosts/hetzner-vpn1 host-params;
};
formatter = {
x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt-rfc-style;
};
};
}

View file

@ -1,4 +1,5 @@
{config, ...}: {
{ config, ... }:
{
config = {
home-manager = {
useGlobalPkgs = true;

View file

@ -1,15 +1,11 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
../modules/gnome.nix
];
imports = [ ../modules/gnome.nix ];
config = {
home-manager.sharedModules = [
{
home.packages = with pkgs;
home.packages =
with pkgs;
[
amberol
gitg
@ -48,13 +44,7 @@
}
{
home.packages = with pkgs;
[
trayscale
]
++ (with gnomeExtensions; [
tailscale-qs
]);
home.packages = with pkgs; [ trayscale ] ++ (with gnomeExtensions; [ tailscale-qs ]);
dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ];
}
];

View file

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
## Apps
telegram-desktop
@ -22,7 +19,11 @@
oh-my-zsh = {
enable = true;
theme = "agnoster";
plugins = ["git" "sudo" "systemadmin"];
plugins = [
"git"
"sudo"
"systemadmin"
];
};
};

View file

@ -1,8 +1,6 @@
[
# set stateVersion
{
home.stateVersion = "22.11";
}
{ home.stateVersion = "22.11"; }
# make nano the default editor
{
home = {

View file

@ -1,4 +1,5 @@
inputs @ {pkgs, ...}: {
inputs@{ pkgs, ... }:
{
programs = {
home-manager.enable = true;
fzf.enable = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;

View file

@ -1,4 +1,5 @@
{config, ...}: {
{ config, ... }:
{
initExtra = ''
eval "$(direnv hook zsh)";
export PATH=$PATH:/home/vinzenz/.cargo/bin
@ -24,6 +25,11 @@
oh-my-zsh = {
enable = true;
theme = "agnoster";
plugins = ["git" "sudo" "docker" "systemadmin"];
plugins = [
"git"
"sudo"
"docker"
"systemadmin"
];
};
}

View file

@ -1,20 +1,12 @@
{
nixpkgs,
common-modules,
...
}:
{ nixpkgs, common-modules, ... }:
nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules =
common-modules
++ [
modules = common-modules ++ [
./hardware.nix
./nginx.nix
../../users/vinzenz.nix
../../users/ronja.nix
{
networking.hostName = "hetzner-vpn1";
}
{ networking.hostName = "hetzner-vpn1"; }
{
# uncomment for build check on non arm system (requires --impure)
# nixpkgs.buildPlatform = builtins.currentSystem;

View file

@ -1,11 +1,6 @@
{ lib, modulesPath, ... }:
{
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
config = {
nixpkgs = {
@ -26,7 +21,11 @@
};
};
initrd = {
availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
];
kernelModules = [ "nvme" ];
};
};

View file

@ -1,8 +1,5 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
security.acme = {
acceptTerms = true;
defaults.email = "acme@zerforschen.plus";
@ -22,7 +19,8 @@
recommendedGzipSettings = true;
recommendedOptimisation = true;
virtualHosts = let
virtualHosts =
let
servicesDomain = "services.zerforschen.plus";
mkServiceConfig = host: port: {
addSSL = true;
@ -41,7 +39,8 @@
};
};
pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net";
in {
in
{
"vscode.${servicesDomain}" = lib.mkMerge [
(mkServiceConfig pc2 8542)
{ locations."/".proxyWebsockets = true; }
@ -51,5 +50,8 @@
};
};
networking.firewall.allowedTCPPorts = [80 443];
networking.firewall.allowedTCPPorts = [
80
443
];
}

View file

@ -1,7 +1,6 @@
{lib, ...}: {
imports = [
../../modules/intel-graphics.nix
];
{ lib, ... }:
{
imports = [ ../../modules/intel-graphics.nix ];
config = {
# intel cpu
boot.kernelModules = [ "kvm-intel" ];
@ -23,7 +22,11 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
boot.initrd = {
availableKernelModules = ["xhci_pci" "thunderbolt" "nvme"];
availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
];
luks.devices = {
"luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3" = {
device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3";

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
services.nginx = {
enable = true;
@ -20,7 +21,11 @@
};
networking.firewall = {
allowedTCPPorts = [80 8001 3000];
allowedTCPPorts = [
80
8001
3000
];
allowedUDPPorts = [ 2342 ];
};
}

View file

@ -19,9 +19,7 @@ nixpkgs.lib.nixosSystem {
../../modules/gaming.nix
../../modules/printing.nix
../../modules/podman.nix
{
networking.hostName = "vinzenz-pc2";
}
{ networking.hostName = "vinzenz-pc2"; }
{
home-manager.users = {
vinzenz = import ../../home/vinzenz;

View file

@ -1,14 +1,19 @@
{...}: {
imports = [
../../modules/amd-graphics.nix
];
{ ... }:
{
imports = [ ../../modules/amd-graphics.nix ];
config = {
# amd cpu
boot.kernelModules = [ "kvm-amd" ];
hardware.cpu.amd.updateMicrocode = true;
boot = {
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
]; # "usb_storage"
loader.efi.efiSysMountPoint = "/boot";
};

View file

@ -1,16 +1,27 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
services.openvscode-server = {
enable = true;
telemetryLevel = "off";
port = 8542;
host = "100.125.93.127"; # tailscale
withoutConnectionToken = true;
extraPackages = with pkgs; [nodejs git gh direnv];
extraPackages = with pkgs; [
nodejs
git
gh
direnv
];
};
networking = {
firewall = {
allowedTCPPorts = [8542 8543 8544 80];
allowedTCPPorts = [
8542
8543
8544
80
];
};
};
}

View file

@ -1,22 +1,14 @@
{ pkgs, ... }:
{
pkgs,
...
}: {
config = {
boot.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
hardware.opengl = {
extraPackages = with pkgs; [
amdvlk
];
extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
extraPackages = with pkgs; [ amdvlk ];
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
};
environment.systemPackages = with pkgs; [
nvtopPackages.amd
];
environment.systemPackages = with pkgs; [ nvtopPackages.amd ];
};
}

View file

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
config = {
services = {
xserver.enable = true;
@ -31,7 +28,10 @@
kdeconnect.enable = true;
firefox = {
enable = true;
languagePacks = ["en-US" "de"];
languagePacks = [
"en-US"
"de"
];
};
nix-ld = {
enable = true;
@ -102,9 +102,7 @@
fonts = {
enableDefaultPackages = true;
fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ];
packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
];
packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) ];
};
hardware.logitech.wireless = {

View file

@ -3,11 +3,15 @@
pkgs,
config,
...
}: {
}:
{
config = {
boot = {
kernelPackages = pkgs.linuxPackages_zen;
kernelParams = ["quiet" "udev.log_level=3"];
kernelParams = [
"quiet"
"udev.log_level=3"
];
supportedFilesystems = [ "btrfs" ];
initrd.supportedFilesystems = [ "btrfs" ];
consoleLogLevel = 0;

View file

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
config = {
hardware = {
opengl = {

View file

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
config = {
services = {
xserver = {
@ -41,7 +38,10 @@
pkgs.gnome-tour
];
environment.systemPackages = with pkgs; [gnome.ghex impression];
environment.systemPackages = with pkgs; [
gnome.ghex
impression
];
# RDP connections
networking.firewall.allowedTCPPorts = [ 3389 ];

View file

@ -1,8 +1,5 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
config = {
hardware.opengl = {
extraPackages = with pkgs; [
@ -19,9 +16,7 @@
libvdpau-va-gl
];
};
environment.systemPackages = with pkgs; [
nvtopPackages.intel
];
environment.systemPackages = with pkgs; [ nvtopPackages.intel ];
allowedUnfreePackages = [ "intel-ocl" ];
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
config = {
environment.systemPackages = with pkgs; [
fontconfig

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
virtualisation = {
containers.enable = true;
podman = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
config = {
services = {
# Enable CUPS to print documents.

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
config = {
# Define user account
users.users.ronja = {
@ -6,7 +7,12 @@
name = "ronja";
description = "Ronja";
home = "/home/ronja";
extraGroups = ["networkmanager" "wheel" "games" "podman"];
extraGroups = [
"networkmanager"
"wheel"
"games"
"podman"
];
shell = pkgs.zsh;
};
};

View file

@ -1,11 +1,19 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
config = {
users.users.vinzenz = {
isNormalUser = true;
name = "vinzenz";
description = "Vinzenz";
home = "/home/vinzenz";
extraGroups = ["networkmanager" "wheel" "games" "dialout" "podman" "nginx"];
extraGroups = [
"networkmanager"
"wheel"
"games"
"dialout"
"podman"
"nginx"
];
shell = pkgs.zsh;
autoSubUidGidRange = true;
};