IN PROGRESS COMMIT. does not currently build.
Attempting to make nixos config that incorperates a non-nixos HM config.
This commit is contained in:
parent
be670ea374
commit
fe1ed3e1be
14 changed files with 237 additions and 172 deletions
21
modules/both/i3/default.nix
Normal file
21
modules/both/i3/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# enable flakes
|
||||
nix =
|
||||
lib.mkIf config.targets.genericLinux.enable
|
||||
{
|
||||
package = pkgs.nix;
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
settings.max-jobs = "auto";
|
||||
gc.automatic = true;
|
||||
};
|
||||
}
|
9
modules/both/networking.nix
Normal file
9
modules/both/networking.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
users.users.${config.host.user}.extraGroups = ["networkmanager"];
|
||||
}
|
16
modules/both/sound.nix
Normal file
16
modules/both/sound.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
23
modules/commonopts.nix
Normal file
23
modules/commonopts.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
host = {
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Primary human user";
|
||||
};
|
||||
fullName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Primary human users long name";
|
||||
};
|
||||
gui.enable = lib.mkEnableOption {
|
||||
description = "enable GUI";
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,10 +6,10 @@
|
|||
}: {
|
||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
# Let Home Manager install and manage itself on non-nixos systems.
|
||||
programs.home-manager.enable = config.targets.genericLinux.enable;
|
||||
|
||||
# enable flakes
|
||||
# enable flakes on non-nixos systems
|
||||
nix =
|
||||
lib.mkIf config.targets.genericLinux.enable
|
||||
{
|
||||
|
|
7
modules/home-manager/i3/default.nix
Normal file
7
modules/home-manager/i3/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}
|
23
modules/nixos/common.nix
Normal file
23
modules/nixos/common.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# packages that should be on every system.
|
||||
environment.systemPackages = with pkgs; [
|
||||
vi # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
];
|
||||
}
|
8
modules/nixos/printing.nix
Normal file
8
modules/nixos/printing.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
}
|
8
modules/nixos/touchpad.nix
Normal file
8
modules/nixos/touchpad.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.xserver.libinput.enable = true;
|
||||
}
|
7
modules/nixos/wireless.nix
Normal file
7
modules/nixos/wireless.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue