diff --git a/flake.lock b/flake.lock index af07ec3..b5ee9c7 100644 --- a/flake.lock +++ b/flake.lock @@ -30,11 +30,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1777989496, - "narHash": "sha256-5U5olo7p570rILIYsuuU9G10UQ+kEgaDOCekFIJKXoI=", + "lastModified": 1780363757, + "narHash": "sha256-yXJsM6uJv3n0gx6oDTMAjv32a7XIr0QyleuQ+gk1aBQ=", "owner": "crisidev", "repo": "bacon-ls", - "rev": "d3b084cec8d567023787d6fb1e7deac6f3a0e320", + "rev": "3f8d0a4181ec91ba16f60139865294751dbd8f68", "type": "github" }, "original": { @@ -107,11 +107,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1776651971, - "narHash": "sha256-yUp7P61fr7Q5VAtHdIJMM818opESP8Ldl6BujeXYap4=", + "lastModified": 1780486924, + "narHash": "sha256-vn11dxWyzAGLsBEVX1670IjhS+F2zO7mgcnu4Gqm6Xw=", "owner": "hanebox", "repo": "ekphos", - "rev": "4250850df2b489faa5bf78648547c071457f69f9", + "rev": "5acb1bf656e29c6d11262f3716c4185bde5ac40c", "type": "github" }, "original": { @@ -167,11 +167,11 @@ ] }, "locked": { - "lastModified": 1777988971, - "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "type": "github" }, "original": { @@ -284,11 +284,11 @@ ] }, "locked": { - "lastModified": 1778248595, - "narHash": "sha256-dhFgEjoeJMYN/7OY6xfxS799YB4IjbbYXTjyGIJyLpc=", + "lastModified": 1782522538, + "narHash": "sha256-CvOaUvJ+mXlxU3m2cPWKcOAhtKETsPUYhq+Xa5ewBp4=", "owner": "nix-community", "repo": "home-manager", - "rev": "fdb2ccba9d5e1238d32e0c4a3ec1a277efa80c1d", + "rev": "8d8a6cc50ddc60748791a14ee1163c865ec57635", "type": "github" }, "original": { @@ -389,11 +389,11 @@ ] }, "locked": { - "lastModified": 1778285091, - "narHash": "sha256-4YwkGkjvLD0EB7rQGCRA9J/zgwrnTL20dJd7Wmnicj0=", + "lastModified": 1782518679, + "narHash": "sha256-TqMXLdxosxaVyscYUn6+/+tFYopyurC5N77jQAv2VK8=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "cca2a2d1c03f763fdcd7066791363d792313c641", + "rev": "70164bb49461443b5f4e0d338b9aeb33084ac58f", "type": "github" }, "original": { @@ -405,11 +405,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1778266020, - "narHash": "sha256-qoydKalrn/QGsGYVRicz0Hzb7bfGmV7Z9CnVONXN/Lc=", + "lastModified": 1782516808, + "narHash": "sha256-goP8P6wKnJOhHoMxLOcEO3flbxAY9yga62nactMmDN0=", "owner": "neovim", "repo": "neovim", - "rev": "b7d8a41d91dcfebe9a5f3d0cf2f0bb0b8d59e32e", + "rev": "4de7038762e9fb082595b69156f29ef932f8790d", "type": "github" }, "original": { @@ -524,11 +524,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1777954456, - "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", + "lastModified": 1773389992, + "narHash": "sha256-wvfdLLWJ2I9oEpDd9PfMA8osfIZicoQ5MT1jIwNs9Tk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", + "rev": "c06b4ae3d6599a672a6210b7021d699c351eebda", "type": "github" }, "original": { @@ -556,11 +556,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1777954456, - "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", + "lastModified": 1782467914, + "narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", + "rev": "e73de5be04e0eff4190a1432b946d469c794e7b4", "type": "github" }, "original": { @@ -656,11 +656,11 @@ ] }, "locked": { - "lastModified": 1778296574, - "narHash": "sha256-DVmg1JCjG0VJTa+FF6tH6tkQChaxzK1EzPL98RiRWU0=", + "lastModified": 1782530211, + "narHash": "sha256-Zn5H2VVMaP79C+bvaUQD+SBXSKoTnURMZGiUrG00zII=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "1d634a90dffb59ec9ba52652de311b15528c1595", + "rev": "06ba695dfefc4afc513b49dfc41c4bf0dd2eaeb1", "type": "github" }, "original": { diff --git a/hosts/sachiel/configuration.nix b/hosts/sachiel/configuration.nix index 1babc2b..f7924c8 100644 --- a/hosts/sachiel/configuration.nix +++ b/hosts/sachiel/configuration.nix @@ -51,6 +51,7 @@ impermanence.enable = true; graphics = { wayland = true; + sway = true; }; boot = { enable = true; diff --git a/hosts/sachiel/home.nix b/hosts/sachiel/home.nix index 25ab020..6d1db9f 100644 --- a/hosts/sachiel/home.nix +++ b/hosts/sachiel/home.nix @@ -16,6 +16,7 @@ # inputs.nix-colors.homeManagerModules.default hm.git + hm.sway hm.jujutsu hm.re hm.shell diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 0616e01..2df1b17 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -2,6 +2,7 @@ # These should be stuff you would like to share with others, not your personal configurations. { # cli + sway = import ./desktop/sway/default.nix; git = import ./cli/git.nix; jujutsu = import ./cli/jujutsu.nix; re = import ./cli/re.nix; diff --git a/modules/home-manager/desktop/sway/default.nix b/modules/home-manager/desktop/sway/default.nix new file mode 100644 index 0000000..a4704bc --- /dev/null +++ b/modules/home-manager/desktop/sway/default.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.desktop.sway; +in { + options.desktop.sway = { + enable = + lib.mkEnableOption "Enable sway"; + + execOnce = lib.mkOption { + default = []; + example = '' + ["waybar", "discord"] + ''; + type = lib.types.listOf lib.types.str; + description = "List of extra programs to execute on launch"; + }; + xwayland.enable = lib.mkEnableOption "Enable xwayland"; + }; + + config = lib.mkIf cfg.enable { + wayland.windowManager.sway = { + enable = true; + xwayland.enable = lib.mkIf cfg.xwayland.enable true; + config = { + modifier = "SUPER"; + terminal = "${lib.getExe pkgs.wezterm}"; + }; + }; + }; +} diff --git a/modules/nixos/system/graphics/default.nix b/modules/nixos/system/graphics/default.nix index 75a7083..92ff74a 100644 --- a/modules/nixos/system/graphics/default.nix +++ b/modules/nixos/system/graphics/default.nix @@ -10,7 +10,6 @@ in { wayland = lib.mkEnableOption "Enable Wayland"; xwayland = lib.mkEnableOption "Enable Xwayland"; xorg = lib.mkEnableOption "Enable XOrg"; - hyprland = lib.mkEnableOption "Set to true if using Hyprland in home-manager"; sway = lib.mkEnableOption "Set to true if using Sway in home-manager"; }; @@ -22,11 +21,15 @@ in { this config does not support that"; } { - assertion = cfg.hyprland -> cfg.wayland; - message = "Please enable Wayland if you enable Hyprland"; + assertion = cfg.sway -> cfg.wayland; + message = "Please enable Wayland if you enable Sway"; } ]; + fonts.packages = with pkgs; [ + nerd-fonts.jetbrains-mono + ]; + # Wayland configuration programs.regreet = lib.mkIf cfg.wayland { enable = true; @@ -51,7 +54,7 @@ in { # Required for ReGreet lib.optionals cfg.wayland [adwaita-icon-theme cantarell-fonts mesa]; - programs.hyprland.enable = lib.mkIf cfg.hyprland true; + programs.sway.enable = lib.mkIf cfg.sway true; # create a home directory for greetd as sway needs a writeable place for cache etc. users.users.greeter.home = "/var/lib/greetd";