diff --git a/Makefile b/Makefile index 7853ce7d..ad7a0075 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,16 @@ -.PHONY: default test build lock +.PHONY: default debug test switch lock default: - sudo nixos-rebuild switch --flake . + sudo nixos-rebuild build --flake . + +debug: + sudo nixos-rebuild build --flake . --show-trace test: sudo nixos-rebuild test --flake . -build: - sudo nixos-rebuild build --flake . +switch: + sudo nixos-rebuild switch --flake . lock: nix flake lock --update-input nixpkgs --update-input home-manager diff --git a/flake.lock b/flake.lock index a12d8395..6904cffe 100644 --- a/flake.lock +++ b/flake.lock @@ -1,15 +1,92 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1687762428, + "narHash": "sha256-DIf7mi45PKo+s8dOYF+UlXHzE0Wl/+k3tXUyAoAnoGE=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "37dd7bb15791c86d55c5121740a1887ab55ee836", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -18,6 +95,64 @@ "type": "github" } }, + "haskell-flake": { + "locked": { + "lastModified": 1684780604, + "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "0.3.0", + "repo": "haskell-flake", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-parts": "flake-parts_3", + "haskell-flake": "haskell-flake", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1686721748, + "narHash": "sha256-ilD6ANYID+b0/+GTFbuZXfmu92bqVqY5ITKXSxqIp5A=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "7192b83935ab292a8e894db590dfd44f976e183b", + "type": "github" + }, + "original": { + "id": "hercules-ci-agent", + "type": "indirect" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "hercules-ci-agent": "hercules-ci-agent", + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1686830987, + "narHash": "sha256-1XLTM0lFr3NV+0rd55SQW/8oQ3ACnqlYcda3FelIwHU=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "04e4ab63b9eed2452edee1bb698827e1cb8265c6", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -82,29 +217,89 @@ "type": "github" } }, - "newm": { + "neovim-flake": { "inputs": { "flake-utils": "flake-utils", "nixpkgs": [ + "neovim-nightly-overlay", "nixpkgs" - ], - "pywmpkg": "pywmpkg" + ] }, "locked": { - "lastModified": 1685880078, - "narHash": "sha256-tvaeY5DjzgfXFtOzpEZqUziaixInJXgJk6MK0ExQG/I=", - "owner": "~atha", - "repo": "newm-atha", - "rev": "9c075588b7486df885eb85fbf2861498bedbdd39", - "type": "sourcehut" + "dir": "contrib", + "lastModified": 1688073254, + "narHash": "sha256-G7Mj+X8YwDr+PXUQ+j9N2zXRvBUk3xv87m85QJarM54=", + "owner": "neovim", + "repo": "neovim", + "rev": "8758c6fb875ff5446c0dff2166e9c3392c2c31d6", + "type": "github" }, "original": { - "owner": "~atha", - "repo": "newm-atha", - "type": "sourcehut" + "dir": "contrib", + "owner": "neovim", + "repo": "neovim", + "type": "github" + } + }, + "neovim-nightly-overlay": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-flake": "neovim-flake", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688083519, + "narHash": "sha256-KniAn96jd/RMlxvjSWEdmBH1ul21Covn9d2uXVVQtGI=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "a43c3d96d868c70e46c6d4e4f0d4bf08e4759e11", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "type": "github" } }, "nixpkgs": { + "locked": { + "lastModified": 1686501370, + "narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1685564631, + "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1687681650, "narHash": "sha256-M2If+gRcfpmaJy/XbfSsRzLlPpoU4nr0NHnKKl50fd8=", @@ -120,37 +315,12 @@ "type": "github" } }, - "pywmpkg": { - "inputs": { - "flake-utils": [ - "newm", - "flake-utils" - ], - "nixpkgs": [ - "newm", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1683389971, - "narHash": "sha256-HI4jkvH+CCxSTDFcJ0R69tV7dD34NMFklGFDStU3uHo=", - "owner": "~atha", - "repo": "pywm-atha", - "rev": "4bfa3c75ba6678aeed8b3b33b2c4f43453d4319a", - "type": "sourcehut" - }, - "original": { - "owner": "~atha", - "repo": "pywm-atha", - "type": "sourcehut" - } - }, "root": { "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", - "newm": "newm", - "nixpkgs": "nixpkgs", + "neovim-nightly-overlay": "neovim-nightly-overlay", + "nixpkgs": "nixpkgs_2", "wallpapers": "wallpapers" } }, diff --git a/flake.nix b/flake.nix index c78cb587..b3dafbb7 100644 --- a/flake.nix +++ b/flake.nix @@ -11,11 +11,11 @@ url = "github:hyprwm/Hyprland"; inputs.nixpkgs.follows = "nixpkgs"; }; - newm = { - url = "sourcehut:~atha/newm-atha"; + wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; + neovim-nightly-overlay = { + url = "github:nix-community/neovim-nightly-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; - wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; }; outputs = { @@ -23,6 +23,7 @@ home-manager, hyprland, wallpapers, + neovim-nightly-overlay, ... }: let home-config = { @@ -113,7 +114,11 @@ }; }; }; - waybar-experimental = final: prev: {waybar = prev.waybar.overrideAttrs (oldAttrs: {mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];});}; + waybar-experimental-overlay = final: prev: { + waybar = prev.waybar.overrideAttrs (old: { + mesonFlags = old.mesonFlags ++ ["-Dexperimental=true"]; + }); + }; in { nixosConfigurations = { Legion = nixpkgs.lib.nixosSystem { @@ -141,7 +146,7 @@ pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; - overlays = [waybar-experimental]; + overlays = [neovim-nightly-overlay.overlay]; }; modules = [ home-config @@ -149,7 +154,7 @@ ./hosts/Vanguard ./services/sshd ./services/syncthing/Vanguard.nix - { + ({pkgs, ...}: { home-manager.users.xenia = { imports = [./home/personal.nix]; home = { @@ -157,15 +162,16 @@ homeDirectory = "/home/xenia"; stateVersion = "22.11"; }; + programs.neovim.package = pkgs.neovim-nightly; }; - } + }) ]; }; Ronin = nixpkgs.lib.nixosSystem { pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; - overlays = [waybar-experimental]; + overlays = [waybar-experimental-overlay neovim-nightly-overlay.overlay]; }; modules = [ home-config @@ -187,6 +193,7 @@ stateVersion = "22.11"; packages = [laptop-state]; }; + programs.neovim.package = pkgs.neovim-nightly; wayland.windowManager.hyprland.extraConfig = '' source=./common.conf bindl=,switch:Lid Switch,exec,check-laptop-lid-state @@ -194,7 +201,6 @@ monitor = DP-3,1920x1200,1920x0,1.0 monitor = DP-4,1920x1080,3840x0,1.0,transform,1 - workspace = name:remote windowrule = workspace name:chat, teams-for-linux windowrule = workspace name:remote, Nxplayer.* bind = ALT, R, moveworkspacetomonitor, name:remote current @@ -205,18 +211,10 @@ programs.waybar.settings = { main = { "output" = "!DP-4"; - "wlr/workspaces"."format-icons"."remote" = "󰢹"; - }; - alt = { - "include" = [ - "~/.config/waybar/modules.json" - "~/.config/waybar/layout.json" - ]; - "output" = "DP-4"; - "wlr/workspaces"."format-icons"."remote" = "󰢹"; - "modules-left" = []; - "modules-center" = ["wlr/workspaces"]; - "modules-right" = []; + "wlr/workspaces" = { + "format-icons"."remote" = "󰢹"; + "persistent_workspaces"."remote" = []; + }; }; }; }; diff --git a/home/desktop/config/waybar/modules.json b/home/desktop/config/waybar/modules.json index d661dca7..88b44df2 100644 --- a/home/desktop/config/waybar/modules.json +++ b/home/desktop/config/waybar/modules.json @@ -169,8 +169,7 @@ "wlr/workspaces": { "on-click": "activate", "disable-scroll": true, - "all-outputs": false, - "sort-by-number": true, + "all-outputs": true, "format": "{icon}", "format-icons": { "dev": "󰅴", @@ -180,6 +179,14 @@ "urgent": "", "default": "" }, - "sort-by-number": true - }, + "persistent_workspaces": { + "dev": [], + "browser": [], + "files": [], + "chat": [] + }, + "sort-by-name": false, + "sort-by-coordinates": false, + "sort-by-number": false + } } diff --git a/home/desktop/hyprland.nix b/home/desktop/hyprland.nix index 8d61f0c6..2e3ce08d 100644 --- a/home/desktop/hyprland.nix +++ b/home/desktop/hyprland.nix @@ -107,11 +107,6 @@ bind = ALT SHIFT, K, movewindow, u bind = ALT SHIFT, J, movewindow, d - workspace = name:dev - workspace = name:browser - workspace = name:files - workspace = name:chat - windowrule = workspace name:browser, firefox windowrule = workspace name:files, thunar windowrule = workspace name:files, libreoffice.* @@ -140,8 +135,8 @@ bind = ALT SHIFT, C, moveworkspacetomonitor, name:chat current bind = ALT SHIFT, C, movetoworkspace, name:chat - bind = ALT, period, workspace, m+1 - bind = ALT, comma, workspace, m-1 + bind = ALT, period, workspace, e+1 + bind = ALT, comma, workspace, e-1 bind = ALT, bracketright, focusmonitor, +1 bind = ALT, bracketleft, focusmonitor, +1 diff --git a/home/gui/default.nix b/home/gui/default.nix index 9e567c1f..5f7d4eae 100644 --- a/home/gui/default.nix +++ b/home/gui/default.nix @@ -1,4 +1,4 @@ {pkgs, ...}: { imports = [./firefox.nix ./wezterm.nix]; - home.packages = with pkgs; [bitwarden otpclient signal-desktop fractal]; + home.packages = with pkgs; [neovide bitwarden otpclient signal-desktop fractal]; }