update
This commit is contained in:
27
hosts/alanturing/default.nix
Normal file
27
hosts/alanturing/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ 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.desktopManager.plasma6.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
tmux
|
||||
];
|
||||
|
||||
networking.hostName = "alanturing";
|
||||
networking.firewall.enable = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
}
|
||||
|
||||
@@ -3,22 +3,24 @@ let
|
||||
inherit (self) inputs;
|
||||
|
||||
common-intel = inputs.nixos-hardware.nixosModules.common-cpu-intel;
|
||||
common-nvidia = inputs.nixos-hardware.nixosModules.common-gpu-nvidia-nonprime;
|
||||
framework16 = inputs.nixos-hardware.nixosModules.framework-16-7040-amd;
|
||||
|
||||
# mkHost - String -> Boolean -> Attr -> Attr - Create nixos system attributes
|
||||
# mkHost - String -> Boolean -> [Attr] -> Attr - Create nixos system attribute set
|
||||
# @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:
|
||||
# @param useXLibre - Boolean - If set true, adds xlibre overlays to modules
|
||||
# @param machine - [Attr] - Array of attribute sets from nixos-hardware nixos Module for setting machine's preset
|
||||
# @return - An attribute set that describes NixOS system configurations
|
||||
|
||||
mkHost = name: useXLibre: machine:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./${name}
|
||||
../overlays
|
||||
machine
|
||||
] ++ builtins.attrValues self.nixosModules ++ (if isDesktop then [
|
||||
] ++ builtins.attrValues self.nixosModules ++ (if useXLibre then [
|
||||
inputs.xlibre-overlay.nixosModules.overlay-xlibre-xserver
|
||||
inputs.xlibre-overlay.nixosModules.overlay-all-xlibre-drivers
|
||||
] else []);
|
||||
] else []) ++ machine;
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
@@ -26,5 +28,7 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
"virtual-bird" = mkHost "virtual-bird" true common-intel;
|
||||
"virtual-bird" = mkHost "virtual-bird" true [ common-intel ];
|
||||
"alanturing" = mkHost "alanturing" true [ common-intel common-nvidia ];
|
||||
"waku" = mkHost "waku" true [ framework16 ];
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
networking.hostName = "virtual-bird";
|
||||
networking.firewall.enable = true;
|
||||
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9705a174-c3ce-44f0-98eb-48d801e91cde";
|
||||
{ device = "/dev/disk/by-label/NIXOS";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3351-CE12";
|
||||
{ device = "/dev/disk/by-label/EFI";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/2bf99498-58e9-429d-9636-115c8c06316a"; }
|
||||
[ { device = "/dev/disk/by-label/SWAP"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
Reference in New Issue
Block a user