some stuff

This commit is contained in:
xunuwu 2024-06-14 07:37:34 +02:00
parent 368fc628c2
commit 841fe9a6a9
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
11 changed files with 77 additions and 65 deletions

78
flake.lock generated
View file

@ -33,11 +33,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1714877287, "lastModified": 1717555938,
"narHash": "sha256-mf1/RfkyhzwLLeqU8AdosbBfRQuQzuVMX7XL7GejoRI=", "narHash": "sha256-sVsJ48fKnIylxXbAIsdTJixkUxA8p2WvYRlyfo0KQos=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "arion", "repo": "arion",
"rev": "e9945eb6cdaf5c946bacd5a330e7b5ac7b3b2fdd", "rev": "c24c185e67f093298a081900b49ca18716077dec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -77,11 +77,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1717214600, "lastModified": 1718244058,
"narHash": "sha256-6cL574j1SSL9At2oZwGarAv9FcwphI9Pd8im+uQ5/bE=", "narHash": "sha256-u32PPPpJl6SlJDbSR6AI8HvW5+68OrX/Q5OMwf1TfFk=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "4118c12978f50c094d2e40146d2b1524012a6dd5", "rev": "3596f5b5f25caa9d0da1ce09bfd94ee65b4bb1eb",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -147,11 +147,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1714641030, "lastModified": 1717285511,
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -358,11 +358,11 @@
}, },
"hardware": { "hardware": {
"locked": { "locked": {
"lastModified": 1717248095, "lastModified": 1718207430,
"narHash": "sha256-e8X2eWjAHJQT82AAN+mCI0B68cIDBJpqJ156+VRrFO0=", "narHash": "sha256-/eO2NTRvrrdYWMI06plS8ANDGOhTZBA+C3H3KwbBI1w=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "7b49d3967613d9aacac5b340ef158d493906ba79", "rev": "9e848e173ca83adf884815c66edc08652ef9ade8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -483,11 +483,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717097707, "lastModified": 1718243258,
"narHash": "sha256-HC5vJ3oYsjwsCaSbkIPv80e4ebJpNvFKQTBOGlHvjLs=", "narHash": "sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0eb314b4f0ba337e88123e0b1e57ef58346aafd9", "rev": "8d5e27b4807d25308dfe369d5a923d87e7dbfda3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -619,11 +619,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717297675, "lastModified": 1718011381,
"narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", "narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", "rev": "88ad3d7501e22b2401dd72734b032b7baa794434",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -639,11 +639,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1717291708, "lastModified": 1718242391,
"narHash": "sha256-9oqdLMnfzywk1B2Lx6jQP6mAL6or6clVtOp+vXBsn9E=", "narHash": "sha256-WhxFBlbO63SoapmTuFjby8z+XADbac8IKoLjAO5I2zk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "4b46d344b7a9e2d026e7da71161826cc01b9eaa8", "rev": "fd5d22a81cd2aa22c59484247e1fefd144e4dc20",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -682,11 +682,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1717265169, "lastModified": 1717880976,
"narHash": "sha256-IITcGd6xpNoyq9SZBigCkv4+qMHSqot0RDPR4xsZ2CA=", "narHash": "sha256-BRvSCsKtDUr83NEtbGfHLUOdDK0Cgbezj2PtcHnz+sQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3b1b4895b2c5f9f5544d02132896aeb9ceea77bc", "rev": "4913a7c3d8b8d00cb9476a6bd730ff57777f740c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -714,11 +714,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1716948383, "lastModified": 1718160348,
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", "narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b", "rev": "57d6973abba7ea108bac64ae7629e7431e0199b6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -746,11 +746,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1717112898, "lastModified": 1717774105,
"narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=", "narHash": "sha256-HV97wqUQv9wvptiHCb3Y0/YH0lJ60uZ8FYfEOIzYEqI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0", "rev": "d226935fd75012939397c83f6c385e4d6d832288",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -762,11 +762,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1717300007, "lastModified": 1718246934,
"narHash": "sha256-rtggYfQX+ooy+5lXBOArmFiPmsemf5jLC8G9WKfGGM0=", "narHash": "sha256-nGgfEvYHCWr6xTc/bY5133hf7KbM45xwddFsylwrbAc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "95edadf3f532643a9dbc55aa21f1fd3a01816007", "rev": "6b3622889d4bad7a23c3c3995dd93d477f7ee4e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -801,11 +801,11 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1717300760, "lastModified": 1718250206,
"narHash": "sha256-dQIfOkT/gVzEcXjzQkRMuRhKEoddvZit2yj2kydl6TI=", "narHash": "sha256-FcTPBqDk3Fut84G9gPRzKbDfYsBKp6k68x7l0gpoaG4=",
"owner": "xunuwu", "owner": "xunuwu",
"repo": "small-nvim", "repo": "small-nvim",
"rev": "040b84066cd6332d61c7d1b8ae571da8e74f75d8", "rev": "80e1ddb44caecdc62a9239fb0a7ce5b315ac3c72",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -820,11 +820,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1717297459, "lastModified": 1718137936,
"narHash": "sha256-cZC2f68w5UrJ1f+2NWGV9Gx0dEYmxwomWN2B0lx0QRA=", "narHash": "sha256-psA+1Q5fPaK6yI3vzlLINNtb6EeXj111zQWnZYyJS9c=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "ab2a43b0d21d1d37d4d5726a892f714eaeb4b075", "rev": "c279dec105dd53df13a5e57525da97905cc0f0d6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -7,6 +7,7 @@
../../terminal ../../terminal
../../terminal/programs/zellij.nix ../../terminal/programs/zellij.nix
../../terminal/programs/lazygit.nix
../../terminal/programs/beets.nix ../../terminal/programs/beets.nix
../../editors/nvim.nix ../../editors/nvim.nix
#../../editors/emacs.nix #../../editors/emacs.nix

View file

@ -38,7 +38,7 @@
mod = config.wayland.windowManager.sway.config.modifier; mod = config.wayland.windowManager.sway.config.modifier;
wobVolume = "${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SINK@ | awk '{print $2*100}' > $XDG_RUNTIME_DIR/wob.sock"; wobVolume = "${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SINK@ | awk '{print $2*100}' > $XDG_RUNTIME_DIR/wob.sock";
setVolume = limit: amount: "${pkgs.wireplumber}/bin/wpctl set-volume -l ${limit} @DEFAULT_AUDIO_SINK@ ${amount}"; setVolume = limit: amount: "${pkgs.wireplumber}/bin/wpctl set-volume -l ${limit} @DEFAULT_AUDIO_SINK@ ${amount}";
perMonitor = workspace: "\"$(${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id')${toString workspace}\""; perMonitor = workspace: "\"$(swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).name' | ${lib.getExe pkgs.perl} -ne '$s=0;for(split//){$s+=ord}print\"$s\"')${toString workspace}\"";
#perMonitor = workspace: "${lib.getExe (pkgs.writeShellScriptBin "perMonitor" '' #perMonitor = workspace: "${lib.getExe (pkgs.writeShellScriptBin "perMonitor" ''
# id=$( md5sum <<< ${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id' ) # id=$( md5sum <<< ${config.wayland.windowManager.sway.package}/bin/swaymsg -t get_outputs | ${lib.getExe pkgs.jq} -r '.[] | select(.focused == true).id' )
# echo $((0x''${id%% *})) # echo $((0x''${id%% *}))
@ -82,15 +82,11 @@
(builtins.map (x: [ (builtins.map (x: [
{ {
name = "${mod}+${toString x}"; name = "${mod}+${toString x}";
#value = "exec swaymsg workspace ${toString x}"; value = "exec swaymsg workspace number ${perMonitor x}:${toString x}";
value = "exec swaymsg workspace number ${perMonitor x} ${toString x}";
#value = "exec ${lib.getExe perMonitor} workspace ${toString x}";
} }
{ {
name = "${mod}+Shift+${toString x}"; name = "${mod}+Shift+${toString x}";
#value = "exec swaymsg move workspace ${toString x}"; value = "exec swaymsg move container to workspace number ${perMonitor x}:${toString x}";
value = "exec swaymsg move container to workspace number ${perMonitor x} ${toString x}";
#value = "exec ${lib.getExe perMonitor} move workspace ${toString x}";
} }
]) (lib.range 0 9))) ]) (lib.range 0 9)))
); );

View file

@ -15,7 +15,7 @@ in {
"fetchart" "fetchart"
"discogs" "discogs"
#"advancedrewrite" #"advancedrewrite"
"lyrics" #"lyrics"
"spotify" "spotify"
"scrub" "scrub"
"duplicates" "duplicates"
@ -32,6 +32,11 @@ in {
remove_art_file = false; remove_art_file = false;
}; };
unimported = {
ignore_extensions = ["jpg" "png"];
ignore_subdirectories = [];
};
fetchart = { fetchart = {
auto = true; auto = true;
cautious = true; cautious = true;
@ -50,10 +55,10 @@ in {
"wikipedia" "wikipedia"
]; ];
lyrics = { #lyrics = {
fallback = "''"; # fallback = "''";
sources = ["musicmatch" "google"]; # sources = ["musicmatch" "google"];
}; #};
replace = { replace = {
"[\\\\]" = "'"; "[\\\\]" = "'";

View file

@ -0,0 +1,3 @@
{
programs.lazygit.enable = true;
}

View file

@ -1,17 +1,10 @@
{ {
pkgs,
inputs,
lib,
...
}: {
imports = [ imports = [
./hardware.nix ./hardware.nix
]; ];
networking.hostName = "nixdesk"; networking.hostName = "nixdesk";
boot.kernelPackages = pkgs.linuxPackages_latest;
swapDevices = [ swapDevices = [
{ {
device = "/var/lib/swapfile"; device = "/var/lib/swapfile";

View file

@ -12,6 +12,7 @@
]; ];
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest;
initrd = { initrd = {
availableKernelModules = [ availableKernelModules = [
"nvme" "nvme"
@ -66,7 +67,14 @@
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
services.xserver.videoDrivers = ["amdgpu"]; services.xserver.videoDrivers = [
"amdgpu"
#"nvidia"
];
#hardware.nvidia = {
# modesetting.enable = true;
# package = config.boot.kernelPackages.nvidiaPackages.stable;
#};
nixpkgs.hostPlatform.system = "x86_64-linux"; nixpkgs.hostPlatform.system = "x86_64-linux";
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;

View file

@ -8,5 +8,7 @@
nethogs nethogs
ffmpeg-full ffmpeg-full
parted parted
pciutils
usbutils
]; ];
} }

View file

@ -17,7 +17,7 @@ let
./desktop ./desktop
./desktop/awesome.nix ./desktop/awesome.nix
./desktop/sway.nix ./desktop/sway.nix
./desktop/hyprland.nix #./desktop/hyprland.nix
./programs ./programs

View file

@ -304,15 +304,19 @@
fetchart, fetchart,
discogs, discogs,
advancedrewrite, advancedrewrite,
lyrics, #lyrics,
spotify, spotify,
scrub, scrub,
duplicates, duplicates,
unimported, unimported,
missing,
] ]
genres: yes genres: yes
unimported:
ignore_extensions: jpg png
spotify: spotify:
source_weight: 0.7 source_weight: 0.7
@ -338,9 +342,9 @@
- lastfm - lastfm
- wikipedia - wikipedia
lyrics: #lyrics:
fallback: ''' # fallback: '''
sources: musixmatch google # sources: musixmatch google
replace: replace:
'[\\]': ''' '[\\]': '''

View file

@ -11,7 +11,7 @@
settings = { settings = {
devices = { devices = {
"nixdesk" = { "nixdesk" = {
id = "DZEIXRH-WBIEUUW-FFP2SLJ-BTIUPBE-YURLPN7-MUFOR6L-HS27D6G-I25XHQ3"; id = "XXABQZC-CO6OM2E-EMB3QIJ-NF5I3WU-CCQPPRY-7BX4ZSS-WIU4WW2-WXFWVQR";
autoAcceptFolders = true; autoAcceptFolders = true;
}; };
"redmi-note-10-pro" = { "redmi-note-10-pro" = {