From 07e90b0d0ac5fcd24145d1aaf5fff0c48673e665 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sun, 1 Dec 2024 17:50:31 +0100 Subject: [PATCH] update to 24.11 --- configuration.nix | 34 +++- flake.lock | 344 ++++++------------------------------- flake.nix | 24 +-- hardware-configuration.nix | 40 +++++ home.nix | 30 +++- remove-old-nix.sh | 7 +- sync-nix.sh | 11 +- upgrade-nix.sh | 11 +- 8 files changed, 181 insertions(+), 320 deletions(-) create mode 100644 hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index 28d6e58..fe93bd8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, hyprland, hyprland-plugins, nixpkgs-unstable, lib, nixos-hardware, zen-browser/*, kwin-effects-forceblur*/, ... }: +{ config, pkgs, hyprland, options, hyprland-plugins, nixpkgs-unstable, lib, nixos-hardware, zen-browser/*, kwin-effects-forceblur*/, ... }: # let # unstable-pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux; #import nixpkgs-unstable.nixosModules.readOnlyPkgs {}; # unstable-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; @@ -19,11 +19,18 @@ nixos-hardware.nixosModules.common-pc-laptop nixos-hardware.nixosModules.common-pc-laptop-ssd ./hardware-configuration.nix - ./cachix.nix + # /etc/nixos/cachix.nix ]; nixpkgs.config.permittedInsecurePackages = [ "olm-3.2.16" + # "qbittorrent-4.6.4" + # "cinny-3.2.0" + "dotnet-sdk-wrapped-7.0.410" + "dotnet-sdk-7.0.410" + "dotnet-runtime-6.0.36" + "dotnet-sdk-wrapped-6.0.428" + "dotnet-sdk-6.0.428" ]; @@ -60,7 +67,7 @@ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; networking.networkmanager.enable = true; - time.timeZone = "Europe/Prague"; + time.timeZone = lib.mkForce "Europe/Prague"; i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "cs_CZ.UTF-8"; @@ -144,11 +151,11 @@ # Comment out below for the first time to avoid cache miss, if using flake programs.hyprland = { enable = true; - package = hyprland.packages.${pkgs.system}.hyprland; - portalPackage = hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override - { + #package = hyprland.packages.${pkgs.system}.hyprland; + #portalPackage = hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland.override + # { #inherit (pkgs) mesa; - }; + #}; # package = unstable-pkgs.hyprland; }; @@ -159,7 +166,18 @@ services.hypridle.enable = true; programs.gamemode.enable = true; programs.fish.enable = true; - programs.nix-ld.enable = true; # Fix dynamic binaries from outside of nix + # Fix dynamic binaries from outside of nix + programs.nix-ld = { + enable = true; + libraries = options.programs.nix-ld.libraries.default ++ (with pkgs; [ + libdrm + mesa + libxkbcommon + openssl + libGL libva + libelf + ]); + }; services.openssh.enable = true; services.tailscale = { enable = true; diff --git a/flake.lock b/flake.lock index 9822b70..5d8686e 100644 --- a/flake.lock +++ b/flake.lock @@ -33,51 +33,16 @@ "type": "github" } }, - "devshell": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1728330715, - "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", - "owner": "numtide", - "repo": "devshell", - "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "flake-compat": { - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -86,97 +51,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixvim", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -184,37 +58,16 @@ ] }, "locked": { - "lastModified": 1726989464, - "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "lastModified": 1732466619, + "narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-24.05", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729260213, - "narHash": "sha256-jAvHoU/1y/yCuXzr2fNF+q6uKmr8Jj2xgAisK4QB9to=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "09a0c0c02953318bf94425738c7061ffdc4cba75", + "rev": "f3111f62a23451114433888902a55cf0692b408d", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -292,11 +145,11 @@ ] }, "locked": { - "lastModified": 1729596320, - "narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=", + "lastModified": 1732053779, + "narHash": "sha256-v9FS0r2XWMf/+uwevvzaF/2TimMFeLEQTf4T8cgc6c0=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219", + "rev": "0bc619b2c3b4f9c2b65247e81d69f8bbc573d991", "type": "github" }, "original": { @@ -436,27 +289,6 @@ "type": "github" } }, - "nix-darwin": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1728901530, - "narHash": "sha256-I9Qd0LnAsEGHtKE9+uVR0iDFmsijWSy7GT0g3jihG4Q=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "a60ac02f9466f85f092e576fd8364dfc4406b5a6", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, "nix-gaming": { "inputs": { "flake-parts": "flake-parts", @@ -464,11 +296,11 @@ "umu": "umu" }, "locked": { - "lastModified": 1729614010, - "narHash": "sha256-L4FvILfV9T0zSs09v1m3hItTp0KfuIRoeHju1eOg2EA=", + "lastModified": 1732758553, + "narHash": "sha256-divlhUduT0/t8D9k11Yd3Ah3xpr302vV1KXxIMb8I3M=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "e9ca6bf2c6ebf60562d82b954ad5e381b67e0264", + "rev": "effe1d54e23f430d3e803f63e9e47aba33acfb63", "type": "github" }, "original": { @@ -477,13 +309,33 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1732519917, + "narHash": "sha256-AGXhwHdJV0q/WNgqwrR2zriubLr785b02FphaBtyt1Q=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "f4a5ca5771ba9ca31ad24a62c8d511a405303436", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixos-hardware": { "locked": { - "lastModified": 1729690929, - "narHash": "sha256-cTSekmupaDfrhlpLhBUBrU9mUzBaD6mYsMveTX0bKDg=", + "lastModified": 1732483221, + "narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "64d900abe40057393148bc0283d35c2254dd4f57", + "rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405", "type": "github" }, "original": { @@ -510,23 +362,23 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1727825735, - "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "lastModified": 1730504152, + "narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1729413321, - "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", + "lastModified": 1732758367, + "narHash": "sha256-RzaI1RO0UXqLjydtz3GAXSTzHkpb/lLD1JD8a0W4Wpo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26", + "rev": "fa42b5a5f401aab8a32bd33c9a4de0738180dc59", "type": "github" }, "original": { @@ -538,11 +390,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1728538411, - "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "lastModified": 1731890469, + "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "rev": "5083ec887760adfe12af64830a66807423a859a7", "type": "github" }, "original": { @@ -554,16 +406,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1729449015, - "narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=", + "lastModified": 1732981179, + "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "89172919243df199fe237ba0f776c3e3e3d72367", + "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } @@ -584,66 +436,16 @@ "type": "github" } }, - "nixvim": { - "inputs": { - "devshell": "devshell", - "flake-compat": "flake-compat", - "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", - "home-manager": "home-manager_2", - "nix-darwin": "nix-darwin", - "nixpkgs": [ - "nixpkgs" - ], - "nuschtosSearch": "nuschtosSearch", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1729699620, - "narHash": "sha256-f6S8JX5w9bPLMbaqR5dM5koybZntdSFfKyfq/LQU7rs=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "029eafd70d6e28919a9ec01a94a46b51c4ccff40", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nuschtosSearch": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1728905062, - "narHash": "sha256-W/lClt0bRgFRO0WFtytX/LEILpPNq+FOjIfESpkeu5c=", - "owner": "NuschtOS", - "repo": "search", - "rev": "f82d3e1c1c9d1eaeb91878519e2d27b27c66ce84", - "type": "github" - }, - "original": { - "owner": "NuschtOS", - "repo": "search", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "nix-gaming": "nix-gaming", + "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable", - "nixvim": "nixvim", "zen-browser": "zen-browser" } }, @@ -662,42 +464,6 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729242555, - "narHash": "sha256-6jWSWxv2crIXmYSEb3LEVsFkCkyVHNllk61X4uhqfCs=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "d986489c1c757f6921a48c1439f19bfb9b8ecab5", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "umu": { "inputs": { "nixpkgs": [ @@ -707,11 +473,11 @@ }, "locked": { "dir": "packaging/nix", - "lastModified": 1728772489, - "narHash": "sha256-6sHjXNhPrRXIV1au5jlSXHeqn/QHb9wyRt7V0F5p4PA=", + "lastModified": 1732337089, + "narHash": "sha256-dwFza03ETqrcmVGSCdgDDKTWKRgckpQ3vXkZRCYtM9g=", "ref": "refs/heads/main", - "rev": "475e2b37e34a663b11f8c92b79dd45637a3e848c", - "revCount": 770, + "rev": "f6a6af3191f5497d95d8f8aaa08826a45da199c4", + "revCount": 842, "submodules": true, "type": "git", "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" diff --git a/flake.nix b/flake.nix index 1fc6007..79467ab 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; zen-browser.url = "github:MarceColl/zen-browser-flake"; nixos-hardware.url = "github:NixOS/nixos-hardware"; @@ -9,19 +9,18 @@ url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; - home-manager.url = "github:nix-community/home-manager/release-24.05"; # /release-24.11 - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + home-manager = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nix-gaming.url = "github:fufexan/nix-gaming"; - nixvim = { - url = "github:nix-community/nixvim"; - # If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-"` - inputs.nixpkgs.follows = "nixpkgs"; - }; - # kwin-effects-forceblur.url = "https://gist.githubusercontent.com/taj-ny/c1abdde710f33e34dc39dc53a5dc2c09/raw/7078265012c37b6f6bc397e9a7893bc6004e7b6c/kwin-effects-forceblur.nix"; + + nix-index-database.url = "github:nix-community/nix-index-database"; + nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { nixpkgs, nixvim, home-manager, ... }@attrs: { + outputs = { nixpkgs, home-manager, nixpkgs-unstable, nix-gaming, nix-index-database, ... }@attrs: { nixosConfigurations.lenovo-nix = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; @@ -29,11 +28,12 @@ # ./obs.nix # doesn't work. Use nix-shell -p obs-studio instead home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; - home-manager.users.dan = (import ./home.nix) { nix-gaming = attrs.nix-gaming; }; + home-manager.users.dan = (import ./home.nix) { inherit nixpkgs-unstable nix-gaming; }; home-manager.backupFileExtension = "backup"; } - # nixvim.nixosModules.nixvim ./configuration.nix + nix-index-database.nixosModules.nix-index + { programs.nix-index-database.comma.enable = true; } ]; }; diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..a69429e --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,40 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/10ee9219-dc75-465c-a980-c09891f9e9c0"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/473E-F632"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home.nix b/home.nix index 60f2a96..4ac4b61 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,11 @@ -{ nix-gaming, ... }: -{ pkgs, hyprland-plugins, ...}: +{ nix-gaming, nixpkgs-unstable,... }: +{ pkgs, hyprland-plugins, inputs, ...}: let - unstable-pkgs = import {}; + + unstable = import inputs.nixpkgs-unstable { + system = pkgs.system; + }; + in { home = { @@ -10,6 +14,8 @@ in packages = with pkgs; [ # acpilight wpsoffice + pico-sdk + elf2uf2-rs # nix-gaming.packages.${pkgs.system}.osu-lazer-bin obsidian betaflight-configurator @@ -48,6 +54,7 @@ in jetbrains.clion jetbrains.goland jetbrains.datagrip + jetbrains.rider datovka nwg-displays wireguard-tools @@ -72,9 +79,20 @@ in libcanberra-gtk3 # sound events qt6ct nil # nix language server + nix-output-monitor + expect + nh + + udev-block-notify + appimage-run + + heroic + heaptrack + # cinny gping - redisinsight + # redisinsight + valgrind caddy jq htmlq @@ -117,6 +135,8 @@ in nixfmt-rfc-style qpwgraph + nixpkgs-unstable.legacyPackages.${system}.zed-editor + android-tools hyperfine scc @@ -176,6 +196,8 @@ in }; vscode = { enable = true; + # package = nixpkgs-unstable.packages.${pkgs.system}.vscode; + # package = unstable.pkgs.vscode; extensions = with pkgs.vscode-extensions; [ ]; diff --git a/remove-old-nix.sh b/remove-old-nix.sh index 25d983e..a4cc4f8 100644 --- a/remove-old-nix.sh +++ b/remove-old-nix.sh @@ -1,3 +1,4 @@ -sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 30d -nix-env --delete-generations 30d -nix-collect-garbage \ No newline at end of file +# sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 30d +# nix-env --delete-generations 30d +# nix-collect-garbage +nh clean all -k 5 -K 20d diff --git a/sync-nix.sh b/sync-nix.sh index eb886f5..26187df 100755 --- a/sync-nix.sh +++ b/sync-nix.sh @@ -1,6 +1,11 @@ +#!/bin/bash echo "Copying configurations" cp .config/* ~/.config/ -r cp .default-python-packages ~ -sudo cp *.nix /etc/nixos/ -sudo nixos-rebuild switch --show-trace --recreate-lock-file -cp /etc/nixos/flake.lock . \ No newline at end of file +if [ -z "$(which nh)" ]; then + sudo cp *.nix /etc/nixos/ + sudo nixos-rebuild switch --show-trace + cp /etc/nixos/flake.lock . +else + nh os switch . -- --show-trace +fi diff --git a/upgrade-nix.sh b/upgrade-nix.sh index 7b581ef..dfff5c0 100644 --- a/upgrade-nix.sh +++ b/upgrade-nix.sh @@ -1 +1,10 @@ -sudo nixos-rebuild --upgrade switch \ No newline at end of file +if [ -z "$(which nh)" ]; then + cd /etc/nixos + sudo nix-channel --update + sudo nix flake update + sudo nixos-rebuild --upgrade switch +else + sudo nix-channel --update + sudo nix flake update + sudo nh os switch . +fi \ No newline at end of file