started new config

This commit is contained in:
2025-12-28 14:48:30 +09:00
commit a743f2c943
17 changed files with 661 additions and 0 deletions

30
hosts/default.nix Normal file
View File

@@ -0,0 +1,30 @@
{ self, nixpkgs, ... }:
let
inherit (self) inputs;
common-intel = inputs.nixos-hardware.nixosModules.common-cpu-intel;
framework16 = inputs.nixos-hardware.nixosModules.framework-16-7040-amd;
# mkHost - String -> Boolean -> Attr -> Attr - Create nixos system attributes
# @param name - String - Name of the system
# @param isDesktop - Boolean - If set true, adds xlibre overlays to modules
# @param machine - Attr - Attribute from nixos-hardware nixos Module for setting machine's preset
mkHost = name: isDesktop: machine:
nixpkgs.lib.nixosSystem {
modules = [
./${name}
../overlays
machine
] ++ builtins.attrValues self.nixosModules ++ (if isDesktop then [
inputs.xlibre-overlay.nixosModules.overlay-xlibre-xserver
inputs.xlibre-overlay.nixosModules.overlay-all-xlibre-drivers
] else []);
specialArgs = {
inherit inputs;
};
};
in
{
"virtual-bird" = mkHost "virtual-bird" true common-intel;
}

View File

@@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
../../profiles/base.nix
../../profiles/desktop.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.xserver.windowManager.i3.enable = true;
environment.systemPackages = with pkgs; [
rofi
dunst
vim
tmux
];
networking.hostName = "virtual-bird";
networking.firewall.enable = true;
system.stateVersion = "25.11"; # Did you read the comment?
}

View File

@@ -0,0 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9705a174-c3ce-44f0-98eb-48d801e91cde";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3351-CE12";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/2bf99498-58e9-429d-9636-115c8c06316a"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}