From 37dc6efd1441cfc80eec2a8ad25ef676fd3a324f Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 29 Jul 2024 11:29:05 -0500 Subject: [PATCH] Home manager unstable --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 29 ++++++++++++++++++++++++----- modules/home-manager/default.nix | 1 + modules/nixos/default.nix | 13 +++++++++++-- nixos/dragon.nix | 24 +++++++++++++++--------- 5 files changed, 72 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 4051b43..a907e46 100644 --- a/flake.lock +++ b/flake.lock @@ -211,6 +211,26 @@ "type": "github" } }, + "home-manager-unstable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1722203588, + "narHash": "sha256-91V5FMSQ4z9bkhTCf0f86Zjw0bh367daSf0mzCIW0vU=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "792757f643cedc13f02098d8ed506d82e19ec1da", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -474,6 +494,7 @@ "hardware": "hardware", "helix": "helix", "home-manager": "home-manager", + "home-manager-unstable": "home-manager-unstable", "hyprland": "hyprland", "nixpkgs": "nixpkgs_3", "nixpkgs-unstable": "nixpkgs-unstable", diff --git a/flake.nix b/flake.nix index 4ab44d1..c63f222 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,9 @@ home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + home-manager-unstable.url = "github:nix-community/home-manager"; + home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable"; + helix.url = "github:helix-editor/helix/master"; hardware.url = "github:nixos/nixos-hardware"; hyprland.url = "github:hyprwm/Hyprland"; @@ -53,6 +56,7 @@ sops-nix, git-hooks, home-manager, + home-manager-unstable, helix, hardware, # nnf, @@ -217,12 +221,12 @@ }; nixosModules = import ./modules/nixos { - inherit home-manager helix nixosModules homeManagerModules pubkey overlays colors sops-nix disko; + inherit home-manager home-manager-unstable helix nixosModules homeManagerModules pubkey overlays colors sops-nix disko; flakeInputs = self.inputs; }; homeManagerModules = import ./modules/home-manager { - inherit home-manager helix nixosModules homeManagerModules pubkey overlays colors; + inherit home-manager home-manager-unstable helix nixosModules homeManagerModules pubkey overlays colors; inherit (nixpkgs) lib; flakeInputs = self.inputs; }; @@ -231,6 +235,8 @@ beefcake = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-defaults + hardware.nixosModules.common-cpu-intel common @@ -249,9 +255,11 @@ ]; }; - dragon = nixpkgs.lib.nixosSystem { + dragon = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-unstable-defaults + outputs.diskoConfigurations.standard hardware.nixosModules.common-cpu-amd hardware.nixosModules.common-pc-ssd @@ -284,6 +292,8 @@ htpc = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-defaults + hardware.nixosModules.common-pc-ssd common @@ -304,6 +314,8 @@ foxtrot = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-unstable-defaults + outputs.diskoConfigurations.standard hardware.nixosModules.framework-13-7040-amd @@ -341,9 +353,10 @@ ]; }; - thablet = nixpkgs.lib.nixosSystem { + thablet = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-unstable-defaults outputs.diskoConfigurations.standard hardware.nixosModules.lenovo-thinkpad-x1-yoga @@ -399,9 +412,11 @@ # ]; # }; - thinker = nixpkgs.lib.nixosSystem { + thinker = nixpkgs-unstable.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-unstable-defaults + { _module.args = { disks = ["/dev/nvme0n1"]; @@ -439,6 +454,8 @@ musicbox = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-defaults + { _module.args = { disks = ["/dev/sda"]; @@ -474,6 +491,7 @@ rascal = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-defaults hardware.nixosModules.common-cpu-amd common ./nixos/rascal.nix @@ -483,6 +501,7 @@ router = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = with nixosModules; [ + home-manager-defaults outputs.diskoConfigurations.unencrypted common linux diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 470b2c2..d171261 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -4,6 +4,7 @@ flakeInputs, homeManagerModules, home-manager, + home-manager-unstable, helix, nixosModules, pubkey, diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 449112e..824435e 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -5,6 +5,7 @@ flakeInputs, homeManagerModules, home-manager, + home-manager-unstable, helix, nixosModules, pubkey, @@ -32,6 +33,16 @@ home-manager.backupFileExtension = "hm-backup"; }; + home-manager-unstable-defaults = { + imports = [ + # enable home-manager + home-manager-unstable.nixosModules.home-manager + ]; + + home-manager.useGlobalPkgs = true; + home-manager.backupFileExtension = "hm-backup"; + }; + mdns-and-lan-service-discovery = { services.avahi = { enable = true; @@ -875,8 +886,6 @@ my-favorite-default-system-apps mosh - home-manager-defaults - daniel ]; diff --git a/nixos/dragon.nix b/nixos/dragon.nix index cd8d211..dea4433 100644 --- a/nixos/dragon.nix +++ b/nixos/dragon.nix @@ -4,10 +4,13 @@ config, ... }: { - system.stateVersion = "24.05"; - home-manager.users.daniel.home.stateVersion = "24.05"; - networking.hostName = "dragon"; - + imports = [ + { + system.stateVersion = "24.05"; + home-manager.users.daniel.home.stateVersion = "24.05"; + networking.hostName = "dragon"; + } + ]; hardware.graphics.extraPackages = [ # pkgs.rocmPackages.clr.icd pkgs.amdvlk @@ -17,11 +20,14 @@ pkgs.vaapiVdpau ]; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.systemd-boot.enable = true; - boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"]; - boot.kernelModules = ["kvm-amd"]; - boot.supportedFilesystems = ["ntfs"]; + boot = { + kernelPackages = pkgs.linuxPackages_zen; + loader.efi.canTouchEfiVariables = true; + loader.systemd-boot.enable = true; + initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"]; + kernelModules = ["kvm-amd"]; + supportedFilesystems = ["ntfs"]; + }; hardware.bluetooth = { enable = true;