First test of all machines
This commit is contained in:
parent
b963380a0a
commit
1d0209fac3
16 changed files with 268 additions and 73 deletions
|
|
@ -1,6 +1,8 @@
|
|||
{inputs, ...}: {
|
||||
{inputs, headless, ...}: {
|
||||
imports = [
|
||||
./loader/systemd.nix
|
||||
./greeter/sddm.nix
|
||||
./refind.nix
|
||||
|
||||
( if headless then ./loader/grub.nix else ./loader/systemd.nix )
|
||||
];
|
||||
}
|
||||
|
|
|
|||
23
modules/boot/loader/grub.nix
Normal file
23
modules/boot/loader/grub.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.boot.loader.grub;
|
||||
in {
|
||||
options = {
|
||||
horseman.boot.loader.grub = {
|
||||
enable = mkEnableOption "Sets grub as the bootloader";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.loader.grub.configurationLimit = 10;
|
||||
};
|
||||
}
|
||||
24
modules/boot/refind.nix
Normal file
24
modules/boot/refind.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.boot.refind;
|
||||
in {
|
||||
options = {
|
||||
horseman.boot.refind = {
|
||||
enable = mkEnableOption "Enables rEFInd, the boot manager";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
refind
|
||||
efibootmgr
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
{inputs, ...}: {
|
||||
{inputs, headless, ...}: {
|
||||
imports = [
|
||||
./apps
|
||||
./hardware
|
||||
./network
|
||||
./terminal
|
||||
./wm
|
||||
( if !headless then ./wm else ./empty.nix )
|
||||
./users
|
||||
./boot
|
||||
./base
|
||||
|
|
|
|||
11
modules/empty.nix
Normal file
11
modules/empty.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
in {
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ in {
|
|||
|
||||
shellAliases = {
|
||||
clone-dotfiles = "cp -r /home/horseman/nix-config/config/dotfiles/.\* /home/horseman/";
|
||||
rebuild = "clone-dotfiles && sudo nixos-rebuild switch --flake";
|
||||
rebuild = "nix fmt && clone-dotfiles && sudo nixos-rebuild switch --flake";
|
||||
update = "sudo nix flake update && rebuild";
|
||||
compose = "sudo docker compose";
|
||||
wolpc = "wakeonlan D8:5E:D3:A8:B1:0A";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,47 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
./horseman.nix
|
||||
];
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.users.default;
|
||||
homeCfg = config.horseman;
|
||||
in {
|
||||
options = {
|
||||
horseman.users.default = {
|
||||
enable = mkEnableOption "Default user";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
users.${homeCfg.username} = {
|
||||
home = {
|
||||
username = "${homeCfg.username}";
|
||||
homeDirectory = "/home/${homeCfg.username}";
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.horseman = {
|
||||
initialPassword = "1234";
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../../config/ssh/authorized_keys
|
||||
];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.users.horseman;
|
||||
in {
|
||||
options = {
|
||||
horseman.users.horseman = {
|
||||
enable = mkEnableOption "Default user";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
users.horseman = {
|
||||
home = {
|
||||
username = "horseman";
|
||||
homeDirectory = "/home/horseman";
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.horseman = {
|
||||
initialPassword = "1234";
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../../config/ssh/authorized_keys
|
||||
];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue