diff --git a/flake.lock b/flake.lock
index c3a4b4b..fd76813 100644
--- a/flake.lock
+++ b/flake.lock
@@ -27,7 +27,7 @@
"emacs": {
"inputs": {
"flake-utils": "flake-utils_2",
- "nixpkgs": "nixpkgs"
+ "nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1683221311,
@@ -87,11 +87,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1680392223,
- "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
+ "lastModified": 1683560683,
+ "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
+ "rev": "006c75898cf814ef9497252b022e91c946ba8e17",
"type": "github"
},
"original": {
@@ -105,11 +105,11 @@
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
- "lastModified": 1680392223,
- "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
+ "lastModified": 1683560683,
+ "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
+ "rev": "006c75898cf814ef9497252b022e91c946ba8e17",
"type": "github"
},
"original": {
@@ -168,11 +168,11 @@
},
"haskell-flake": {
"locked": {
- "lastModified": 1682714267,
- "narHash": "sha256-DsGj9AIKqKcWQQOuwbFU77rkehaICzISHhH7aezZ6OQ=",
+ "lastModified": 1684069239,
+ "narHash": "sha256-1nPdY5KasmGwwtuKv7OKCLCZC3wlAE+hJWwKZRBAluo=",
"owner": "srid",
"repo": "haskell-flake",
- "rev": "a904caac3e4638f84a28102762bf767dd1ae50c0",
+ "rev": "b8ccbf305e720e3483d7b983aeda61326169226a",
"type": "github"
},
"original": {
@@ -183,11 +183,11 @@
},
"haskell-flake_2": {
"locked": {
- "lastModified": 1682714267,
- "narHash": "sha256-DsGj9AIKqKcWQQOuwbFU77rkehaICzISHhH7aezZ6OQ=",
+ "lastModified": 1684069239,
+ "narHash": "sha256-1nPdY5KasmGwwtuKv7OKCLCZC3wlAE+hJWwKZRBAluo=",
"owner": "srid",
"repo": "haskell-flake",
- "rev": "a904caac3e4638f84a28102762bf767dd1ae50c0",
+ "rev": "b8ccbf305e720e3483d7b983aeda61326169226a",
"type": "github"
},
"original": {
@@ -217,82 +217,18 @@
"type": "github"
}
},
- "jade": {
- "flake": false,
- "locked": {
- "lastModified": 1683306042,
- "narHash": "sha256-ZZlSojpMVQPMG2iHX47g/vGdJclS67W52OYsI+wVilI=",
- "owner": "sajenim",
- "repo": "jade",
- "rev": "d1b6f87a064f5f6ee3d4c134caafb3d12acde08f",
- "type": "github"
- },
- "original": {
- "owner": "sajenim",
- "repo": "jade",
- "type": "github"
- }
- },
- "master": {
- "locked": {
- "lastModified": 1683302933,
- "narHash": "sha256-REz0CBw7tqIy/w1HBPWvzebHpEJEYbcf8tc0zg7qes4=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "36226e3b93c5e7db9110392fb0242ca95c331530",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "master",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
- "neovim-jsm": {
- "flake": false,
- "locked": {
- "lastModified": 1683595289,
- "narHash": "sha256-k4VPAFJ54Vf2v2jEV1v3F6MWnppHxXc7783pXHWHtFo=",
- "owner": "sajenim",
- "repo": "neovim-jsm",
- "rev": "7b97c46ba7fc6f100d397eaee2a2d40ab238c591",
- "type": "github"
- },
- "original": {
- "owner": "sajenim",
- "repo": "neovim-jsm",
- "type": "github"
- }
- },
- "nixos-unstable": {
- "locked": {
- "lastModified": 1683194677,
- "narHash": "sha256-Am7aCGNy/h6RMnvg7Pn4PHQXZZq9FyIUA9klYxBwyDI=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "0d8145a5d81ebf6698077b21042380a3a66a11c7",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "nixos-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"nixpkgs": {
"locked": {
- "lastModified": 1673540789,
- "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
- "owner": "NixOS",
+ "lastModified": 1683928319,
+ "narHash": "sha256-maz0DRKixJVcNRMiAMWlJniiF8IuQ+WbfmlJJ8D+jfM=",
+ "owner": "nixos",
"repo": "nixpkgs",
- "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
+ "rev": "9656e85a15a0fe67847ee8cdb99a20d8df499962",
"type": "github"
},
"original": {
- "owner": "NixOS",
- "ref": "nixos-unstable",
+ "owner": "nixos",
+ "ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
@@ -301,7 +237,7 @@
"inputs": {
"crane": "crane",
"emacs": "emacs",
- "nixpkgs": "nixpkgs_2",
+ "nixpkgs": "nixpkgs_3",
"nixpkgs-fmt": "nixpkgs-fmt",
"river-src": "river-src",
"wezterm-src": "wezterm-src"
@@ -346,11 +282,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
- "lastModified": 1680213900,
- "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
+ "lastModified": 1682879489,
+ "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
+ "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
"type": "github"
},
"original": {
@@ -364,11 +300,11 @@
"nixpkgs-lib_2": {
"locked": {
"dir": "lib",
- "lastModified": 1680213900,
- "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
+ "lastModified": 1682879489,
+ "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
+ "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
"type": "github"
},
"original": {
@@ -381,21 +317,37 @@
},
"nixpkgs-unstable": {
"locked": {
- "lastModified": 1683267615,
- "narHash": "sha256-A/zAy9YauwdPut90h6cYC1zgP/WmuW9zmJ+K/c5i6uc=",
+ "lastModified": 1684049129,
+ "narHash": "sha256-7WB9LpnPNAS8oI7hMoHeKLNhRX7k3CI9uWBRSfmOCCE=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "0b6445b611472740f02eae9015150c07c5373340",
+ "rev": "0470f36b02ef01d4f43c641bbf07020bcab71bf1",
"type": "github"
},
"original": {
"owner": "nixos",
- "ref": "nixpkgs-unstable",
+ "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
+ "locked": {
+ "lastModified": 1673540789,
+ "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
"locked": {
"lastModified": 1683250446,
"narHash": "sha256-poBkMQ0q7X2xH5hAqLYmsly0NGbC6zDCUnrwOXIxo50=",
@@ -411,13 +363,13 @@
"type": "github"
}
},
- "nixpkgs_3": {
+ "nixpkgs_4": {
"locked": {
- "lastModified": 1682779028,
- "narHash": "sha256-tFfSbwSLobpHRznAa35KEU3R+fsFWTlmpFhTUdXq8RE=",
+ "lastModified": 1684120848,
+ "narHash": "sha256-gIwJ5ac1FwZEkCRwjY+gLwgD4G1Bw3Xtr2jr2XihMPo=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "54abe781c482f51ff4ff534ebaba77db5bd97442",
+ "rev": "0cb867999eec4085e1c9ca61c09b72261fa63bb4",
"type": "github"
},
"original": {
@@ -427,13 +379,13 @@
"type": "github"
}
},
- "nixpkgs_4": {
+ "nixpkgs_5": {
"locked": {
- "lastModified": 1682779028,
- "narHash": "sha256-tFfSbwSLobpHRznAa35KEU3R+fsFWTlmpFhTUdXq8RE=",
+ "lastModified": 1684120848,
+ "narHash": "sha256-gIwJ5ac1FwZEkCRwjY+gLwgD4G1Bw3Xtr2jr2XihMPo=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "54abe781c482f51ff4ff534ebaba77db5bd97442",
+ "rev": "0cb867999eec4085e1c9ca61c09b72261fa63bb4",
"type": "github"
},
"original": {
@@ -464,18 +416,11 @@
"root": {
"inputs": {
"home-manager": "home-manager",
- "jade": "jade",
- "master": "master",
- "neovim-jsm": "neovim-jsm",
- "nixos-unstable": "nixos-unstable",
- "nixpkgs": [
- "nixos-unstable"
- ],
+ "nixpkgs": "nixpkgs",
"nixpkgs-f2k": "nixpkgs-f2k",
"nixpkgs-unstable": "nixpkgs-unstable",
- "stable": "stable",
- "xmobar-jsm": "xmobar-jsm",
- "xmonad-jsm": "xmonad-jsm"
+ "xmobar-config": "xmobar-config",
+ "xmonad-config": "xmonad-config"
}
},
"rust-analyzer-src": {
@@ -522,22 +467,6 @@
"type": "github"
}
},
- "stable": {
- "locked": {
- "lastModified": 1683207485,
- "narHash": "sha256-gs+PHt/y/XQB7S8+YyBLAM8LjgYpPZUVFQBwpFSmJro=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "cc45a3f8c98e1c33ca996e3504adefbf660a72d1",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "nixos-22.11",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -572,44 +501,38 @@
"url": "https://github.com/wez/wezterm.git"
}
},
- "xmobar-jsm": {
+ "xmobar-config": {
"inputs": {
"flake-parts": "flake-parts",
"haskell-flake": "haskell-flake",
- "nixpkgs": "nixpkgs_3"
- },
- "locked": {
- "lastModified": 1682990712,
- "narHash": "sha256-T50x69VeO/ZOF/FT4sY/sZ6tpILSv0wAhvnUwxtO/jA=",
- "owner": "sajenim",
- "repo": "xmobar-jsm",
- "rev": "29a52ad859b46eb8fdd08993c953a45c1cab1c93",
- "type": "github"
- },
- "original": {
- "owner": "sajenim",
- "repo": "xmobar-jsm",
- "type": "github"
- }
- },
- "xmonad-jsm": {
- "inputs": {
- "flake-parts": "flake-parts_2",
- "haskell-flake": "haskell-flake_2",
"nixpkgs": "nixpkgs_4"
},
"locked": {
- "lastModified": 1683305153,
- "narHash": "sha256-nDBJypiQMpeoch9DHNM23yLqhBWrcFkdL+zeIYks1bo=",
- "owner": "sajenim",
- "repo": "xmonad-jsm",
- "rev": "c461890b1d35d4e05acccacb1965cbaf45a415b8",
- "type": "github"
+ "lastModified": 1,
+ "narHash": "sha256-9yA3EWDaaAmIpotcyodU2TOU9hiKU6mGhx1CDmqab2o=",
+ "path": "home-manager/common/jade/xmobar/xmobar-config",
+ "type": "path"
},
"original": {
- "owner": "sajenim",
- "repo": "xmonad-jsm",
- "type": "github"
+ "path": "home-manager/common/jade/xmobar/xmobar-config",
+ "type": "path"
+ }
+ },
+ "xmonad-config": {
+ "inputs": {
+ "flake-parts": "flake-parts_2",
+ "haskell-flake": "haskell-flake_2",
+ "nixpkgs": "nixpkgs_5"
+ },
+ "locked": {
+ "lastModified": 1,
+ "narHash": "sha256-E4BkxlATBwtD2VV2R9RU27T7ih7NCvif/n50RV6mgiY=",
+ "path": "home-manager/common/jade/xmonad/xmonad-config",
+ "type": "path"
+ },
+ "original": {
+ "path": "home-manager/common/jade/xmonad/xmonad-config",
+ "type": "path"
}
}
},
diff --git a/flake.nix b/flake.nix
index b77178c..c8c5fbb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,40 +2,23 @@
description = "NixOS + Home Manager configuration with flakes";
inputs = {
- # Nixpkgs branches
- master.url = "github:nixos/nixpkgs/master";
- stable.url = "github:nixos/nixpkgs/nixos-22.11";
- nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
- nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
+ # Nixpkgs
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
+ # You can access packages and modules from different nixpkgs revs
+ # at the same time. Here's an working example:
+ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
+ # Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
# Home manager
home-manager.url = "github:nix-community/home-manager/master";
+ home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Add any other flake you might need
nixpkgs-f2k.url = "github:fortuneteller2k/nixpkgs-f2k";
- # My personal flakes
- xmonad-jsm.url = "github:sajenim/xmonad-jsm";
- # xmonad-jsm.url = "path:/home/sajenim/xmonad-jsm";
- xmobar-jsm.url = "github:sajenim/xmobar-jsm";
- # xmobar-jsm.url = "path:/home/sajenim/xmobar-jsm";
-
- # Github repos
- jade = {
- url = "github:sajenim/jade";
- # url = "path:/home/sajenim/Projects/jade";
- flake = false;
- };
-
- neovim-jsm = {
- url = "github:sajenim/neovim-jsm";
- # url = "path:/home/sajenim/Projects/neovim-jsm";
- flake = false;
- };
-
- # Default branch
- nixpkgs.follows = "nixos-unstable";
- home-manager.inputs.nixpkgs.follows = "nixpkgs";
+ # Developer environments
+ xmonad-config.url = "path:home-manager/common/jade/xmonad/xmonad-config";
+ xmobar-config.url = "path:home-manager/common/jade/xmobar/xmobar-config";
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
@@ -100,7 +83,7 @@
extraSpecialArgs = { inherit inputs outputs; };
modules = [
# > Our main home-manager configuration file <
- ./home-manager/sajenim.nix
+ ./home-manager/sajenim/home.nix
];
};
@@ -108,7 +91,7 @@
pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
- ./home-manager/admin.nix
+ ./home-manager/admin/home.nix
];
};
};
diff --git a/home-manager/admin.nix b/home-manager/admin/home.nix
similarity index 100%
rename from home-manager/admin.nix
rename to home-manager/admin/home.nix
diff --git a/home-manager/common/jade/default.nix b/home-manager/common/jade/default.nix
new file mode 100644
index 0000000..1fd7a1c
--- /dev/null
+++ b/home-manager/common/jade/default.nix
@@ -0,0 +1,30 @@
+{ inputs, pkgs, ... }:
+
+{
+ imports = [ ];
+
+ nixpkgs.overlays = [
+ (final: prev: {
+ xmobar = inputs.xmobar-config.packages.${pkgs.system}.xmobar-config;
+ })
+ ];
+
+ home.packages = with pkgs; [
+ dmenu
+ feh
+ unstable.wezterm
+ xmobar
+ ];
+
+ xsession.windowManager.xmonad = {
+ enable = true;
+ enableContribAndExtras = true;
+ config = ./xmonad/xmonad-config/src/xmonad.hs;
+ };
+
+ home.file.".xinitrc".source = ./xinitrc;
+
+ xdg.configFile = {
+ wezterm = { source = ./wezterm; recursive = true; };
+ };
+}
diff --git a/config/wezterm/colors/gruvbox_material_dark_hard.toml b/home-manager/common/jade/wezterm/colors/gruvbox_material_dark_hard.toml
similarity index 100%
rename from config/wezterm/colors/gruvbox_material_dark_hard.toml
rename to home-manager/common/jade/wezterm/colors/gruvbox_material_dark_hard.toml
diff --git a/config/wezterm/wezterm.lua b/home-manager/common/jade/wezterm/wezterm.lua
similarity index 100%
rename from config/wezterm/wezterm.lua
rename to home-manager/common/jade/wezterm/wezterm.lua
diff --git a/home-manager/common/jade/xinitrc b/home-manager/common/jade/xinitrc
new file mode 100644
index 0000000..b87c514
--- /dev/null
+++ b/home-manager/common/jade/xinitrc
@@ -0,0 +1,10 @@
+#/bin/bash
+
+# Setup our monitors
+xrandr --output HDMI-A-0 --mode 1920x1080 --output DisplayPort-0 --mode 2560x1440 --right-of HDMI-A-0
+
+# Apply our wallpaper
+feh --bg-scale /etc/nixos/assets/chinatown.png
+
+# Launch our window manager
+exec xmonad
diff --git a/home-manager/common/jade/xmobar/xmobar-config/flake.lock b/home-manager/common/jade/xmobar/xmobar-config/flake.lock
new file mode 100644
index 0000000..e9476dc
--- /dev/null
+++ b/home-manager/common/jade/xmobar/xmobar-config/flake.lock
@@ -0,0 +1,80 @@
+{
+ "nodes": {
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": "nixpkgs-lib"
+ },
+ "locked": {
+ "lastModified": 1683560683,
+ "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "006c75898cf814ef9497252b022e91c946ba8e17",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "haskell-flake": {
+ "locked": {
+ "lastModified": 1684069239,
+ "narHash": "sha256-1nPdY5KasmGwwtuKv7OKCLCZC3wlAE+hJWwKZRBAluo=",
+ "owner": "srid",
+ "repo": "haskell-flake",
+ "rev": "b8ccbf305e720e3483d7b983aeda61326169226a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "srid",
+ "repo": "haskell-flake",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1684120848,
+ "narHash": "sha256-gIwJ5ac1FwZEkCRwjY+gLwgD4G1Bw3Xtr2jr2XihMPo=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "0cb867999eec4085e1c9ca61c09b72261fa63bb4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-lib": {
+ "locked": {
+ "dir": "lib",
+ "lastModified": 1682879489,
+ "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
+ "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/jade/xmobar/xmobar-config/flake.nix b/home-manager/common/jade/xmobar/xmobar-config/flake.nix
new file mode 100644
index 0000000..933070c
--- /dev/null
+++ b/home-manager/common/jade/xmobar/xmobar-config/flake.nix
@@ -0,0 +1,46 @@
+{
+ 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/home-manager/common/jade/xmobar/xmobar-config/src/xmobar-top.hs b/home-manager/common/jade/xmobar/xmobar-config/src/xmobar-top.hs
new file mode 100644
index 0000000..64424fa
--- /dev/null
+++ b/home-manager/common/jade/xmobar/xmobar-config/src/xmobar-top.hs
@@ -0,0 +1,47 @@
+import Xmobar
+
+-- | Configuration
+config :: Config
+config = defaultConfig
+ -- general settings
+ { font = "Fira Code Semi Bold 9"
+ , additionalFonts = [ "Symbols Nerd Font 2048-em 24" ]
+ , bgColor = bg1
+ , fgColor = fg0
+ , position = Static { xpos = 1920, ypos = 0, width = 2560, height = 24 }
+ -- commands to run
+ , commands =
+ [ Run $ XPropertyLog "_XMONAD_LOG_1"
+ , Run $ Com "uname" ["-r","-s"] "" 0
+ , Run $ Date "%a %b %_d %Y %H:%M:%S" "date" 10
+ , Run $ Weather "YPJT"
+ [ "-t", "Temp: C | Wind: km/h | Humidity: %" ]
+ 18000
+ ]
+ -- format our bar
+ , sepChar = "%"
+ , alignSep = "}{"
+ , template = "\59255 %uname% |%_XMONAD_LOG_1%}{%YPJT% | %date%"
+ }
+
+-- | Gruvbox material
+bg0, bg1, fg0, fg1, red, orange, yellow, green, aqua, blue, purple :: String
+-- backgrounds
+bg0 = "#1d2021"
+bg1 = "#282828"
+-- foregrounds
+fg0 = "#d4be98"
+fg1 = "#ddc7a1"
+-- greys
+grey0 = "#7c6f64"
+-- colors
+red = "#ea6962"
+orange = "#e78a4e"
+yellow = "#d8a658"
+green = "#a9b665"
+aqua = "#89b482"
+blue = "#7daea3"
+purple = "#d3869b"
+
+main :: IO ()
+main = configFromArgs config >>= xmobar
diff --git a/home-manager/common/jade/xmobar/xmobar-config/xmobar-config.cabal b/home-manager/common/jade/xmobar/xmobar-config/xmobar-config.cabal
new file mode 100644
index 0000000..b1ec891
--- /dev/null
+++ b/home-manager/common/jade/xmobar/xmobar-config/xmobar-config.cabal
@@ -0,0 +1,18 @@
+cabal-version: 3.0
+name: xmobar-config
+version: 0.1.0.0
+synopsis: A Minimalistic Text Based Status Bar
+description: my xmobar configuration
+license: BSD-3-Clause
+author: sajenim
+maintainer: its.jassy@pm.me
+build-type: Simple
+
+executable xmobar-top
+ main-is: xmobar-top.hs
+ hs-source-dirs: src
+ ghc-options: -Wall -threaded
+ build-depends: base,
+ xmobar
+ default-language: Haskell2010
+
diff --git a/home-manager/common/jade/xmonad/xmonad-config/flake.lock b/home-manager/common/jade/xmonad/xmonad-config/flake.lock
new file mode 100644
index 0000000..e9476dc
--- /dev/null
+++ b/home-manager/common/jade/xmonad/xmonad-config/flake.lock
@@ -0,0 +1,80 @@
+{
+ "nodes": {
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": "nixpkgs-lib"
+ },
+ "locked": {
+ "lastModified": 1683560683,
+ "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "006c75898cf814ef9497252b022e91c946ba8e17",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "haskell-flake": {
+ "locked": {
+ "lastModified": 1684069239,
+ "narHash": "sha256-1nPdY5KasmGwwtuKv7OKCLCZC3wlAE+hJWwKZRBAluo=",
+ "owner": "srid",
+ "repo": "haskell-flake",
+ "rev": "b8ccbf305e720e3483d7b983aeda61326169226a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "srid",
+ "repo": "haskell-flake",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1684120848,
+ "narHash": "sha256-gIwJ5ac1FwZEkCRwjY+gLwgD4G1Bw3Xtr2jr2XihMPo=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "0cb867999eec4085e1c9ca61c09b72261fa63bb4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-lib": {
+ "locked": {
+ "dir": "lib",
+ "lastModified": 1682879489,
+ "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0",
+ "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/jade/xmonad/xmonad-config/flake.nix b/home-manager/common/jade/xmonad/xmonad-config/flake.nix
new file mode 100644
index 0000000..982fedc
--- /dev/null
+++ b/home-manager/common/jade/xmonad/xmonad-config/flake.nix
@@ -0,0 +1,46 @@
+{
+ 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.xmonad-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.xmonad-config;
+ };
+ };
+}
diff --git a/home-manager/common/jade/xmonad/xmonad-config/src/xmonad.hs b/home-manager/common/jade/xmonad/xmonad-config/src/xmonad.hs
new file mode 100644
index 0000000..0fad621
--- /dev/null
+++ b/home-manager/common/jade/xmonad/xmonad-config/src/xmonad.hs
@@ -0,0 +1,154 @@
+-- Base
+import XMonad
+import System.Exit
+import qualified XMonad.StackSet as W
+
+-- Actions
+import XMonad.Actions.CycleWS
+
+-- Hooks
+import XMonad.Hooks.EwmhDesktops
+
+-- Layouts
+import XMonad.Layout.ThreeColumns
+
+-- Layout modifiers
+import XMonad.Layout.Spacing
+import XMonad.Layout.Renamed
+import XMonad.Layout.NoBorders
+
+-- Utilities
+import XMonad.Util.EZConfig (additionalKeysP)
+
+-- xmobar dependencies
+import XMonad.Hooks.DynamicLog
+import XMonad.Hooks.StatusBar
+import XMonad.Hooks.StatusBar.PP
+import XMonad.Util.Loggers
+
+-- | Configuration
+myTerminal = "wezterm"
+myModMask = mod4Mask
+myBorderWidth = 5
+myNormalBorderColor = "#282828"
+myFocusedBorderColor = "#282828"
+myWorkspaces = ["code", "chat", "web", "games", "misc"]
+
+-- | Keybindings
+myKeys =
+ -- launching and killing programs
+ [ ("M-n" , spawn myTerminal ) -- %! Launch terminal
+ , ("M-e" , spawn "dmenu_run" ) -- %! Launch dmenu
+ , ("M-C-w" , kill ) -- %! Close the focused window
+ -- layouts
+ , ("M-" , sendMessage NextLayout ) -- %! Rotate through the available layout algorithms
+ -- move focus up or down the window stack
+ , ("M-" , windows W.focusDown ) -- %! Move focus to the next window
+ , ("M-" , windows W.focusUp ) -- %! Move focus to the previous window
+ , ("M-" , windows W.focusMaster ) -- %! Move focus to the master window
+ -- modifying the window order
+ , ("M-S-" , windows W.swapDown ) -- %! Swap the focused window with the next window
+ , ("M-S-" , windows W.swapUp ) -- %! Swap the focused window with the previous window
+ , ("M-S-" , windows W.swapMaster ) -- %! Swap the focused window with the master window
+ -- resizing the master/slave ratio
+ , ("M-" , sendMessage Expand ) -- %! Expand the master area
+ , ("M-" , sendMessage Shrink ) -- %! Shrink the master area
+ -- number of windows in the master area
+ , ("M-S-" , sendMessage (IncMasterN 1) ) -- %! Increase the number of windows in the master area
+ , ("M-S-", sendMessage (IncMasterN (-1)) ) -- %! Decrease the number of windows in the master area
+ -- floating layer support
+ , ("M-t" , withFocused $ windows . W.sink ) -- %! Push window back into tiling
+ -- workspace navigation
+ , ("M-" , moveTo Next hiddenWS ) -- %! Move focus to the next hidden workspace
+ , ("M-" , moveTo Prev hiddenWS ) -- %! Move focus to the previous hidden workspace
+ -- move window to workspace
+ , ("M-S-" , shiftTo Next hiddenWS ) -- %! Move focused window to the next hidden workspace
+ , ("M-S-" , nextScreen ) -- %! Move focus to the next screen
+ , ("M-" , prevScreen ) -- %! Move focus to the previous screen
+ -- move windows between screens
+ , ("M-S-" , shiftNextScreen ) -- %! Move focused window to the next screen
+ , ("M-S-" , shiftPrevScreen ) -- %! Move focused window to the previous screen
+ -- quit, or restart
+ , ("M-S-q" , io exitSuccess ) -- %! Quit xmonad
+ ]
+
+-- | Layouts
+myLayout = tiled ||| threeCol ||| full
+ where
+ -- Add a configurable amount of space around windows.
+ gaps = spacingRaw False (Border 50 50 50 50) True (Border 10 10 10 10) True
+ -- Our layouts
+ tiled = renamed [Replace "Spacing Tiled"] . gaps $ Tall nmaster delta ratio
+ threeCol = renamed [Replace "Spacing Three Column"] . gaps $ ThreeColMid nmaster delta ratio
+ full = renamed [Replace "Fullscreen"] $ noBorders Full
+ -- Layout settings
+ nmaster = 1 -- Default number of windows in the master pane
+ ratio = 1/2 -- Default proportion of screen occupied by master pane
+ delta = 3/100 -- Percent of screen to increment by when resizing panes
+
+-- | Xmobar
+xmobarTop = statusBarPropTo "_XMONAD_LOG_1" "xmobar-top" (pure ppTop)
+
+ppTop :: PP
+ppTop = def
+ { ppSep = grey0 " | "
+ , ppTitleSanitize = xmobarStrip
+ -- workspace labels
+ , ppCurrent = purple . wrap " " ""
+ , ppVisible = blue . wrap " " ""
+ , ppHidden = grey0 . wrap " " ""
+ , ppHiddenNoWindows = grey0 . wrap " " ""
+ , ppUrgent = red . wrap " " ""
+ -- misc
+ , ppOrder = \[ws, l, _, wins] -> [ws, l, wins]
+ , ppExtras = [logTitles formatFocused formatUnfocused]
+ }
+ where
+ formatFocused = wrap (grey0 "") (grey0 " ") . purple . ppWindow
+ formatUnfocused = wrap (grey0 "") (grey0 " ") . blue . ppWindow
+
+ -- | Windows should have *some* title, which should not not exceed a
+ -- sane length.
+ ppWindow :: String -> String
+ ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30
+
+ -- | Gruvbox material
+ bg0, bg1, fg0, fg1, red, orange, yellow, green, aqua, blue, purple :: String -> String
+ -- backgrounds
+ bg0 = xmobarColor "#1d2021" ""
+ bg1 = xmobarColor "#282828" ""
+ -- foregrounds
+ fg0 = xmobarColor "#d4be98" ""
+ fg1 = xmobarColor "#ddc7a1" ""
+ -- greys
+ grey0 = xmobarColor "#7c6f64" ""
+ -- colors
+ red = xmobarColor "#ea6962" ""
+ orange = xmobarColor "#e78a4e" ""
+ yellow = xmobarColor "#d8a658" ""
+ green = xmobarColor "#a9b665" ""
+ aqua = xmobarColor "#89b482" ""
+ blue = xmobarColor "#7daea3" ""
+ purple = xmobarColor "#d3869b" ""
+
+-- | The main function
+main :: IO ()
+main = xmonad
+ . ewmhFullscreen
+ . ewmh
+ . withEasySB (xmobarTop) defToggleStrutsKey
+ $ myConfig
+
+myConfig = def
+ { modMask = myModMask
+ , layoutHook = myLayout
+ , terminal = myTerminal
+ , borderWidth = myBorderWidth
+ , normalBorderColor = myNormalBorderColor
+ , focusedBorderColor = myFocusedBorderColor
+ , workspaces = myWorkspaces
+ } `additionalKeysP` myKeys
+
+
diff --git a/home-manager/common/jade/xmonad/xmonad-config/xmonad-config.cabal b/home-manager/common/jade/xmonad/xmonad-config/xmonad-config.cabal
new file mode 100644
index 0000000..761c788
--- /dev/null
+++ b/home-manager/common/jade/xmonad/xmonad-config/xmonad-config.cabal
@@ -0,0 +1,19 @@
+cabal-version: 3.0
+name: xmonad-config
+version: 0.1.0.0
+synopsis: A tiling window manager
+description: my xmonad configuration
+license: BSD-3-Clause
+author: sajenim
+maintainer: its.jassy@pm.me
+build-type: Simple
+
+executable xmonad-config
+ main-is: xmonad.hs
+ hs-source-dirs: src
+ ghc-options: -Wall
+ build-depends: base,
+ xmonad,
+ xmonad-contrib
+ default-language: Haskell2010
+
diff --git a/home-manager/programs/git.nix b/home-manager/common/programs/git/default.nix
similarity index 100%
rename from home-manager/programs/git.nix
rename to home-manager/common/programs/git/default.nix
diff --git a/home-manager/common/programs/nvim/config/init.lua b/home-manager/common/programs/nvim/config/init.lua
new file mode 100644
index 0000000..d5244d9
--- /dev/null
+++ b/home-manager/common/programs/nvim/config/init.lua
@@ -0,0 +1,86 @@
+--
+-- Vim Options
+--
+
+-- Disable vim's built in file explorer
+vim.g.loaded_netrw = 1
+vim.g.loaded_netrwPlugin = 1
+
+-- {{{ General Configuration
+vim.opt.termguicolors = true -- set termguicolors to enable highlight groups
+vim.opt.number = true -- print line numbers
+vim.opt.showmode = false -- if in insert, replace or visual mode put a message on the last line
+vim.opt.swapfile = false -- disable swap file
+vim.opt.clipboard = 'unnamedplus' -- use the system clipboard as the default register
+-- }}}
+
+-- {{{ Spaces & Tabs
+vim.opt.tabstop = 2 -- number of visual spaces per TAB
+vim.opt.softtabstop = 2 -- number of spaces in tab when editing
+vim.opt.shiftwidth = 2 -- number of spaces to use for autoindent
+vim.opt.expandtab = true -- tabs are space
+vim.opt.autoindent = true
+vim.opt.copyindent = true -- copy indent from the previous line
+-- }}}
+
+-- {{{ Keybinds
+vim.g.mapleader = ' '
+
+local opts = { noremap = true, silent = true }
+local map = vim.api.nvim_set_keymap
+
+
+map('n', 't', ':NvimTreeToggle', opts)
+-- }}}
+
+--
+-- Gruvbox Material
+--
+
+-- For dark version
+vim.opt.background = 'dark'
+
+-- Set contrast
+vim.g.gruvbox_material_background = 'hard'
+
+-- For better performance
+vim.g.gruvbox_material_better_performance = 0
+
+-- To disable italic in `Comment`, set this option to `1`
+vim.g.gruvbox_material_disable_italic_comment = 1
+
+-- To enable bold in function name just like the original gruvbox, set this option to `1`
+vim.g.gruvbox_material_enable_bold = 0
+
+-- To enable italic in this color scheme, set this option to `1`
+vim.g.gruvbox_material_enable_italic = 1
+
+-- Set the colorscheme
+vim.cmd [[colorscheme gruvbox-material]]
+
+
+--
+-- Load and run our libraries
+--
+
+-- load defaults
+require('nvim-tree').setup()
+require('Comment').setup()
+require('gitsigns').setup()
+
+-- user
+require('user.lspconfig')
+require('user.nvim-cmp')
+require('user.lualine')
+
+-- user.config
+require('user.config.server_configurations')
+
+
+-- Enable syntax highlighting
+require('nvim-treesitter.configs').setup {
+ highlight = {
+ enable = true,
+ }
+}
+
diff --git a/home-manager/common/programs/nvim/config/lua/user/config/server_configurations.lua b/home-manager/common/programs/nvim/config/lua/user/config/server_configurations.lua
new file mode 100644
index 0000000..2784de0
--- /dev/null
+++ b/home-manager/common/programs/nvim/config/lua/user/config/server_configurations.lua
@@ -0,0 +1,33 @@
+-- Setup language servers
+require'lspconfig'.clangd.setup{}
+require'lspconfig'.nil_ls.setup{}
+
+-- haskell-language-server
+require'lspconfig'.hls.setup {
+ filetypes = { 'haskell', 'lhaskell', 'cabal' },
+}
+
+-- lua-language-server
+require'lspconfig'.lua_ls.setup {
+ settings = {
+ Lua = {
+ runtime = {
+ -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
+ version = 'LuaJIT',
+ },
+ diagnostics = {
+ -- Get the language server to recognize the `vim` global
+ globals = {'vim'},
+ },
+ workspace = {
+ -- Make the server aware of Neovim runtime files
+ library = vim.api.nvim_get_runtime_file("", true),
+ checkThirdParty = false,
+ },
+ -- Do not send telemetry data containing a randomized but unique identifier
+ telemetry = {
+ enable = false,
+ },
+ },
+ },
+}
diff --git a/home-manager/common/programs/nvim/config/lua/user/lspconfig.lua b/home-manager/common/programs/nvim/config/lua/user/lspconfig.lua
new file mode 100644
index 0000000..e278cc1
--- /dev/null
+++ b/home-manager/common/programs/nvim/config/lua/user/lspconfig.lua
@@ -0,0 +1,40 @@
+-- Global mappings.
+-- See `:help vim.diagnostic.*` for documentation on any of the below functions
+vim.keymap.set('n', 'de', vim.diagnostic.enable)
+vim.keymap.set('n', 'dd', vim.diagnostic.disable)
+vim.keymap.set('n', 'e', vim.diagnostic.open_float)
+vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
+vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
+vim.keymap.set('n', 'q', vim.diagnostic.setloclist)
+
+-- Use LspAttach autocommand to only map the following keys
+-- after the language server attaches to the current buffer
+vim.api.nvim_create_autocmd('LspAttach', {
+ group = vim.api.nvim_create_augroup('UserLspConfig', {}),
+ callback = function(ev)
+ -- Enable completion triggered by
+ vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
+
+ -- Buffer local mappings.
+ -- See `:help vim.lsp.*` for documentation on any of the below functions
+ local opts = { buffer = ev.buf }
+ vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
+ vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
+ vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
+ vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
+ vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts)
+ vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts)
+ vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts)
+ vim.keymap.set('n', 'wl', function()
+ print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
+ end, opts)
+ vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts)
+ vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts)
+ vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, opts)
+ vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
+ vim.keymap.set('n', 'f', function()
+ vim.lsp.buf.format { async = true }
+ end, opts)
+ end,
+})
+
diff --git a/home-manager/common/programs/nvim/config/lua/user/lualine.lua b/home-manager/common/programs/nvim/config/lua/user/lualine.lua
new file mode 100644
index 0000000..f7a8817
--- /dev/null
+++ b/home-manager/common/programs/nvim/config/lua/user/lualine.lua
@@ -0,0 +1,87 @@
+-- Use external source for diff
+local function diff_source()
+ local gitsigns = vim.b.gitsigns_status_dict
+ if gitsigns then
+ return {
+ added = gitsigns.added,
+ modified = gitsigns.changed,
+ removed = gitsigns.removed
+ }
+ end
+end
+
+-- Configure the statusline
+require('lualine').setup {
+ options = {
+ -- Set our theme and icon status
+ icons_enabled = true,
+ theme = 'gruvbox-material',
+
+ -- Define our seperators
+ component_separators = { left = '', right = ''},
+ section_separators = { left = '', right = ''},
+
+ -- Disable some filetypes
+ disabled_filetypes = {
+ statusline = {},
+ winbar = {},
+ },
+
+ -- If current filetype in in this list it'll
+ -- always be drawn as inactive statusline
+ ignore_focus = {},
+
+ -- When set to true, left sections i.e. 'a','b' and 'c'
+ -- can't take over the entire statusline even
+ -- if neither of 'x', 'y' or 'z' are present.
+ always_divide_middle = true,
+
+ -- enable global statusline (have a single statusline
+ -- at bottom of neovim instead of one for every window).
+ globalstatus = true,
+
+ -- sets how often lualine should refreash it's contents (in ms)
+ refresh = {
+ statusline = 1000,
+ tabline = 1000,
+ winbar = 1000,
+ }
+ },
+
+ -- Setup our active statusline components
+ sections = {
+ lualine_a = {'mode'},
+ lualine_b = { {'FugitiveHead', icon = ''}, {'diff', source = diff_source}, 'diagnostics'},
+ lualine_c = {'filename'},
+ lualine_x = {'encoding', 'fileformat', 'filetype'},
+ lualine_y = {'progress'},
+ lualine_z = {'location'}
+ },
+
+ -- Setup our inactive statusline components
+ inactive_sections = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = {'filename'},
+ lualine_x = {'location'},
+ lualine_y = {},
+ lualine_z = {}
+ },
+
+ -- Setup our tabline components
+ tabline = {
+ lualine_a = {'buffers'},
+ lualine_b = {'searchcount'},
+ lualine_c = {},
+ lualine_x = {},
+ lualine_y = {},
+ lualine_z = {'tabs'}
+ },
+
+ -- Setup our winbar components
+ winbar = {},
+ inactive_winbar = {},
+
+ -- Load our extensions
+ extensions = {'fugitive', 'nvim-tree'}
+}
diff --git a/home-manager/common/programs/nvim/config/lua/user/nvim-cmp.lua b/home-manager/common/programs/nvim/config/lua/user/nvim-cmp.lua
new file mode 100644
index 0000000..56cba65
--- /dev/null
+++ b/home-manager/common/programs/nvim/config/lua/user/nvim-cmp.lua
@@ -0,0 +1,60 @@
+-- Add additional capabilities supported by nvim-cmp
+local capabilities = require("cmp_nvim_lsp").default_capabilities()
+
+local lspconfig = require('lspconfig')
+
+-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
+local servers = { 'clangd', 'lua_ls', 'nil_ls' }
+for _, lsp in ipairs(servers) do
+ lspconfig[lsp].setup {
+ -- on_attach = my_custom_on_attach,
+ capabilities = capabilities,
+ }
+end
+
+-- luasnip setup
+local luasnip = require 'luasnip'
+
+-- nvim-cmp setup
+local cmp = require 'cmp'
+cmp.setup {
+ snippet = {
+ expand = function(args)
+ luasnip.lsp_expand(args.body)
+ end,
+ },
+ mapping = cmp.mapping.preset.insert({
+ [""] = cmp.mapping.abort(),
+ [''] = cmp.mapping.scroll_docs(-4), -- Up
+ [''] = cmp.mapping.scroll_docs(4), -- Down
+ -- C-b (back) C-f (forward) for snippet placeholder navigation.
+ [''] = cmp.mapping.complete(),
+ [''] = cmp.mapping.confirm {
+ behavior = cmp.ConfirmBehavior.Replace,
+ select = true,
+ },
+ [''] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_next_item()
+ elseif luasnip.expand_or_jumpable() then
+ luasnip.expand_or_jump()
+ else
+ fallback()
+ end
+ end, { 'i', 's' }),
+ [''] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_prev_item()
+ elseif luasnip.jumpable(-1) then
+ luasnip.jump(-1)
+ else
+ fallback()
+ end
+ end, { 'i', 's' }),
+ }),
+ sources = {
+ { name = 'nvim_lsp' },
+ { name = 'luasnip' },
+ },
+}
+
diff --git a/home-manager/common/programs/nvim/default.nix b/home-manager/common/programs/nvim/default.nix
new file mode 100644
index 0000000..9c38211
--- /dev/null
+++ b/home-manager/common/programs/nvim/default.nix
@@ -0,0 +1,58 @@
+{ inputs, outputs, lib, config, pkgs, ... }:
+
+{
+
+ home.packages = with pkgs; [
+ # Language servers
+ clang-tools # C, C++, Objective C/C++, OpenCL, CUDA, and RenderScript
+ haskell-language-server # Haskell
+ # lua-language-server # Lua
+ nil # Nix
+ ];
+
+ programs.neovim = {
+ enable = true;
+ package = pkgs.neovim-unwrapped;
+ plugins = with pkgs.vimPlugins; [
+ # Install all grammar packages
+ # nvim-treesitter.withAllGrammars
+
+ # Or specific grammar packages only
+ (nvim-treesitter.withPlugins (p: [
+ p.c
+ p.lua
+ p.nix
+ ]))
+
+ # Quality of Life Enhancements
+ comment-nvim # Smart and powerful commenting
+
+ # User Interface
+ gruvbox-material # Theme
+ dashboard-nvim # Start screen
+ nvim-tree-lua # File explorer
+ lualine-nvim # Statusline
+
+ # Git Integration
+ vim-fugitive # Call any arbitary git command
+ gitsigns-nvim # Git decorations
+
+ # Autocompletion
+ nvim-lspconfig # Collection of configurations for built-in LSP client
+ nvim-cmp # Autocompletion plugin
+ cmp-nvim-lsp # LSP source for nvim-cmp
+ cmp_luasnip # Snippets source for nvim-cmp
+ luasnip # Snippets plugin
+
+ # Misc
+ vim-shellcheck # Static analysis tool for shell scripts
+ markdown-preview-nvim # Preview markdown in browser
+
+ # Dependencies
+ nvim-web-devicons # Provides icons
+ ];
+ };
+
+ xdg.configFile.nvim = { source = ./config; recursive = true; };
+
+}
diff --git a/home-manager/programs/zsh.nix b/home-manager/common/programs/zsh/default.nix
similarity index 100%
rename from home-manager/programs/zsh.nix
rename to home-manager/common/programs/zsh/default.nix
diff --git a/home-manager/sajenim.nix b/home-manager/sajenim/home.nix
similarity index 82%
rename from home-manager/sajenim.nix
rename to home-manager/sajenim/home.nix
index aa41639..551e88e 100644
--- a/home-manager/sajenim.nix
+++ b/home-manager/sajenim/home.nix
@@ -12,15 +12,15 @@
# You can also split up your configuration and import pieces of it here:
- # Configurations
- "${inputs.jade}/default.nix"
- "${inputs.neovim-jsm}/default.nix"
+ # User programs
+ ./programs/discocss
+ ./programs/mangohud
- # Programs
- ./programs/discocss.nix
- ./programs/git.nix
- ./programs/mangohud.nix
- ./programs/zsh.nix
+ # Common programs
+ ../common/jade
+ ../common/programs/git
+ ../common/programs/zsh
+ ../common/programs/nvim
];
nixpkgs = {
@@ -65,16 +65,10 @@
packages = with pkgs; [
discord
spotify
- # prismlauncher https://github.com/NixOS/nixpkgs/issues/229358
- wezterm
+ prismlauncher
];
};
- # Copy user configuration
- xdg.configFile = {
- wezterm = { source = ../config/wezterm; recursive = true; };
- };
-
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
diff --git a/home-manager/programs/discocss.nix b/home-manager/sajenim/programs/discocss/default.nix
similarity index 100%
rename from home-manager/programs/discocss.nix
rename to home-manager/sajenim/programs/discocss/default.nix
diff --git a/home-manager/programs/mangohud.nix b/home-manager/sajenim/programs/mangohud/default.nix
similarity index 100%
rename from home-manager/programs/mangohud.nix
rename to home-manager/sajenim/programs/mangohud/default.nix
diff --git a/home-manager/services/picom.nix b/home-manager/sajenim/services/picom.nix
similarity index 100%
rename from home-manager/services/picom.nix
rename to home-manager/sajenim/services/picom.nix
diff --git a/nixos/fuchsia/configuration.nix b/nixos/fuchsia/configuration.nix
index ad587ed..6ce6ed8 100644
--- a/nixos/fuchsia/configuration.nix
+++ b/nixos/fuchsia/configuration.nix
@@ -110,7 +110,7 @@
domain = "kanto.dev";
# Connect to networks
networkmanager.enable = true;
- # Setup our firewall
+ # Open ports in the firewall.
firewall = {
enable = true;
allowedTCPPorts = [ ];