bring back "vm"
This commit is contained in:
@@ -32,9 +32,12 @@
|
||||
stateVersion = "23.05";
|
||||
timeZone = "UTC";
|
||||
base = {
|
||||
users.passwd = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path;
|
||||
users = {
|
||||
enable = true;
|
||||
passwd = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path;
|
||||
};
|
||||
};
|
||||
|
||||
unitstatus = {
|
||||
|
||||
@@ -63,6 +63,7 @@ in {
|
||||
base = {
|
||||
zfs.enable = true;
|
||||
users = {
|
||||
enable = true;
|
||||
fullDesktop = true;
|
||||
passwd = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
|
||||
@@ -1,41 +1,137 @@
|
||||
{
|
||||
self,
|
||||
lib,
|
||||
pkgs,
|
||||
myData,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
mj = {
|
||||
stateVersion = "23.05";
|
||||
timeZone = "UTC";
|
||||
imports = [
|
||||
"${modulesPath}/profiles/all-hardware.nix"
|
||||
"${modulesPath}/installer/cd-dvd/iso-image.nix"
|
||||
../../modules/profiles/desktop
|
||||
];
|
||||
|
||||
base.users.passwd = {
|
||||
root.initialPassword = "live";
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.nixos = {
|
||||
#config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.mkMerge [
|
||||
(import ../../shared/home/default.nix {
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
#inherit (config.mj) stateVersion;
|
||||
stateVersion = "23.11";
|
||||
username = "nixos";
|
||||
fullDesktop = true;
|
||||
hmOnly = false;
|
||||
email = "motiejus@jakstys.lt";
|
||||
})
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
"l" = "echo -n ł | xclip -selection clipboard";
|
||||
"gp" = "${pkgs.git}/bin/git remote | ${pkgs.parallel}/bin/parallel --verbose git push";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
mj = {
|
||||
stateVersion = "23.11";
|
||||
timeZone = "UTC";
|
||||
desktop = {
|
||||
username = "nixos";
|
||||
configureDM = false;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
tmux
|
||||
htop
|
||||
];
|
||||
isoImage = {
|
||||
isoName = "toolshed.iso";
|
||||
squashfsCompression = "zstd";
|
||||
appendToMenuLabel = " Toolshed ${self.lastModifiedDate}";
|
||||
makeEfiBootable = true; # EFI booting
|
||||
makeUsbBootable = true; # USB booting
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
services = {
|
||||
nsd = {
|
||||
pcscd.enable = true;
|
||||
udev.packages = [pkgs.yubikey-personalization];
|
||||
getty.autologinUser = "nixos";
|
||||
xserver = {
|
||||
enable = true;
|
||||
interfaces = ["0.0.0.0" "::"];
|
||||
zones = {
|
||||
"jakstys.lt.".data = myData.jakstysLTZone;
|
||||
desktopManager.xfce.enable = true;
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "nixos";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
ssh.startAgent = false;
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users = {
|
||||
nixos = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "video"];
|
||||
initialHashedPassword = "";
|
||||
};
|
||||
root.initialHashedPassword = "";
|
||||
};
|
||||
|
||||
security = {
|
||||
pam.services.lightdm.text = ''
|
||||
auth sufficient pam_succeed_if.so user ingroup wheel
|
||||
'';
|
||||
sudo = {
|
||||
enable = true;
|
||||
wheelNeedsPassword = false;
|
||||
};
|
||||
};
|
||||
|
||||
# from yubikey-guide
|
||||
environment.systemPackages = with pkgs; [
|
||||
paperkey
|
||||
pgpdump
|
||||
parted
|
||||
cryptsetup
|
||||
|
||||
yubikey-manager
|
||||
yubikey-manager-qt
|
||||
yubikey-personalization
|
||||
yubikey-personalization-gui
|
||||
yubico-piv-tool
|
||||
yubioath-flutter
|
||||
|
||||
ent
|
||||
haskellPackages.hopenpgp-tools
|
||||
|
||||
diceware
|
||||
pwgen
|
||||
|
||||
cfssl
|
||||
pcsctools
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "vm";
|
||||
domain = "jakstys.lt";
|
||||
firewall = {
|
||||
allowedTCPPorts = [53];
|
||||
allowedUDPPorts = [53];
|
||||
};
|
||||
domain = "example.org";
|
||||
firewall.allowedTCPPorts = [22];
|
||||
};
|
||||
|
||||
nix = {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
base = {
|
||||
zfs.enable = true;
|
||||
users = {
|
||||
enable = true;
|
||||
passwd = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path;
|
||||
|
||||
@@ -56,9 +56,12 @@
|
||||
timeZone = "Europe/Vilnius";
|
||||
base = {
|
||||
zfs.enable = true;
|
||||
users.passwd = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path;
|
||||
users = {
|
||||
enable = true;
|
||||
passwd = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-passwd-hash.path;
|
||||
motiejus.hashedPasswordFile = config.age.secrets.motiejus-passwd-hash.path;
|
||||
};
|
||||
};
|
||||
unitstatus = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user