diff --git a/hosts/fwbook.hardware-configuration.nix b/hosts/fwbook.hardware-configuration.nix index c086c6b..25f68fe 100644 --- a/hosts/fwbook.hardware-configuration.nix +++ b/hosts/fwbook.hardware-configuration.nix @@ -18,6 +18,11 @@ options = [ "subvol=@root" "compress=zstd" ]; }; + fileSystems."/root-btrfs" = + { device = "/dev/disk/by-uuid/adaad601-f79c-4342-ba3a-9eab53ec4cd1"; + fsType = "btrfs"; + }; + fileSystems."/home" = { device = "/dev/disk/by-uuid/adaad601-f79c-4342-ba3a-9eab53ec4cd1"; fsType = "btrfs"; @@ -29,6 +34,13 @@ fsType = "btrfs"; options = [ "subvol=@nix" "compress=zstd" "noatime" ]; }; + + fileSystems."/swap" = + { device = "/dev/disk/by-uuid/adaad601-f79c-4342-ba3a-9eab53ec4cd1"; + fsType = "btrfs"; + options = [ "subvol=@swap" "noatime" ]; + }; + fileSystems."/mnt/Data" = { device = "/dev/disk/by-uuid/239db4ac-762d-4d76-8297-ccd37bcdfd8b"; fsType = "ext4"; @@ -39,7 +51,7 @@ fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; - + swapDevices = [ { device = "/swap/swapfile"; } ]; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 3d21a26..f8ca8f4 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -29,6 +29,7 @@ in cosmic.enable = true; kde.enable = false; crypto.enable = true; + gnome.enable = true; }; }; networkDrives = { @@ -42,13 +43,7 @@ in # Desktop Env services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.wayland = true; - # services.displayManager.defaultSession = "cosmic"; - services.xserver.desktopManager.gnome.enable = true; - environment.gnome.excludePackages = with pkgs; [ - gnome-tour - gnome-text-editor - gnome-console - ]; + services.displayManager.defaultSession = "cosmic"; # Firmware updater services.fwupd.enable = true; diff --git a/modules/nixos/desktop/cosmic.nix b/modules/nixos/desktop/cosmic.nix index 8b727bd..1f2763f 100644 --- a/modules/nixos/desktop/cosmic.nix +++ b/modules/nixos/desktop/cosmic.nix @@ -16,5 +16,162 @@ in services.desktopManager.cosmic.enable = true; hardware.system76.enableAll = true; hardware.system76.power-daemon.enable = true; + home-manager.users.${config.skyg.user.name}.xdg.configFile = { + "cosmic/com.system76.CosmicSettings.Shortcuts/v1/system_actions" = { + enable = true; + force = true; + text = ''{ + Terminal: "ghostty", + }''; + }; + "cosmic/com.system76.CosmicSettings.Shortcuts/v1/custom" = { + enable = true; + force = true; + text = '' + { + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Up", + ): MoveToOutput(Up), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Up", + ): Disable, + ( + modifiers: [ + Super, + ], + key: "b", + ): Spawn("chromium --profile-directory=\'Profile 1\'"), + ( + modifiers: [ + Super, + Alt, + ], + key: "b", + ): Spawn("chromium --profile-directory=\'Default\'"), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Down", + ): Disable, + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "l", + ): Disable, + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Right", + ): Disable, + ( + modifiers: [ + Super, + ], + key: "t", + ): Spawn("ghostty"), + ( + modifiers: [ + Super, + ], + key: "s", + ): System(Screenshot), + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Right", + ): MoveToOutput(Right), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Left", + ): Disable, + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Left", + ): MoveToOutput(Left), + ( + modifiers: [ + Super, + ], + ): System(Launcher), + ( + modifiers: [ + Super, + ], + key: "p", + ): Spawn("wofi-emoji"), + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Down", + ): MoveToOutput(Down), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "h", + ): Disable, + ( + modifiers: [ + Super, + Alt, + ], + key: "Left", + ): MoveToPreviousWorkspace, + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "k", + ): Disable, + ( + modifiers: [ + Super, + Alt, + ], + key: "Right", + ): MoveToNextWorkspace, + ( + modifiers: [ + Super, + ], + key: "n", + ): Minimize, + } + ''; + }; + }; }; } diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 0a20315..b284771 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -10,6 +10,7 @@ in ./x11.nix ./packages.nix ./crypto.nix + ./gnome.nix ]; options = { diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome.nix new file mode 100644 index 0000000..5e36349 --- /dev/null +++ b/modules/nixos/desktop/gnome.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.skyg.nixos.desktop.gnome; +in +{ + options = { + skyg.nixos.desktop.gnome = { + enable = lib.mkEnableOption + "gnome"; + }; + }; + config = lib.mkIf cfg.enable { + services.xserver.desktopManager.gnome.enable = true; + environment.gnome.excludePackages = with pkgs; [ + gnome-tour + gnome-text-editor + gnome-console + ]; + programs.dconf.enable = true; + home-manager.users.${config.skyg.user.name}.dconf.settings = { + "org/gnome/desktop/wm/keybindings" = { + close = [ " q" ]; + maximize = [ " m" ]; + move-to-monitor-right = [ " Right" ]; + move-to-monitor-left = [ " Left" ]; + move-to-workspace-last = [ " Right" ]; + move-to-workspace-left = [ " Left" ]; + move-to-workspace-right = [ "Right" ]; + switch-to-workspace-left = [ "Left" ]; + switch-to-workspace-right = [ "Right" ]; + }; + }; + }; +}