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