From 5c20a153851b7d4820080a1e06e6f0597f1357eb Mon Sep 17 00:00:00 2001 From: sajenim Date: Sun, 23 Jul 2023 08:24:40 +0800 Subject: [PATCH] setup custom xmobar package --- .../common/desktop/xmobar/default.nix | 13 --- .../desktop/xmobar/xmobar-config/flake.lock | 80 ------------------- .../desktop/xmobar/xmobar-config/flake.nix | 46 ----------- pkgs/xmobar-config/default.nix | 5 ++ .../xmobar-config/src/xmobar-top.hs | 0 .../xmobar-config/xmobar-config.cabal | 0 6 files changed, 5 insertions(+), 139 deletions(-) delete mode 100644 home-manager/common/desktop/xmobar/default.nix delete mode 100644 home-manager/common/desktop/xmobar/xmobar-config/flake.lock delete mode 100644 home-manager/common/desktop/xmobar/xmobar-config/flake.nix create mode 100644 pkgs/xmobar-config/default.nix rename {home-manager/common/desktop/xmobar => pkgs}/xmobar-config/src/xmobar-top.hs (100%) rename {home-manager/common/desktop/xmobar => pkgs}/xmobar-config/xmobar-config.cabal (100%) diff --git a/home-manager/common/desktop/xmobar/default.nix b/home-manager/common/desktop/xmobar/default.nix deleted file mode 100644 index 5709132..0000000 --- a/home-manager/common/desktop/xmobar/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ inputs, pkgs, ... }: - -{ - nixpkgs.overlays = [ - (final: prev: { - xmobar = inputs.xmobar-config.packages.${pkgs.system}.xmobar-config; - }) - ]; - - home.pkgs = with pkgs; [ - xmobar - ]; -} diff --git a/home-manager/common/desktop/xmobar/xmobar-config/flake.lock b/home-manager/common/desktop/xmobar/xmobar-config/flake.lock deleted file mode 100644 index 37e7c12..0000000 --- a/home-manager/common/desktop/xmobar/xmobar-config/flake.lock +++ /dev/null @@ -1,80 +0,0 @@ -{ - "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "haskell-flake": { - "locked": { - "lastModified": 1689950301, - "narHash": "sha256-sUYqHggNUIMuBVOsRoseBn3/tx58yMnMvOM31Rqf9dU=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "92aabc529c4487960c14016b65b3ac7e7e159b13", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "haskell-flake", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1689935543, - "narHash": "sha256-6GQ9ib4dA/r1leC5VUpsBo0BmDvNxLjKrX1iyL+h8mc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e43e2448161c0a2c4928abec4e16eae1516571bc", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1688049487, - "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-parts": "flake-parts", - "haskell-flake": "haskell-flake", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/home-manager/common/desktop/xmobar/xmobar-config/flake.nix b/home-manager/common/desktop/xmobar/xmobar-config/flake.nix deleted file mode 100644 index 933070c..0000000 --- a/home-manager/common/desktop/xmobar/xmobar-config/flake.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - haskell-flake.url = "github:srid/haskell-flake"; - }; - outputs = inputs@{ self, nixpkgs, flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = nixpkgs.lib.systems.flakeExposed; - imports = [ inputs.haskell-flake.flakeModule ]; - - perSystem = { self', pkgs, ... }: { - - # Typically, you just want a single project named "default". But - # multiple projects are also possible, each using different GHC version. - haskellProjects.default = { - # If you have a .cabal file in the root, this option is determined - # automatically. Otherwise, specify all your local packages here. - packages.xmobar-config.root = ./.; - - # The base package set representing a specific GHC version. - # By default, this is pkgs.haskellPackages. - # You may also create your own. See https://haskell.flake.page/package-set - # basePackages = pkgs.haskellPackages; - - # Dependency overrides go here. See https://haskell.flake.page/dependency - # source-overrides = { }; - # overrides = self: super: { }; - - # devShell = { - # # Enabled by default - # enable = true; - # - # # Programs you want to make available in the shell. - # # Default programs can be disabled by setting to 'null' - # tools = hp: { fourmolu = hp.fourmolu; ghcid = null; }; - # - # hlsCheck.enable = true; - # }; - }; - - # haskell-flake doesn't set the default package, but you can do it here. - packages.default = self'.packages.xmobar-config; - }; - }; -} diff --git a/pkgs/xmobar-config/default.nix b/pkgs/xmobar-config/default.nix new file mode 100644 index 0000000..a6dd3cf --- /dev/null +++ b/pkgs/xmobar-config/default.nix @@ -0,0 +1,5 @@ +{ pkgs }: + +pkgs.haskellPackages.developPackage { + root = ./.; +} diff --git a/home-manager/common/desktop/xmobar/xmobar-config/src/xmobar-top.hs b/pkgs/xmobar-config/src/xmobar-top.hs similarity index 100% rename from home-manager/common/desktop/xmobar/xmobar-config/src/xmobar-top.hs rename to pkgs/xmobar-config/src/xmobar-top.hs diff --git a/home-manager/common/desktop/xmobar/xmobar-config/xmobar-config.cabal b/pkgs/xmobar-config/xmobar-config.cabal similarity index 100% rename from home-manager/common/desktop/xmobar/xmobar-config/xmobar-config.cabal rename to pkgs/xmobar-config/xmobar-config.cabal