From 3e0017a1914ed25d961645bf82624b3deb9fe466 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 14 Jun 2021 21:44:38 +0200 Subject: [PATCH] fix: dumpyourvms builds --- flake.nix | 6 +-- hosts/dumpyourvms.nix | 6 --- hosts/dumpyourvms/default.nix | 75 ++----------------------------- hosts/dumpyourvms/dumpyourvms.nix | 75 +++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 81 deletions(-) delete mode 100644 hosts/dumpyourvms.nix create mode 100644 hosts/dumpyourvms/dumpyourvms.nix diff --git a/flake.nix b/flake.nix index 01dc6f5f..89842203 100644 --- a/flake.nix +++ b/flake.nix @@ -103,9 +103,9 @@ suites = with profiles; rec { base = [ core users.nixos users.root ]; pubsolaros = [ core base-user users.root ]; - anonymous = [ pubsolaros users.nixos ]; - teutat3s = [ base users.teutat3s ]; - dumpyourvms = [ teutat3s graphical ]; + anonymous = pubsolaros ++ [ users.nixos ]; + teutat3s = pubsolaros ++ [ users.teutat3s ]; + dumpyourvms = teutat3s ++ [ graphical ]; }; }; }; diff --git a/hosts/dumpyourvms.nix b/hosts/dumpyourvms.nix deleted file mode 100644 index d4d9802f..00000000 --- a/hosts/dumpyourvms.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ suites, ... }: -{ - imports = [ - ./dumpyourvms - ] ++ suites.dumpyourvms; -} diff --git a/hosts/dumpyourvms/default.nix b/hosts/dumpyourvms/default.nix index c1eebb60..bef0a660 100644 --- a/hosts/dumpyourvms/default.nix +++ b/hosts/dumpyourvms/default.nix @@ -1,75 +1,6 @@ -{ config, pkgs, lib, ... }: -with lib; -let - psCfg = config.pub-solar; - xdg = config.home-manager.users."${psCfg.user.name}".xdg; -in +{ suites, ... }: { imports = [ - ./hardware-configuration.nix - ]; - - config = { - pub-solar.x-os.keyfile = "/home/teutat3s/flk/hosts/dumpyourvms/secrets/keyfile.bin"; - - # fix backlight for keyboard and brightness, adjust function key binding - boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" ]; - boot.loader.efi.canTouchEfiVariables = true; - - hardware = { - cpu.intel.updateMicrocode = true; - facetimehd.enable = true; - }; - - networking = import ./networking.nix; - - security.pki.certificateFiles = [ ./consul-agent-ca.pem ]; - - services.unbound = import ./unbound.nix; - - # Radeon driver seems to work better than amdgpu with Radeon R9 M370X - services.xserver.videoDrivers = [ "radeon" ]; - - # Thunderbolt tools - services.hardware.bolt.enable = true; - - services.udev.extraRules = - # Disable XHC1 wakeup signal to avoid resume getting triggered some time - # after suspend. Reboot required for this to take effect. - ''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"''; - - - services.printing.enable = true; - services.printing.drivers = [ pkgs.brlaser ]; - - home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { - # Custom device sway configs - xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf; - "sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf; - "sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf; - }; - }; - - users.users.teutat3s = { - extraGroups = [ "unbound" ]; - }; - - - # WLAN frequency compliance (e.g. check for radar with DFS) - hardware.firmware = with pkgs; [ wireless-regdb ]; - boot.extraModprobeConfig = '' - options cfg80211 ieee80211_regdom="DE" - ''; - - # 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? - }; + ./dumpyourvms.nix + ] ++ suites.dumpyourvms; } diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix new file mode 100644 index 00000000..55c2c92c --- /dev/null +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -0,0 +1,75 @@ +{ config, pkgs, lib, ... }: +with lib; +let + psCfg = config.pub-solar; + xdg = config.home-manager.users."${psCfg.user.name}".xdg; +in +{ + imports = [ + ./hardware-configuration.nix + ]; + + config = { + pub-solar.x-os.keyfile = "/etc/nixos/secrets/keyfile.bin"; + + # fix backlight for keyboard and brightness, adjust function key binding + boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" ]; + boot.loader.efi.canTouchEfiVariables = true; + + hardware = { + cpu.intel.updateMicrocode = true; + facetimehd.enable = true; + }; + + networking = import ./networking.nix; + + security.pki.certificateFiles = [ ./consul-agent-ca.pem ]; + + services.unbound = import ./unbound.nix; + + # Radeon driver seems to work better than amdgpu with Radeon R9 M370X + services.xserver.videoDrivers = [ "radeon" ]; + + # Thunderbolt tools + services.hardware.bolt.enable = true; + + services.udev.extraRules = + # Disable XHC1 wakeup signal to avoid resume getting triggered some time + # after suspend. Reboot required for this to take effect. + ''SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"''; + + + services.printing.enable = true; + services.printing.drivers = [ pkgs.brlaser ]; + + home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { + # Custom device sway configs + xdg.configFile = mkIf psCfg.sway.enable { + "sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf; + "sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf; + "sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf; + "sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; + "sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf; + }; + }; + + users.users.teutat3s = { + extraGroups = [ "unbound" ]; + }; + + + # WLAN frequency compliance (e.g. check for radar with DFS) + hardware.firmware = with pkgs; [ wireless-regdb ]; + boot.extraModprobeConfig = '' + options cfg80211 ieee80211_regdom="DE" + ''; + + # 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? + }; +}