From c7e4d8c28192b44850d50dc2e9a3834d4d373445 Mon Sep 17 00:00:00 2001 From: Sneexy Date: Tue, 23 Apr 2024 15:37:44 -0500 Subject: [PATCH] chore: disable plasma-manager for now, disko --- config/desktop.nix | 25 ---- config/disko.nix | 59 +++++++++ config/laptop.nix | 12 -- config/nixos.nix | 38 +++++- config/packages.nix | 2 + machines/thonkpad/default.nix | 7 +- machines/thunkpad/default.nix | 7 +- machines/thunkpad/hardware-configuration.nix | 2 +- users/ruben/config/sheldon/plugins.toml | 119 ++++++++++++++++++ users/ruben/home.nix | 9 +- users/ruben/packages.nix | 123 +++++++++++++------ 11 files changed, 314 insertions(+), 89 deletions(-) create mode 100644 config/disko.nix delete mode 100644 config/laptop.nix create mode 100644 users/ruben/config/sheldon/plugins.toml diff --git a/config/desktop.nix b/config/desktop.nix index 271c835..e03ddf8 100644 --- a/config/desktop.nix +++ b/config/desktop.nix @@ -60,29 +60,4 @@ }; }; }; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - - # wireplumber exists! - wireplumber.enable = true; - }; - - services.pipewire.wireplumber.configPackages = [ - (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" '' - bluez_monitor.properties = { - ["bluez5.enable-sbc-xq"] = true, - ["bluez5.enable-msbc"] = true, - ["bluez5.enable-hw-volume"] = true, - ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" - } - '') - ]; } diff --git a/config/disko.nix b/config/disko.nix new file mode 100644 index 0000000..799ccf0 --- /dev/null +++ b/config/disko.nix @@ -0,0 +1,59 @@ +{ + disko.devices = { + disk = { + vdb = { + type = "disk"; + device = "/dev/disk/by-diskseq/1"; + content = { + type = "gpt"; + partitions = { + ESP = { + priority = 1; + name = "ESP"; + start = "1MiB"; + end = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; # Override existing partition + # Subvolumes must set a mountpoint in order to be mounted, + # unless their parent is mounted + subvolumes = { + "/rootfs" = { + mountOptions = [ "compress=zstd" ]; + mountpoint = "/"; + }; + "/home" = { + mountOptions = [ "compress=zstd" ]; + mountpoint = "/home"; + }; + "/nix" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/nix"; + }; + "/persist" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/persist"; + }; + "/log" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/var/log"; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} + diff --git a/config/laptop.nix b/config/laptop.nix deleted file mode 100644 index f084e2e..0000000 --- a/config/laptop.nix +++ /dev/null @@ -1,12 +0,0 @@ -# This is your system's configuration file. -# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - -} diff --git a/config/nixos.nix b/config/nixos.nix index e5fe112..7522ba6 100644 --- a/config/nixos.nix +++ b/config/nixos.nix @@ -45,15 +45,19 @@ substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org" + "https://nyx.chaotic.cx" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" ]; }; - # use linux-zen - boot.kernelPackages = pkgs.linuxKernel.packages.linux_zen; + # according to research: zen helps by trying to keep a reponsive desktop when i'm doing like millions of things + # at once + # TODO: theres also cachyos which i've tried for a short while, maybe poke at it again? + boot.kernelPackages = pkgs.linuxPackages_zen; # Bootloader. boot.loader.systemd-boot.enable = true; @@ -80,9 +84,35 @@ # https://nixos.wiki/wiki/Bluetooth hardware.bluetooth = { enable = true; + package = pkgs.bluez; powerOnBoot = false; }; + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + + # wireplumber exists! + wireplumber.enable = true; + }; + + services.pipewire.wireplumber.configPackages = [ + (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" '' + bluez_monitor.properties = { + ["bluez5.enable-sbc-xq"] = true, + ["bluez5.enable-msbc"] = true, + ["bluez5.enable-hw-volume"] = true, + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + } + '') + ]; + # Enable CUPS to print documents. services.printing = { enable = true; @@ -91,6 +121,10 @@ services.avahi.enable = true; services.avahi.nssmdns4 = true; + # xbox LIVE !!!! + hardware.xpadneo.enable = true; + hardware.xone.enable = true; + # enable zram for swap stuff zramSwap.enable = true; diff --git a/config/packages.nix b/config/packages.nix index e23f2ab..7f93f8d 100644 --- a/config/packages.nix +++ b/config/packages.nix @@ -41,7 +41,9 @@ distrobox virt-manager + kdePackages.kdeconnect-kde kde-rounded-corners + wl-clipboard ]; # steam diff --git a/machines/thonkpad/default.nix b/machines/thonkpad/default.nix index d799e0a..a6105e3 100644 --- a/machines/thonkpad/default.nix +++ b/machines/thonkpad/default.nix @@ -13,11 +13,8 @@ # use shared configuration ../../config/nixos.nix - # laptop configuration - #../../config/laptop.nix - - # intel opengl setup - ../../config/intel.nix + # intel configuration + #../../config/intel.nix ]; # who up thonking they diff --git a/machines/thunkpad/default.nix b/machines/thunkpad/default.nix index 25e0b9a..70f1a16 100644 --- a/machines/thunkpad/default.nix +++ b/machines/thunkpad/default.nix @@ -13,11 +13,8 @@ # use shared configuration ../../config/nixos.nix - # laptop configuration - #../../config/laptop.nix - - # intel opengl setup - ../../config/intel.nix + # intel configuration + #../../config/intel.nix ]; # who up thunking they diff --git a/machines/thunkpad/hardware-configuration.nix b/machines/thunkpad/hardware-configuration.nix index ed37e05..88dad0b 100644 --- a/machines/thunkpad/hardware-configuration.nix +++ b/machines/thunkpad/hardware-configuration.nix @@ -16,7 +16,7 @@ fileSystems."/" = { device = "/dev/disk/by-uuid/169dd244-d0c4-4a9d-a11f-3e25452d153f"; fsType = "btrfs"; - options = [ "subvol=@" ]; + options = [ "compress-force=zstd:3" "subvol=@" ]; }; fileSystems."/boot" = diff --git a/users/ruben/config/sheldon/plugins.toml b/users/ruben/config/sheldon/plugins.toml new file mode 100644 index 0000000..9d2f21e --- /dev/null +++ b/users/ruben/config/sheldon/plugins.toml @@ -0,0 +1,119 @@ +# `sheldon` configuration file +# ---------------------------- +# +# You can modify this file directly or you can use one of the following +# `sheldon` commands which are provided to assist in editing the config file: +# +# - `sheldon add` to add a new plugin to the config file +# - `sheldon edit` to open up the config file in the default editor +# - `sheldon remove` to remove a plugin from the config file +# +# See the documentation for more https://github.com/rossmacarthur/sheldon#readme + +shell = "zsh" + +[plugins] + +# deferred loading +[plugins.zsh-defer] +github = "romkatv/zsh-defer" + +[templates] +defer = "{{ hooks?.pre | nl }}{% for file in files %}zsh-defer source \"{{ file }}\"\n{% endfor %}{{ hooks?.post | nl }}" + +# completions +[plugins.completion] +github = "mattmc3/zephyr" +use = ["plugins/{{ name }}"] + +# shell benchmarking +[plugins.zsh-bench] +github = "romkatv/zsh-bench" +apply = ["PATH"] + +# oh-my-zsh +[plugins.key-bindings] +github = "ohmyzsh/ohmyzsh" +use = ["lib/{{ name }}.zsh"] + +[plugins.omz-completion] +github = "ohmyzsh/ohmyzsh" +use = ["lib/completion.zsh"] + +[plugins.clipboard] +github = "ohmyzsh/ohmyzsh" +use = ["lib/{{ name }}.zsh"] + +[plugins.copybuffer] +github = "ohmyzsh/ohmyzsh" +use = ["plugins/{{ name }}"] + +[plugins.copyfile] +github = "ohmyzsh/ohmyzsh" +use = ["plugins/{{ name }}"] + +[plugins.copypath] +github = "ohmyzsh/ohmyzsh" +use = ["plugins/{{ name }}"] + +[plugins.extract] +github = "ohmyzsh/ohmyzsh" +use = ["plugins/{{ name }}"] +apply = ["defer"] + +# zsh-utils +[plugins.history] +github = "belak/zsh-utils" + +[plugins.utility] +github = "belak/zsh-utils" + +[plugins.editor] +local = "~/.config/zsh/plugins/{{ name }}" + +# deferred plugins go below + +# git-open +[plugins.git-open] +github = "paulirish/git-open" +apply = ["defer"] + +# yt-dlp completions and aliases +[plugins.yt-dlp] +github = "clavelm/yt-dlp-omz-plugin" +apply = ["defer"] + +# completions learning daemon +[plugins.cod] +github = "dim-an/cod" +apply = ["defer"] + +# shift select +[plugins.shift-select] +github = "jirutka/zsh-shift-select" +apply = ["defer"] + +# fast syntax highlighting +[plugins.fast-syntax-highlighting] +github = "zdharma-continuum/fast-syntax-highlighting" +apply = ["defer"] + +# auto suggestions +[plugins.zsh-autosuggestions] +github = "zsh-users/zsh-autosuggestions" +apply = ["defer"] + +# command history searching +[plugins.zsh-history-substring-search] +github = "zsh-users/zsh-history-substring-search" +apply = ["defer"] + +# fzf searching plugin +[plugins.fzf-zsh-plugin] +github = "unixorn/fzf-zsh-plugin" +apply = ["defer"] + +# git credeeztials manager or something like that +#[plugins.blackbox] +#github = "StackExchange/blackbox" +#apply = ["defer"] diff --git a/users/ruben/home.nix b/users/ruben/home.nix index 13714d2..399082a 100644 --- a/users/ruben/home.nix +++ b/users/ruben/home.nix @@ -25,13 +25,13 @@ flake-inputs.catppuccin.homeManagerModules.catppuccin # plasma-manager - flake-inputs.plasma-manager.homeManagerModules.plasma-manager + #flake-inputs.plasma-manager.homeManagerModules.plasma-manager # user packages ./packages.nix # plasma config - ./desktop.nix + #./desktop.nix # theme config ./themes.nix @@ -55,6 +55,11 @@ source = ./config/zsh; recursive = true; }; + # sheldon plugins + home.file.".config/sheldon" = { + source = ./config/sheldon; + recursive = true; + }; # ╭───────────────────────────────────────────────╮ # │ _ __ _ │ diff --git a/users/ruben/packages.nix b/users/ruben/packages.nix index 3cccc3a..375a792 100644 --- a/users/ruben/packages.nix +++ b/users/ruben/packages.nix @@ -35,8 +35,8 @@ sd zoxide krabby + #sheldonkdePackages.kdeconnect-kde cod - atuin alejandra usbutils @@ -48,6 +48,11 @@ wgcf mpdris2 + rustc + cargo + openssl + gcc + firefox thunderbird birdtray @@ -111,41 +116,54 @@ dotDir = ".config/zsh"; history.size = 50000; - antidote.enable = true; - antidote.plugins = [ - # completions - "mattmc3/zephyr path:plugins/completion" - - # shell benchmarking - "romkatv/zsh-bench kind:path kind:defer" - - # oh my zsh - "ohmyzsh/ohmyzsh path:lib/key-bindings.zsh" - "ohmyzsh/ohmyzsh path:lib/clipboard.zsh" - #"ohmyzsh/ohmyzsh path:lib/completion.zsh" - "ohmyzsh/ohmyzsh path:plugins/copybuffer" - "ohmyzsh/ohmyzsh path:plugins/copyfile" - "ohmyzsh/ohmyzsh path:plugins/copypath" - "ohmyzsh/ohmyzsh path:plugins/extract kind:defer" - - # zsh-utils - "belak/zsh-utils path:history" - "belak/zsh-utils path:utility" - "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/plugins/editor" - - # useful plugins - "atuinsh/atuin kind:defer" - "paulirish/git-open kind:defer" - "clavelm/yt-dlp-omz-plugin kind:defer" - "dim-an/cod kind:defer" - "jirutka/zsh-shift-select kind:defer" - "unixorn/fzf-zsh-plugin kind:defer" - - "zdharma-continuum/fast-syntax-highlighting kind:defer" - "zsh-users/zsh-autosuggestions kind:defer" - "zsh-users/zsh-history-substring-search kind:defer" - ]; + # ╭───────────────────────────────────╮ + # │ _ _ _ _ │ + # │ __ _ _ _| |_(_)__| |___| |_ ___ │ + # │ / _` | ' \ _| / _` / _ \ _/ -_) │ + # │ \__,_|_||_\__|_\__,_\___/\__\___| │ + # │ antidote │ + # ╰───────────────────────────────────╯ + # NOTE: disables for now to try sheldon + #antidote.enable = true; + #antidote.plugins = [ + # # completions + # "mattmc3/zephyr path:plugins/completion" + # + # # shell benchmarking + # "romkatv/zsh-bench kind:path kind:defer" + # + # # oh my zsh + # "ohmyzsh/ohmyzsh path:lib/key-bindings.zsh" + # "ohmyzsh/ohmyzsh path:lib/clipboard.zsh" + # "ohmyzsh/ohmyzsh path:lib/completion.zsh kind:defer" + # "ohmyzsh/ohmyzsh path:plugins/copybuffer kind:defer" + # "ohmyzsh/ohmyzsh path:plugins/copyfile kind:defer" + # "ohmyzsh/ohmyzsh path:plugins/copypath kind:defer" + # "ohmyzsh/ohmyzsh path:plugins/extract kind:defer" + # + # # zsh-utils (modified editor plugin to remove block cursor) + # "belak/zsh-utils path:utility kind:defer" + # "${config.home.homeDirectory}/${config.programs.zsh.dotDir}/plugins/editor" + # + # # useful plugins + # "atuinsh/atuin kind:defer" + # "paulirish/git-open kind:defer" + # "clavelm/yt-dlp-omz-plugin kind:defer" + # "dim-an/cod kind:defer" + # "jirutka/zsh-shift-select kind:defer" + # "unixorn/fzf-zsh-plugin kind:defer" + # + # "zdharma-continuum/fast-syntax-highlighting kind:defer" + # "zsh-users/zsh-autosuggestions kind:defer" + #]; + # ╭────────────────────────────╮ + # │ _ _ │ + # │ __ _| (_)__ _ ___ ___ ___ │ + # │ / _` | | / _` (_-