Update flake

This commit is contained in:
Samae 2024-09-13 17:51:00 +03:00
parent 91926d5975
commit 8fe9b3bb4d
6 changed files with 70 additions and 65 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ xmonad-x86_64-linux
xmonad.errors xmonad.errors
xmonad.state xmonad.state
dist-newstyle dist-newstyle
result*

View file

@ -1,30 +1,12 @@
{ {
"nodes": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1725983898,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,24 +18,8 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "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", "root": "root",

View file

@ -2,18 +2,56 @@
description = "Build my xmonad config"; description = "Build my xmonad config";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: outputs = {
self,
flake-utils.lib.eachDefaultSystem (system: nixpkgs,
let pkgs = nixpkgs.legacyPackages.${system}; in }: let
{ forAllSystems = function:
devShells.default = import ./shell.nix { inherit pkgs; }; nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] (system:
}) // { function rec {
packages.x86_64-linux.default = inherit system;
# Notice the reference to nixpkgs here. compilerVersion = "ghc966";
with import nixpkgs { system = "x86_64-linux"; }; pkgs = nixpkgs.legacyPackages.${system};
haskellPackages.callCabal2nix "xmonad-config" ./. {}; 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
];
};
});
}; };
} }

View file

@ -1,5 +1,4 @@
{ pkgs }: {pkgs}: let
let
inherit (pkgs) callPackage fetchFromGitHub mkShell; inherit (pkgs) callPackage fetchFromGitHub mkShell;
easy-hls-src = fetchFromGitHub { easy-hls-src = fetchFromGitHub {
owner = "jkachmar"; owner = "jkachmar";
@ -9,9 +8,8 @@ let
}; };
easy-hls = callPackage easy-hls-src {}; easy-hls = callPackage easy-hls-src {};
in in
mkShell {
mkShell {
buildInputs = [ buildInputs = [
easy-hls easy-hls
]; ];
} }

View file

@ -1,7 +1,7 @@
cabal-version: >=1.10 cabal-version: >=1.10
name: xmonad-config name: xmonad-config
version: 0.11.0.0 version: 0.13.0.0
-- synopsis: -- synopsis:
-- description: -- description:
-- bug-reports: -- bug-reports:
@ -29,7 +29,7 @@ executable xmonad
, mtl , mtl
, unix , unix
, xmonad , xmonad
, xmonad-contrib , xmonad-contrib >= 0.18.1
, xmonad-extras , xmonad-extras
hs-source-dirs: . hs-source-dirs: .
, lib , lib

View file

@ -8,14 +8,13 @@ import XMonad
import XMonad.Actions.DynamicProjects import XMonad.Actions.DynamicProjects
import XMonad.Config.Desktop import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog import XMonad.Hooks.DynamicLog
--import XMonad.Hooks.EwmhDesktops (ewmh, ewmhFullscreen)
import XMonad.Hooks.EwmhDesktops (ewmh)
import XMonad.Hooks.ManageHelpers import XMonad.Hooks.ManageHelpers
import XMonad.Layout.NoBorders (noBorders, smartBorders, hasBorder, BorderMessage (HasBorder)) import XMonad.Layout.NoBorders (noBorders, smartBorders, hasBorder, BorderMessage (HasBorder))
import XMonad.Layout.ResizableTile (ResizableTall(..)) import XMonad.Layout.ResizableTile (ResizableTall(..))
import XMonad.Layout.Spacing import XMonad.Layout.Spacing
import XMonad.Layout.ToggleLayouts (toggleLayouts) import XMonad.Layout.ToggleLayouts (toggleLayouts)
import XMonad.Util.EZConfig import XMonad.Util.EZConfig
import XMonad.Util.Hacks (fixSteamFlicker)
import qualified Nord as N import qualified Nord as N
import qualified XMonad.Layout.Spacing as SS (Border(..)) import qualified XMonad.Layout.Spacing as SS (Border(..))
@ -52,9 +51,12 @@ myManageHook = composeAll
, transience' , transience'
] ]
fixSteam :: XConfig l -> XConfig l
fixSteam c = c { handleEventHook = fixSteamFlicker <+> handleEventHook c }
------------ build the full config ------------ build the full config
withConfig = withConfig =
ewmh fixSteam -- And workaround steam bug
$ Projects.modify -- Apply projects config $ Projects.modify -- Apply projects config
$ Keys.modify -- Apply keybindings config $ Keys.modify -- Apply keybindings config
$ Mouse.modify -- Apply mouse bindings config $ Mouse.modify -- Apply mouse bindings config