From 34c3e678eb93ef4b303c794d6118ad59789c05dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Thu, 26 Jun 2025 12:57:36 +0200 Subject: [PATCH] update flake --- fish/conf.d/functions.fish | 43 ++++++++++++++ nix/configuration.nix | 5 +- nix/flake.lock | 102 +++++++++++++-------------------- nix/flake.nix | 2 +- nix/hardware-configuration.nix | 6 ++ nix/packages.nix | 14 ++++- sshconfig | 12 +--- 7 files changed, 109 insertions(+), 75 deletions(-) diff --git a/fish/conf.d/functions.fish b/fish/conf.d/functions.fish index 003d91f..3d33bef 100644 --- a/fish/conf.d/functions.fish +++ b/fish/conf.d/functions.fish @@ -76,3 +76,46 @@ function gur git reset "HEAD@{$argv[1]}" end +function nix_upgrade + sudo nix flake update --flake /home/catalin/.dotfiles/nix/ + sudo nixos-rebuild switch --flake /home/catalin/.dotfiles/nix/ --upgrade +end + +function delete_line + if test (count $argv) -lt 2 + echo "Usage: delete_line [--backup]" + return 1 + end + + set file $argv[1] + set line_num $argv[2] + set make_backup false + + if contains -- --backup $argv + set make_backup true + end + + if not test -f $file + echo "Error: File '$file' does not exist" + return 1 + end + + if not string match -qr '^\d+$' $line_num + echo "Error: Line number must be a positive integer" + return 1 + end + + set total_lines (wc -l < $file) + if test $line_num -gt $total_lines + echo "Error: Line $line_num does not exist (file has only $total_lines lines)" + return 1 + end + + if test $make_backup = true + cp $file $file.bak + echo "Backup created: $file.bak" + end + + sed -i "$line_num"d $file + echo "Deleted line $line_num from $file" +end \ No newline at end of file diff --git a/nix/configuration.nix b/nix/configuration.nix index 25a3a86..df88516 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -5,6 +5,7 @@ ./hardware-configuration.nix ]; nixpkgs.config.allowBroken = true; + nixpkgs.config.permittedInsecurePackages = ["electron-33.4.11"]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.supportedFilesystems = ["ntfs"]; @@ -46,6 +47,7 @@ dash-to-dock.extensionUuid clipboard-indicator.extensionUuid emoji-copy.extensionUuid + bluetooth-battery-meter.extensionUuid ]; }; }; @@ -60,6 +62,7 @@ gnomeExtensions.clipboard-indicator gnomeExtensions.emoji-copy gnomeExtensions.gsconnect + gnomeExtensions.bluetooth-battery-meter gnome-tweaks catppuccin-gtk catppuccin-cursors @@ -160,6 +163,6 @@ nix.extraOptions = '' trusted-users = root catalin ''; - + system.autoUpgrade.enable = true; system.stateVersion = "24.11"; } diff --git a/nix/flake.lock b/nix/flake.lock index 8a3ffce..8a3b607 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -70,17 +70,16 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs": "nixpkgs", "zig": "zig", - "zig2nix": "zig2nix" + "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1741594465, - "narHash": "sha256-8a/QIgNwV8VGn8JIiACmVVEdue+U3juiMSAO1DEUTC4=", + "lastModified": 1750884490, + "narHash": "sha256-hRt8xWReiDFyR4MDFg7FCq1PtvJb8hmrelkifnu/7yI=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "95daca616db5c24d7bb37fd5a3ac2f8762bb4ead", + "rev": "fa47db5363bedc5c3c9add87a83427447a273a90", "type": "github" }, "original": { @@ -96,11 +95,11 @@ ] }, "locked": { - "lastModified": 1739757849, - "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", + "lastModified": 1747688870, + "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", "owner": "nix-community", "repo": "home-manager", - "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", + "rev": "d5f1f641b289553927b3801580598d200a501863", "type": "github" }, "original": { @@ -134,18 +133,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741600792, - "narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ebe2788eafd539477f83775ef93c3c7e244421d3", - "type": "github" + "lastModified": 1748189127, + "narHash": "sha256-zRDR+EbbeObu4V2X5QCd2Bk5eltfDlCr5yvhBwUT6pY=", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.802491.7c43f080a7f2/nixexprs.tar.xz" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz" } }, "nixpkgs-lib": { @@ -160,34 +156,18 @@ "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" } }, - "nixpkgs-stable": { + "nixpkgs_2": { "locked": { - "lastModified": 1738255539, - "narHash": "sha256-hP2eOqhIO/OILW+3moNWO4GtdJFYCqAe9yJZgvlCoDQ=", - "owner": "nixos", + "lastModified": 1750622754, + "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "c3511a3b53b482aa7547c9d1626fd7310c1de1c5", + "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", "type": "github" }, "original": { - "owner": "nixos", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1738136902, - "narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", + "owner": "NixOS", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -197,7 +177,7 @@ "ghostty": "ghostty", "home-manager": "home-manager", "nix-snapd": "nix-snapd", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "unstable": "unstable" } }, @@ -218,11 +198,11 @@ }, "unstable": { "locked": { - "lastModified": 1741708242, - "narHash": "sha256-cNRqdQD4sZpN7JLqxVOze4+WsWTmv2DGH0wNCOVwrWc=", + "lastModified": 1750836778, + "narHash": "sha256-sRLyRiC7TezRbbjGJwUFOgb2xMbSr3wQ0oJKfYlQ6s0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b62d2a95c72fb068aecd374a7262b37ed92df82b", + "rev": "d7bb1922f0bb3d0c990f56f9cdb767fdb20a5f22", "type": "github" }, "original": { @@ -243,15 +223,15 @@ ], "nixpkgs": [ "ghostty", - "nixpkgs-stable" + "nixpkgs" ] }, "locked": { - "lastModified": 1738239110, - "narHash": "sha256-Y5i9mQ++dyIQr+zEPNy+KIbc5wjPmfllBrag3cHZgcE=", + "lastModified": 1748261582, + "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "1a8fb6f3a04724519436355564b95fce5e272504", + "rev": "aafb1b093fb838f7a02613b719e85ec912914221", "type": "github" }, "original": { @@ -260,7 +240,7 @@ "type": "github" } }, - "zig2nix": { + "zon2nix": { "inputs": { "flake-utils": [ "ghostty", @@ -268,21 +248,21 @@ ], "nixpkgs": [ "ghostty", - "nixpkgs-stable" + "nixpkgs" ] }, "locked": { - "lastModified": 1741368279, - "narHash": "sha256-WTaC8HmnIq6O71iK0g9as404BbmS+YyEP5qS85m2JBY=", + "lastModified": 1742104771, + "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", "owner": "jcollie", - "repo": "zig2nix", - "rev": "672971b5b6911de21446ad4fc76dee677922eda0", + "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", "type": "github" }, "original": { "owner": "jcollie", - "ref": "672971b5b6911de21446ad4fc76dee677922eda0", - "repo": "zig2nix", + "ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "repo": "zon2nix", "type": "github" } } diff --git a/nix/flake.nix b/nix/flake.nix index 0c2230d..57c05a8 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -2,7 +2,7 @@ description = "NixOS flake"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; ghostty = { url = "github:ghostty-org/ghostty"; diff --git a/nix/hardware-configuration.nix b/nix/hardware-configuration.nix index 5d76b33..7013bdc 100644 --- a/nix/hardware-configuration.nix +++ b/nix/hardware-configuration.nix @@ -53,6 +53,12 @@ fsType = "nfs"; options = [ "x-systemd.automount" "noauto" ]; }; + + fileSystems."/mnt/windoze2" = + { device = "/dev/disk/by-uuid/6084BE5384BE2B82"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=1000"]; + }; fileSystems."/mnt/windoze" = { device = "/dev/disk/by-uuid/46B01460B01458AF"; fsType = "ntfs-3g"; diff --git a/nix/packages.nix b/nix/packages.nix index efec56b..31b0a1f 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -72,7 +72,6 @@ pkgs: with pkgs; [ kubeconform kube-score uv - ventoy-full chiaki-ng gnome-themes-extra tela-circle-icon-theme @@ -103,5 +102,18 @@ pkgs: with pkgs; [ asciinema gimp yq + lnav + insomnia + qbittorrent + shadps4 + afetch + zed-editor + p7zip + ansible + k3sup coder + peek + goose-cli + gamemode + lm_sensors ] diff --git a/sshconfig b/sshconfig index 0cb9827..97e637c 100644 --- a/sshconfig +++ b/sshconfig @@ -119,14 +119,4 @@ Host fuku.dd02 Host fuku.dd01 HostName dd01.fuku User root - IdentityFile ~/.ssh/id_ed25519 - -# --- START CODER VSCODE workspace.i.mercedes-benz.com --- -Host coder-vscode.workspace.i.mercedes-benz.com--* - ConnectTimeout 0 - LogLevel ERROR - ProxyCommand "/home/catalin/.config/Code/User/globalStorage/coder.coder-remote/workspace.i.mercedes-benz.com/bin/coder-linux-amd64" vscodessh --network-info-dir "/home/catalin/.config/Code/User/globalStorage/coder.coder-remote/net" --session-token-file "/home/catalin/.config/Code/User/globalStorage/coder.coder-remote/workspace.i.mercedes-benz.com/session" --url-file "/home/catalin/.config/Code/User/globalStorage/coder.coder-remote/workspace.i.mercedes-benz.com/url" %h - SetEnv CODER_SSH_SESSION_TYPE=vscode - StrictHostKeyChecking no - UserKnownHostsFile /dev/null -# --- END CODER VSCODE workspace.i.mercedes-benz.com --- \ No newline at end of file + IdentityFile ~/.ssh/id_ed25519 \ No newline at end of file