feat: drop bento, add yuba (WSL)

This commit is contained in:
winston 2024-02-11 19:12:32 +00:00
parent 11011387de
commit 8618fa8858
Signed by: winston
GPG key ID: 3786770EDBC2B481
11 changed files with 62 additions and 109 deletions

View file

@ -393,7 +393,8 @@
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"pre-commit-hooks": "pre-commit-hooks",
"swayfx": "swayfx"
"swayfx": "swayfx",
"wsl": "wsl"
}
},
"rust-overlay": {
@ -486,6 +487,30 @@
"repo": "default",
"type": "github"
}
},
"wsl": {
"inputs": {
"flake-compat": [],
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707476384,
"narHash": "sha256-9YortZTCO9r7wFHX92t+npUDmD5VcKrkVmwaPCvEiXI=",
"owner": "nix-community",
"repo": "nixos-wsl",
"rev": "76ca59d8d4423b27c0238bc31401692ebc571365",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-wsl",
"type": "github"
}
}
},
"root": "root",

View file

@ -16,8 +16,8 @@
host = "sashimi";
system = "aarch64-darwin";
username = "winston";
extraModules = [inputs.nekowinston-nur.darwinModules.default];
isGraphical = true;
extraModules = [inputs.nekowinston-nur.darwinModules.default];
}
{
host = "futomaki";
@ -26,10 +26,11 @@
isGraphical = true;
}
{
host = "bento";
host = "yuba";
system = "x86_64-linux";
username = "w";
isGraphical = true;
username = "winston";
isGraphical = false;
extraModules = [inputs.wsl.nixosModules.default];
}
];
imports = [inputs.pre-commit-hooks.flakeModule];
@ -112,6 +113,12 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
wsl = {
url = "github:nix-community/nixos-wsl";
inputs.flake-compat.follows = "";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/nur";
caarlos0-nur = {

View file

@ -53,6 +53,7 @@
];
extraConfig = {
core.fsmonitor = "rs-git-fsmonitor";
credential.helper = "gopass";
init.defaultBranch = "main";
push.default = "current";

View file

@ -1,32 +0,0 @@
{
config,
pkgs,
...
}: {
imports = [./hardware.nix];
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["quiet" "splash"];
};
hardware = {
bluetooth.enable = true;
};
networking = {
hostName = "bento";
networkmanager.enable = true;
firewall.enable = true;
};
time.timeZone = "Europe/Vienna";
i18n.defaultLocale = "en_US.UTF-8";
services = {
openssh.enable = true;
pcscd.enable = true;
};
virtualisation.podman.enable = true;
}

View file

@ -1,66 +0,0 @@
# 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,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.loader.systemd-boot.consoleMode = "0";
boot.initrd.luks.devices = {
luksroot = {
device = "/dev/disk/by-uuid/1af1c538-b38a-43f3-9ad2-9da8a946db7f";
preLVM = true;
allowDiscards = true;
};
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/83c767e9-9efd-4f85-990d-e5cfb9200167";
fsType = "btrfs";
options = ["subvol=root" "compress=zstd"];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/83c767e9-9efd-4f85-990d-e5cfb9200167";
fsType = "btrfs";
options = ["subvol=home" "compress=zstd"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/83c767e9-9efd-4f85-990d-e5cfb9200167";
fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9382-B533";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/fd70f74e-f2a8-4117-a2c0-355736b162e0";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -39,8 +39,6 @@
programs.zsh.enable = true;
environment.systemPackages = [pkgs.xdg-utils];
system.stateVersion = "22.11";
# enable yubikey u2f support
security.pam.u2f = {
enable = true;

View file

@ -0,0 +1,12 @@
{
lib,
pkgs,
...
}: {
services.kanata.enable = lib.mkForce false;
system = {
build.installBootLoader = lib.mkForce "${pkgs.coreutils}/bin/true";
stateVersion = "23.11";
};
}

View file

@ -6,7 +6,6 @@
imports = [./hardware.nix];
networking = {
hostName = "futomaki";
networkmanager.enable = true;
firewall.enable = true;
};
@ -60,4 +59,6 @@
};
};
};
system.stateVersion = "22.11";
}

View file

@ -68,6 +68,9 @@
description = "Whether the system is a graphical target";
};
};
config = {
networking.hostName = host;
};
}
./common/shared
./common/${hostPlatform}

View file

@ -1,9 +1,6 @@
{
imports = [./brew.nix];
networking.computerName = "sashimi";
networking.hostName = "sashimi";
nix.settings.extra-platforms = [
"aarch64-darwin"
"x86_64-darwin"

View file

@ -0,0 +1,7 @@
{
imports = [../common/wsl];
wsl = {
defaultUser = "winston";
enable = true;
};
}