diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/desktop/configuration.nix | 39 | ||||
| -rw-r--r-- | hosts/desktop/disko.nix | 4 | ||||
| -rw-r--r-- | hosts/desktop/home.nix | 26 | ||||
| -rw-r--r-- | hosts/oci/configuration.nix | 85 | ||||
| -rw-r--r-- | hosts/oci/disko.nix | 77 | ||||
| -rw-r--r-- | hosts/oci/home.nix | 21 | ||||
| -rw-r--r-- | hosts/thinkpad/boot.key | bin | 0 -> 4734 bytes | |||
| -rw-r--r-- | hosts/thinkpad/configuration.nix | 25 | ||||
| -rw-r--r-- | hosts/thinkpad/disko.nix | 115 |
9 files changed, 282 insertions, 110 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 4382320..fc1c334 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -62,15 +62,21 @@ users.enable = true; }; srv = { - files.enable = true; + files = { + enable = true; + localsend.enable = true; + }; gaming = { enable = true; steam.enable = true; }; - virtualization.enable = true; + virtualization = { + kvm.enable = true; + waydroid.enable = true; + }; kdeconnect.enable = true; nix-helper.enable = true; - ollama.enable = true; + # ollama.enable = true; monero.enable = true; sops.enable = true; syncthing.enable = true; @@ -81,8 +87,33 @@ }; }; + systemd.services.oci-arm-claimer = { + description = "OCI ARM Instance Claimer Script"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + WorkingDirectory = "/home/${username}/docs/oci-arm-host-capacity"; + + ExecStart = "${pkgs.php}/bin/php -d error_reporting='E_ALL & ~E_DEPRECATED' /home/${username}/docs/oci-arm-host-capacity/index.php"; + + Restart = "always"; + RestartSec = "60"; + User = "${username}"; + }; + path = [ + pkgs.php + pkgs.php82Packages.composer + ]; + }; + boot = { - kernelModules = [ "nct6687" ]; + kernelModules = [ + "nct6687" + "binder_linux" + "ashem_linux" + ]; + # kernelParams = [ "video=DP-1:2560x1440@240" ]; extraModulePackages = [ config.boot.kernelPackages.nct6687d ]; diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix index 93941e9..d9be765 100644 --- a/hosts/desktop/disko.nix +++ b/hosts/desktop/disko.nix @@ -3,7 +3,7 @@ disk = { main = { type = "disk"; - device = "/dev/nvme0n1"; + device = "/dev/disk/by-id/nvme-Lexar_SSD_NM790_2TB_PM5679R0036090P270"; content = { type = "gpt"; partitions = { @@ -114,7 +114,7 @@ }; storage = { type = "disk"; - device = "/dev/sda"; + device = "/dev/disk/by-id/ata-WDC_WD20EZBX-00AYRA0_WD-WXA2D63K8CLK"; content = { type = "gpt"; partitions = { diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 8211143..196617b 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -59,4 +59,30 @@ yt-dlp.enable = true; }; }; + + programs.niri.settings.outputs = { + "DP-1" = { + focus-at-startup = true; + variable-refresh-rate = "on-demand"; + position = { + x = 0; + y = 0; + }; + mode = { + width = 2560; + height = 1440; + }; + }; + "DP-2" = { + variable-refresh-rate = "on-demand"; + position = { + x = 2560; + y = 360; + }; + mode = { + width = 1920; + height = 1080; + }; + }; + }; } diff --git a/hosts/oci/configuration.nix b/hosts/oci/configuration.nix new file mode 100644 index 0000000..e3e4840 --- /dev/null +++ b/hosts/oci/configuration.nix @@ -0,0 +1,85 @@ +{ + inputs, + username, + ... +}: +{ + system.stateVersion = "25.05"; + + imports = [ + inputs.disko.nixosModules.disko + # ./disko.nix + + ../../os/default.nix + ]; + # hardware.facter.reportPath = /etc/nixos/hosts/oci/facter.json; + + # networking = { + # hostName = "oci"; + # defaultGateway = "10.0.0.1"; + # nameservers = [ "9.9.9.9" ]; + # interfaces.eth0 = { + # ipv4.addresses = [ + # { + # address = "10.0.0.90"; + # prefixLength = 24; + # } + # ]; + # useDHCP = true; + # }; + # firewall = { + # logRefusedConnections = false; + # rejectPackets = true; + # }; + # }; + + boot.loader = { + # efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + }; + + services.cloud-init = { + enable = true; + network.enable = true; + }; + + os = { + core = { + # allowUnfree.enable = true; + + bootloader.type = "none"; + bootloader.efi = false; + drivers = { + enable = true; + kernel = "stable"; + }; + fonts.enable = true; + home-manager = { + enable = true; + users.${username}.path = ./home.nix; + }; + locale.enable = true; + memory = { + zram.enable = true; + swapfile = { + enable = true; + size = 16; + }; + }; + network.enable = true; + security.enable = true; + ssh.enable = true; + storage.enable = true; + users.enable = true; + }; + srv = { + sops.enable = true; + files.enable = true; + nix-helper.enable = true; + }; + }; + boot.kernelParams = [ + "console=ttyS0" + "net.ifnames=0" + ]; +} diff --git a/hosts/oci/disko.nix b/hosts/oci/disko.nix new file mode 100644 index 0000000..fb01384 --- /dev/null +++ b/hosts/oci/disko.nix @@ -0,0 +1,77 @@ +{ lib, ... }: +{ + disko.devices.disk.main = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = lib.mkForce "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "root" = { + mountpoint = lib.mkForce "/"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "noatime" + ]; + }; + "nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "nodev" + "noatime" + ]; + }; + "home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "nosuid" + "nodev" + "noatime" + ]; + }; + "log" = { + mountpoint = "/var/log"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "nosuid" + "nodev" + "noatime" + ]; + }; + "swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ + "compress=none" + "discard=async" + "nodatacow" + "noatime" + ]; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/oci/home.nix b/hosts/oci/home.nix new file mode 100644 index 0000000..3ffc2ee --- /dev/null +++ b/hosts/oci/home.nix @@ -0,0 +1,21 @@ +{ username, ... }: +{ + imports = [ ../../hm/default.nix ]; + + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "25.05"; + }; + + hm = { + conf.git.enable = true; + editors.nixvim.enable = true; + shell = { + cli.enable = true; + fish.enable = true; + foot.enable = true; + starship.enable = true; + }; + }; +} diff --git a/hosts/thinkpad/boot.key b/hosts/thinkpad/boot.key Binary files differnew file mode 100644 index 0000000..6675c92 --- /dev/null +++ b/hosts/thinkpad/boot.key diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix index ecc1c52..56a21b3 100644 --- a/hosts/thinkpad/configuration.nix +++ b/hosts/thinkpad/configuration.nix @@ -23,10 +23,15 @@ audio.enable = true; bootloader = { type = "grub"; - efi = false; timeout = 0; - grub.device = "/dev/nvme0n1"; luks.enable = true; + grub = { + device = "/dev/nvme0n1"; + signing = { + enable = true; + keyId = "3D95543550A5A23A"; + }; + }; }; drivers = { enable = true; @@ -57,9 +62,18 @@ }; srv = { bluetooth.enable = true; - files.enable = true; - gaming.enable = true; - virtualization.enable = true; + files = { + enable = true; + localsend.enable = true; + }; + gaming = { + enable = true; + steam.enable = true; + }; + virtualization = { + kvm.enable = true; + waydroid.enable = true; + }; kdeconnect.enable = true; nix-helper.enable = true; monero.enable = true; @@ -71,4 +85,5 @@ }; }; services.thinkfan.enable = true; + boot.kernelParams = [ "iomem=relaxed" ]; } diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix index b5ccdc1..9816f7f 100644 --- a/hosts/thinkpad/disko.nix +++ b/hosts/thinkpad/disko.nix @@ -11,20 +11,16 @@ size = "1M"; type = "EF02"; }; - boot = { - size = "2G"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; luks = { size = "100%"; content = { type = "luks"; - name = "crypted_main"; + name = "crypted"; + keyFile = "/boot/root.key"; + extraFormatArgs = [ + "--type luks2" + "--pbkdf argon2id" + ]; settings.allowDiscards = true; content = { type = "btrfs"; @@ -38,6 +34,16 @@ "noatime" ]; }; + "boot" = { + mountpoint = "/boot"; + mountOptions = [ + "compress=none" + "discard=async" + "nosuid" + "nodev" + "noatime" + ]; + }; "nix" = { mountpoint = "/nix"; mountOptions = [ @@ -104,95 +110,6 @@ }; }; }; - storage = { - type = "disk"; - device = "/dev/sda"; - content = { - type = "gpt"; - partitions = { - luks = { - size = "100%"; - content = { - type = "luks"; - name = "crypted_storage"; - keyFile = "/tmp/crypt.key"; - settings.allowDiscards = true; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "archive" = { - mountpoint = "/storage/archive"; - mountOptions = [ - "compress=zstd:1" - "discard=async" - "nosuid" - "nodev" - "noatime" - - "nofail" - "x-systemd.device-timeout=5s" - ]; - }; - "movies" = { - mountpoint = "/storage/movies"; - mountOptions = [ - "compress=none" - "discard=async" - "nosuid" - "nodev" - "noatime" - - "nofail" - "x-systemd.device-timeout=5s" - ]; - }; - "anime" = { - mountpoint = "/storage/anime"; - mountOptions = [ - "compress=none" - "discard=async" - "nosuid" - "nodev" - "noatime" - - "nofail" - "x-systemd.device-timeout=5s" - ]; - }; - "pictures" = { - mountpoint = "/storage/pics"; - mountOptions = [ - "compress=none" - "discard=async" - "nosuid" - "nodev" - "noatime" - - "nofail" - "x-systemd.device-timeout=5s" - ]; - }; - "videos" = { - mountpoint = "/storage/vids"; - mountOptions = [ - "compress=none" - "discard=async" - "nosuid" - "nodev" - "noatime" - - "nofail" - "x-systemd.device-timeout=5s" - ]; - }; - }; - }; - }; - }; - }; - }; - }; }; }; } |
