diff --git a/flake.nix b/flake.nix index 0096a20..8b3b690 100644 --- a/flake.nix +++ b/flake.nix @@ -63,66 +63,23 @@ }: let devices = { - vinzenz-lpt2 = { - system = "x86_64-linux"; - additional-modules = [ - self.nixosModules.user-vinzenz - - self.nixosModules.gnome - self.nixosModules.wine-gaming - self.nixosModules.steam - self.nixosModules.printing - self.nixosModules.podman - self.nixosModules.vinzenz-desktop-settings - self.nixosModules.intel-graphics - ]; - home-manager-users = { - inherit (self.homeConfigurations) vinzenz; - }; - }; - vinzenz-pc2 = { - system = "x86_64-linux"; - additional-modules = [ - self.nixosModules.user-vinzenz - self.nixosModules.user-ronja - - self.nixosModules.gnome - self.nixosModules.wine-gaming - self.nixosModules.steam - self.nixosModules.printing - self.nixosModules.podman - self.nixosModules.vinzenz-desktop-settings - self.nixosModules.amd-graphics - ]; - home-manager-users = { - inherit (self.homeConfigurations) vinzenz ronja; - }; - }; - ronja-pc = { - system = "x86_64-linux"; - additional-modules = [ - self.nixosModules.user-ronja - - self.nixosModules.gnome - self.nixosModules.steam - self.nixosModules.wine-gaming - self.nixosModules.vinzenz-desktop-settings - ]; - home-manager-users = { - inherit (self.homeConfigurations) ronja; - }; - }; - hetzner-vpn2 = { - system = "aarch64-linux"; - }; - forgejo-runner-1 = { - system = "aarch64-linux"; - additional-modules = [ self.nixosModules.podman ]; - }; + vinzenz-lpt2 = "x86_64-linux"; + vinzenz-pc2 = "x86_64-linux"; + ronja-pc = "x86_64-linux"; + hetzner-vpn2 = "aarch64-linux"; + forgejo-runner-1 = "aarch64-linux"; }; + homeDevices = [ + "vinzenz-lpt2" + "vinzenz-pc2" + "ronja-pc" + ]; lib = nixpkgs.lib; - forDevice = f: lib.mapAttrs (device: value: f (value // { inherit device; })) devices; - supported-systems = lib.attrsets.mapAttrsToList (k: v: v.system) devices; + forDevice = f: lib.mapAttrs f devices; + supported-systems = [ + "x86_64-linux" + "aarch64-linux" + ]; forAllSystems = f: lib.genAttrs supported-systems ( @@ -144,28 +101,21 @@ }; nixosConfigurations = forDevice ( - { - device, - system, - home-manager-users ? { }, - additional-modules ? [ ], - }: + device: system: let - specialArgs = { + commonSpecialArgs = { inherit device; vinzenzHomeModules = self.homeModules; - vinzenzLib = self.lib; }; in nixpkgs.lib.nixosSystem { - inherit system specialArgs; + inherit system; + specialArgs = commonSpecialArgs // { + vinzenzNixosModules = self.nixosModules; + }; modules = [ { networking.hostName = device; - nixpkgs = { - inherit system; - hostPlatform = lib.mkDefault system; - }; system = { stateVersion = "22.11"; autoUpgrade.flake = "git+https://git.berlin.ccc.de/vinzenz/nixos-configuration.git"; @@ -178,18 +128,11 @@ nix.settings.experimental-features = [ "nix-command" "flakes" - "repl-flake" ]; - - documentation = { - info.enable = false; # info pages and the info command - doc.enable = false; # documentation distributed in packages' /share/doc - }; } ./nixosConfigurations/${device} - self.nixosModules.default self.nixosModules.lix-is-nix self.nixosModules.globalinstalls self.nixosModules.autoupdate @@ -197,14 +140,14 @@ self.nixosModules.tailscale self.nixosModules.allowed-unfree-list self.nixosModules.extra-caches - self.nixosModules.systemd-boot + ./modules/nixpkgs.nix zerforschen-plus.nixosModules.default ] - ++ (nixpkgs.lib.optionals (home-manager-users != { }) [ + ++ (nixpkgs.lib.optionals (builtins.elem device homeDevices) [ { home-manager = { - extraSpecialArgs = specialArgs; + extraSpecialArgs = commonSpecialArgs; useGlobalPkgs = true; useUserPackages = true; }; @@ -218,10 +161,7 @@ self.homeModules.templates self.homeModules.zsh-basics self.homeModules.nano - self.homeModules.gnome-extensions ]; - - home-manager.users = home-manager-users; } self.nixosModules.pkgs-unstable @@ -232,14 +172,11 @@ self.nixosModules.gnome self.nixosModules.modern-desktop self.nixosModules.nix-ld - self.nixosModules.quiet-boot - self.nixosModules.firmware-updates home-manager.nixosModules.home-manager servicepoint-simulator.nixosModules.default servicepoint-cli.nixosModules.default - ]) - ++ additional-modules; + ]); } ); @@ -263,14 +200,9 @@ pkgs-vscode-extensions = { nixpkgs.overlays = [ nix-vscode-extensions.overlays.default ]; }; - # required modules to use other modules, should not do anything on their own - default = { - imports = [ self.nixosModules.allowed-unfree-list ]; - }; }; homeModules = self.lib.importDir ./homeModules; - homeConfigurations = self.lib.importDir ./homeConfigurations; formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-tree); }; diff --git a/homeConfigurations/ronja/default.nix b/home/ronja/configuration.nix similarity index 98% rename from homeConfigurations/ronja/default.nix rename to home/ronja/configuration.nix index 0f202cd..26cceac 100644 --- a/homeConfigurations/ronja/default.nix +++ b/home/ronja/configuration.nix @@ -1,6 +1,5 @@ { config, pkgs, ... }: { - imports = [ ./vscode.nix ]; config = { home.packages = with pkgs; [ ## Apps diff --git a/home/ronja/default.nix b/home/ronja/default.nix new file mode 100644 index 0000000..7c2f96d --- /dev/null +++ b/home/ronja/default.nix @@ -0,0 +1,25 @@ +{ pkgs, ... }: +{ + config = { + # Define user account + users.users.ronja = { + isNormalUser = true; + name = "ronja"; + description = "Ronja"; + home = "/home/ronja"; + extraGroups = [ + "networkmanager" + "wheel" + "games" + "podman" + "openvscode-server" + ]; + shell = pkgs.zsh; + }; + + home-manager.users.ronja.imports = [ + ./configuration.nix + ./vscode.nix + ]; + }; +} diff --git a/homeConfigurations/ronja/vscode.nix b/home/ronja/vscode.nix similarity index 100% rename from homeConfigurations/ronja/vscode.nix rename to home/ronja/vscode.nix diff --git a/homeConfigurations/vinzenz/.config/containers/policy.json b/home/vinzenz/.config/containers/policy.json similarity index 100% rename from homeConfigurations/vinzenz/.config/containers/policy.json rename to home/vinzenz/.config/containers/policy.json diff --git a/homeConfigurations/vinzenz/.zsh/p10k.zsh b/home/vinzenz/.zsh/p10k.zsh similarity index 100% rename from homeConfigurations/vinzenz/.zsh/p10k.zsh rename to home/vinzenz/.zsh/p10k.zsh diff --git a/homeConfigurations/vinzenz/configuration.nix b/home/vinzenz/configuration.nix similarity index 97% rename from homeConfigurations/vinzenz/configuration.nix rename to home/vinzenz/configuration.nix index ace8086..74be21f 100644 --- a/homeConfigurations/vinzenz/configuration.nix +++ b/home/vinzenz/configuration.nix @@ -56,10 +56,6 @@ icu nextcloud-client - - lutris - - foliate ]; home.file = { diff --git a/home/vinzenz/default.nix b/home/vinzenz/default.nix new file mode 100644 index 0000000..e555eba --- /dev/null +++ b/home/vinzenz/default.nix @@ -0,0 +1,51 @@ +{ pkgs, ... }: +{ + config = { + users.users.vinzenz = { + isNormalUser = true; + name = "vinzenz"; + description = "Vinzenz"; + home = "/home/vinzenz"; + extraGroups = [ + "networkmanager" + "wheel" + "games" + "dialout" + "podman" + "nginx" + "adbusers" + "kvm" + "input" + "video" + ]; + shell = pkgs.zsh; + autoSubUidGidRange = true; + }; + + nix.settings.trusted-users = [ "vinzenz" ]; + + home-manager.users.vinzenz.imports = [ + ./configuration.nix + ./editorconfig.nix + ./fuzzel.nix + ./git.nix + ./gnome.nix + #./niri.nix + ./ssh.nix + ./swaylock.nix + ./vscode.nix + ./waybar.nix + ./zsh.nix + ]; + + allowedUnfreePackages = [ + "rider" + "pycharm-professional" + "jetbrains-toolbox" + + "anydesk" + + "vscode-extension-ms-dotnettools-csharp" + ]; + }; +} diff --git a/homeConfigurations/vinzenz/editorconfig.nix b/home/vinzenz/editorconfig.nix similarity index 100% rename from homeConfigurations/vinzenz/editorconfig.nix rename to home/vinzenz/editorconfig.nix diff --git a/homeConfigurations/vinzenz/fuzzel.nix b/home/vinzenz/fuzzel.nix similarity index 100% rename from homeConfigurations/vinzenz/fuzzel.nix rename to home/vinzenz/fuzzel.nix diff --git a/homeConfigurations/vinzenz/git.nix b/home/vinzenz/git.nix similarity index 100% rename from homeConfigurations/vinzenz/git.nix rename to home/vinzenz/git.nix diff --git a/home/vinzenz/gnome.nix b/home/vinzenz/gnome.nix new file mode 100644 index 0000000..3a4f479 --- /dev/null +++ b/home/vinzenz/gnome.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + config = { + home.packages = + with pkgs.gnomeExtensions; + [ + # battery-health-charging + quick-settings-tweaker + solaar-extension + alphabetical-app-grid + ] + ++ (with pkgs; [ foliate ]); + + dconf.settings = { + "org/gnome/shell" = { + enabled-extensions = [ + "GPaste@gnome-shell-extensions.gnome.org" + "solaar-extension@sidevesh" + "AlphabeticalAppGrid@stuarthayhurst" + ]; + }; + }; + }; +} diff --git a/homeConfigurations/vinzenz/niri.nix b/home/vinzenz/niri.nix similarity index 100% rename from homeConfigurations/vinzenz/niri.nix rename to home/vinzenz/niri.nix diff --git a/homeConfigurations/vinzenz/ssh.nix b/home/vinzenz/ssh.nix similarity index 100% rename from homeConfigurations/vinzenz/ssh.nix rename to home/vinzenz/ssh.nix diff --git a/homeConfigurations/vinzenz/swaylock.nix b/home/vinzenz/swaylock.nix similarity index 100% rename from homeConfigurations/vinzenz/swaylock.nix rename to home/vinzenz/swaylock.nix diff --git a/homeConfigurations/vinzenz/vscode.nix b/home/vinzenz/vscode.nix similarity index 100% rename from homeConfigurations/vinzenz/vscode.nix rename to home/vinzenz/vscode.nix diff --git a/homeConfigurations/vinzenz/waybar.nix b/home/vinzenz/waybar.nix similarity index 100% rename from homeConfigurations/vinzenz/waybar.nix rename to home/vinzenz/waybar.nix diff --git a/homeConfigurations/vinzenz/zsh.nix b/home/vinzenz/zsh.nix similarity index 100% rename from homeConfigurations/vinzenz/zsh.nix rename to home/vinzenz/zsh.nix diff --git a/homeConfigurations/vinzenz/default.nix b/homeConfigurations/vinzenz/default.nix deleted file mode 100644 index 33cfceb..0000000 --- a/homeConfigurations/vinzenz/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - imports = [ - ./configuration.nix - ./editorconfig.nix - ./fuzzel.nix - ./git.nix - ./gnome.nix - #./niri.nix - ./ssh.nix - ./swaylock.nix - ./vscode.nix - ./waybar.nix - ./zsh.nix - ]; -} diff --git a/homeConfigurations/vinzenz/gnome.nix b/homeConfigurations/vinzenz/gnome.nix deleted file mode 100644 index 7424363..0000000 --- a/homeConfigurations/vinzenz/gnome.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ pkgs, ... }: -{ - config = { - home.packages = with pkgs; [ - gitg - meld - simple-scan - pinta - dconf-editor - impression # usb image writer - papers # pdf viewer - gnome-software # for flatpak apps - gnomeExtensions.solaar-extension - snapshot - ]; - - dconf.settings = { - "org/gnome/shell".enabled-extensions = [ - "GPaste@gnome-shell-extensions.gnome.org" - "solaar-extension@sidevesh" - ]; - "org/gnome/desktop/interface".color-scheme = "prefer-dark"; - "org/gnome/desktop/wm/keybindings" = { - switch-windows = [ "Tab" ]; - switch-windows-backward = [ "Tab" ]; - switch-applications = [ "Tab" ]; - switch-applications-backward = [ "Tab" ]; - }; - }; - }; -} diff --git a/homeModules/gnome-extensions.nix b/homeModules/gnome-extensions.nix deleted file mode 100644 index 9c30c40..0000000 --- a/homeModules/gnome-extensions.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ - lib, - pkgs, - osConfig, - config, - ... -}: -{ - options.vinzenz.gnome-extensions = - let - mkDefaultEnabledOption = - name: - lib.mkOption { - default = true; - example = false; - description = "Whether to enable ${name}."; - type = lib.types.bool; - }; - in - { - enable = mkDefaultEnabledOption "gnome extended options"; - appindicator.enable = mkDefaultEnabledOption "appindicator"; - caffeine.enable = mkDefaultEnabledOption "caffeine"; - tailscale-qs.enable = lib.mkOption { - default = osConfig.services.tailscale.enable; - example = true; - description = "Whether to enable tailscale quick setting."; - type = lib.types.bool; - }; - alphabetic-apps.enable = mkDefaultEnabledOption "alphabetic app grid"; - clock-show-seconds = mkDefaultEnabledOption "clock seconds"; - show-battery-percentage = mkDefaultEnabledOption "battery percentage"; - enable-numlock = mkDefaultEnabledOption "num lock on login"; - enable-systool-warning = lib.mkEnableOption "system configuration tool warning"; - edge-tiling = mkDefaultEnabledOption "edge tiling"; - dynamic-workspaces = mkDefaultEnabledOption "dynamic workspaces"; - tap-to-click = mkDefaultEnabledOption "tap to click"; - two-finger-scrolling = mkDefaultEnabledOption "two finger scrolling"; - }; - - config = - let - cfg = config.vinzenz.gnome-extensions; - in - lib.mkIf cfg.enable ( - lib.mkMerge [ - { - dconf = { - enable = true; - settings = { - "org/gnome/shell" = { - disable-user-extensions = false; - disabled-extensions = [ ]; - enabled-extensions = [ ]; - }; - - "ca/desrt/dconf-editor".show-warning = cfg.enable-systool-warning; - "org/gnome/tweaks".show-extensions-notice = cfg.enable-systool-warning; - "org/gnome/mutter" = { - inherit (cfg) edge-tiling dynamic-workspaces; - }; - "org/gnome/desktop/peripherals/touchpad" = { - inherit (cfg) tap-to-click; - two-finger-scrolling-enabled = cfg.two-finger-scrolling; - }; - "org/gnome/desktop/interface" = { - inherit (cfg) clock-show-seconds show-battery-percentage; - }; - }; - }; - } - - (lib.mkIf cfg.tailscale-qs.enable { - home.packages = [ pkgs.gnomeExtensions.tailscale-qs ]; - dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ]; - }) - - (lib.mkIf cfg.appindicator.enable { - home.packages = [ pkgs.gnomeExtensions.appindicator ]; - dconf.settings."org/gnome/shell".enabled-extensions = [ "appindicatorsupport@rgcjonas.gmail.com" ]; - }) - - (lib.mkIf cfg.caffeine.enable { - home.packages = [ pkgs.gnomeExtensions.caffeine ]; - dconf.settings."org/gnome/shell".enabled-extensions = [ "caffeine@patapon.info" ]; - }) - - (lib.mkIf cfg.alphabetic-apps.enable { - home.packages = [ pkgs.gnomeExtensions.alphabetical-app-grid ]; - dconf.settings = { - "org/gnome/shell".enabled-extensions = [ "AlphabeticalAppGrid@stuarthayhurst" ]; - "org/gnome/shell/extensions/alphabetical-app-grid".folder-order-position = "start"; - }; - }) - - (lib.mkIf cfg.enable-numlock { - dconf.settings."org/gnome/desktop/peripherals/keyboard".numlock-state = true; - }) - ] - ); -} diff --git a/hooks/pre-commit b/hooks/pre-commit deleted file mode 100755 index 6b6b870..0000000 --- a/hooks/pre-commit +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euxo pipefail - -nix fmt - -nix flake check --all-systems --show-trace diff --git a/modules/amd-graphics.nix b/modules/amd-graphics.nix new file mode 100644 index 0000000..041d700 --- /dev/null +++ b/modules/amd-graphics.nix @@ -0,0 +1,22 @@ +{ pkgs, config, ... }: +{ + config = { + boot.kernelModules = [ "amdgpu" ]; + services.xserver.videoDrivers = [ "amdgpu" ]; + + hardware = { + graphics.enable = true; + amdgpu = { + opencl.enable = true; + amdvlk = { + # TODO: this creates black borders around GNOME apps + # enable = true; + # support32Bit.enable = config.hardware.graphics.enable32Bit; + }; + overdrive.enable = true; + }; + }; + + environment.systemPackages = with pkgs; [ nvtopPackages.amd ]; + }; +} diff --git a/modules/desktop-environment.nix b/modules/desktop-environment.nix new file mode 100644 index 0000000..e839353 --- /dev/null +++ b/modules/desktop-environment.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: +{ + config = { + programs.firefox.enable = true; + + environment.systemPackages = with pkgs; [ + lm_sensors + + # office + #libreoffice-qt + #hunspell + #hunspellDicts.de-de + #hunspellDicts.en-us-large + ]; + + fonts = { + enableDefaultPackages = true; + fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ]; + packages = with pkgs; [ + nerd-fonts.fira-code + roboto-mono + recursive + ]; + }; + + hardware.logitech.wireless = { + enable = true; + enableGraphical = true; + }; + }; +} diff --git a/modules/desktop-hardware.nix b/modules/desktop-hardware.nix new file mode 100644 index 0000000..a8b2f93 --- /dev/null +++ b/modules/desktop-hardware.nix @@ -0,0 +1,48 @@ +{ + lib, + pkgs, + ... +}: +{ + config = { + boot = { + kernelPackages = pkgs.linuxPackages_zen; + kernelParams = [ + "quiet" + "udev.log_level=3" + ]; + supportedFilesystems = [ "btrfs" ]; + initrd.supportedFilesystems = [ "btrfs" ]; + consoleLogLevel = 0; + initrd.verbose = false; + plymouth.enable = true; + loader = { + timeout = 3; + efi.canTouchEfiVariables = true; + systemd-boot = { + enable = true; + editor = false; # do not allow changing kernel parameters + consoleMode = "max"; + }; + }; + }; + + networking.networkmanager.enable = true; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + hardware = { + enableRedistributableFirmware = true; + bluetooth.enable = true; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + services.fwupd.enable = true; + }; +} diff --git a/modules/gaming.nix b/modules/gaming.nix new file mode 100644 index 0000000..478c200 --- /dev/null +++ b/modules/gaming.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: +{ + config = { + hardware = { + graphics = { + enable32Bit = true; + extraPackages = with pkgs; [ mangohud ]; + extraPackages32 = with pkgs; [ mangohud ]; + }; + + xpadneo.enable = true; + }; + + environment.systemPackages = with pkgs; [ + wineWowPackages.stagingFull + wineWowPackages.fonts + winetricks + dxvk + mangohud + vulkan-tools + glxinfo + lutris + ]; + + networking.firewall.allowedUDPPorts = [ + # Factorio + 34197 + ]; + }; +} diff --git a/modules/gnome-shared-dconf.nix b/modules/gnome-shared-dconf.nix new file mode 100644 index 0000000..5d54628 --- /dev/null +++ b/modules/gnome-shared-dconf.nix @@ -0,0 +1,43 @@ +{ + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + clock-show-seconds = true; + show-battery-percentage = true; + }; + "org/gnome/mutter" = { + edge-tiling = true; + dynamic-workspaces = true; + }; + "org/gnome/desktop/peripherals/keyboard" = { + numlock-state = true; + }; + "org/gnome/desktop/peripherals/touchpad" = { + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + "org/gnome/shell" = { + disable-user-extensions = false; + disabled-extensions = [ ]; + enabled-extensions = [ + "tailscale@joaophi.github.com" + "appindicatorsupport@rgcjonas.gmail.com" + "workspace-indicator@gnome-shell-extensions.gcampax.github.com" + "caffeine@patapon.info" + ]; + }; + "ca/desrt/dconf-editor" = { + show-warning = false; + }; + "org/gnome/desktop/wm/keybindings" = { + switch-windows = [ "Tab" ]; + switch-windows-backward = [ "Tab" ]; + switch-applications = [ "Tab" ]; + switch-applications-backward = [ "Tab" ]; + }; + "org/gnome/shell/extensions/alphabetical-app-grid" = { + folder-order-position = "start"; + }; +} diff --git a/modules/gnome.nix b/modules/gnome.nix new file mode 100644 index 0000000..507247d --- /dev/null +++ b/modules/gnome.nix @@ -0,0 +1,61 @@ +{ pkgs, ... }: +{ + config = { + # remove some gnome default apps + environment.gnome.excludePackages = with pkgs; [ + cheese # photo booth + epiphany # web browser + evince # document viewer + geary # email client + gnome-maps + gnome-weather + gnome-tour + sysprof + orca # screen reader + gnome-weather + gnome-backgrounds + gnome-user-docs + yelp # help app + # gnome-music + # totem # video player + # snapshot # camera + # baobab # disk usage + ]; + + # RDP connections + services.gnome.gnome-remote-desktop.enable = true; + networking.firewall.allowedTCPPorts = [ 3389 ]; + + home-manager.sharedModules = [ + { + home.packages = + with pkgs; + [ + gitg + meld + simple-scan + pinta + dconf-editor + gpaste + ghex + impression + papers + + # graphical installer for flatpak apps + gnome-software + ] + ++ (with gnomeExtensions; [ + caffeine + appindicator + ]); + + dconf.settings = import ./gnome-shared-dconf.nix; + } + + { + home.packages = with pkgs; [ trayscale ] ++ (with gnomeExtensions; [ tailscale-qs ]); + dconf.settings."org/gnome/shell".enabled-extensions = [ "tailscale@joaophi.github.com" ]; + } + ]; + }; +} diff --git a/nixosModules/intel-graphics.nix b/modules/intel-graphics.nix similarity index 82% rename from nixosModules/intel-graphics.nix rename to modules/intel-graphics.nix index 74c6e67..709d720 100644 --- a/nixosModules/intel-graphics.nix +++ b/modules/intel-graphics.nix @@ -1,5 +1,7 @@ -{ pkgs, ... }: +{ pkgs, vinzenzNixosModules, ... }: { + imports = [ vinzenzNixosModules.allowed-unfree-list ]; + config = { hardware.graphics = { extraPackages = with pkgs; [ diff --git a/nixosModules/latex.nix b/modules/latex.nix similarity index 100% rename from nixosModules/latex.nix rename to modules/latex.nix diff --git a/nixosModules/niri.nix b/modules/niri.nix similarity index 100% rename from nixosModules/niri.nix rename to modules/niri.nix diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix new file mode 100644 index 0000000..7fb99a7 --- /dev/null +++ b/modules/nixpkgs.nix @@ -0,0 +1,9 @@ +{ + documentation = { + enable = true; # documentation of packages + nixos.enable = false; # nixos documentation + man.enable = true; # manual pages and the man command + info.enable = false; # info pages and the info command + doc.enable = false; # documentation distributed in packages' /share/doc + }; +} diff --git a/nixosConfigurations/forgejo-runner-1/configuration.nix b/nixosConfigurations/forgejo-runner-1/configuration.nix new file mode 100644 index 0000000..345e622 --- /dev/null +++ b/nixosConfigurations/forgejo-runner-1/configuration.nix @@ -0,0 +1,15 @@ +{ ... }: +{ + # uncomment for build check on non arm system (requires --impure) + # nixpkgs.buildPlatform = builtins.currentSystem; + services.tailscale.useRoutingFeatures = "both"; + system.autoUpgrade.allowReboot = true; + + users.users = { + root.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + }; +} diff --git a/nixosConfigurations/forgejo-runner-1/default.nix b/nixosConfigurations/forgejo-runner-1/default.nix index f9d3c3f..79cb613 100644 --- a/nixosConfigurations/forgejo-runner-1/default.nix +++ b/nixosConfigurations/forgejo-runner-1/default.nix @@ -1,21 +1,10 @@ +{ vinzenzNixosModules, ... }: { imports = [ + ./configuration.nix ./hardware.nix + + vinzenzNixosModules.podman ./forgejo-runner.nix ]; - - config = { - # uncomment for build check on non arm system (requires --impure) - # nixpkgs.buildPlatform = builtins.currentSystem; - services.tailscale.useRoutingFeatures = "both"; - system.autoUpgrade.allowReboot = true; - - users.users = { - root.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - }; - }; } diff --git a/nixosConfigurations/forgejo-runner-1/hardware.nix b/nixosConfigurations/forgejo-runner-1/hardware.nix index e8fbc56..e3e6880 100644 --- a/nixosConfigurations/forgejo-runner-1/hardware.nix +++ b/nixosConfigurations/forgejo-runner-1/hardware.nix @@ -3,6 +3,11 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { + nixpkgs = { + hostPlatform = "aarch64-linux"; + system = "aarch64-linux"; + }; + boot = { tmp.cleanOnBoot = true; kernelParams = [ "console=tty" ]; diff --git a/nixosConfigurations/hetzner-vpn2/configuration.nix b/nixosConfigurations/hetzner-vpn2/configuration.nix new file mode 100644 index 0000000..8e16ff7 --- /dev/null +++ b/nixosConfigurations/hetzner-vpn2/configuration.nix @@ -0,0 +1,21 @@ +{ ... }: +{ + # uncomment for build check on non arm system (requires --impure) + # nixpkgs.buildPlatform = builtins.currentSystem; + + services.tailscale.useRoutingFeatures = "both"; + + 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'' + ]; + #ronja.openssh.authorizedKeys.keys = [ + # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' + #]; + }; + + system.autoUpgrade.allowReboot = true; +} diff --git a/nixosConfigurations/hetzner-vpn2/default.nix b/nixosConfigurations/hetzner-vpn2/default.nix index 591dc20..46ded48 100644 --- a/nixosConfigurations/hetzner-vpn2/default.nix +++ b/nixosConfigurations/hetzner-vpn2/default.nix @@ -1,27 +1,7 @@ { imports = [ + ./configuration.nix ./hardware.nix ./nginx.nix ]; - - config = { - # uncomment for build check on non arm system (requires --impure) - # nixpkgs.buildPlatform = builtins.currentSystem; - - services.tailscale.useRoutingFeatures = "both"; - - 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'' - ]; - #ronja.openssh.authorizedKeys.keys = [ - # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' - #]; - }; - - system.autoUpgrade.allowReboot = true; - }; } diff --git a/nixosConfigurations/hetzner-vpn2/hardware.nix b/nixosConfigurations/hetzner-vpn2/hardware.nix index d7c96f0..e8fa931 100644 --- a/nixosConfigurations/hetzner-vpn2/hardware.nix +++ b/nixosConfigurations/hetzner-vpn2/hardware.nix @@ -3,6 +3,11 @@ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; config = { + nixpkgs = { + hostPlatform = "aarch64-linux"; + system = "aarch64-linux"; + }; + boot = { tmp.cleanOnBoot = true; kernelParams = [ "console=tty" ]; diff --git a/nixosConfigurations/ronja-pc/configuration.nix b/nixosConfigurations/ronja-pc/configuration.nix new file mode 100644 index 0000000..0e9124d --- /dev/null +++ b/nixosConfigurations/ronja-pc/configuration.nix @@ -0,0 +1,26 @@ +{ + config, + pkgs, + ... +}: +{ + # Configure keymap in X11 + services.xserver.xkb = { + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; +} diff --git a/nixosConfigurations/ronja-pc/default.nix b/nixosConfigurations/ronja-pc/default.nix index dd22382..e0e9117 100644 --- a/nixosConfigurations/ronja-pc/default.nix +++ b/nixosConfigurations/ronja-pc/default.nix @@ -1,32 +1,15 @@ -{ - config, - pkgs, - ... -}: +{ vinzenzNixosModules, ... }: { imports = [ + ./configuration.nix ./hardware.nix + + ../../modules/gnome.nix + ../../modules/gaming.nix + vinzenzNixosModules.steam + ../../modules/desktop-environment.nix + ../../modules/desktop-hardware.nix + + ../../home/ronja ]; - - config = { - # Configure keymap in X11 - services.xserver.xkb = { - layout = "de"; - variant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; - - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget - ]; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ];}; - }; } diff --git a/nixosConfigurations/ronja-pc/hardware.nix b/nixosConfigurations/ronja-pc/hardware.nix index e6ad854..f668726 100644 --- a/nixosConfigurations/ronja-pc/hardware.nix +++ b/nixosConfigurations/ronja-pc/hardware.nix @@ -1,8 +1,6 @@ { lib, ... }: { boot = { - supportedFilesystems = [ "btrfs" ]; - initrd.supportedFilesystems = [ "btrfs" ]; kernelModules = [ "kvm-intel" ]; extraModulePackages = [ ]; initrd = { @@ -39,10 +37,6 @@ { device = "/dev/disk/by-uuid/bf9d19fb-499b-4bfb-b67d-131fa5bf8259"; } ]; - hardware.bluetooth.enable = true; - - networking = { - networkmanager.enable = true; - useDHCP = lib.mkDefault true; - }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = true; } diff --git a/nixosConfigurations/vinzenz-lpt2/configuration.nix b/nixosConfigurations/vinzenz-lpt2/configuration.nix new file mode 100644 index 0000000..b38f25a --- /dev/null +++ b/nixosConfigurations/vinzenz-lpt2/configuration.nix @@ -0,0 +1,45 @@ +{ ... }: +{ + imports = [ ./nginx.nix ]; + + config = { + nix.settings.extra-platforms = [ + "aarch64-linux" + "i686-linux" + ]; + + services.xserver.xkb = { + # Configure keymap in X11 + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + + users.users.vinzenz.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' + ]; + + #users.users.ronja.openssh.authorizedKeys.keys = [ + # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' + #]; + + programs = { + adb.enable = true; + light = { + enable = true; + brightnessKeys = { + enable = true; + step = 5; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ + 8776 + 1337 + ]; + }; +} diff --git a/nixosConfigurations/vinzenz-lpt2/default.nix b/nixosConfigurations/vinzenz-lpt2/default.nix index 58eac82..d29ae65 100644 --- a/nixosConfigurations/vinzenz-lpt2/default.nix +++ b/nixosConfigurations/vinzenz-lpt2/default.nix @@ -1,47 +1,18 @@ +{ vinzenzNixosModules, ... }: { imports = [ + ./configuration.nix ./hardware.nix - ./nginx.nix + + ../../modules/gnome.nix + ../../modules/gaming.nix + vinzenzNixosModules.steam + vinzenzNixosModules.printing + vinzenzNixosModules.podman + ../../modules/desktop-environment.nix + ../../modules/desktop-hardware.nix + + ../../home/vinzenz + ../../home/ronja ]; - - config = { - nix.settings.extra-platforms = [ - "aarch64-linux" - "i686-linux" - ]; - - services.xserver.xkb = { - # Configure keymap in X11 - layout = "de"; - variant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; - - users.users.vinzenz.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming'' - ]; - - #users.users.ronja.openssh.authorizedKeys.keys = [ - # ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ronja-ssh-host-key'' - #]; - - programs = { - adb.enable = true; - light = { - enable = true; - brightnessKeys = { - enable = true; - step = 5; - }; - }; - }; - - networking.firewall.allowedTCPPorts = [ - 8776 - 1337 - ]; - }; } diff --git a/nixosConfigurations/vinzenz-lpt2/hardware.nix b/nixosConfigurations/vinzenz-lpt2/hardware.nix index 175a168..f51ccd1 100644 --- a/nixosConfigurations/vinzenz-lpt2/hardware.nix +++ b/nixosConfigurations/vinzenz-lpt2/hardware.nix @@ -1,21 +1,30 @@ -{ pkgs, lib, ... }: +{ lib, ... }: { - # intel cpu - boot.kernelModules = [ - "kvm-intel" - "xe" - ]; + imports = [ ../../modules/intel-graphics.nix ]; + config = { + # intel cpu + boot.kernelModules = [ + "kvm-intel" + "xe" + ]; + hardware.cpu.intel.updateMicrocode = true; - networking = { - networkmanager.enable = true; - useDHCP = lib.mkDefault true; - }; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; - boot = { - kernelPackages = pkgs.linuxPackages_zen; - supportedFilesystems = [ "btrfs" ]; - initrd = { - supportedFilesystems = [ "btrfs" ]; + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + + hardware.enableRedistributableFirmware = true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + boot.initrd = { availableKernelModules = [ "xhci_pci" "thunderbolt" @@ -27,30 +36,28 @@ }; }; }; - }; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; - fsType = "btrfs"; - options = [ "subvol=@" ]; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/E2B7-2BC1"; + fsType = "vfat"; + }; }; - "/boot" = { - device = "/dev/disk/by-uuid/E2B7-2BC1"; - fsType = "vfat"; - }; + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 32 * 1024; + } + ]; + + services.thermald.enable = true; + services.hardware.bolt.enable = true; # thunderbolt security }; - - swapDevices = [ - { - device = "/var/lib/swapfile"; - size = 32 * 1024; - } - ]; - - services.thermald.enable = true; - services.hardware.bolt.enable = true; # thunderbolt security - - hardware.bluetooth.enable = true; } diff --git a/nixosConfigurations/vinzenz-pc2/configuration.nix b/nixosConfigurations/vinzenz-pc2/configuration.nix new file mode 100644 index 0000000..4f6b859 --- /dev/null +++ b/nixosConfigurations/vinzenz-pc2/configuration.nix @@ -0,0 +1,36 @@ +{ pkgs, ... }: +{ + imports = [ + ./hardware.nix + ./vscode-server.nix + ./hass.nix + ]; + config = { + nix.settings.extra-platforms = [ + "aarch64-linux" + "i686-linux" + ]; + + services.xserver.xkb = { + # Configure keymap in X11 + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + + users.users.vinzenz.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' + ]; + + users.users.ronja.openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ssh-host-key'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgN6J8KyVyQqBAz+y3drXDmIsxOPkdPB+ISgpIP9Eld Generated By Termius'' + ]; + + environment.systemPackages = with pkgs; [ lact ]; + }; +} diff --git a/nixosConfigurations/vinzenz-pc2/default.nix b/nixosConfigurations/vinzenz-pc2/default.nix index 23505b1..e31bdbc 100644 --- a/nixosConfigurations/vinzenz-pc2/default.nix +++ b/nixosConfigurations/vinzenz-pc2/default.nix @@ -1,42 +1,19 @@ -{ pkgs, ... }: +{ vinzenzNixosModules, ... }: { imports = [ + ./configuration.nix ./hardware.nix - ./vscode-server.nix - ./hass.nix + + ../../modules/gnome.nix + ../../modules/gaming.nix + vinzenzNixosModules.steam + vinzenzNixosModules.printing + vinzenzNixosModules.podman + #../../modules/niri.nix + ../../modules/desktop-environment.nix + ../../modules/desktop-hardware.nix + + ../../home/vinzenz + ../../home/ronja ]; - - config = { - nix.settings.extra-platforms = [ - "aarch64-linux" - "i686-linux" - ]; - - services.xserver.xkb = { - # Configure keymap in X11 - layout = "de"; - variant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; - - users.users.vinzenz.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming'' - ]; - - users.users.ronja.openssh.authorizedKeys.keys = [ - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALWKm+d6KL6Vl3grPOcGouiNTkvdhXuWJmcrdEBY2nw ssh-host-key'' - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgN6J8KyVyQqBAz+y3drXDmIsxOPkdPB+ISgpIP9Eld Generated By Termius'' - ]; - - environment.systemPackages = with pkgs; [ lact ]; - - networking.firewall.allowedUDPPorts = [ - # Factorio - 34197 - ]; - }; } diff --git a/nixosConfigurations/vinzenz-pc2/hardware.nix b/nixosConfigurations/vinzenz-pc2/hardware.nix index 9e875c3..316d9a2 100644 --- a/nixosConfigurations/vinzenz-pc2/hardware.nix +++ b/nixosConfigurations/vinzenz-pc2/hardware.nix @@ -1,30 +1,25 @@ -{ pkgs, lib, ... }: +{ ... }: { - # amd cpu - boot.kernelModules = [ "kvm-amd" ]; + 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" - kernelPackages = pkgs.linuxPackages_zen; - supportedFilesystems = [ "btrfs" ]; - initrd.supportedFilesystems = [ "btrfs" ]; - loader.efi.efiSysMountPoint = "/boot"; + boot = { + initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "sd_mod" + ]; # "usb_storage" + loader.efi.efiSysMountPoint = "/boot"; + }; + + fileSystems = import ./fstab.nix; + swapDevices = [ ]; + + networking.interfaces.eno1.wakeOnLan.enable = true; }; - - fileSystems = import ./fstab.nix; - swapDevices = [ ]; - - networking = { - networkmanager.enable = true; - useDHCP = lib.mkDefault true; - interfaces.eno1.wakeOnLan.enable = true; - }; - - hardware.bluetooth.enable = true; } diff --git a/nixosConfigurations/vinzenz-pc2/vscode-server.nix b/nixosConfigurations/vinzenz-pc2/vscode-server.nix index 6632b1f..199c015 100644 --- a/nixosConfigurations/vinzenz-pc2/vscode-server.nix +++ b/nixosConfigurations/vinzenz-pc2/vscode-server.nix @@ -15,12 +15,16 @@ ]; }; - networking.firewall.allowedTCPPorts = [ - 8542 - 8543 - 8544 - 80 - 1313 - 5201 - ]; + networking = { + firewall = { + allowedTCPPorts = [ + 8542 + 8543 + 8544 + 80 + 1313 + 5201 + ]; + }; + }; } diff --git a/nixosModules/allowed-unfree-list.nix b/nixosModules/allowed-unfree-list.nix index 7bfa758..a5583cf 100644 --- a/nixosModules/allowed-unfree-list.nix +++ b/nixosModules/allowed-unfree-list.nix @@ -9,9 +9,7 @@ config = { nixpkgs.config = { # https://github.com/NixOS/nixpkgs/issues/197325#issuecomment-1579420085 - allowUnfreePredicate = lib.mkDefault ( - pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages - ); + allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.allowedUnfreePackages; }; }; } diff --git a/nixosModules/amd-graphics.nix b/nixosModules/amd-graphics.nix deleted file mode 100644 index cca6393..0000000 --- a/nixosModules/amd-graphics.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, ... }: -{ - boot.kernelModules = [ "amdgpu" ]; - services.xserver.videoDrivers = [ "amdgpu" ]; - - hardware = { - graphics.enable = true; - amdgpu = { - opencl.enable = true; - amdvlk = { - # TODO: this creates black borders around GNOME apps - # enable = true; - # support32Bit.enable = config.hardware.graphics.enable32Bit; - }; - overdrive.enable = true; - }; - }; - - environment.systemPackages = with pkgs; [ nvtopPackages.amd ]; -} diff --git a/nixosModules/en-de.nix b/nixosModules/en-de.nix index a91780e..0ed4faf 100644 --- a/nixosModules/en-de.nix +++ b/nixosModules/en-de.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: { i18n = { defaultLocale = "en_US.UTF-8"; @@ -22,10 +21,4 @@ "en-US" "de" ]; - - environment.systemPackages = [ - pkgs.hunspell - pkgs.hunspellDicts.de-de - pkgs.hunspellDicts.en-us - ]; } diff --git a/nixosModules/firmware-updates.nix b/nixosModules/firmware-updates.nix deleted file mode 100644 index 8e81b72..0000000 --- a/nixosModules/firmware-updates.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - hardware = { - enableRedistributableFirmware = true; - cpu = { - amd.updateMicrocode = true; - intel.updateMicrocode = true; - }; - }; - - services.fwupd.enable = true; -} diff --git a/nixosModules/gnome.nix b/nixosModules/gnome.nix index 7a6f920..3afe9ce 100644 --- a/nixosModules/gnome.nix +++ b/nixosModules/gnome.nix @@ -1,65 +1,31 @@ +{ pkgs, ... }: { - pkgs, - lib, - config, - ... -}: -{ - options.vinzenz = { - keep-gnome-default-apps = lib.mkEnableOption "keep gnome default apps"; + services = { + xserver = { + # Enable the GNOME Desktop Environment. + desktopManager.gnome = { + enable = true; + extraGSettingsOverridePackages = [ pkgs.mutter ]; + extraGSettingsOverrides = '' + [org.gnome.mutter] + experimental-features=['scale-monitor-framebuffer'] + ''; + }; + displayManager.gdm.enable = true; + excludePackages = [ pkgs.xterm ]; + }; + + displayManager.defaultSession = "gnome"; + + gnome = { + tinysparql.enable = false; + localsearch.enable = false; + sushi.enable = true; + }; }; - config = lib.mkMerge [ - { - services = { - xserver = { - # Enable the GNOME Desktop Environment. - desktopManager.gnome = { - enable = true; - extraGSettingsOverridePackages = [ pkgs.mutter ]; - extraGSettingsOverrides = '' - [org.gnome.mutter] - experimental-features=['scale-monitor-framebuffer'] - ''; - }; - displayManager.gdm.enable = true; - excludePackages = [ pkgs.xterm ]; - }; - - displayManager.defaultSession = "gnome"; - - gnome = { - tinysparql.enable = false; - localsearch.enable = false; - sushi.enable = true; - }; - }; - - programs = { - dconf.enable = true; - gpaste.enable = true; - }; - } - (lib.mkIf (!config.vinzenz.keep-gnome-default-apps) { - environment.gnome.excludePackages = with pkgs; [ - cheese # photo booth - epiphany # web browser - evince # document viewer - geary # email client - gnome-maps - gnome-weather - gnome-tour - sysprof - orca # screen reader - gnome-weather - gnome-backgrounds - gnome-user-docs - yelp # help app - gnome-music - totem # video player - snapshot # camera - baobab # disk usage - ]; - }) - ]; + programs = { + dconf.enable = true; + gpaste.enable = true; + }; } diff --git a/nixosModules/quiet-boot.nix b/nixosModules/quiet-boot.nix deleted file mode 100644 index 8dbcd57..0000000 --- a/nixosModules/quiet-boot.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - boot = { - kernelParams = [ - "quiet" - "udev.log_level=3" - ]; - consoleLogLevel = 0; - initrd.verbose = false; - plymouth.enable = true; - }; -} diff --git a/nixosModules/steam.nix b/nixosModules/steam.nix index b0991e6..1c70785 100644 --- a/nixosModules/steam.nix +++ b/nixosModules/steam.nix @@ -1,4 +1,7 @@ +{ vinzenzNixosModules, ... }: { + imports = [ vinzenzNixosModules.allowed-unfree-list ]; + hardware.steam-hardware.enable = true; programs = { diff --git a/nixosModules/systemd-boot.nix b/nixosModules/systemd-boot.nix deleted file mode 100644 index 321a26c..0000000 --- a/nixosModules/systemd-boot.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - boot.loader = { - timeout = 3; - efi.canTouchEfiVariables = true; - systemd-boot = { - enable = true; - editor = false; # do not allow changing kernel parameters - consoleMode = "max"; - }; - }; -} diff --git a/nixosModules/user-ronja.nix b/nixosModules/user-ronja.nix deleted file mode 100644 index b374ab9..0000000 --- a/nixosModules/user-ronja.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ pkgs, ... }: -{ - users.users.ronja = { - isNormalUser = true; - name = "ronja"; - description = "Ronja"; - home = "/home/ronja"; - extraGroups = [ - "networkmanager" - "wheel" - "games" - "podman" - "openvscode-server" - ]; - shell = pkgs.zsh; - }; - - nix.settings.trusted-users = [ "ronja" ]; -} diff --git a/nixosModules/user-vinzenz.nix b/nixosModules/user-vinzenz.nix deleted file mode 100644 index b48e750..0000000 --- a/nixosModules/user-vinzenz.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ pkgs, ... }: -{ - users.users.vinzenz = { - isNormalUser = true; - name = "vinzenz"; - description = "Vinzenz"; - home = "/home/vinzenz"; - extraGroups = [ - "networkmanager" - "wheel" - "games" - "dialout" - "podman" - "nginx" - "adbusers" - "kvm" - "input" - "video" - ]; - shell = pkgs.zsh; - autoSubUidGidRange = true; - }; - - nix.settings.trusted-users = [ "vinzenz" ]; - - allowedUnfreePackages = [ - "rider" - "pycharm-professional" - "jetbrains-toolbox" - - "anydesk" - - "vscode-extension-ms-dotnettools-csharp" - ]; -} diff --git a/nixosModules/vinzenz-desktop-settings.nix b/nixosModules/vinzenz-desktop-settings.nix deleted file mode 100644 index 24b4b4f..0000000 --- a/nixosModules/vinzenz-desktop-settings.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, ... }: -{ - programs.firefox.enable = true; - - environment.systemPackages = with pkgs; [ - lm_sensors - libreoffice-qt6 - ]; - - fonts = { - enableDefaultPackages = true; - fontconfig.defaultFonts.monospace = [ "FiraCode Nerd Font" ]; - packages = with pkgs; [ - nerd-fonts.fira-code - roboto-mono - recursive - ]; - }; - - hardware.logitech.wireless = { - enable = true; - enableGraphical = true; - }; - - # RDP connections - services.gnome.gnome-remote-desktop.enable = true; - networking.firewall.allowedTCPPorts = [ 3389 ]; -} diff --git a/nixosModules/wine-gaming.nix b/nixosModules/wine-gaming.nix deleted file mode 100644 index 2b9cb51..0000000 --- a/nixosModules/wine-gaming.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs, ... }: -{ - hardware = { - graphics = { - enable32Bit = true; - extraPackages = with pkgs; [ mangohud ]; - extraPackages32 = with pkgs; [ mangohud ]; - }; - - xpadneo.enable = true; - }; - - environment.systemPackages = with pkgs; [ - wineWowPackages.stagingFull - wineWowPackages.fonts - winetricks - dxvk - mangohud - vulkan-tools - glxinfo - ]; -}