move common imports

This commit is contained in:
2024-08-08 13:12:28 +05:30
parent 69486b7df4
commit fd92021844
10 changed files with 28 additions and 17 deletions

View File

@ -6,7 +6,7 @@
imports = [
inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503
./hardware-configuration.nix
../../modules/nixos/default.nix
../common
../../modules/nixos/desktop
../../modules/nixos/desktop/awesome
../../modules/nixos/desktop/hyprland

View File

@ -1,5 +1,6 @@
{pkgs, ...}: {
imports = [
../common/home.nix
../../modules/home-manager/awesome
../../modules/home-manager/hyprland
../../modules/home-manager/waybar

75
hosts/common/default.nix Normal file
View File

@ -0,0 +1,75 @@
{
pkgs,
username,
outputs,
...
}: {
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
outputs.overlays.nur
outputs.overlays.nix-vscode-extensions
];
config = {
allowUnfree = true;
joypixels.acceptLicense = true;
};
};
nix = {
settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
};
time.timeZone = "Asia/Kolkata";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_IN";
LC_IDENTIFICATION = "en_IN";
LC_MEASUREMENT = "en_IN";
LC_MONETARY = "en_IN";
LC_NAME = "en_IN";
LC_NUMERIC = "en_IN";
LC_PAPER = "en_IN";
LC_TELEPHONE = "en_IN";
LC_TIME = "en_IN";
};
};
programs = {
zsh.enable = true;
nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 5d --keep 5";
flake = "/home/${username}/Projects/nixos-config";
};
};
services = {
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
};
};
users = {
defaultUserShell = pkgs.zsh;
users.${username} = {
initialPassword = "${username}";
isNormalUser = true;
extraGroups = ["networkmanager" "wheel" "storage"];
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me''
];
};
};
}

41
hosts/common/home.nix Normal file
View File

@ -0,0 +1,41 @@
{
outputs,
username,
...
}: {
imports = [
../../modules/home-manager/shell
../../modules/home-manager/git
../../modules/home-manager/starship
../../modules/home-manager/nvim
../../modules/home-manager/tmux
../../modules/home-manager/helix
];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
outputs.overlays.nur
outputs.overlays.nix-vscode-extensions
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
joypixels.acceptLicense = true;
};
};
home = {
username = "${username}";
homeDirectory = "/home/${username}";
};
programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
home.stateVersion = "23.11";
}

View File

@ -8,7 +8,7 @@
imports = [
inputs.sops-nix.nixosModules.sops
./hardware-configuration.nix
../../modules/nixos/default.nix
../common
../../modules/nixos/headscale.nix
../../modules/nixos/vaultwarden.nix
../../modules/nixos/uptime-kuma.nix

View File

@ -0,0 +1,5 @@
{...}: {
imports = [
../common/home.nix
];
}

5
hosts/isoImage/home.nix Normal file
View File

@ -0,0 +1,5 @@
{...}: {
imports = [
../common/home.nix
];
}

View File

@ -7,7 +7,7 @@
}: {
imports = [
inputs.nixos-wsl.nixosModules.wsl
../../modules/nixos/default.nix
../common
../../modules/nixos/virtualisation/docker.nix
];

5
hosts/wsl/home.nix Normal file
View File

@ -0,0 +1,5 @@
{...}: {
imports = [
../common/home.nix
];
}