Compare commits
3 Commits
e38491d9e3
...
f2e594275e
Author | SHA1 | Date | |
---|---|---|---|
f2e594275e | |||
858ea8b16b | |||
29ee933441 |
10
flake.nix
10
flake.nix
|
@ -96,17 +96,12 @@
|
|||
base = mkNixOsBase {
|
||||
inherit system pkgs;
|
||||
hostname = "catboy-cafe";
|
||||
use-efi = true;
|
||||
};
|
||||
graphical = mkNixOsGraphical {
|
||||
inherit pkgs;
|
||||
background = "pan-wire-3.png";
|
||||
};
|
||||
networking = mkNixOsNetworking {
|
||||
inherit pkgs;
|
||||
eth-interface = "enp0s31f6";
|
||||
static-ip = "192.168.0.199";
|
||||
};
|
||||
networking = mkNixOsNetworking { inherit pkgs; };
|
||||
|
||||
coral =
|
||||
let
|
||||
|
@ -136,7 +131,8 @@
|
|||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./nixos/hardware/catboy-cafe.nix
|
||||
./nixos/machines/catboy-cafe/hardware.nix
|
||||
./nixos/machines/catboy-cafe/boot.nix
|
||||
base
|
||||
graphical
|
||||
networking
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
system, pkgs, nixpkgs-flake, hostname,
|
||||
use-efi ? false, efi-mountpoint ? "/boot",
|
||||
use-grub ? false, grub-device ? "/dev/sda",
|
||||
}:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true; # lol
|
||||
|
@ -29,17 +27,6 @@
|
|||
|
||||
networking.hostName = hostname;
|
||||
|
||||
boot.loader = if use-efi
|
||||
then {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = efi-mountpoint;
|
||||
} else if use-grub then {
|
||||
grub.enable = true;
|
||||
grub.devce = grub-device;
|
||||
} else throw "Please use either use-efi or use-grub = true";
|
||||
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
|
||||
services.logind.lidSwitch = "ignore";
|
||||
|
|
7
nixos/machines/catboy-cafe/boot.nix
Normal file
7
nixos/machines/catboy-cafe/boot.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
efi.efiSysMountPoint = "/boot";
|
||||
};
|
||||
}
|
|
@ -1,21 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
eth-interface ? "eth0",
|
||||
static-ip ? false, # false, or IPv4 address as string
|
||||
default-gateway ? "192.168.1.1",
|
||||
use-iwd ? false,
|
||||
}:
|
||||
let static-ip-conf = if static-ip != false then {
|
||||
networking.defaultGateway = { address = default-gateway; interface = eth-interface; };
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.${eth-interface}.ipv4.addresses = [ {
|
||||
address = static-ip;
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
networking.networkmanager.unmanaged = [eth-interface];
|
||||
} else {};
|
||||
in pkgs.lib.attrsets.recursiveUpdate static-ip-conf
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
dhcp = "dhcpcd";
|
||||
wifi.backend = if use-iwd then "iwd" else "wpa_supplicant";
|
||||
};
|
||||
networking.nameservers = [ "8.8.8.8" ];
|
||||
networking.resolvconf.enable = true;
|
||||
networking.resolvconf.dnsExtensionMechanism = false; # edns seems to be fucky with this enabled
|
||||
|
|
Loading…
Reference in New Issue
Block a user