From 9f2626935c155960b1af639be229b3d3f432244d Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:32:08 -0800 Subject: [PATCH] unstable all --- extras/dev.nix | 30 ++++++------- extras/gaming.nix | 10 ++--- flake.lock | 26 +++-------- flake.nix | 98 +++++++++++------------------------------- systems/BASED.nix | 6 +-- systems/NOcomputer.nix | 8 ++-- systems/NOlaptop.nix | 2 +- systems/NOserver.nix | 2 +- users/pi.nix | 4 +- users/tao.nix | 45 +++++++++++-------- 10 files changed, 86 insertions(+), 145 deletions(-) diff --git a/extras/dev.nix b/extras/dev.nix index ad189db..583113d 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -4,12 +4,12 @@ nodejs python310Packages.python-lsp-server sqlite - unstable.sqlx-cli - unstable.ruff - unstable.ruff-lsp + sqlx-cli + ruff + ruff-lsp pypy3 python3 - # unstable.swagger-cli + # swagger-cli # swagger-codegen sshfs openapi-generator-cli @@ -25,17 +25,17 @@ nil nixpkgs-fmt rustup - unstable.cargo - unstable.cargo-edit - unstable.cargo-feature - unstable.cargo-rr - unstable.clippy - unstable.elf2uf2-rs - unstable.pijul - unstable.rust-analyzer - unstable.rustc - unstable.rustfmt - unstable.sccache + cargo + cargo-edit + cargo-feature + cargo-rr + clippy + elf2uf2-rs + pijul + rust-analyzer + rustc + rustfmt + sccache vulkan-loader ]; diff --git a/extras/gaming.nix b/extras/gaming.nix index 0d8b631..11bc9f3 100644 --- a/extras/gaming.nix +++ b/extras/gaming.nix @@ -2,12 +2,12 @@ imports = [ aagl.nixosModules.default ]; environment.systemPackages = with pkgs; [ - unstable.heroic - unstable.lutris - unstable.mangohud - unstable.prismlauncher + heroic + lutris + mangohud + prismlauncher wine - # unstable.parsec-bin + # parsec-bin ]; nixpkgs.config.permittedInsecurePackages = [ diff --git a/flake.lock b/flake.lock index 963d770..500df8e 100644 --- a/flake.lock +++ b/flake.lock @@ -123,13 +123,13 @@ "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs_2": { "locked": { - "lastModified": 1706191920, - "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=", + "lastModified": 1706371002, + "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae5c332cbb5827f6b1f02572496b141021de335f", + "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006", "type": "github" }, "original": { @@ -138,29 +138,13 @@ "type": "indirect" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", - "type": "indirect" - } - }, "root": { "inputs": { "aagl": "aagl", "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", "nixos-raspberrypi": "nixos-raspberrypi", - "nixpkgs": "nixpkgs_2", - "nixpkgs-unstable": "nixpkgs-unstable" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 465eb7a..194cf63 100644 --- a/flake.nix +++ b/flake.nix @@ -15,99 +15,49 @@ aagl.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ nixpkgs, nixos-hardware, nixos-raspberrypi, home-manager, aagl, ... }: - # let - # nixos-system = (systemModules: nixpkgs.lib.nixosSystem { - # modules = systemModules; - # specialArgs = attrs; - # }); - # overlay-unstable = final: prev: { - # unstable = import nixpkgs { - # system = "x86_64-linux"; - # config.allowUnfree = true; - # config.permittedInsecurePackages = [ - # # "electron-24.8.6" - # ]; - # }; - # }; - # # overlay-unstable-arm = final: prev: { - # # unstable = import nixpkgs-unstable { - # # system = "aarch64-linux"; - # # config.allowUnfree = true; - # # # config.allowUnsupportedSystem = true; - # # }; - # # }; - # nixos-hw = nixos-hardware.nixosModules; - # # nixos-rpi = nixos-raspberrypi.nixosModules; - # # overlay-home-manager = final: prev: { - # # hw = import home-manager; - # # }; - # in + outputs = { self, nixpkgs, nixos-hardware, nixos-raspberrypi, home-manager, aagl, ... }@attrs: { nixosConfigurations = { - NOcomputer = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - config.allowUnfree = true; - modules = [ - nixos-hardware.nixosModules.common-cpu-amd - nixos-hardware.nixosModules.common-gpu-nvidia-nonprime - ./systems/BASED.nix - ./systems/NOcomputer.nix - # ./users/tao.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.jdoe = import ./tao.nix; - } - ./extras/uwuraid.nix - ./extras/dev.nix - ./extras/gaming.nix - ]; - }; + # NOcomputer = nixpkgs.lib.nixosSystem { + # system = "x86_64-linux"; + # # config.allowUnfree = true; + # modules = [ + # nixos-hardware.nixosModules.common-cpu-amd + # nixos-hardware.nixosModules.common-gpu-nvidia-nonprime + # ./systems/BASED.nix + # ./systems/NOcomputer.nix + # # ./users/tao.nix + # home-manager.nixosModules.home-manager + # { + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + # home-manager.users.jdoe = import ./tao.nix; + # } + # ./extras/uwuraid.nix + # ./extras/dev.nix + # ./extras/gaming.nix + # ]; + # }; NOlaptop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - config.allowUnfree = true; + specialArgs = attrs; + # config.allowUnfree = true; modules = [ nixos-hardware.nixosModules.common-cpu-intel # inputs.nixos-hardware.nixosModules.framework ./systems/BASED.nix ./systems/NOlaptop.nix - # ./users/tao.nix + ./users/tao.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.jdoe = import ./tao.nix; } ./extras/uwuraid.nix ./extras/dev.nix ./extras/gaming.nix ]; }; - # NOcomputer = nixos-system [ - # ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) - # nixos-hw.common-cpu-amd - # nixos-hw.common-gpu-nvidia-nonprime - # ./systems/BASED.nix - # ./systems/NOcomputer.nix - # # home-manager.nixosModules.home-manager - # ./users/tao.nix - # ./extras/uwuraid.nix - # ./extras/dev.nix - # ./extras/gaming.nix - # ]; - # NOlaptop = nixos-system [ - # ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) - # nixos-hw.common-cpu-intel - # # inputs.nixos-hardware.nixosModules.framework - # ./systems/BASED.nix - # ./systems/NOlaptop.nix - # ./users/tao.nix - # ./extras/uwuraid.nix - # ./extras/dev.nix - # ./extras/gaming.nix - # ]; # NObangers = nixos-system [ # # ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable-arm ]; }) # nixos-hw.raspberry-pi-4 diff --git a/systems/BASED.nix b/systems/BASED.nix index 5b1ed97..0e5dbc0 100644 --- a/systems/BASED.nix +++ b/systems/BASED.nix @@ -13,10 +13,10 @@ ffmpeg firefox git - unstable.helix + helix localsend mesa - unstable.mpv + mpv ouch ripgrep skim @@ -29,7 +29,7 @@ programs.partition-manager.enable = lib.mkDefault true; services.tailscale.enable = true; - services.tailscale.package = pkgs.unstable.tailscale; + services.tailscale.package = pkgs.tailscale; services.openssh.enable = true; services.flatpak.enable = lib.mkDefault true; diff --git a/systems/NOcomputer.nix b/systems/NOcomputer.nix index 5dc5f7a..b1e9ce6 100644 --- a/systems/NOcomputer.nix +++ b/systems/NOcomputer.nix @@ -82,7 +82,7 @@ # }; # boot.kernelPackages = pkgs.linuxPackages_6_5; - boot.kernelPackages = pkgs.unstable.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.kernelModules = [ "i2c-dev" "kvm-amd" ]; boot.kernelParams = [ "nvidia-drm.modeset=1" ]; @@ -100,9 +100,9 @@ modesetting.enable = true; powerManagement.enable = true; # package = config.boot.kernelPackages.nvidiaPackages.latest; - # package = pkgs.unstable.linuxPackages_latest.nvidiaPackages.vulkan_beta; - # package = pkgs.unstable.linuxPackages_latest.nvidiaPackages.latest; - package = pkgs.unstable.linuxPackages_latest.nvidiaPackages.production; + # package = pkgs.linuxPackages_latest.nvidiaPackages.vulkan_beta; + # package = pkgs.linuxPackages_latest.nvidiaPackages.latest; + package = pkgs.linuxPackages_latest.nvidiaPackages.production; }; # enable core and mem freq sliders for nvidia services.xserver.deviceSection = '' diff --git a/systems/NOlaptop.nix b/systems/NOlaptop.nix index f7ad85b..b40a810 100644 --- a/systems/NOlaptop.nix +++ b/systems/NOlaptop.nix @@ -4,7 +4,7 @@ # libsForQt5.skanpage intel-gpu-tools powertop - unstable.fw-ectool + fw-ectool ]; fileSystems."/home" = { diff --git a/systems/NOserver.nix b/systems/NOserver.nix index 4029452..15fc874 100644 --- a/systems/NOserver.nix +++ b/systems/NOserver.nix @@ -4,7 +4,7 @@ bottom cifs-utils git - unstable.helix + helix ouch ripgrep skim diff --git a/users/pi.nix b/users/pi.nix index 81d4fec..5a86930 100644 --- a/users/pi.nix +++ b/users/pi.nix @@ -4,7 +4,7 @@ libsForQt5.kdeconnect-kde ]; # programs.nushell.enable = true; - # environment.shells = with pkgs; [ unstable.nushell ]; + # environment.shells = with pkgs; [ nushell ]; # services.expressvpn.enable = true; @@ -24,7 +24,7 @@ users.users.tao = { isNormalUser = true; extraGroups = [ "wheel" "dialout" ]; - # shell = pkgs.unstable.nushell; + # shell = pkgs.nushell; }; # i18n.inputMethod = { diff --git a/users/tao.nix b/users/tao.nix index d4a53af..7927292 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -1,9 +1,9 @@ -{ pkgs, ... }: { +{ pkgs, home-manager, ... }: { users.users.tao.packages = with pkgs; [ leetcode-cli - unstable.typst-fmt + typst-fmt mendeley - # unstable.wkhtmltopdf + # wkhtmltopdf calibre qmk qmk-udev-rules @@ -29,7 +29,7 @@ discord gh jellyfin-media-player - unstable.jellyfin-mpv-shim + jellyfin-mpv-shim keepassxc libsForQt5.kcharselect libsForQt5.kdeconnect-kde @@ -45,23 +45,23 @@ thunderbird tio typst-lsp - unstable.joshuto - unstable.nushell - # unstable.oculante - unstable.pandoc - unstable.prusa-slicer - unstable.starship - unstable.typst - unstable.wezterm - unstable.yazi + joshuto + nushell + # oculante + pandoc + prusa-slicer + starship + typst + wezterm + yazi virt-manager zathura zoom-us - unstable.zoxide + zoxide ]; # programs.adb.enable = true; programs.mosh.enable = true; - environment.shells = with pkgs; [ unstable.nushell ]; + environment.shells = with pkgs; [ nushell ]; services.udev.extraRules = '' KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" @@ -90,7 +90,7 @@ users.users.tao = { isNormalUser = true; extraGroups = [ "video" "wheel" "libvirtd" "dialout" "game" ]; - shell = pkgs.unstable.nushell; + shell = pkgs.nushell; }; @@ -108,8 +108,15 @@ # }; # imports = [ (import "${home-manager}/nixos") ]; + # imports = [ home-manager.nixosModules.home-manager ]; - # home-manager.users.tao = { - # home.stateversion = "23.11"; - # }; + # home-manager.nixosModules.home-manager + # { + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + # home-manager.users.tao = import ./users/tao.nix; + # } + home-manager.users.tao = { pkgs, ... }: { + home.stateversion = "23.11"; + }; }