diff --git a/configuration.nix b/configuration.nix index df85c7a..e4760dd 100644 --- a/configuration.nix +++ b/configuration.nix @@ -15,6 +15,11 @@ ./defaults.nix ]; + nix.settings = { + substituters = [ "https://hyprland.cachix.org" ]; + trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; + + }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # kernel diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..eaf39ff --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/nixos-22.11"; + hyprland.url = "github:hyprwm/Hyprland"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + outputs = { self, nixpkgs, hyprland, home-manager }: { + nixosConfigurations.bat = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + hyprland.nixosModules.default + { programs.hyprland.enable = true; } + ]; + }; + homeConfigurations."zoe@bat" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + + modules = [ + hyprland.homeManagerModules.default + { wayland.windowManager.hyprland.enable = true; } + ]; + }; + }; +} diff --git a/sync.sh b/sync.sh index 4e78c63..fdacc90 100755 --- a/sync.sh +++ b/sync.sh @@ -7,7 +7,7 @@ git pull # cp -r /etc/nixos/ ./backup # copy over all the files to /etc/nixos/ -sudo cp -ru ./configuration.nix ./wallpaper.png ./dunst ./helix ./rofi ./i3 ./fish ./kitty ./nvim/ ./disks.nix ./variables.nix ./programs.nix ./defaults.nix ./packages.nix ./home.nix ./services.nix ./user.nix /etc/nixos/ +sudo cp -ru ./flake.nix ./configuration.nix ./wallpaper.png ./dunst ./helix ./rofi ./i3 ./fish ./kitty ./nvim/ ./disks.nix ./variables.nix ./programs.nix ./defaults.nix ./packages.nix ./home.nix ./services.nix ./user.nix /etc/nixos/ cp -u ./.xinitrc $HOME cp -ur ./cursors $HOME/.local/share/icons @@ -19,4 +19,4 @@ cp -ur ./cursors $HOME/.local/share/icons # cd ../ # update and build my new config -sudo nixos-rebuild switch --upgrade +sudo nixos-rebuild switch --upgrade --impure