From c446c9d356851f0caa8d092c5536149fd2fd91e7 Mon Sep 17 00:00:00 2001 From: Alexander Szczepanski Date: Sun, 1 Aug 2021 13:14:12 +0200 Subject: [PATCH] added mini and some other stuff --- configs/gui.nix | 8 ++++++-- configs/user.nix | 4 ++++ configs/virtualisation.nix | 1 + machine/mini.nix | 39 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 machine/mini.nix diff --git a/configs/gui.nix b/configs/gui.nix index 4f0e6f5..654cfa0 100644 --- a/configs/gui.nix +++ b/configs/gui.nix @@ -3,6 +3,7 @@ { nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowBroken = true; environment.systemPackages = with pkgs; [ kitty signal-desktop @@ -32,8 +33,13 @@ transmission-gtk bitwarden libreoffice + etcher + mangohud + minecraft ]; + programs.steam.enable = true; + fonts = { enableDefaultFonts = true; fontDir.enable = true; @@ -63,8 +69,6 @@ programs.dconf.enable = true; - programs.steam.enable = true; - nixpkgs.config.chromium.commandLineArgs = "--enable-features=WebUIDarkMode,NativeNotifications,VaapiVideoDecoder --ignore-gpu-blocklist --use-gl=desktop --force-dark-mode --disk-cache-dir=/tmp/cache"; programs.chromium = { enable = true; diff --git a/configs/user.nix b/configs/user.nix index b8662f5..5939a2c 100644 --- a/configs/user.nix +++ b/configs/user.nix @@ -35,6 +35,10 @@ hostname = "192.168.122.33"; }; + matchBlocks."mini" = { + hostname = "192.168.0.87"; + }; + matchBlocks."router" = { hostname = "192.168.1.1"; user = "root"; diff --git a/configs/virtualisation.nix b/configs/virtualisation.nix index dfaee33..dd846c8 100644 --- a/configs/virtualisation.nix +++ b/configs/virtualisation.nix @@ -7,5 +7,6 @@ enable = true; qemuPackage = pkgs.qemu_kvm; }; + spiceUSBRedirection.enable = true; }; } diff --git a/machine/mini.nix b/machine/mini.nix new file mode 100644 index 0000000..46ce25c --- /dev/null +++ b/machine/mini.nix @@ -0,0 +1,39 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + /etc/nixos/hardware-configuration.nix + ../configs/virtualisation.nix + ../configs/common.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "mini"; + networking.useDHCP = false; + networking.interfaces.enp3s0.useDHCP = true; + + users.users.alex = { + defaultUserShell = pkgs.zsh; + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + }; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "21.05"; # Did you read the comment? + +}