From 8e5557921d756f8b9e8d3961ab7ea308fc88acbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Fri, 10 Apr 2026 16:05:34 +0200 Subject: [PATCH 1/2] feat: prepare minimal features for fortress --- features/desktop-minimal.nix | 45 ++++++++++++++++++++++++++++++++++++ features/shell-minimal.nix | 16 +++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 features/desktop-minimal.nix create mode 100644 features/shell-minimal.nix diff --git a/features/desktop-minimal.nix b/features/desktop-minimal.nix new file mode 100644 index 0000000..73ff718 --- /dev/null +++ b/features/desktop-minimal.nix @@ -0,0 +1,45 @@ +{ + nixos = + { pkgs, inputs, ... }: + { + imports = [ inputs.stylix.nixosModules.stylix ]; + + # audio + services.pipewire = { + enable = true; + pulse.enable = true; + }; + + security.polkit.enable = true; + services.dbus.enable = true; + services.playerctld.enable = true; + + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + extraPortals = [ + pkgs.xdg-desktop-portal-wlr + pkgs.xdg-desktop-portal-gtk + ]; + }; + + fonts.packages = with pkgs; [ + font-awesome + nerd-fonts.jetbrains-mono + ]; + + # theming + stylix = { + enable = true; + polarity = "dark"; + image = "${inputs.assets}/wallpaper.png"; + base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; + }; + }; + + home = + { inputs, ... }: + { + home.file.".assets".source = inputs.assets; + }; +} diff --git a/features/shell-minimal.nix b/features/shell-minimal.nix new file mode 100644 index 0000000..5ecde47 --- /dev/null +++ b/features/shell-minimal.nix @@ -0,0 +1,16 @@ +{ + nixos = _: { + programs.zsh.enable = true; + environment.etc."zshenv".text = '' + export ZDOTDIR=$HOME/.config/zsh + ''; + }; + + home = + { pkgs, ... }: + { + home.packages = with pkgs; [ + starship + ]; + }; +} From f85980190e6cdbe85c751e6b8ece9c583f6c7a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Fri, 10 Apr 2026 16:06:09 +0200 Subject: [PATCH 2/2] feat: prepare initial fortress host --- flake/hosts.nix | 15 +++++ hosts/fortress/configuration.nix | 81 +++++++++++++++++++++++ hosts/fortress/hardware-configuration.nix | 30 +++++++++ 3 files changed, 126 insertions(+) create mode 100644 hosts/fortress/configuration.nix create mode 100644 hosts/fortress/hardware-configuration.nix diff --git a/flake/hosts.nix b/flake/hosts.nix index 338fb59..a0ec121 100644 --- a/flake/hosts.nix +++ b/flake/hosts.nix @@ -100,6 +100,21 @@ in ]; }; + fortress = mkHost "fortress" { + system = "x86_64-linux"; + user = "matej"; + features = [ + "localisation" + "gnupg" + "shell-minimal" + "desktop-minimal" + "sway" + "greeter" + "networkmanager" + "yubikey" + ]; + }; + ephvm = mkHost "ephvm" { system = "x86_64-linux"; user = "matej"; diff --git a/hosts/fortress/configuration.nix b/hosts/fortress/configuration.nix new file mode 100644 index 0000000..c5e1195 --- /dev/null +++ b/hosts/fortress/configuration.nix @@ -0,0 +1,81 @@ +{ + pkgs, + inputs, + ... +}: + +{ + imports = [ + inputs.disko.nixosModules.disko + inputs.nixos-hardware.nixosModules.framework-16-amd-ai-300-series + ]; + + localisation = { + timeZone = "Europe/Ljubljana"; + defaultLocale = "en_US.UTF-8"; + }; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + disko.devices.disk.main = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + esp = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "cryptlvm"; + settings.allowDiscards = true; + content = { + type = "lvm_pv"; + vg = "vg"; + }; + }; + }; + }; + }; + }; + + disko.devices.lvm_vg.vg = { + type = "lvm_vg"; + lvs = { + root = { + size = "100%FREE"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + swap = { + size = "32G"; + content = { + type = "swap"; + }; + }; + }; + }; + + networking.firewall.enable = true; + + environment.systemPackages = with pkgs; [ + google-chrome + firefox + vim + ]; + + system.stateVersion = "25.11"; +} diff --git a/hosts/fortress/hardware-configuration.nix b/hosts/fortress/hardware-configuration.nix new file mode 100644 index 0000000..364964d --- /dev/null +++ b/hosts/fortress/hardware-configuration.nix @@ -0,0 +1,30 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + hardware.firmware = [ pkgs.linux-firmware ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usbhid" + "uas" + "sd_mod" + ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}