hosts/morphius: init new device
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
49
hosts/morphius/configuration.nix
Normal file
49
hosts/morphius/configuration.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.system
|
||||
self.nixosModules.config
|
||||
./disko
|
||||
./hardware
|
||||
./misc
|
||||
];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
# hostId = "31150fae";
|
||||
hostName = "morphius";
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
environment.memoryAllocator.provider = "mimalloc";
|
||||
system.stateVersion = "25.11";
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
|
||||
desktop.plasma.enable = true;
|
||||
# services.greetd.settings.initial_session = {
|
||||
# user = "user";
|
||||
# command = "${pkgs.niri}/bin/niri-session";
|
||||
# };
|
||||
|
||||
module = {
|
||||
config = {
|
||||
# laptop.homeRowMods = true;
|
||||
powerSave = true;
|
||||
useIwd = true;
|
||||
vaapi = "intel-media-driver";
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
theme = "rose-pine-moon";
|
||||
};
|
||||
};
|
||||
|
||||
locale.ukrainian.enable = true;
|
||||
opentabletdriver.enable = false;
|
||||
qmk-vial.enable = true;
|
||||
virtual.libvirt.enable = true;
|
||||
}
|
14
hosts/morphius/disko/default.nix
Normal file
14
hosts/morphius/disko/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{inputs, ...}: let
|
||||
disk = "/dev/nvme0n1";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = import ./disk-main.nix {inherit disk;};
|
||||
}
|
70
hosts/morphius/disko/disk-main.nix
Normal file
70
hosts/morphius/disko/disk-main.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{disk, ...}: {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-main";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos-root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress-force=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
11
hosts/morphius/hardware/default.nix
Normal file
11
hosts/morphius/hardware/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
imports = [
|
||||
# ./laptop
|
||||
];
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
5
hosts/morphius/hardware/laptop/default.nix
Normal file
5
hosts/morphius/hardware/laptop/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./keyboard-fix.nix
|
||||
];
|
||||
}
|
21
hosts/morphius/hardware/laptop/keyboard-fix.nix
Normal file
21
hosts/morphius/hardware/laptop/keyboard-fix.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
services = {
|
||||
udev.extraHwdb = ''
|
||||
evdev:input:b0011v0001p0001eAB83*
|
||||
KEYBOARD_KEY_d5=sysrq
|
||||
KEYBOARD_KEY_d4=leftmeta
|
||||
KEYBOARD_KEY_95=brightnessdown
|
||||
KEYBOARD_KEY_91=brightnessup
|
||||
'';
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["0001:0001"];
|
||||
settings.main = {
|
||||
camera = "brightnessdown";
|
||||
prog1 = "brightnessup";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
hosts/morphius/misc/default.nix
Normal file
5
hosts/morphius/misc/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./distributed-build.nix
|
||||
];
|
||||
}
|
30
hosts/morphius/misc/distributed-build.nix
Normal file
30
hosts/morphius/misc/distributed-build.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) readFile;
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64";
|
||||
in {
|
||||
nix = {
|
||||
distributedBuilds = true;
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "dunamis";
|
||||
publicHostKey = pubHost;
|
||||
sshKey = secrets."ssh-${hostName}-user".path;
|
||||
sshUser = "nix-ssh";
|
||||
supportedFeatures = [
|
||||
"benchmark"
|
||||
"big-parallel"
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
];
|
||||
system = "x86_64-linux";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
7
hosts/morphius/users/user/home-configuration.nix
Normal file
7
hosts/morphius/users/user/home-configuration.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
../../../dunamis/users/user/common.nix
|
||||
../../../dunamis/users/user/programs.nix
|
||||
../../../dunamis/users/user/flatpak.nix
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user