diff --git a/common/default.nix b/common/default.nix index 326c69c..ddbf3bc 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ imports = [ ./nixpkgs.nix ./globalinstalls.nix diff --git a/common/globalinstalls.nix b/common/globalinstalls.nix index 20bf11d..42dd28e 100644 --- a/common/globalinstalls.nix +++ b/common/globalinstalls.nix @@ -1,7 +1,8 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ config = { environment = { - pathsToLink = ["/share/zsh"]; + pathsToLink = [ "/share/zsh" ]; systemPackages = with pkgs; [ ncdu glances diff --git a/common/i18n.nix b/common/i18n.nix index d3fbebc..ee498a9 100644 --- a/common/i18n.nix +++ b/common/i18n.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ config = { time.timeZone = "Europe/Berlin"; i18n = { diff --git a/common/networking.nix b/common/networking.nix index 94bc82d..05140c2 100644 --- a/common/networking.nix +++ b/common/networking.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ config = { services.openssh = { enable = true; diff --git a/common/nixpkgs.nix b/common/nixpkgs.nix index 9bb9184..d4456be 100644 --- a/common/nixpkgs.nix +++ b/common/nixpkgs.nix @@ -1,12 +1,9 @@ +{ config, lib, ... }: { - config, - lib, - ... -}: { options.allowedUnfreePackages = lib.mkOption { type = lib.types.listOf lib.types.str; - default = []; - example = ["steam"]; + default = [ ]; + example = [ "steam" ]; }; config = { nixpkgs.config = { @@ -16,9 +13,15 @@ nix = { settings = { - 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"]; + 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" + ]; }; gc = { automatic = true; diff --git a/flake.nix b/flake.nix index 56e3db0..2145ecc 100644 --- a/flake.nix +++ b/flake.nix @@ -11,32 +11,41 @@ }; }; - outputs = { - nixpkgs, - home-manager, - lix-module, - ... - }: { - nixosConfigurations = let - host-params = { - inherit nixpkgs; - inherit home-manager; - inherit lix-module; - common-modules = [ - lix-module.nixosModules.default - ./common - ]; - desktop-modules = [ - home-manager.nixosModules.home-manager - ./home - ./modules/desktop-environment.nix - ./modules/desktop-hardware.nix - ]; + outputs = + { + nixpkgs, + home-manager, + lix-module, + ... + }: + { + nixosConfigurations = + let + host-params = { + inherit nixpkgs; + inherit home-manager; + inherit lix-module; + common-modules = [ + lix-module.nixosModules.default + ./common + ]; + desktop-modules = [ + home-manager.nixosModules.home-manager + ./home + ./modules/desktop-environment.nix + ./modules/desktop-hardware.nix + ]; + }; + 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; }; - 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; }; - }; } diff --git a/home/default.nix b/home/default.nix index 567952f..d59fbbb 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ config = { home-manager = { useGlobalPkgs = true; diff --git a/home/gnome-shared-dconf.nix b/home/gnome-shared-dconf.nix index 58133e7..3ba7894 100644 --- a/home/gnome-shared-dconf.nix +++ b/home/gnome-shared-dconf.nix @@ -20,7 +20,7 @@ }; "org/gnome/shell" = { disable-user-extensions = false; - disabled-extensions = []; + disabled-extensions = [ ]; enabled-extensions = [ "appindicatorsupport@rgcjonas.gmail.com" "workspace-indicator@gnome-shell-extensions.gcampax.github.com" @@ -34,9 +34,9 @@ show-warning = false; }; "org/gnome/desktop/wm/keybindings" = { - switch-windows = ["Tab"]; - switch-windows-backward = ["Tab"]; - switch-applications = ["Tab"]; - switch-applications-backward = ["Tab"]; + switch-windows = [ "Tab" ]; + switch-windows-backward = [ "Tab" ]; + switch-applications = [ "Tab" ]; + switch-applications-backward = [ "Tab" ]; }; } diff --git a/home/gnome.nix b/home/gnome.nix index 47f10b3..019ae64 100644 --- a/home/gnome.nix +++ b/home/gnome.nix @@ -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,14 +44,8 @@ } { - home.packages = with pkgs; - [ - trayscale - ] - ++ (with gnomeExtensions; [ - tailscale-qs - ]); - dconf.settings."org/gnome/shell".enabled-extensions = ["tailscale@joaophi.github.com"]; + home.packages = with pkgs; [ trayscale ] ++ (with gnomeExtensions; [ tailscale-qs ]); + dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ]; } ]; }; diff --git a/home/ronja.nix b/home/ronja.nix index 0457204..c0e0f05 100644 --- a/home/ronja.nix +++ b/home/ronja.nix @@ -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" + ]; }; }; diff --git a/home/shared-modules.nix b/home/shared-modules.nix index 3ad3365..dbc3d59 100644 --- a/home/shared-modules.nix +++ b/home/shared-modules.nix @@ -1,8 +1,6 @@ [ # set stateVersion - { - home.stateVersion = "22.11"; - } + { home.stateVersion = "22.11"; } # make nano the default editor { home = { diff --git a/home/vinzenz/default.nix b/home/vinzenz/default.nix index ff80b8e..2f8890b 100644 --- a/home/vinzenz/default.nix +++ b/home/vinzenz/default.nix @@ -1,4 +1,5 @@ -inputs @ {pkgs, ...}: { +inputs@{ pkgs, ... }: +{ programs = { home-manager.enable = true; fzf.enable = true; diff --git a/home/vinzenz/vscode.nix b/home/vinzenz/vscode.nix index b19d1cc..f44f25b 100644 --- a/home/vinzenz/vscode.nix +++ b/home/vinzenz/vscode.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ enable = true; package = pkgs.vscodium; enableUpdateCheck = false; diff --git a/home/vinzenz/zsh.nix b/home/vinzenz/zsh.nix index c6d011c..9b85c05 100644 --- a/home/vinzenz/zsh.nix +++ b/home/vinzenz/zsh.nix @@ -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" + ]; }; } diff --git a/hosts/hetzner-vpn1/default.nix b/hosts/hetzner-vpn1/default.nix index f284bd4..e384574 100644 --- a/hosts/hetzner-vpn1/default.nix +++ b/hosts/hetzner-vpn1/default.nix @@ -1,42 +1,34 @@ -{ - nixpkgs, - common-modules, - ... -}: +{ nixpkgs, common-modules, ... }: nixpkgs.lib.nixosSystem { system = "aarch64-linux"; - modules = - common-modules - ++ [ - ./hardware.nix - ./nginx.nix - ../../users/vinzenz.nix - ../../users/ronja.nix - { - networking.hostName = "hetzner-vpn1"; - } - { - # uncomment for build check on non arm system (requires --impure) - # nixpkgs.buildPlatform = builtins.currentSystem; - } - { - users.users = { - root.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - vinzenz.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - ronja.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' - ]; - }; - } - ]; + modules = common-modules ++ [ + ./hardware.nix + ./nginx.nix + ../../users/vinzenz.nix + ../../users/ronja.nix + { networking.hostName = "hetzner-vpn1"; } + { + # uncomment for build check on non arm system (requires --impure) + # nixpkgs.buildPlatform = builtins.currentSystem; + } + { + users.users = { + root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + vinzenz.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + ronja.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' + ]; + }; + } + ]; } diff --git a/hosts/hetzner-vpn1/hardware.nix b/hosts/hetzner-vpn1/hardware.nix index 7494a08..66be389 100644 --- a/hosts/hetzner-vpn1/hardware.nix +++ b/hosts/hetzner-vpn1/hardware.nix @@ -1,11 +1,6 @@ +{ lib, modulesPath, ... }: { - lib, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { nixpkgs = { @@ -26,8 +21,12 @@ }; }; initrd = { - availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"]; - kernelModules = ["nvme"]; + availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "xen_blkfront" + ]; + kernelModules = [ "nvme" ]; }; }; @@ -48,7 +47,7 @@ # This file was populated at runtime with the networking # details gathered from the active system. networking = { - nameservers = ["8.8.8.8"]; + nameservers = [ "8.8.8.8" ]; defaultGateway = "172.31.1.1"; defaultGateway6 = { address = "fe80::1"; diff --git a/hosts/hetzner-vpn1/nginx.nix b/hosts/hetzner-vpn1/nginx.nix index ca9c938..f49ff6f 100644 --- a/hosts/hetzner-vpn1/nginx.nix +++ b/hosts/hetzner-vpn1/nginx.nix @@ -1,8 +1,5 @@ +{ pkgs, lib, ... }: { - pkgs, - lib, - ... -}: { security.acme = { acceptTerms = true; defaults.email = "acme@zerforschen.plus"; @@ -10,46 +7,51 @@ security.pam.services.nginx.setEnvironment = false; systemd.services.nginx.serviceConfig = { - SupplementaryGroups = ["shadow"]; + SupplementaryGroups = [ "shadow" ]; }; services.nginx = { enable = true; - additionalModules = [pkgs.nginxModules.pam]; + additionalModules = [ pkgs.nginxModules.pam ]; recommendedProxySettings = true; recommendedTlsSettings = true; recommendedGzipSettings = true; recommendedOptimisation = true; - virtualHosts = let - servicesDomain = "services.zerforschen.plus"; - mkServiceConfig = host: port: { - addSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://${host}:${toString port}/"; - extraConfig = '' - # bind to tailscale ip - proxy_bind 100.88.118.60; - # pam auth - limit_except OPTIONS { - auth_pam "Password Required"; - auth_pam_service_name "nginx"; - } - ''; + virtualHosts = + let + servicesDomain = "services.zerforschen.plus"; + mkServiceConfig = host: port: { + addSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://${host}:${toString port}/"; + extraConfig = '' + # bind to tailscale ip + proxy_bind 100.88.118.60; + # pam auth + limit_except OPTIONS { + auth_pam "Password Required"; + auth_pam_service_name "nginx"; + } + ''; + }; }; + pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net"; + in + { + "vscode.${servicesDomain}" = lib.mkMerge [ + (mkServiceConfig pc2 8542) + { locations."/".proxyWebsockets = true; } + ]; + "preon-app.${servicesDomain}" = mkServiceConfig pc2 8543; + "preon-api.${servicesDomain}" = mkServiceConfig pc2 8544; }; - pc2 = "vinzenz-pc2.donkey-pentatonic.ts.net"; - in { - "vscode.${servicesDomain}" = lib.mkMerge [ - (mkServiceConfig pc2 8542) - {locations."/" .proxyWebsockets = true;} - ]; - "preon-app.${servicesDomain}" = mkServiceConfig pc2 8543; - "preon-api.${servicesDomain}" = mkServiceConfig pc2 8544; - }; }; - networking.firewall.allowedTCPPorts = [80 443]; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; } diff --git a/hosts/vinzenz-lpt2/default.nix b/hosts/vinzenz-lpt2/default.nix index b65af8e..ab2b42d 100644 --- a/hosts/vinzenz-lpt2/default.nix +++ b/hosts/vinzenz-lpt2/default.nix @@ -23,7 +23,7 @@ nixpkgs.lib.nixosSystem { { networking.hostName = "vinzenz-lpt2"; - nix.settings.extra-platforms = ["aarch64-linux"]; + nix.settings.extra-platforms = [ "aarch64-linux" ]; } { diff --git a/hosts/vinzenz-lpt2/hardware.nix b/hosts/vinzenz-lpt2/hardware.nix index 6c53492..82dd975 100644 --- a/hosts/vinzenz-lpt2/hardware.nix +++ b/hosts/vinzenz-lpt2/hardware.nix @@ -1,10 +1,9 @@ -{lib, ...}: { - imports = [ - ../../modules/intel-graphics.nix - ]; +{ lib, ... }: +{ + imports = [ ../../modules/intel-graphics.nix ]; config = { # intel cpu - boot.kernelModules = ["kvm-intel"]; + boot.kernelModules = [ "kvm-intel" ]; hardware.cpu.intel.updateMicrocode = true; boot.loader = { @@ -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"; @@ -35,7 +38,7 @@ "/" = { device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; fsType = "btrfs"; - options = ["subvol=@"]; + options = [ "subvol=@" ]; }; "/boot" = { diff --git a/hosts/vinzenz-lpt2/nginx.nix b/hosts/vinzenz-lpt2/nginx.nix index 74db1c9..8c82c3f 100644 --- a/hosts/vinzenz-lpt2/nginx.nix +++ b/hosts/vinzenz-lpt2/nginx.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ services.nginx = { enable = true; @@ -14,13 +15,17 @@ proxyWebsockets = true; }; - serverAliases = ["172.23.42.96"]; + serverAliases = [ "172.23.42.96" ]; }; }; }; networking.firewall = { - allowedTCPPorts = [80 8001 3000]; - allowedUDPPorts = [2342]; + allowedTCPPorts = [ + 80 + 8001 + 3000 + ]; + allowedUDPPorts = [ 2342 ]; }; } diff --git a/hosts/vinzenz-pc2/default.nix b/hosts/vinzenz-pc2/default.nix index 827455f..318efab 100644 --- a/hosts/vinzenz-pc2/default.nix +++ b/hosts/vinzenz-pc2/default.nix @@ -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; diff --git a/hosts/vinzenz-pc2/fstab.nix b/hosts/vinzenz-pc2/fstab.nix index 19fd5ff..1c9c7e5 100644 --- a/hosts/vinzenz-pc2/fstab.nix +++ b/hosts/vinzenz-pc2/fstab.nix @@ -2,19 +2,19 @@ "/" = { device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; fsType = "btrfs"; - options = ["subvol=@"]; + options = [ "subvol=@" ]; }; "/home" = { device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; fsType = "btrfs"; - options = ["subvol=@home"]; + options = [ "subvol=@home" ]; }; "/games" = { device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; fsType = "btrfs"; - options = ["subvol=@games"]; + options = [ "subvol=@games" ]; }; "/boot" = { @@ -27,7 +27,7 @@ # this is convenient for managing the flat subvolume hierarchy device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; fsType = "btrfs"; - options = ["subvolid=5"]; + options = [ "subvolid=5" ]; }; "/mnt/ssd2" = { diff --git a/hosts/vinzenz-pc2/hardware.nix b/hosts/vinzenz-pc2/hardware.nix index 30661dc..316d9a2 100644 --- a/hosts/vinzenz-pc2/hardware.nix +++ b/hosts/vinzenz-pc2/hardware.nix @@ -1,19 +1,24 @@ -{...}: { - imports = [ - ../../modules/amd-graphics.nix - ]; +{ ... }: +{ + imports = [ ../../modules/amd-graphics.nix ]; config = { # amd cpu - boot.kernelModules = ["kvm-amd"]; + 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"; }; fileSystems = import ./fstab.nix; - swapDevices = []; + swapDevices = [ ]; networking.interfaces.eno1.wakeOnLan.enable = true; }; diff --git a/hosts/vinzenz-pc2/vscode-server.nix b/hosts/vinzenz-pc2/vscode-server.nix index a6645c5..6f8e2d4 100644 --- a/hosts/vinzenz-pc2/vscode-server.nix +++ b/hosts/vinzenz-pc2/vscode-server.nix @@ -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 + ]; }; }; } diff --git a/modules/amd-graphics.nix b/modules/amd-graphics.nix index c4c2d00..8a62194 100644 --- a/modules/amd-graphics.nix +++ b/modules/amd-graphics.nix @@ -1,22 +1,14 @@ +{ pkgs, ... }: { - pkgs, - ... -}: { config = { - boot.kernelModules = ["amdgpu"]; - services.xserver.videoDrivers = ["amdgpu"]; + 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 ]; }; } diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix index 79e4c0f..d3a7a10 100644 --- a/modules/desktop-environment.nix +++ b/modules/desktop-environment.nix @@ -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; @@ -101,10 +101,8 @@ fonts = { enableDefaultPackages = true; - fontconfig.defaultFonts.monospace = ["FiraCode Nerd Font"]; - packages = with pkgs; [ - (nerdfonts.override {fonts = ["FiraCode"];}) - ]; + fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ]; + packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) ]; }; hardware.logitech.wireless = { diff --git a/modules/desktop-hardware.nix b/modules/desktop-hardware.nix index ac8be03..62d0ab9 100644 --- a/modules/desktop-hardware.nix +++ b/modules/desktop-hardware.nix @@ -3,13 +3,17 @@ pkgs, config, ... -}: { +}: +{ config = { boot = { kernelPackages = pkgs.linuxPackages_zen; - kernelParams = ["quiet" "udev.log_level=3"]; - supportedFilesystems = ["btrfs"]; - initrd.supportedFilesystems = ["btrfs"]; + kernelParams = [ + "quiet" + "udev.log_level=3" + ]; + supportedFilesystems = [ "btrfs" ]; + initrd.supportedFilesystems = [ "btrfs" ]; consoleLogLevel = 0; initrd.verbose = false; plymouth.enable = true; diff --git a/modules/gaming.nix b/modules/gaming.nix index f66f810..c069b9a 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -1,15 +1,12 @@ +{ config, pkgs, ... }: { - config, - pkgs, - ... -}: { config = { hardware = { opengl = { driSupport = true; driSupport32Bit = true; - extraPackages = with pkgs; [mangohud]; - extraPackages32 = with pkgs; [mangohud]; + extraPackages = with pkgs; [ mangohud ]; + extraPackages32 = with pkgs; [ mangohud ]; }; steam-hardware.enable = true; diff --git a/modules/gnome.nix b/modules/gnome.nix index 5aadbcc..49a4d0e 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -1,8 +1,5 @@ +{ config, pkgs, ... }: { - config, - pkgs, - ... -}: { config = { services = { xserver = { @@ -41,9 +38,12 @@ pkgs.gnome-tour ]; - environment.systemPackages = with pkgs; [gnome.ghex impression]; + environment.systemPackages = with pkgs; [ + gnome.ghex + impression + ]; # RDP connections - networking.firewall.allowedTCPPorts = [3389]; + networking.firewall.allowedTCPPorts = [ 3389 ]; }; } diff --git a/modules/intel-graphics.nix b/modules/intel-graphics.nix index 5bbf846..3d5655f 100644 --- a/modules/intel-graphics.nix +++ b/modules/intel-graphics.nix @@ -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 - ]; - allowedUnfreePackages = ["intel-ocl"]; + environment.systemPackages = with pkgs; [ nvtopPackages.intel ]; + allowedUnfreePackages = [ "intel-ocl" ]; }; } diff --git a/modules/latex.nix b/modules/latex.nix index bee5f21..3d097f8 100644 --- a/modules/latex.nix +++ b/modules/latex.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ config = { environment.systemPackages = with pkgs; [ fontconfig diff --git a/modules/podman.nix b/modules/podman.nix index 03532f3..eb1914b 100644 --- a/modules/podman.nix +++ b/modules/podman.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ virtualisation = { containers.enable = true; podman = { diff --git a/modules/printing.nix b/modules/printing.nix index 32f9efc..b198d6c 100644 --- a/modules/printing.nix +++ b/modules/printing.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ config = { services = { # Enable CUPS to print documents. diff --git a/users/ronja.nix b/users/ronja.nix index b8a271d..547f31b 100644 --- a/users/ronja.nix +++ b/users/ronja.nix @@ -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; }; }; diff --git a/users/vinzenz.nix b/users/vinzenz.nix index e965602..77bc2a1 100644 --- a/users/vinzenz.nix +++ b/users/vinzenz.nix @@ -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; };