Use home-manager as module

This commit is contained in:
Jordan Holt 2022-12-30 20:31:38 +00:00
parent a7f86f9935
commit 08b5e158a2
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520
4 changed files with 104 additions and 38 deletions

64
flake.lock generated Normal file
View File

@ -0,0 +1,64 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1672244468,
"narHash": "sha256-xaZb8AZqoXRCSqPusCk4ouf+fUNP8UJdafmMTF1Ltlw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "89a8ba0b5b43b3350ff2e3ef37b66736b2ef8706",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-22.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672353432,
"narHash": "sha256-oZfgp/44/o2tWiylV30cR+DLyWTJ+5dhsdWZVpzs3e4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "913a47cd064cc06440ea84e5e0452039a85781f0",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.11",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -3,42 +3,25 @@
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11";
home-manager.url = "github:nix-community/home-manager/release-22.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-22.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }: {
let
system = "x86_64-linux";
outputs = inputs@{ nixpkgs, home-manager, ... }: {
nixosConfigurations = {
atlas = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
lib = nixpkgs.lib;
in {
homeManagerConfigurations = {
jordan = home-manager.lib.homeManagerConfiguration {
inherit system pkgs;
username = "jordan";
homeDirectory = "/home/jordan";
configuration = {
imports = ]
./users/jordan/home.nix
];
};
};
};
nixosConfigurations = {
atlas = lib.nixosSystem {
inherit system;
modules = [
./system/configuration.nix
];
};
modules = [
./system/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jordan = import ./users/jordan/home.nix;
}
];
};
};
};

View File

@ -15,7 +15,7 @@
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
networking.hostName = "nixos"; # Define your hostname.
networking.hostName = "atlas"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
@ -107,10 +107,6 @@
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# List services that you want to enable:

View File

@ -10,11 +10,34 @@
programs.gpg.enable = true;
programs.zsh = {
enable = true;
enableCompletion = true;
};
home.packages = with pkgs; [
bind
bmon
fd
ffmpeg
firefox-wayland
fzf
git
iotop
pass
neovim
nnn
pass
passExtensions.pass-otp
ripgrep
rsync
tcpdump
tokei
tree
yt-dlp
wl-clipboard
zsh-autosuggestions
zsh-fast-syntax-highlighting
zsh-history-substring-search
];
}