From a9e025c4f93d59e0fd5efcdcc582850df80ed3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Mon, 14 Jun 2021 23:23:30 +0200 Subject: [PATCH] fix: Make chocolatebar work with the new config --- .gitignore | 8 ++++---- hosts/chocolatebar.nix | 6 ------ hosts/chocolatebar/base.nix | 31 +++++++++++++++++++++++++++++++ hosts/chocolatebar/default.nix | 31 +++---------------------------- 4 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 hosts/chocolatebar.nix create mode 100644 hosts/chocolatebar/base.nix diff --git a/.gitignore b/.gitignore index c50c560a..c319c3b0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,12 +3,12 @@ up hosts/up-* .direnv doc/index.html -<<<<<<< HEAD -tags -======= # Result of flk commands vm iso doi ->>>>>>> devos/core + +# PubSolarOS +tags +/owners diff --git a/hosts/chocolatebar.nix b/hosts/chocolatebar.nix deleted file mode 100644 index 43c30835..00000000 --- a/hosts/chocolatebar.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ suites, ... }: -{ - imports = [ - ./chocolatebar - ] ++ suites.chocolatebar; -} diff --git a/hosts/chocolatebar/base.nix b/hosts/chocolatebar/base.nix new file mode 100644 index 00000000..76175878 --- /dev/null +++ b/hosts/chocolatebar/base.nix @@ -0,0 +1,31 @@ +{ config, pkgs, lib, ... }: +with lib; +let + psCfg = config.pub-solar; + xdg = config.home-manager.users."${psCfg.user.name}".xdg; +in +{ + imports = [ + ./configuration.nix + ./virtualisation + ]; + + config = { + pub-solar.x-os.keyfile = "/etc/nixos/hosts/chocolatebar/secrets/keyfile.bin"; + + pub-solar.virtualisation.isolateGPU = "rx550x"; + + hardware.cpu.amd.updateMicrocode = true; + + hardware.opengl.extraPackages = with pkgs; [ + rocm-opencl-icd + rocm-opencl-runtime + ]; + + home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { + "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; + "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; + "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; + }; + }; +} diff --git a/hosts/chocolatebar/default.nix b/hosts/chocolatebar/default.nix index 76175878..fcb71c52 100644 --- a/hosts/chocolatebar/default.nix +++ b/hosts/chocolatebar/default.nix @@ -1,31 +1,6 @@ -{ config, pkgs, lib, ... }: -with lib; -let - psCfg = config.pub-solar; - xdg = config.home-manager.users."${psCfg.user.name}".xdg; -in +{ suites, ... }: { imports = [ - ./configuration.nix - ./virtualisation - ]; - - config = { - pub-solar.x-os.keyfile = "/etc/nixos/hosts/chocolatebar/secrets/keyfile.bin"; - - pub-solar.virtualisation.isolateGPU = "rx550x"; - - hardware.cpu.amd.updateMicrocode = true; - - hardware.opengl.extraPackages = with pkgs; [ - rocm-opencl-icd - rocm-opencl-runtime - ]; - - home-manager.users."${psCfg.user.name}".xdg.configFile = mkIf psCfg.sway.enable { - "sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf; - "sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf; - "sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf; - }; - }; + ./base.nix + ] ++ suites.chocolatebar; }