mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 17:54:35 +00:00
Add blank home-manager config
This commit is contained in:
parent
da5262c60d
commit
e2764cb4cb
43
home/default.nix
Normal file
43
home/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, lib, inputs, self, ... }:
|
||||
let
|
||||
hmConf = config.myOptions.home-manager;
|
||||
username = config.myOptions.system.username;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./programs
|
||||
];
|
||||
|
||||
home-manager = lib.mkIf hmConf.enabled {
|
||||
# Use verbose mode for home-manager
|
||||
verbose = true;
|
||||
|
||||
# Should home-manager use the same pkgs as system's pkgs?
|
||||
# If disabled, home-manager will independently evaluate and use
|
||||
# its own set of packages. Note that this could increase disk usage
|
||||
# and it might lead to inconsistencies.
|
||||
useGlobalPkgs = true;
|
||||
|
||||
# Use NixOS user packages (users.users.<name>.packages)
|
||||
# instead of home-manager's own shell init config files to
|
||||
# get packages to install
|
||||
useUserPackages = true;
|
||||
|
||||
# Move existing files to .old suffix rather than exiting with error
|
||||
backupFileExtension = "hm.old";
|
||||
|
||||
# These will be passed to all hm modules
|
||||
extraSpecialArgs = { inherit inputs self; };
|
||||
|
||||
users.${username} = {
|
||||
# Let home-manager manage itself in standalone mode
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = hmConf.stateVersion;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
home/programs/default.nix
Normal file
6
home/programs/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./graphical
|
||||
./terminal
|
||||
];
|
||||
}
|
5
home/programs/graphical/default.nix
Normal file
5
home/programs/graphical/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./wms
|
||||
];
|
||||
}
|
5
home/programs/graphical/wms/default.nix
Normal file
5
home/programs/graphical/wms/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./hyprland
|
||||
];
|
||||
}
|
3
home/programs/graphical/wms/hyprland/default.nix
Normal file
3
home/programs/graphical/wms/hyprland/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
imports = [ ];
|
||||
}
|
3
home/programs/terminal/default.nix
Normal file
3
home/programs/terminal/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
imports = [ ];
|
||||
}
|
3
home/services/default.nix
Normal file
3
home/services/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
imports = [ ];
|
||||
}
|
|
@ -1,12 +1,15 @@
|
|||
{self, inputs, ...}: let
|
||||
{ self, inputs, ... }:
|
||||
let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
|
||||
# A list of shared modules that ALL systems need
|
||||
shared = [
|
||||
../system
|
||||
../home
|
||||
../options
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
vboxnix = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
|
|
@ -27,5 +27,9 @@
|
|||
virtual-machine = true;
|
||||
cpu.type = "amd";
|
||||
};
|
||||
home-manager = {
|
||||
enabled = true;
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./device
|
||||
./home
|
||||
./system.nix
|
||||
];
|
||||
}
|
||||
|
|
18
options/home/default.nix
Normal file
18
options/home/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ lib, ... }: with lib; let
|
||||
in
|
||||
{
|
||||
options.myOptions.home-manager = {
|
||||
enabled = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Should home-manager be enabled for this host?";
|
||||
};
|
||||
|
||||
stateVersion = mkOption {
|
||||
type = types.str;
|
||||
default = config.system.nixos;
|
||||
description = "HomeManager's state version";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -3,13 +3,13 @@ in
|
|||
{
|
||||
options.myOptions.system = {
|
||||
hostname = mkOption {
|
||||
description = "hostname for this system";
|
||||
type = types.str;
|
||||
description = "Hostname for this system";
|
||||
};
|
||||
|
||||
username = mkOption {
|
||||
description = "username for the primary admin account for this system";
|
||||
type = types.str;
|
||||
description = "Username for the primary admin account for this system";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue