diff --git a/flake.lock b/flake.lock index b708d55..b5fed12 100644 --- a/flake.lock +++ b/flake.lock @@ -205,6 +205,29 @@ "type": "indirect" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727463368, + "narHash": "sha256-5glMknkwQejUrKy28iy/kCFlSMwHcVyf/whmxqD0ggk=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "29ad64f0ac4ae84710dfeb1d37572d95c94cbfd8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "root": { "inputs": { "cherrykitten-website": "cherrykitten-website", @@ -214,7 +237,8 @@ "impermanence": "impermanence", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs-unstable": "nixpkgs-unstable", + "plasma-manager": "plasma-manager" } }, "stable": { diff --git a/flake.nix b/flake.nix index 6efbf40..6ca49ac 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + impermanence.url = "github:nix-community/impermanence"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; diff --git a/hosts/dinictis/default.nix b/hosts/dinictis/default.nix index 651a253..d958a11 100644 --- a/hosts/dinictis/default.nix +++ b/hosts/dinictis/default.nix @@ -1,9 +1,11 @@ -{ pkgs, ... }: { +{ pkgs, lib, ... }: { imports = [ ../../profiles/desktop ./hardware-configuration.nix ]; + services.xserver.xkb.layout = lib.mkForce "de"; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/hosts/tabby/default.nix b/hosts/tabby/default.nix index f589949..4f87fcf 100644 --- a/hosts/tabby/default.nix +++ b/hosts/tabby/default.nix @@ -9,13 +9,10 @@ inputs.nixos-hardware.nixosModules.framework-16-7040-amd ]; - services.hardware.bolt.enable = true; cherrykitten.impermanence.enable = true; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.wireless.iwd.enable = true; - fileSystems."/mnt/Media" = { device = "192.168.0.3:/mnt/user/Media"; fsType = "nfs"; diff --git a/modules/nixos/impermanence/default.nix b/modules/nixos/impermanence/default.nix index cf968d2..4551e8e 100644 --- a/modules/nixos/impermanence/default.nix +++ b/modules/nixos/impermanence/default.nix @@ -17,6 +17,7 @@ in "/var/lib/nixos" "/var/lib/systemd/coredump" "/var/lib/iwd" + "/etc/NetworkManager/system-connections/" "/home" ]; files = [ diff --git a/profiles/desktop/default.nix b/profiles/desktop/default.nix index 58a8f4b..31f772a 100644 --- a/profiles/desktop/default.nix +++ b/profiles/desktop/default.nix @@ -1,7 +1,6 @@ -{ pkgs, pkgs-unstable, ... }: { +{ pkgs, pkgs-unstable, flake, ... }: { imports = [ - ./sway ./foot.nix ./firefox.nix ]; @@ -18,6 +17,18 @@ home-manager.users.sammy.services.nextcloud-client.enable = true; + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + services.xserver = { + enable = true; + + libinput.enable = true; + + xkb.layout = "us"; + xkb.options = "caps:escape"; + }; + services.rpcbind.enable = true; # needed for NFS # Enable sound. @@ -30,19 +41,11 @@ services.logind.powerKey = "hibernate"; services.logind.powerKeyLongPress = "poweroff"; - services.xserver = { - enable = true; - displayManager.sddm = { - enable = true; - wayland.enable = true; - autoNumlock = true; - }; + services.hardware.bolt.enable = true; - libinput.enable = true; + networking.networkmanager.enable = true; - xkb.layout = "de"; - xkb.options = "caps:escape"; - }; + powerManagement.enable = true; virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; @@ -66,4 +69,7 @@ emoji = [ "noto-fonts-emoji" "font-awesome" ]; }; }; + + home-manager.sharedModules = [ flake.inputs.plasma-manager.homeManagerModules.plasma-manager ]; + home-manager.users.sammy.programs.plasma = import ./plasma-home.nix; } diff --git a/profiles/desktop/plasma-home.nix b/profiles/desktop/plasma-home.nix new file mode 100644 index 0000000..27065f1 --- /dev/null +++ b/profiles/desktop/plasma-home.nix @@ -0,0 +1,105 @@ +{ + enable = true; + + shortcuts = { + + kwin = { + "Switch One Desktop Down" = "Meta+Alt+Down"; + "Switch One Desktop Up" = "Meta+Alt+Up"; + "Switch One Desktop to the Left" = "Meta+Alt+Left"; + "Switch One Desktop to the Right" = "Meta+Alt+Right"; + + "Switch Window Down" = "Meta+Down"; + "Switch Window Left" = "Meta+Left"; + "Switch Window Right" = "Meta+Right"; + "Switch Window Up" = "Meta+Up"; + + "Window Close" = "Meta+Q"; + "Window Maximize" = "Meta+Shift+Return"; + + "Window One Desktop Down" = "Meta+Ctrl+Shift+Down"; + "Window One Desktop Up" = "Meta+Ctrl+Shift+Up"; + "Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left"; + "Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right"; + + "Window Quick Tile Bottom" = "Meta+Shift+Down"; + "Window Quick Tile Left" = "Meta+Shift+Left"; + "Window Quick Tile Right" = "Meta+Shift+Right"; + "Window Quick Tile Top" = "Meta+Shift+Up"; + + "Window to Desktop 1" = "Meta+Shift+1"; + "Window to Desktop 2" = "Meta+Shift+2"; + "Window to Desktop 3" = "Meta+Shift+3"; + "Window to Desktop 4" = "Meta+Shift+4"; + "Window to Desktop 5" = "Meta+Shift+5"; + "Window to Desktop 6" = "Meta+Shift+6"; + "Window to Desktop 7" = "Meta+Shift+7"; + "Window to Desktop 8" = "Meta+Shift+8"; + + "Window to Next Desktop" = "Meta+Shift+N"; + "Window to Previous Desktop" = "Meta+Shift+P"; + + }; + }; + + panels = [ + { + location = "bottom"; + floating = true; + screen = "all"; + widgets = [ + { + kickoff = { + sortAlphabetically = true; + icon = "nix-snowflake-white"; + }; + } + "org.kde.plasma.pager" + { + iconTasks = { + launchers = [ + "applications:org.kde.dolphin.desktop" + "applications:org.kde.konsole.desktop" + "applications:firefox.desktop" + ]; + }; + } + "org.kde.plasma.marginsseparator" + { + digitalClock = { + calendar.firstDayOfWeek = "monday"; + time.format = "24h"; + }; + } + { + systemTray.items = { + shown = [ + "org.kde.plasma.battery" + "org.kde.plasma.bluetooth" + "org.kde.plasma.volume" + ]; + hidden = [ + "org.kde.plasma.networkmanagement" + ]; + }; + } + ]; + } + ]; + + input = { + keyboard = { + numlockOnStartup = "on"; + options = [ + "caps:escape" + ]; + }; + }; + + kwin = { + virtualDesktops = { + number = 8; + rows = 2; + }; + }; +}