From ca251d096bbd6bc28e74438b0f10d259369a72fb Mon Sep 17 00:00:00 2001 From: axtloss Date: Mon, 15 Aug 2022 14:36:42 +0200 Subject: [PATCH] change plasma to kde in config, fixes #18 --- flake.lock | 75 ++++++++++++++++++++++++++++++++++++++++++ flake.nix | 47 ++++++++++++++++++++++++++ src/internal/config.rs | 6 ++-- 3 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c0638ca --- /dev/null +++ b/flake.lock @@ -0,0 +1,75 @@ +{ + "nodes": { + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1659610603, + "narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=", + "owner": "nix-community", + "repo": "naersk", + "rev": "c6a45e4277fa58abd524681466d3450f896dc094", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1660566196, + "narHash": "sha256-mjObRMshcxAyK7J5ZJ5/nP0uEu8Ym5trrVsj1253nUc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "07a564964c0dfb1fa15f9be701b2fba55b252a9d", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "naersk": "naersk", + "nixpkgs": "nixpkgs_2", + "utils": "utils" + } + }, + "utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e7601f6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,47 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + utils.url = "github:numtide/flake-utils"; + naersk.url = "github:nix-community/naersk"; + }; + + outputs = { self, nixpkgs, utils, naersk }: + utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages."${system}"; + naersk-lib = naersk.lib."${system}"; + in rec + { + packages.amethyst = naersk-lib.buildPackage { + pname = "ame"; + root = ./.; + nativeBuildInputs = with pkgs; [ + openssl + sqlite + pkg-config + ]; + }; + + packages.default = packages.amethyst; + + apps.amethyst = utils.lib.mkApp { + drv = packages.amethyst; + }; + + apps.default = apps.amethyst; + + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + rustc + cargo + rustfmt + cargo-audit + clippy + openssl + sqlite + pkg-config + ]; + }; + }); +} + diff --git a/src/internal/config.rs b/src/internal/config.rs index e413133..5a2212b 100755 --- a/src/internal/config.rs +++ b/src/internal/config.rs @@ -157,9 +157,9 @@ pub fn read_config(configpath: PathBuf) { /*if let Some(desktop) = &config.desktop { desktops::install_desktop_setup(*desktop); }*/ - match config.desktop.as_str() { + match config.desktop.to_lowercase().as_str() { // "onyx" => desktops::install_desktop_setup(DesktopSetup::Onyx), - "plasma" => desktops::install_desktop_setup(DesktopSetup::Kde), + "kde" => desktops::install_desktop_setup(DesktopSetup::Kde), "mate" => desktops::install_desktop_setup(DesktopSetup::Mate), "gnome" => desktops::install_desktop_setup(DesktopSetup::Gnome), "cinnamon" => desktops::install_desktop_setup(DesktopSetup::Cinnamon), @@ -172,7 +172,7 @@ pub fn read_config(configpath: PathBuf) { "herbstluftwm" => desktops::install_desktop_setup(DesktopSetup::Herbstluftwm), "awesome" => desktops::install_desktop_setup(DesktopSetup::Awesome), "bspwm" => desktops::install_desktop_setup(DesktopSetup::Bspwm), - "None/DIY" => desktops::install_desktop_setup(DesktopSetup::None), + "none/diy" => desktops::install_desktop_setup(DesktopSetup::None), _ => log::info!("No desktop setup selected!"), } println!();