From 7be08c80fa5d908e7a8f7e4a1fae33ce183d46de Mon Sep 17 00:00:00 2001 From: zoe Date: Sat, 8 Jul 2023 16:01:56 +0200 Subject: [PATCH] use rust flake --- configuration.nix | 21 ++++++++++----------- flake.nix | 13 ++++++------- user.nix | 9 ++------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/configuration.nix b/configuration.nix index 1a1cf42..56b08c6 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’). -{ pkgs, config, ... }: { +{ pkgs, ... }: { imports = [ ./hardware-configuration.nix @@ -16,10 +16,9 @@ ]; nix.settings = { - substituters = [ - "https://helix.cachix.org" - ]; - trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; + substituters = [ "https://helix.cachix.org" ]; + trusted-public-keys = + [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -57,8 +56,10 @@ any-nix-shell fish --info-right | source ''; - xdg.portal.enable = true; - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + xdg.portal = { + enable = true; + wlr.enable = true; + }; # hostname networking.hostName = "bat"; # Define your hostname. @@ -147,7 +148,7 @@ alsa.support32Bit = true; pulse.enable = true; wireplumber.enable = true; - # jack.enable = true; + jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) @@ -192,7 +193,5 @@ # vars environment.variables = { MOZ_USE_XINPUT2 = "DEFAULT=1"; }; - nixpkgs.config.permittedInsecurePackages = [ - "python-2.7.18.6" - ]; + nixpkgs.config.permittedInsecurePackages = [ "python-2.7.18.6" ]; } diff --git a/flake.nix b/flake.nix index 7e0d79d..fa439e0 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { inputs = { nixpkgs.url = "nixpkgs/nixos-23.05"; + mozilla.url = "github:mozilla/nixpkgs-mozilla"; # hyprland.url = "github:hyprwm/Hyprland"; supercolor.url = "github:zoe-bat/supercolor"; kaokao.url = "github:zoe-bat/kaokao"; @@ -10,16 +11,14 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs - , home-manager, supercolor, i3layouts-rofi, kaokao - }@inputs: - let - system = "x86_64-linux"; + outputs = { self, nixpkgs, home-manager, supercolor, i3layouts-rofi, kaokao + , mozilla }@inputs: + let system = "x86_64-linux"; in { nixosConfigurations.bat = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + system = system; modules = [ - ({ config, pkgs, ... }: { nixpkgs.overlays = [ ]; }) + ({ config, pkgs, ... }: { nixpkgs.overlays = [ mozilla.overlays.rust ]; }) ./configuration.nix ]; specialArgs = inputs; diff --git a/user.nix b/user.nix index 55b5b61..2046890 100644 --- a/user.nix +++ b/user.nix @@ -1,10 +1,5 @@ { pkgs, supercolor, kaokao, i3layouts-rofi, ... }: -let - my-python-packages = p: - with p; [ - i3ipc - python-lsp-server - ]; +let my-python-packages = p: with p; [ pytest i3ipc python-lsp-server ]; in { # Define a user account. Don't forget to set a password with ‘passwd’. users.users.zoe = { @@ -149,11 +144,11 @@ in { nodePackages_latest.svelte-language-server nodePackages_latest.svelte-check ## rust + latest.rustChannels.stable.rust cargo-watch llvmPackages_rocm.clang mold libclang - rustup taplo cargo-outdated cargo-generate