feat: Flake | use home-manager as a nixos module
This commit is contained in:
19
flake.nix
19
flake.nix
@@ -43,7 +43,6 @@
|
||||
outputs = {nixpkgs, ...} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
hostName = "rihla";
|
||||
user = "shahab";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
@@ -54,9 +53,17 @@
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./nixos/configuration.nix
|
||||
./nixos/disko-config.nix
|
||||
./nixos/hardware-configuration.nix
|
||||
{
|
||||
home-manager = {
|
||||
sharedModules = [
|
||||
./modules/home-manager/yubikey-touch-detector.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs hostName;
|
||||
@@ -64,16 +71,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
"${user}" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
./home-manager/home.nix
|
||||
./modules/home-manager/yubikey-touch-detector.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
devShell.x86_64-linux = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nil
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Be sure to actually install the font first!
|
||||
font = "ComicCodeLigatures";
|
||||
username = "shahab";
|
||||
email = "shahab@dogar.dev";
|
||||
email = "${username}@dogar.dev";
|
||||
fullName = "Shahab Dogar";
|
||||
in {
|
||||
# You can import other home-manager modules here
|
||||
@@ -123,6 +123,7 @@ in {
|
||||
# Enable home-manager
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Add service to monitor yubikey requirement
|
||||
services.yubikey-touch-detector.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{lib, ...}: {
|
||||
{lib, config, pkgs, ...}: {
|
||||
imports = [
|
||||
./imports/environment.nix
|
||||
./imports/hardware.nix
|
||||
@@ -40,6 +40,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.shahab = import ../home-manager/home.nix;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
||||
Reference in New Issue
Block a user