Update flake
This commit is contained in:
parent
91926d5975
commit
8fe9b3bb4d
6 changed files with 70 additions and 65 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,3 +8,4 @@ xmonad-x86_64-linux
|
|||
xmonad.errors
|
||||
xmonad.state
|
||||
dist-newstyle
|
||||
result*
|
||||
|
|
40
flake.lock
40
flake.lock
|
@ -1,30 +1,12 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723175592,
|
||||
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
|
||||
"lastModified": 1725983898,
|
||||
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
|
||||
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -36,24 +18,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
62
flake.nix
62
flake.nix
|
@ -2,18 +2,56 @@
|
|||
description = "Build my xmonad config";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||
{
|
||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||
}) // {
|
||||
packages.x86_64-linux.default =
|
||||
# Notice the reference to nixpkgs here.
|
||||
with import nixpkgs { system = "x86_64-linux"; };
|
||||
haskellPackages.callCabal2nix "xmonad-config" ./. {};
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
forAllSystems = function:
|
||||
nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] (system:
|
||||
function rec {
|
||||
inherit system;
|
||||
compilerVersion = "ghc966";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
hsPkgs = pkgs.haskell.packages.${compilerVersion}.override {
|
||||
overrides = hfinal: hprev: {
|
||||
# Internal Packages
|
||||
xmonad-config = hfinal.callCabal2nix "xmonad-config" ./. {};
|
||||
xmonad-contrib = pkgs.haskell.lib.compose.doJailbreak (pkgs.haskell.lib.compose.overrideCabal (drv: {
|
||||
version = "0.18.1";
|
||||
sha256 = "sha256-BXOdIErNhNNS3slNBhiskH/zljVREjx0fu836BOGZDI=";
|
||||
})
|
||||
hprev.xmonad-contrib);
|
||||
xmonad-extras = pkgs.haskell.lib.compose.doJailbreak (pkgs.haskell.lib.compose.overrideCabal (drv: {
|
||||
version = "0.17.2";
|
||||
sha256 = "sha256-KAqC6sDbvd79lhyByfbA0cYwSINJ+JkivsieUE2rm2U=";
|
||||
})
|
||||
hprev.xmonad-extras);
|
||||
};
|
||||
};
|
||||
});
|
||||
in {
|
||||
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
|
||||
packages = forAllSystems ({hsPkgs, ...}: ({
|
||||
default = hsPkgs.xmonad-config;
|
||||
}));
|
||||
devShells = forAllSystems ({
|
||||
hsPkgs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
default = hsPkgs.shellFor {
|
||||
name = "xmonad-config";
|
||||
packages = p: [
|
||||
p.xmonad-config
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
hsPkgs.haskell-language-server
|
||||
hsPkgs.cabal-install
|
||||
cabal2nix
|
||||
haskellPackages.ghcid
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs }:
|
||||
let
|
||||
{pkgs}: let
|
||||
inherit (pkgs) callPackage fetchFromGitHub mkShell;
|
||||
easy-hls-src = fetchFromGitHub {
|
||||
owner = "jkachmar";
|
||||
|
@ -9,7 +8,6 @@ let
|
|||
};
|
||||
easy-hls = callPackage easy-hls-src {};
|
||||
in
|
||||
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
easy-hls
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
cabal-version: >=1.10
|
||||
|
||||
name: xmonad-config
|
||||
version: 0.11.0.0
|
||||
version: 0.13.0.0
|
||||
-- synopsis:
|
||||
-- description:
|
||||
-- bug-reports:
|
||||
|
@ -29,7 +29,7 @@ executable xmonad
|
|||
, mtl
|
||||
, unix
|
||||
, xmonad
|
||||
, xmonad-contrib
|
||||
, xmonad-contrib >= 0.18.1
|
||||
, xmonad-extras
|
||||
hs-source-dirs: .
|
||||
, lib
|
||||
|
|
|
@ -8,14 +8,13 @@ import XMonad
|
|||
import XMonad.Actions.DynamicProjects
|
||||
import XMonad.Config.Desktop
|
||||
import XMonad.Hooks.DynamicLog
|
||||
--import XMonad.Hooks.EwmhDesktops (ewmh, ewmhFullscreen)
|
||||
import XMonad.Hooks.EwmhDesktops (ewmh)
|
||||
import XMonad.Hooks.ManageHelpers
|
||||
import XMonad.Layout.NoBorders (noBorders, smartBorders, hasBorder, BorderMessage (HasBorder))
|
||||
import XMonad.Layout.ResizableTile (ResizableTall(..))
|
||||
import XMonad.Layout.Spacing
|
||||
import XMonad.Layout.ToggleLayouts (toggleLayouts)
|
||||
import XMonad.Util.EZConfig
|
||||
import XMonad.Util.Hacks (fixSteamFlicker)
|
||||
import qualified Nord as N
|
||||
import qualified XMonad.Layout.Spacing as SS (Border(..))
|
||||
|
||||
|
@ -52,9 +51,12 @@ myManageHook = composeAll
|
|||
, transience'
|
||||
]
|
||||
|
||||
fixSteam :: XConfig l -> XConfig l
|
||||
fixSteam c = c { handleEventHook = fixSteamFlicker <+> handleEventHook c }
|
||||
|
||||
------------ build the full config
|
||||
withConfig =
|
||||
ewmh
|
||||
fixSteam -- And workaround steam bug
|
||||
$ Projects.modify -- Apply projects config
|
||||
$ Keys.modify -- Apply keybindings config
|
||||
$ Mouse.modify -- Apply mouse bindings config
|
||||
|
|
Loading…
Reference in a new issue