From 9046f3d02a8da9dc03b19322d448fa10119b6674 Mon Sep 17 00:00:00 2001 From: Christian Ott Date: Mon, 7 Jul 2025 08:13:07 +0200 Subject: [PATCH] nix updates --- configuration.nix | 13 ++--- flake.lock | 48 ++++++++++------ flake.nix | 22 ++++++- home.nix | 58 +++++++++++++++++-- hyperland/default.nix | 9 +++ modules/vscode.nix | 11 ---- modules/vscodium/default.nix | 11 ++++ modules/vscodium/vscodium.nix | 104 ++++++++++++++++++++++++++++++++++ 8 files changed, 235 insertions(+), 41 deletions(-) delete mode 100644 modules/vscode.nix create mode 100644 modules/vscodium/default.nix create mode 100644 modules/vscodium/vscodium.nix diff --git a/configuration.nix b/configuration.nix index 55787f4..2b62d61 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,11 +3,9 @@ # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). { - config, - lib, + inputs, pkgs, ronema, - xdph, ... }: @@ -86,8 +84,8 @@ programs.hyprland.portalPackage = pkgs.xdg-desktop-portal-wlr; # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = false; - services.xserver.desktopManager.gnome.enable = true; + services.displayManager.gdm.enable = false; + services.desktopManager.gnome.enable = true; services.fwupd.enable = true; @@ -126,7 +124,7 @@ jack.enable = true; pulse.enable = true; }; - hardware.pulseaudio.enable = false; + services.pulseaudio.enable = false; # Enable touchpad support (enabled default in most desktopManager). services.libinput = { @@ -174,7 +172,8 @@ wget curl btop - vscodium + vscodium-insider + pciutils usbutils openvpn diff --git a/flake.lock b/flake.lock index 04a6b3a..cb852f5 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1736508663, - "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=", + "lastModified": 1751824240, + "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", "owner": "nix-community", "repo": "home-manager", - "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc", + "rev": "fd9e55f5fac45a26f6169310afca64d56b681935", "type": "github" }, "original": { @@ -132,11 +132,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1736441705, - "narHash": "sha256-OL7leZ6KBhcDF3nEKe4aZVfIm6xQpb1Kb+mxySIP93o=", + "lastModified": 1751432711, + "narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "8870dcaff63dfc6647fb10648b827e9d40b0a337", + "rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f", "type": "github" }, "original": { @@ -148,11 +148,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1736523798, - "narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=", + "lastModified": 1751637120, + "narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "130595eba61081acde9001f43de3248d8888ac4a", + "rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3", "type": "github" }, "original": { @@ -177,6 +177,22 @@ "type": "github" } }, + "nixpkgs-small": { + "locked": { + "lastModified": 1751743520, + "narHash": "sha256-gk83D6+0KpugopnV6vrumpVHDrqESFjVr39O9u7NNy8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "833775e5731dcd1fd3eb0b61fa7ed2a4fafb4e3e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, "ronema": { "inputs": { "nixpkgs": [ @@ -185,16 +201,13 @@ }, "locked": { "lastModified": 1732525400, - "narHash": "sha256-VtuMp0XoAcUaDF40RszQpVdPZHrAEyzggnnooBcz64g=", - "ref": "refs/heads/master", - "rev": "6c3b5763408b76cc6e62b6b5806ddc6b30b4c207", - "revCount": 78, - "type": "git", - "url": "file:///home/chrigi/private-dev/rofi-network-manager" + "narHash": "sha256-q051SKAI9oSSkwG998w8J20EaKHV/loopSUTIsbft1M=", + "path": "/home/chrigi/private-dev/rofi-network-manager", + "type": "path" }, "original": { - "type": "git", - "url": "file:///home/chrigi/private-dev/rofi-network-manager" + "path": "/home/chrigi/private-dev/rofi-network-manager", + "type": "path" } }, "root": { @@ -203,6 +216,7 @@ "nix-colors": "nix-colors", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", + "nixpkgs-small": "nixpkgs-small", "ronema": "ronema", "xdph": "xdph" } diff --git a/flake.nix b/flake.nix index 0120943..13ee00d 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-small.url = "github:nixos/nixpkgs/nixos-unstable-small"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nix-colors.url = "github:misterio77/nix-colors"; xdph = { @@ -23,6 +24,7 @@ { self, nixpkgs, + nixpkgs-small, nixos-hardware, home-manager, nix-colors, @@ -34,16 +36,32 @@ username = "chrigi"; lib = nixpkgs.lib; system = "x86_64-linux"; + nixpkgsDrvRootPath = nixpkgs + "/pkgs/applications/editors/vscode"; pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ + (final: prev: { + vscodium-insider = pkgs.callPackage ./modules/vscodium/vscodium.nix { inherit nixpkgsDrvRootPath; }; + + }) + ]; + }; + pkgs-small = import nixpkgs-small { + inherit system; + config.allowUnfree = true; }; in { nixosConfigurations.nix-fw16 = lib.nixosSystem { specialArgs = { - inherit pkgs ronema xdph; + inherit + inputs + pkgs + ronema + xdph + ; }; modules = [ ./configuration.nix @@ -55,7 +73,7 @@ home-manager.useUserPackages = true; home-manager.users.${username} = import ./home.nix; home-manager.extraSpecialArgs = { - inherit username nix-colors; + inherit pkgs-small username nix-colors; }; } ]; diff --git a/home.nix b/home.nix index d72c1c6..68858ca 100644 --- a/home.nix +++ b/home.nix @@ -1,11 +1,15 @@ { config, pkgs, + pkgs-small, nix-colors, username, ... }: +let + +in { imports = [ nix-colors.homeManagerModules.default @@ -22,7 +26,7 @@ # Packages that should be installed to the user profile. home.packages = with pkgs; [ - kitty + pkgs-small.kitty eza git git-lfs @@ -30,7 +34,7 @@ jq direnv - okular + kdePackages.okular zip ant @@ -39,7 +43,6 @@ nixd # Nix language server for vscode nixfmt-rfc-style - skypeforlinux signal-desktop teams-for-linux @@ -47,12 +50,49 @@ jetbrains-toolbox nextcloud-client - presenterm + pkgs-small.presenterm font-awesome nerd-fonts.jetbrains-mono nerd-fonts.caskaydia-cove nerd-fonts.fira-code + (pkgs.appimageTools.wrapType2 { + name = "atlassify"; + pname = "atlassify"; + version = "1.17.0"; + src = fetchurl { + url = "https://github.com/setchy/atlassify/releases/download/v1.17.0/Atlassify-1.17.0.AppImage"; + hash = "sha256-mfcxrd9axnmQMofth1M5ov2a4ppFE0ga0Gxjwbx2v9o="; + }; + extraPkgs = + pkgs: + (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs) + ++ [ + libsecret + ]; + + }) + + (pkgs.stdenv.mkDerivation { + pname = "flowkeeper"; + version = "0.9.1"; + + src = pkgs.fetchurl { + url = "https://github.com/flowkeeper-org/fk-desktop/releases/download/v0.9.1/Flowkeeper"; + sha256 = "sha256-HCEG7LSM7h2Yz6BbvQ0KdmfYnKZOG+TZxMvE5o8gYiA="; + }; + + dontUnpack = true; + + installPhase = '' + install -Dm755 $src $out/bin/flowkeeper + ''; + + meta = { + description = "Flowkeeper time tracker"; + platforms = pkgs.lib.platforms.linux; + }; + }) ]; programs.ssh = { @@ -95,6 +135,16 @@ ''; }; + programs.atuin = { + enable = true; + settings = { + auto_sync = true; + sync_frequency = "5m"; + sync_address = "https://atuin.christianott.ch"; + search_mode = "fuzzy"; + }; + }; + programs.starship = { enable = true; enableBashIntegration = true; diff --git a/hyperland/default.nix b/hyperland/default.nix index c17cf1c..1b42897 100644 --- a/hyperland/default.nix +++ b/hyperland/default.nix @@ -261,6 +261,15 @@ in "bordercolor rgba(ed8796FF), class:org.kde.polkit-kde-authentication-agent-1" "dimaround, class:org.kde.polkit-kde-authentication-agent-1" "stayfocused, class:org.kde.polkit-kde-authentication-agent-1" + + # nextcloud + "float,class:(com.nextcloud.desktopclient.nextcloud)" + "size 400 800,class:(com.nextcloud.desktopclient.nextcloud)" + "move 100%-412 44,class:(com.nextcloud.desktopclient.nextcloud)" + # to try if it has sideeffects + "noinitialfocus, initialClass:com.nextcloud.desktopclient.nextcloud" + + "noinitialfocus, initialClass:atlassify" ]; # Bind flags # l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active. diff --git a/modules/vscode.nix b/modules/vscode.nix deleted file mode 100644 index 8381529..0000000 --- a/modules/vscode.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - config, - pkgs, - ... -}: { - - programs.vscode { - enable = true; - - }; -} \ No newline at end of file diff --git a/modules/vscodium/default.nix b/modules/vscodium/default.nix new file mode 100644 index 0000000..04ffb4f --- /dev/null +++ b/modules/vscodium/default.nix @@ -0,0 +1,11 @@ +{ inputs, pkgs, ... }: +let + nixpkgsDrvRootPath = inputs.nixpkgs + "/pkgs/applications/editors/vscode"; +in +{ + nixpkgs.overlays = [ + { + vscodium = pkgs.callPackage ./vscodium-insiders.nix { inherit nixpkgsDrvRootPath; }; + } + ]; +} diff --git a/modules/vscodium/vscodium.nix b/modules/vscodium/vscodium.nix new file mode 100644 index 0000000..c506c95 --- /dev/null +++ b/modules/vscodium/vscodium.nix @@ -0,0 +1,104 @@ +{ + lib, + stdenv, + callPackage, + nixpkgsDrvRootPath, + fetchurl, + nixosTests, + commandLineArgs ? "", + sourceExecutableName ? "codium-insiders", + useVSCodeRipgrep ? stdenv.hostPlatform.isDarwin, +}: + +let + inherit (stdenv.hostPlatform) system; + throwSystem = throw "Unsupported system: ${system}"; + + plat = + { + x86_64-linux = "linux-x64"; + x86_64-darwin = "darwin-x64"; + aarch64-linux = "linux-arm64"; + aarch64-darwin = "darwin-arm64"; + armv7l-linux = "linux-armhf"; + } + .${system} or throwSystem; + + archive_fmt = if stdenv.hostPlatform.isDarwin then "zip" else "tar.gz"; + + hash = + { + x86_64-linux = "sha256-GXK5c8Ar6zjPvP+PDLsoqwDrzC1ECpeSkZCErcIhvYg="; + x86_64-darwin = "sha256-d+8vt5grnLwD/cIIGgb2ogpgZrZLZs+2bqfBrRzLfJw="; + aarch64-linux = "sha256-D93Eh5TPRgd9OxJ4pWsOryS5mOz2amQOHOnO+K99hAg="; + aarch64-darwin = "sha256-xKBWAb23jUi8pI7mZpHOP2eF3PZFh0MWj+BM+alKF18="; + armv7l-linux = "sha256-EqJNi/qMM08voA/Ltle3/28zbgIz/Ae42IE5oXLxcKU="; + } + .${system} or throwSystem; + + sourceRoot = lib.optionalString (!stdenv.hostPlatform.isDarwin) "."; +in +callPackage "${toString nixpkgsDrvRootPath}/generic.nix" rec { + inherit + sourceRoot + commandLineArgs + useVSCodeRipgrep + sourceExecutableName + ; + + # Please backport all compatible updates to the stable release. + # This is important for the extension ecosystem. + version = "1.100.02359-insider"; + pname = "vscodium"; + + executableName = "codium-insiders"; + longName = "VSCodium"; + shortName = "vscodium"; + + src = fetchurl { + url = "https://github.com/VSCodium/vscodium-insiders/releases/download/${version}/VSCodium-${plat}-${version}.${archive_fmt}"; + inherit hash; + }; + + tests = nixosTests.vscodium; + + updateScript = ./update-vscodium.sh; + + # Editing the `codium` binary (and shell scripts) within the app bundle causes the bundle's signature + # to be invalidated, which prevents launching starting with macOS Ventura, because VSCodium is notarized. + # See https://eclecticlight.co/2022/06/17/app-security-changes-coming-in-ventura/ for more information. + dontFixup = stdenv.hostPlatform.isDarwin; + + meta = { + description = '' + Open source source code editor developed by Microsoft for Windows, + Linux and macOS (VS Code without MS branding/telemetry/licensing) + ''; + longDescription = '' + Open source source code editor developed by Microsoft for Windows, + Linux and macOS. It includes support for debugging, embedded Git + control, syntax highlighting, intelligent code completion, snippets, + and code refactoring. It is also customizable, so users can change the + editor's theme, keyboard shortcuts, and preferences + ''; + homepage = "https://github.com/VSCodium/vscodium"; + downloadPage = "https://github.com/VSCodium/vscodium/releases"; + license = lib.licenses.mit; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + maintainers = with lib.maintainers; [ + synthetica + bobby285271 + ludovicopiero + ]; + mainProgram = "codium"; + platforms = [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + "armv7l-linux" + ]; + # requires libc.so.6 and other glibc specifics + broken = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu; + }; +}