From f4a6faf1d3cb00ccae571797b203a5c861df744e Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Mon, 5 Aug 2024 23:31:56 +0200 Subject: [PATCH] Refactor nh and just --- hosts/common.nix | 5 ++++- hosts/inspiron/default.nix | 3 +-- hosts/inspiron/hardware.nix | 5 +++-- hosts/north/default.nix | 2 +- justfile | 6 +++--- modules/home/hyprland/keybinds.nix | 2 +- modules/system/nix-helper.nix | 9 --------- users/seb/home.nix | 1 - 8 files changed, 13 insertions(+), 20 deletions(-) delete mode 100644 modules/system/nix-helper.nix diff --git a/hosts/common.nix b/hosts/common.nix index e3b8f1f..9241ef3 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -52,7 +52,10 @@ vimAlias = true; }; - environment.systemPackages = [ pkgs.git ]; + environment.systemPackages = [ + pkgs.git + pkgs.just + ]; nixpkgs.config.allowUnfreePredicate = pkg: diff --git a/hosts/inspiron/default.nix b/hosts/inspiron/default.nix index e3855d8..c175ab0 100644 --- a/hosts/inspiron/default.nix +++ b/hosts/inspiron/default.nix @@ -24,7 +24,6 @@ sops.enable = true; printing.enable = true; syncthing.enable = true; - nix-helper.enable = true; auto-gc.enable = true; geoclue.enable = true; tailscale = { @@ -33,5 +32,5 @@ }; }; - services.auto-cpufreq.enable = true; + programs.nh.enable = true; } diff --git a/hosts/inspiron/hardware.nix b/hosts/inspiron/hardware.nix index 403d815..ee68699 100644 --- a/hosts/inspiron/hardware.nix +++ b/hosts/inspiron/hardware.nix @@ -9,15 +9,16 @@ hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = true; boot.kernelModules = [ "kvm-amd" ]; -boot.initrd.kernelModules = [ "usb_storage" ]; + boot.initrd.kernelModules = [ "usb_storage" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" - "sd_mod" + "sd_mod" ]; zramSwap.enable = true; services.fstrim.enable = true; services.fwupd.enable = true; + services.auto-cpufreq.enable = true; } diff --git a/hosts/north/default.nix b/hosts/north/default.nix index 887ffae..0dd3188 100644 --- a/hosts/north/default.nix +++ b/hosts/north/default.nix @@ -21,7 +21,6 @@ sops.enable = true; printing.enable = true; syncthing.enable = true; - nix-helper.enable = true; auto-gc.enable = true; geoclue.enable = true; tailscale = { @@ -30,5 +29,6 @@ }; }; + programs.nh.enable = true; programs.steam.enable = true; } diff --git a/justfile b/justfile index 4a65232..d7e0f52 100644 --- a/justfile +++ b/justfile @@ -6,13 +6,13 @@ default: just --list --unsorted switch: - {{ rebuild }} switch + {{ rebuild }} switch . test: - {{ rebuild }} test + {{ rebuild }} test . boot: - {{ rebuild }} boot + {{ rebuild }} boot . reboot: boot reboot diff --git a/modules/home/hyprland/keybinds.nix b/modules/home/hyprland/keybinds.nix index 866c958..e7c276e 100644 --- a/modules/home/hyprland/keybinds.nix +++ b/modules/home/hyprland/keybinds.nix @@ -129,7 +129,7 @@ bind = SUPER, D, togglespecialworkspace, chat # Flake workspace - workspace = special:flake, border:false, gapsout:30, on-created-empty:kitty --directory $FLAKE --override background_opacity=0.7 + workspace = special:flake, border:false, gapsout:30, on-created-empty:kitty --directory ~/Projects/nixos/my-config --override background_opacity=0.7 windowrulev2 = noblur, class:(kitty), onworkspace:special:flake bind = SUPER, Q, togglespecialworkspace, flake ''; diff --git a/modules/system/nix-helper.nix b/modules/system/nix-helper.nix deleted file mode 100644 index 47f705e..0000000 --- a/modules/system/nix-helper.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, ... }: -{ - options.myConfig.nix-helper.enable = lib.mkEnableOption ""; - - config = lib.mkIf config.myConfig.nix-helper.enable { - environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config"; - programs.nh.enable = true; - }; -} diff --git a/users/seb/home.nix b/users/seb/home.nix index eafb45a..237f035 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -18,7 +18,6 @@ home.packages = [ pkgs.fastfetch - pkgs.just (wrappers.kitty { inherit (config.myConfig) theme; }) wrappers.firefox