From e1592b5cff387648f885f51816592146ce639384 Mon Sep 17 00:00:00 2001 From: chayleaf Date: Mon, 10 Apr 2023 19:15:34 +0700 Subject: [PATCH] XDG_CONFIG_HOME/nixpkgs->XDG_CONFIG_HOME/home-manager --- README.md | 2 +- home/common/i3-sway.nix | 4 ++-- home/flake.nix | 13 ++++++------- home/hosts/nixmsi.nix | 2 +- home/pkgs/default.nix | 7 +++++++ home/pkgs/home-daemon/Cargo.lock | 2 +- home/pkgs/home-daemon/Cargo.toml | 2 +- home/overlays.nix => overlays.nix | 0 update.sh | 3 ++- 9 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 home/pkgs/default.nix rename home/overlays.nix => overlays.nix (100%) diff --git a/README.md b/README.md index 29cf35f..abd2990 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # My Nix config To install, put `system` to `/etc/nixos`, put `home` to -`~/.config/nixpkgs`. +`~/.config/home-manager` (and `overlays.nix` to `~/.config/nixpkgs`) The reason they are separate is because I want to be able to iterate home config quickly, and `nixos-rebuild`'ing the entire sytem for every diff --git a/home/common/i3-sway.nix b/home/common/i3-sway.nix index 5ec9ae2..0e7cfae 100644 --- a/home/common/i3-sway.nix +++ b/home/common/i3-sway.nix @@ -80,7 +80,7 @@ commonConfig = { inherit modifier; startup = [ { command = builtins.toString (with pkgs; writeShellScript "init-wm" '' - ${callPackage ../pkgs/home-daemon {}}/bin/dotfiles-home-daemon system76-scheduler& + ${home-daemon}/bin/home-daemon system76-scheduler& ${gnome.zenity}/bin/zenity --password | (${keepassxc}/bin/keepassxc --pw-stdin ~/Nextcloud/keepass.kdbx&) # nextcloud and nheko need secret service access ${nextcloud-client}/bin/nextcloud --background& @@ -448,7 +448,7 @@ in }; terminal = config.terminalBin; extraConfig = { - modi = [ "steam:${pkgs.callPackage ../pkgs/rofi-steam-game-list {}}/bin/rofi-steam-game-list" "drun" "run" "ssh" ]; + modi = [ "steam:${pkgs.rofi-steam-game-list}/bin/rofi-steam-game-list" "drun" "run" "ssh" ]; icon-theme = "hicolor"; drun-match-fields = [ "name" "generic" "exec" "keywords" ]; show-icons = true; diff --git a/home/flake.nix b/home/flake.nix index 5ad4b7f..d908e65 100644 --- a/home/flake.nix +++ b/home/flake.nix @@ -37,6 +37,12 @@ "https://cache.nixos.org" # "https://nixpkgs-wayland.cachix.org" ]; + overlays = [ + (self: super: import ./pkgs { + pkgs = super; + }) + nix-gaming.overlays.default + ]; }; extraSpecialArgs = { # pkgs-wayland = nixpkgs-wayland.packages.${system}; @@ -44,13 +50,6 @@ modules = [ notlua.nixosModules.default nur.nixosModules.nur - { nixpkgs.overlays = [ - nix-gaming.overlays.default - (self: super: { - clang_latest = super.clang_15; - clang-tools_latest = super.clang-tools_15; - }) - ]; } ./hosts/nixmsi.nix (getPriv "nixmsi") ]; diff --git a/home/hosts/nixmsi.nix b/home/hosts/nixmsi.nix index c0190f9..6b81521 100644 --- a/home/hosts/nixmsi.nix +++ b/home/hosts/nixmsi.nix @@ -102,7 +102,7 @@ kdenlive mediainfo glaxnimate - (pkgs.callPackage ../pkgs/lalrpop { }) + lalrpop # waiting until the PR gets merged (looking-glass-client.overrideAttrs (old: { version = "B6"; diff --git a/home/pkgs/default.nix b/home/pkgs/default.nix new file mode 100644 index 0000000..1ed0e08 --- /dev/null +++ b/home/pkgs/default.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: { + lalrpop = pkgs.callPackage ./lalrpop { }; + home-daemon = pkgs.callPackage ./home-daemon { }; + rofi-steam-game-list = pkgs.callPackage ./rofi-steam-game-list { }; + clang_latest = pkgs.clang_15; + clang-tools_latest = pkgs.clang-tools_15; +} diff --git a/home/pkgs/home-daemon/Cargo.lock b/home/pkgs/home-daemon/Cargo.lock index 1232c1b..c843b62 100644 --- a/home/pkgs/home-daemon/Cargo.lock +++ b/home/pkgs/home-daemon/Cargo.lock @@ -228,7 +228,7 @@ dependencies = [ ] [[package]] -name = "dotfiles-home-daemon" +name = "home-daemon" version = "0.1.0" dependencies = [ "futures-util", diff --git a/home/pkgs/home-daemon/Cargo.toml b/home/pkgs/home-daemon/Cargo.toml index 0b1bc18..bd3d1d8 100644 --- a/home/pkgs/home-daemon/Cargo.toml +++ b/home/pkgs/home-daemon/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "dotfiles-home-daemon" +name = "home-daemon" version = "0.1.0" edition = "2021" diff --git a/home/overlays.nix b/overlays.nix similarity index 100% rename from home/overlays.nix rename to overlays.nix diff --git a/update.sh b/update.sh index c59350c..e33078f 100755 --- a/update.sh +++ b/update.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash rm -rf ./home ./system cp -r /etc/nixos ./system -cp -r ~/.config/nixpkgs ./home +cp -r ~/.config/home-manager ./home +cp ~/.config/nixpkgs/overlays.nix ./overlays.nix