$ bluetoothctl [bluetooth] # power on [bluetooth] # agent on [bluetooth] # default-agent [bluetooth] # scan on ...put device in pairing mode and wait [hex-address] to appear here... [bluetooth] # pair [hex-address] [bluetooth] # connect [hex-address]
nix-collect-garbage
nix shell nixpkgs#nix-prefetch-git
nix-prefetch-git https://github.com/MarianArlt/sddm-sugar-dark
# Update flake.lock
sudo nix flake update
# Or replace only the specific input, such as home-manager:
sudo nix flake lock --update-input home-manager
# Apply the updates
sudo nixos-rebuild switch --flake .
grim -g “$(slurp)” - | wl-copy wl-paste > ~/Pictures/screen.png
So I had a bunch of problems with java in doom + nix but now everything seems to be working Steps I took:
- Turn on java in doom
- Create dummy project with maven
- Open java class in it and wait for lsp to download all it needs
- Configure spring like this
(after! lsp-java (require 'lsp-java-boot) (require 'dap-java) ;; to enable the lenses (add-hook 'lsp-mode-hook #'lsp-lens-mode) (add-hook 'java-mode-hook #'lsp-java-boot-lens-mode) (add-hook 'java-mode-hook #'lsp-java-boot-lens-mode) (setf lombok-jar-path "/home/omen/.m2/repository/org/projectlombok/lombok/1.18.26/lombok-1.18.26.jar") (setq lsp-java-vmargs `( "-XX:+UseParallelGC" "-XX:GCTimeRatio=4" "-XX:AdaptiveSizePolicyWeight=90" "-Dsun.zip.disableMemoryMapping=true" "-Xmx1G" "-Xms100m" ,(concat "-javaagent:" lombok-jar-path) ) ) )
- Create dummy project with spring in it. DO NOT USE lsp stuff to generate it (seems like it is broken some way)
- Open some class in project and wait for lsp do update some stuff
qpdf --verbose --encrypt USER_PASSWORD OWNER_PASSWORD 256 -- file_in.pdf file_out.pdf
So if you just try to run src_bash[:exports code]{mvn clean install} in terminal you would get errors for running integration test. For this to work you would need to use this shell.nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "simple-x11-env";
targetPkgs = pkgs: (with pkgs; [
maven
jdk17
]);
multiPkgs = pkgs: (with pkgs; [
maven
jdk17
]);
runScript = "zsh";
}).env
rsync -ah --progress source destination
Had some issues accessing `.authinfo.gpg` file. Needed to kill gpg-agent and start it again like:
# kill agent
gpgconf --kill gpg-agent
# start it
gpg-agent
sudo nix fmt
For some reason sound stoped working and was able to fix using:
systemctl --user restart pipewire.service
Notes: After installation src_bash[:exports code]{nixos-rebuild test –flake .#uzume} returns error but after running src_bash[:exports code]{nixos-rebuild boot –flake .#uzume} and running test again issue fixed
- Enter nix shell with necessary packages
nix shell nixpkgs#ssh-to-age nixpkgs#age nixpkgs#sops
- Create master key
mkdir -p ~/.config/sops/age age-keygen -o ~/.config/sops/age/keys.txt
- Get public key for the generated one
age-keygen -y ~/.config/sops/age/keys.txt
- Create .sops.yaml file
Primary key is from previous steps, it should be backed up somewhere else as you will use it as backup key in case something happens and you can’t access secrets using other keys
Omen key is based on public ssh key from /etc/ssh/ssh_host_ed25519_key.pub (enabled openssh service for this)
keys: - &primary age19wvqtn4ju6k4vs8fxr34unl6xx4cv04jw0lx9ps20xlde927zfssgl4qke - &omen age1jggd0cqn7c3ajqphnd0tt7kud3tqdz6uv3mkghhkzdtf4f0xrp2qtuvsks creation_rules: - path_regex: secrets/secrets.yaml$ key_groups: - age: - *primary - *omen
- Create secrets file and populate them
sops secrets/secrets.yaml
- Create sops.nix configuration
{ config, lib, pkgs, inputs, ... }: { imports = [ inputs.sops-nix.nixosModules.sops ]; sops = { defaultSopsFile = ./secrets/secrets.yaml; validateSopsFiles = false; age = { sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; keyFile = "/var/lib/sops-nix/keys.txt"; generateKey = true; }; secrets = { omen-password = { neededForUsers = true; }; }; }; }
Now you can use your secrets in nix configurations