diff --git a/flake.nix b/flake.nix index fdd0c9c..737fd66 100644 --- a/flake.nix +++ b/flake.nix @@ -93,12 +93,14 @@ inherit inputs; flake = self; }; + personal-cli = import ./personal-cli/hm.nix; }; nixosModules = { minimal = import ./minimal/nixos.nix { inherit extraInfo; }; + personal-cli = import ./personal-cli/nixos.nix; }; overlays.x86_64-linux = final: prev: pkgList "x86_64-linux" prev.callPackage; @@ -109,6 +111,7 @@ modules = [ ./hostconfig/ZeNixComputa/extra_info.nix self.nixosModules.minimal + self.nixosModules.personal-cli ({pkgs, ...}: { nixpkgs.overlays = [ inputs.nur.overlay @@ -132,6 +135,7 @@ }: { imports = [ self.hmModules.minimal + self.hmModules.personal-cli ./home.nix ./graphical.nix ./extra_info.nix diff --git a/home.nix b/home.nix index 9a025b2..133c5a1 100644 --- a/home.nix +++ b/home.nix @@ -12,7 +12,6 @@ }; in { home.packages = with pkgs; [ - bitwarden-cli nodePackages.vscode-json-languageserver exa python3 @@ -24,22 +23,10 @@ in { codespell cargo-flamegraph linuxPackages.perf - tokei gcc11 - #nix-alien - xdg-ninja bc - kabalist_cli - nvfetcher - hbw ]; - services = { - syncthing = { - enable = true; - }; - }; - programs = { starship = { enable = true; @@ -52,10 +39,6 @@ in { }; }; home.file = { - "bin" = { - source = ./scripts; - recursive = true; - }; "bin/ssh-picker" = let ssh_hosts = builtins.attrNames config.programs.ssh.matchBlocks; ssh_specific = builtins.filter (h: !(lib.strings.hasInfix "*" h)) ssh_hosts; @@ -75,16 +58,9 @@ in { ''; executable = true; }; - ".zfunc" = { - source = ./zfunc; - recursive = true; - }; }; programs.zsh = { - initExtraBeforeCompInit = '' - fpath+="$HOME/.zfunc" - ''; shellAliases = { new-direnv = "nix flake new -t github:nix-community/nix-direnv"; }; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 4bcf92f..4fee51c 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -33,7 +33,6 @@ }; localtimed.enable = true; geoclue2.enable = true; - fwupd.enable = true; postgresql = { enable = true; }; @@ -50,21 +49,6 @@ virtualisation = { waydroid.enable = true; - libvirtd = { - enable = true; - qemu.swtpm.enable = true; - qemu.ovmf = { - enable = true; - packages = [pkgs.OVMFFull]; - }; - }; - podman = { - enable = true; - }; - docker = { - enable = true; - storageDriver = "btrfs"; - }; }; security.pam = { @@ -80,7 +64,6 @@ }; }; - networking.networkmanager.enable = true; programs.noisetorch.enable = true; networking.firewall = { diff --git a/nixos/localcfg.nix b/nixos/localcfg.nix index 4bc0941..3095610 100644 --- a/nixos/localcfg.nix +++ b/nixos/localcfg.nix @@ -60,12 +60,7 @@ uid = 1000; extraGroups = [ "wheel" - "networkmanager" "adbusers" - "libvirtd" - "kvm" - "qemu-libvirtd" - "docker" "http" "scanner" "lp" diff --git a/personal-cli/hm.nix b/personal-cli/hm.nix new file mode 100644 index 0000000..3f56eee --- /dev/null +++ b/personal-cli/hm.nix @@ -0,0 +1,29 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + bitwarden-cli + hbw + kabalist_cli + nix-alien + nvfetcher + tokei + xdg-ninja + ]; + + services.syncthing.enable = true; + + programs.ssh.enable = true; + programs.zsh.initExtraBeforeCompInit = '' + fpath+="$HOME/.zfunc" + ''; + + home.file = { + bin = { + source = ./scripts; + recursive = true; + }; + ".zfunc" = { + source = ./zfunc; + recursive = true; + }; + }; +} diff --git a/personal-cli/nixos.nix b/personal-cli/nixos.nix new file mode 100644 index 0000000..4520ee0 --- /dev/null +++ b/personal-cli/nixos.nix @@ -0,0 +1,36 @@ +{ + pkgs, + config, + ... +}: { + environment.systemPackages = [config.boot.kernelPackages.perf]; + + services.fwupd.enable = true; + services.openssh.enable = true; + virtualisation = { + libvirtd = { + enable = true; + qemu.swtpm.enable = true; + qemu.ovmf = { + enable = true; + packages = [pkgs.OVMFFull]; + }; + }; + + podman.enable = true; + docker = { + enable = true; + storageDriver = "btrfs"; + }; + }; + + networking.networkmanager.enable = true; + + users.users."${config.extraInfo.username}".extraGroups = [ + "networkmanager" + "libvirtd" + "kvm" + "qemu-libvirtd" + "docker" + ]; +} diff --git a/scripts/spot_volume.sh b/personal-cli/scripts/spot_volume.sh similarity index 100% rename from scripts/spot_volume.sh rename to personal-cli/scripts/spot_volume.sh diff --git a/zfunc/_kabalist_cli b/personal-cli/zfunc/_kabalist_cli similarity index 100% rename from zfunc/_kabalist_cli rename to personal-cli/zfunc/_kabalist_cli