From c04d34ab44a1bd2b0118736d4a9a796f1c700eb2 Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Sun, 2 Jun 2024 14:38:57 +0200 Subject: sway: init module This inits both the nixos and the home-manager module --- hm/default.nix | 2 +- hm/sway/default.nix | 7 ------- modules/hm/sils/default.nix | 1 + modules/hm/sils/sway.nix | 16 ++++++++++++++++ modules/nixos/sils/default.nix | 1 + modules/nixos/sils/roles.nix | 1 + modules/nixos/sils/sway.nix | 15 +++++++++++++++ sys/default.nix | 1 - sys/desktop/sway/default.nix | 6 ------ 9 files changed, 35 insertions(+), 15 deletions(-) delete mode 100644 hm/sway/default.nix create mode 100644 modules/hm/sils/sway.nix create mode 100644 modules/nixos/sils/sway.nix delete mode 100644 sys/desktop/sway/default.nix diff --git a/hm/default.nix b/hm/default.nix index 4a0e255..7d6e482 100644 --- a/hm/default.nix +++ b/hm/default.nix @@ -9,7 +9,6 @@ ./packages ./rofi ./ssh - ./sway ./swayidle ./swaylock ./swayosd @@ -37,6 +36,7 @@ jameica.enable = true; kdeconnect.enable = true; mail.enable = true; + sway.enable = true; zathura.enable = true; }; programs.home-manager.enable = true; diff --git a/hm/sway/default.nix b/hm/sway/default.nix deleted file mode 100644 index 794c681..0000000 --- a/hm/sway/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{...}: { - wayland.windowManager.sway = { - enable = true; - config = { - }; - }; -} diff --git a/modules/hm/sils/default.nix b/modules/hm/sils/default.nix index cef49ac..6a2b43c 100644 --- a/modules/hm/sils/default.nix +++ b/modules/hm/sils/default.nix @@ -10,6 +10,7 @@ ./jameica.nix ./kdeconnect.nix ./mail.nix + ./sway.nix ./zathura.nix ]; } diff --git a/modules/hm/sils/sway.nix b/modules/hm/sils/sway.nix new file mode 100644 index 0000000..4298dd0 --- /dev/null +++ b/modules/hm/sils/sway.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + ... +}: let + cfg = config.sils.sway; +in { + options.sils.sway.enable = lib.mkEnableOption "sway"; + config = lib.mkIf cfg.enable { + wayland.windowManager.sway = { + enable = true; + config = { + }; + }; + }; +} diff --git a/modules/nixos/sils/default.nix b/modules/nixos/sils/default.nix index c335979..0098644 100644 --- a/modules/nixos/sils/default.nix +++ b/modules/nixos/sils/default.nix @@ -9,6 +9,7 @@ ./plymouth.nix ./roles.nix ./sudo.nix + ./sway.nix ./theming.nix ]; } diff --git a/modules/nixos/sils/roles.nix b/modules/nixos/sils/roles.nix index 678d2ed..bd7cb50 100644 --- a/modules/nixos/sils/roles.nix +++ b/modules/nixos/sils/roles.nix @@ -10,6 +10,7 @@ in { networking.enable = true; nix-config.enable = true; plymouth.enable = true; + sway.enable = true; theming.enable = true; } else if roleCmp "vm" diff --git a/modules/nixos/sils/sway.nix b/modules/nixos/sils/sway.nix new file mode 100644 index 0000000..4aac2f4 --- /dev/null +++ b/modules/nixos/sils/sway.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + ... +}: let + cfg = config.sils.sway; +in { + options.sils.sway.enable = lib.mkEnableOption "sway"; + config = lib.mkIf cfg.enable { + programs.sway = { + enable = true; + package = null; + }; + }; +} diff --git a/sys/default.nix b/sys/default.nix index e92f83e..a6ccb88 100644 --- a/sys/default.nix +++ b/sys/default.nix @@ -1,6 +1,5 @@ {...}: { imports = [ - ./desktop/sway ./environment ./font ./impermanence diff --git a/sys/desktop/sway/default.nix b/sys/desktop/sway/default.nix deleted file mode 100644 index e131221..0000000 --- a/sys/desktop/sway/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - programs.sway = { - enable = true; - package = null; - }; -} -- cgit 1.4.1