From 502e7239317b111d782f7f73e2c4288af92698f4 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 4 Aug 2024 10:43:27 +0100 Subject: [PATCH] Move autostarts out of personal.nix and work.nix Move to specific machines because I don't want the programs autostarting on laptops --- home/Northstar.nix | 20 ++++---------------- home/Scorch.nix | 9 ++++++--- home/Tone.nix | 44 -------------------------------------------- home/Vanguard.nix | 10 ++++------ home/default.nix | 18 +++++++----------- home/personal.nix | 3 --- home/work.nix | 8 ++------ system/Vanguard.nix | 1 - 8 files changed, 23 insertions(+), 90 deletions(-) diff --git a/home/Northstar.nix b/home/Northstar.nix index 91aefac3..dff76db4 100644 --- a/home/Northstar.nix +++ b/home/Northstar.nix @@ -1,24 +1,12 @@ -{ - config, - lib, - pkgs, - ... -}: +{ config, lib, ... }: { imports = [ ./personal.nix ./desktop/plasma/default.nix ]; - home.packages = with pkgs; [ prusa-slicer ]; programs.plasma = lib.mkIf config.programs.plasma.enable { - configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true; - }; - wayland.windowManager.sway = lib.mkIf config.wayland.windowManager.sway.enable { - config.workspaceOutputAssign = [ - { - output = "eDP-1"; - workspace = "1"; - } - ]; + configFile = { + kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true; + }; }; } diff --git a/home/Scorch.nix b/home/Scorch.nix index 2bb3befe..97a54a43 100644 --- a/home/Scorch.nix +++ b/home/Scorch.nix @@ -1,10 +1,13 @@ -{ config, lib, ... }: +{ pkgs, ... }: { imports = [ ./work.nix ./desktop/plasma/default.nix ]; - wayland.windowManager.sway = lib.mkIf config.wayland.windowManager.sway.enable { - config.output."Dell Inc. DELL P3223QE CCG8YN3".scale = "1.5"; + xdg.configFile = { + "autostart/twinkle.desktop".source = "${pkgs.twinkle}/share/applications/twinkle.desktop"; + "autostart/teams-for-linux.desktop".source = "${pkgs.teams-for-linux}/share/applications/teams-for-linux.desktop"; + "autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop"; + "autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source = "${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop"; }; } diff --git a/home/Tone.nix b/home/Tone.nix index f3cb0353..8085b28f 100644 --- a/home/Tone.nix +++ b/home/Tone.nix @@ -9,48 +9,4 @@ kcminputrc."Libinput/1160/4132/DELL0A21:00 0488:1024 Touchpad".NaturalScroll = true; }; }; - wayland.windowManager.sway = lib.mkIf config.wayland.windowManager.sway.enable { - config = { - output."eDP-1".scale = "1.25"; - workspaceOutputAssign = [ - { - output = "eDP-1"; - workspace = "1"; - } - ]; - }; - }; - services.kanshi = lib.mkIf config.wayland.windowManager.sway.enable { - enable = true; - settings = - let - laptopScreen = { - criteria = "eDP-1"; - scale = 1.25; - position = "2560,576"; - }; - monitor = { - criteria = "Dell Inc. DELL P3223QE CCG8YN3"; - scale = 1.5; - position = "0,0"; - }; - in - [ - { - profile = { - name = "undocked"; - outputs = [ laptopScreen ]; - }; - } - { - profile = { - name = "docked"; - outputs = [ - laptopScreen - monitor - ]; - }; - } - ]; - }; } diff --git a/home/Vanguard.nix b/home/Vanguard.nix index 9f23b9d0..9e76bb16 100644 --- a/home/Vanguard.nix +++ b/home/Vanguard.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ pkgs, ... }: { imports = [ ./personal.nix @@ -12,6 +7,9 @@ ./desktop/plasma/default.nix ]; xdg.configFile = { + "autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop"; + "autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source = "${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop"; + "autostart/webcord.desktop".source = "${pkgs.webcord}/share/applications/webcord.desktop"; "autostart/org.kde.ktorrent.desktop".source = "${pkgs.kdePackages.ktorrent}/share/applications/org.kde.ktorrent.desktop"; }; } diff --git a/home/default.nix b/home/default.nix index 3e77c5d4..c8f3d746 100644 --- a/home/default.nix +++ b/home/default.nix @@ -23,16 +23,12 @@ whatsapp-for-linux teams-for-linux ]; - xdg.configFile = { - "autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop"; - "autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source = "${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop"; - "teams-for-linux/config.json".text = builtins.toJSON { - awayOnSystemIdle = true; - closeAppOnCross = true; - followSystemTheme = true; - notificationMethod = "electron"; - optInTeamsV2 = true; - spellCheckerLanguages = [ "en_GB" ]; - }; + xdg.configFile."teams-for-linux/config.json".text = builtins.toJSON { + awayOnSystemIdle = true; + closeAppOnCross = true; + followSystemTheme = true; + notificationMethod = "electron"; + optInTeamsV2 = true; + spellCheckerLanguages = [ "en_GB" ]; }; } diff --git a/home/personal.nix b/home/personal.nix index c448f4f9..9179029e 100644 --- a/home/personal.nix +++ b/home/personal.nix @@ -8,7 +8,4 @@ openscad kicad-small ]; - xdg.configFile = { - "autostart/webcord.desktop".source = "${pkgs.webcord}/share/applications/webcord.desktop"; - }; } diff --git a/home/work.nix b/home/work.nix index dd39a7d4..09d312e2 100644 --- a/home/work.nix +++ b/home/work.nix @@ -6,8 +6,8 @@ }: { imports = [ ./default.nix ]; - home.packages = with pkgs; [ - twinkle + home.packages = [ + pkgs.twinkle (import ./scripts/ukaea-vpn.nix pkgs) ]; programs.git.userEmail = config.accounts.email.accounts.outlook.address; @@ -15,8 +15,4 @@ proton.primary = lib.mkForce false; outlook.primary = lib.mkForce true; }; - xdg.configFile = { - "autostart/twinkle.desktop".source = "${pkgs.twinkle}/share/applications/twinkle.desktop"; - "autostart/teams-for-linux.desktop".source = "${pkgs.teams-for-linux}/share/applications/teams-for-linux.desktop"; - }; } diff --git a/system/Vanguard.nix b/system/Vanguard.nix index b224ef5a..afc30182 100644 --- a/system/Vanguard.nix +++ b/system/Vanguard.nix @@ -15,7 +15,6 @@ }; steam-hardware.enable = true; }; - programs.steam = { enable = true; remotePlay.openFirewall = true;