From 9396554c2141f3c4e14bcbd71d0f31b9ff7816d6 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Fri, 16 Feb 2024 20:10:31 -0500 Subject: [PATCH] flakes work! --- home-config/home-configuration.scm | 3 +- home-config/nix-config/nix.conf | 1 + home-config/nix-home-manager/flake.lock | 69 +++++++++++++++++++++++++ home-config/nix-home-manager/flake.nix | 39 ++++++++++++++ home-config/nix-home-manager/home.nix | 11 ++-- modules/ryan-packages/freedesktop.scm | 2 +- 6 files changed, 115 insertions(+), 10 deletions(-) create mode 100644 home-config/nix-config/nix.conf create mode 100644 home-config/nix-home-manager/flake.lock create mode 100644 home-config/nix-home-manager/flake.nix diff --git a/home-config/home-configuration.scm b/home-config/home-configuration.scm index 3455fb0..81ee992 100644 --- a/home-config/home-configuration.scm +++ b/home-config/home-configuration.scm @@ -139,7 +139,8 @@ ("waybar" ,(local-file "waybar" #:recursive? #t)) ("alacritty" ,(local-file "alacritty" #:recursive? #t)) ("aerc" ,(local-file "aerc" #:recursive? #t)) - ("home-manager" ,(local-file "nix-home-manager" #:recursive? #t)) )) + ("home-manager" ,(local-file "nix-home-manager" #:recursive? #t)) + ("nix" ,(local-file "nix-config" #:recursive? #t)) )) (service home-files-service-type `((".local/share/nvim/site/autoload/plug.vim" ,(local-file "nvim/plugin-manager/plug.vim")) (".ssh/config" ,(local-file "ssh/config")) diff --git a/home-config/nix-config/nix.conf b/home-config/nix-config/nix.conf new file mode 100644 index 0000000..c7d7291 --- /dev/null +++ b/home-config/nix-config/nix.conf @@ -0,0 +1 @@ +experimental-features = nix-command flakes diff --git a/home-config/nix-home-manager/flake.lock b/home-config/nix-home-manager/flake.lock new file mode 100644 index 0000000..0356e26 --- /dev/null +++ b/home-config/nix-home-manager/flake.lock @@ -0,0 +1,69 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1708031129, + "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "hyprpicker-git": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703987863, + "narHash": "sha256-MHhAk74uk0qHVwSkLCcXLXMe4478M2oZEFPXwjSoo2E=", + "owner": "hyprwm", + "repo": "hyprpicker", + "rev": "2ef703474fb96e97e03e66e8820f213359f29382", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprpicker", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1707956935, + "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "hyprpicker-git": "hyprpicker-git", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/home-config/nix-home-manager/flake.nix b/home-config/nix-home-manager/flake.nix new file mode 100644 index 0000000..8e1b937 --- /dev/null +++ b/home-config/nix-home-manager/flake.nix @@ -0,0 +1,39 @@ +{ + description = "Home Manager configuration of ryan"; + + inputs = { + # Specify the source of Home Manager and Nixpkgs. + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hyprpicker-git = { + url = "github:hyprwm/hyprpicker"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { nixpkgs, home-manager, hyprpicker-git, ... }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + overlays = [ + hyprpicker-git.overlays.default + ]; + in { + homeConfigurations."ryan" = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ + ./home.nix + {nixpkgs.overlays = overlays;} + ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + }; + }; +} diff --git a/home-config/nix-home-manager/home.nix b/home-config/nix-home-manager/home.nix index aa90213..9dcdc28 100644 --- a/home-config/nix-home-manager/home.nix +++ b/home-config/nix-home-manager/home.nix @@ -13,18 +13,12 @@ # You should not change this value, even if you update Home Manager. If you do # want to update the value, then make sure to first check the Home Manager # release notes. - home.stateVersion = "22.11"; # Please read the comment before changing. - - # Enable nix flakes - nix = { - package = pkgs.nix; - settings.experimental-features = [ "nix-command" "flakes" ]; - }; + home.stateVersion = "23.11"; # Please read the comment before changing. # This value will set some environment variables to allow home-manager to # function better outside of NixOS nixpkgs.config.allowUnfree = true; - targets.genericLinux.enable = true; + #targets.genericLinux.enable = true; fonts.fontconfig.enable = true; # The home.packages option allows you to install Nix packages into your @@ -47,6 +41,7 @@ waypaper gdu spotify-player + hyprpicker # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the diff --git a/modules/ryan-packages/freedesktop.scm b/modules/ryan-packages/freedesktop.scm index 4f28358..add4a6d 100644 --- a/modules/ryan-packages/freedesktop.scm +++ b/modules/ryan-packages/freedesktop.scm @@ -71,7 +71,7 @@ (("\\<(hyprctl-share-picker)\\>" _ cmd) (string-append #$output "/bin/" cmd)))))))) (native-inputs (list gcc-13 pkg-config wayland hyprlang)) - (inputs (list bash-minimal grim hyprland hyprland-protocols mesa pipewire qtbase-5 sdbus-c++ slurp wayland-protocols qtwayland-5)) + (inputs (list bash-minimal grim hyprland hyprland-protocols mesa pipewire qtbase sdbus-c++ slurp wayland-protocols qtwayland)) (home-page "") (synopsis "test") (description "test")