From 99908d63c89629414f10c5f7e69cc1a00304fed9 Mon Sep 17 00:00:00 2001 From: System administrator Date: Sat, 7 Sep 2024 10:24:01 -0700 Subject: [PATCH] 11 current 2024-09-07 10:24:00 24.11.20240828.71e91c4 6.6.47 * --- configuration.nix | 13 ++++++++++++- flake.lock | 21 +++++++++++++++++++++ flake.nix | 10 +++++----- main-user.nix | 5 ++--- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/configuration.nix b/configuration.nix index 628036d..3acec04 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,14 +2,19 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./main-user.nix + inputs.home-manager.nixosModules.default ]; + main-user.enable = true; + main-user.userName = "jchenry"; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -101,6 +106,12 @@ ]; }; + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "jchenry" = import ./home.nix; + }; + }; # Allow unfree packages nixpkgs.config.allowUnfree = true; diff --git a/flake.lock b/flake.lock index 27fefb3..3c2f655 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1725694918, + "narHash": "sha256-+HsjshXpqNiJHLaJaK0JnIicJ/a1NquKcfn4YZ3ILgg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "aaebdea769a5c10f1c6e50ebdf5924c1a13f0cda", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1724819573, @@ -18,6 +38,7 @@ }, "root": { "inputs": { + "home-manager": "home-manager", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 2d275eb..dc84091 100644 --- a/flake.nix +++ b/flake.nix @@ -4,10 +4,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - # home-manager = { - # url = "github:nix-community/home-manager"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -15,7 +15,7 @@ specialArgs = {inherit inputs;}; modules = [ ./configuration.nix - # inputs.home-manager.nixosModules.default + inputs.home-manager.nixosModules.default ]; }; }; diff --git a/main-user.nix b/main-user.nix index 6248770..ccfeee1 100644 --- a/main-user.nix +++ b/main-user.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }; +{ lib, config, pkgs, ... }: { options = { @@ -12,8 +12,7 @@ config = lib.mkIf config.main-user.enable { users.users.${config.main-user.userName} = { isNormalUser = true; - initalPassword = "12345"; - description = "main user"; + initialPassword = "12345"; shell = pkgs.bash; }; };