From 8ac1e75e857230b1707d32f415119d1546f45559 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 11 Feb 2025 14:53:02 -0800 Subject: [PATCH] devenv --- extras/dev.nix | 19 +++++++------- flake.lock | 53 ++++---------------------------------- flake.nix | 15 ++++++----- systems/BASED.nix | 5 +++- users/tao.nix | 2 +- users/tao/nushell/stuff.nu | 10 +++---- 6 files changed, 33 insertions(+), 71 deletions(-) diff --git a/extras/dev.nix b/extras/dev.nix index 060720d..2ca3d3b 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -1,5 +1,6 @@ {pkgs, ...}: { environment.systemPackages = with pkgs; [ + devenv act aichat # (llm.withPlugins (ps: with ps; [llm-openrouter])) @@ -102,13 +103,13 @@ SUBSYSTEM == "tty", GROUP="dialout", ATTRS{interface}=="Black Magic UART Port", SYMLINK+="ttyBmpTarg" ''; - virtualisation.docker = { - enable = true; - storageDriver = "btrfs"; - }; - virtualisation.docker.rootless = { - enable = true; - setSocketVariable = true; - }; - users.extraGroups.docker.members = ["tao"]; + # virtualisation.docker = { + # enable = true; + # storageDriver = "btrfs"; + # }; + # virtualisation.docker.rootless = { + # enable = true; + # setSocketVariable = true; + # }; + # users.extraGroups.docker.members = ["tao"]; } diff --git a/flake.lock b/flake.lock index 7a9419a..74d3798 100644 --- a/flake.lock +++ b/flake.lock @@ -294,27 +294,6 @@ "type": "github" } }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "plasma-manager", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1714377222, - "narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "libgit2": { "flake": false, "locked": { @@ -563,27 +542,6 @@ "type": "indirect" } }, - "plasma-manager": { - "inputs": { - "home-manager": "home-manager_3", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1736549395, - "narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=", - "owner": "pjones", - "repo": "plasma-manager", - "rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b", - "type": "github" - }, - "original": { - "owner": "pjones", - "repo": "plasma-manager", - "type": "github" - } - }, "root": { "inputs": { "agenix": "agenix", @@ -596,7 +554,6 @@ "nixos-facter-modules": "nixos-facter-modules", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_5", - "plasma-manager": "plasma-manager", "zen-browser": "zen-browser" } }, @@ -658,15 +615,15 @@ ] }, "locked": { - "lastModified": 1727721329, - "narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=", - "owner": "MarceColl", + "lastModified": 1739459953, + "narHash": "sha256-utELlKir2wO2fRzNPuAIx9z8f6BGUt0Q3IzA0GNfAPk=", + "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc", + "rev": "f36e0e7e21079151bfe817df3a6ab93dc8d648ea", "type": "github" }, "original": { - "owner": "MarceColl", + "owner": "0xc000022070", "repo": "zen-browser-flake", "type": "github" } diff --git a/flake.nix b/flake.nix index e57d32d..8953820 100644 --- a/flake.nix +++ b/flake.nix @@ -17,10 +17,10 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - plasma-manager = { - url = "github:pjones/plasma-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # plasma-manager = { + # url = "github:pjones/plasma-manager"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; helix = { url = "github:mattwparas/helix/steel-event-system"; inputs.nixpkgs.follows = "nixpkgs"; @@ -32,7 +32,7 @@ # prescurve.url = "github:taotien/prescurve"; # prescurve.inputs.nixpkgs.follows = "nixpkgs"; zen-browser = { - url = "github:MarceColl/zen-browser-flake"; + url = "github:0xc000022070/zen-browser-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/0.1"; @@ -43,10 +43,12 @@ extra-substituters = [ "https://cosmic.cachix.org/" # "https://helix.cachix.org/" + "https://devenv.cachix.org" ]; extra-trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" # "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" ]; }; @@ -58,8 +60,7 @@ agenix, disko, home-manager, - plasma-manager, - # helix, + # plasma-manager, nixos-cosmic, zen-browser, determinate, diff --git a/systems/BASED.nix b/systems/BASED.nix index d07cf40..7002932 100644 --- a/systems/BASED.nix +++ b/systems/BASED.nix @@ -178,7 +178,10 @@ ]; }; nixpkgs.config = {allowUnfree = true;}; - nix.nixPath = ["nixpks=${pkgs.path}"]; + nix.nixPath = ["nixpkgs=${pkgs.path}"]; + nix.extraOptions = '' + trusted-users = root tao + ''; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; system.stateVersion = lib.mkDefault "23.05"; diff --git a/users/tao.nix b/users/tao.nix index 966d4bc..66aca81 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -37,7 +37,7 @@ darktable deluge discord - inputs.plasma-manager.packages.${pkgs.system}.default + # inputs.plasma-manager.packages.${pkgs.system}.default jellyfin-media-player # jellyfin-mpv-shim kdePackages.plasma-vault diff --git a/users/tao/nushell/stuff.nu b/users/tao/nushell/stuff.nu index 826c9cd..b5ae567 100644 --- a/users/tao/nushell/stuff.nu +++ b/users/tao/nushell/stuff.nu @@ -13,7 +13,7 @@ alias snapper = snapper -c home alias follow = readlink -f alias la = ls -a -alias quiet = sudo ectool fanduty 30 +alias quiet = sudo ectool fanduty 42 alias loud = sudo ectool autofanctrl alias cp-full = cp @@ -71,14 +71,14 @@ def nr [package] { nix search nixpkgs $package } def rebuild --wrapped [subcommand, --builders: string, ...rest] { - if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders | is-empty) { + if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") { sudo nix store info --store ssh://nocomputer } - if ($builders | is-empty) { - sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose ...$rest + if ($builders == "") { + sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose --builders "" } else { - sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose --builders $builders ...$rest + sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose ...$rest } toastify send rebuild done! }