From 66bcfd68399a770ac9f1a3d9bbf5d454fab370c6 Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 10 Nov 2023 19:23:36 +0100 Subject: [PATCH 1/3] install fractal --- nixos/common/desktop/home.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/common/desktop/home.nix b/nixos/common/desktop/home.nix index fc72106c..0a62c899 100644 --- a/nixos/common/desktop/home.nix +++ b/nixos/common/desktop/home.nix @@ -15,6 +15,7 @@ in cinny-desktop element-desktop-wayland fusee-launcher + fractal-next gcc gimp helix From 0eebdf6bd0ac93a999cad17b3ddf1899ef5d74a1 Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 10 Nov 2023 22:53:33 +0100 Subject: [PATCH 2/3] fix dhcp --- nixos/common/desktop/home.nix | 1 + nixos/hosts/olympus/dhcp/configuration.nix | 19 ++++++++++--------- nixos/hosts/olympus/eevee/configuration.nix | 16 ---------------- nixos/hosts/olympus/eevee/hardware.nix | 4 +++- 4 files changed, 14 insertions(+), 26 deletions(-) diff --git a/nixos/common/desktop/home.nix b/nixos/common/desktop/home.nix index 0a62c899..c63088a2 100644 --- a/nixos/common/desktop/home.nix +++ b/nixos/common/desktop/home.nix @@ -33,6 +33,7 @@ in nixpkgs-review plex-media-player plexamp + spotify qmk rustup solo2-cli diff --git a/nixos/hosts/olympus/dhcp/configuration.nix b/nixos/hosts/olympus/dhcp/configuration.nix index 30aab235..0503693b 100644 --- a/nixos/hosts/olympus/dhcp/configuration.nix +++ b/nixos/hosts/olympus/dhcp/configuration.nix @@ -34,11 +34,11 @@ in networking.firewall.allowedUDPPorts = [ 67 ]; - services.prometheus.exporters.kea = { - enable = true; - openFirewall = true; - controlSocketPaths = [ "/run/kea/kea-dhcp4.socket" ]; - }; + # services.prometheus.exporters.kea = { + # enable = true; + # openFirewall = true; + # controlSocketPaths = [ "/run/kea/kea-dhcp4.socket" ]; + # }; services.kea.dhcp4 = { enable = true; @@ -50,10 +50,11 @@ in interfaces-config.interfaces = [ "eth0" ]; - control-socket = { - socket-type = "unix"; - socket-name = "/run/kea/kea-dhcp4.socket"; - }; + # control-socket = { + # socket-type = "unix"; + # socket-name = "/run/kea/kea-dhcp4.socket"; + # }; + # failed to initialize Kea server: configuration error using file '/etc/kea/dhcp4-server.conf': cannot create socket lockfile, /run/kea/kea-dhcp4.socket.lock, : No such file or directory lease-database = { name = "/var/lib/kea/dhcp4.leases"; diff --git a/nixos/hosts/olympus/eevee/configuration.nix b/nixos/hosts/olympus/eevee/configuration.nix index 40987178..26a0bfd3 100644 --- a/nixos/hosts/olympus/eevee/configuration.nix +++ b/nixos/hosts/olympus/eevee/configuration.nix @@ -40,22 +40,6 @@ environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - # services.kubo = { - # enable = true; - # enableGC = true; - # # autoMount = true; - # settings = { - # Addresses.API = "/ip4/127.0.0.1/tcp/2324"; - # Routing = { - # AcceleratedDHTClient = true; - # }; - # Experimental = { - # FilestoreEnabled = true; - # }; - # }; - # }; - home-manager = { users.victor = import ./home; }; diff --git a/nixos/hosts/olympus/eevee/hardware.nix b/nixos/hosts/olympus/eevee/hardware.nix index 422c10a4..e5731378 100644 --- a/nixos/hosts/olympus/eevee/hardware.nix +++ b/nixos/hosts/olympus/eevee/hardware.nix @@ -2,13 +2,14 @@ hardware = { enableAllFirmware = true; nvidia = { - package = config.boot.kernelPackages.nvidiaPackages.stable; + # package = config.boot.kernelPackages.nvidiaPackages.stable; # Open drivers cause gdm to crash # open = true; # nvidia-drm.modeset=1 modesetting.enable = true; + powerManagement.enable = false; }; # Hardware acceleration @@ -17,6 +18,7 @@ # Vulkan driSupport = true; + driSupport32Bit = true; }; logitech.wireless = { From ec0c2f466a54948e4882a1c343a4d511169eb22d Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 10 Nov 2023 23:35:26 +0100 Subject: [PATCH 3/3] add sccache --- nixos/common/desktop/home.nix | 2 +- nixos/common/hm-modules/default.nix | 2 +- nixos/common/hm-modules/rust.nix | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 nixos/common/hm-modules/rust.nix diff --git a/nixos/common/desktop/home.nix b/nixos/common/desktop/home.nix index c63088a2..e9b37d53 100644 --- a/nixos/common/desktop/home.nix +++ b/nixos/common/desktop/home.nix @@ -35,7 +35,6 @@ in plexamp spotify qmk - rustup solo2-cli tex unzip @@ -47,6 +46,7 @@ in programs = { v.vscode.enable = true; v.nvim.enable = true; + v.rust.enable = true; riff = { enable = true; diff --git a/nixos/common/hm-modules/default.nix b/nixos/common/hm-modules/default.nix index 29d2e443..2dbbe8f1 100644 --- a/nixos/common/hm-modules/default.nix +++ b/nixos/common/hm-modules/default.nix @@ -1,3 +1,3 @@ { ... }: { - imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ./git.nix ]; + imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ./git.nix ./rust.nix ]; } diff --git a/nixos/common/hm-modules/rust.nix b/nixos/common/hm-modules/rust.nix new file mode 100644 index 00000000..836eeb45 --- /dev/null +++ b/nixos/common/hm-modules/rust.nix @@ -0,0 +1,21 @@ +{ pkgs, lib, config, ... }: +with lib; +let cfg = config.programs.v.rust; +in { + options.programs.v.rust = { enable = mkEnableOption "rust"; }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ rustup ]; + + home.file = { + ".cargo/config.toml".text = '' + [registries.crates-io] + protocol = "sparse" + + [build] + rustc-wrapper = "${pkgs.sccache}/bin/sccache" + ''; + }; + + home.sessionPath = [ "$HOME/.cargo/bin" ]; + }; +}