flake: update configuration for tower
This commit is contained in:
parent
b8cd82aa85
commit
6e5f6c1a59
5 changed files with 47 additions and 23 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -34,7 +34,23 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"impermanence": "impermanence",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
14
flake.nix
14
flake.nix
|
@ -3,14 +3,22 @@
|
|||
outputs = inputs: let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||
user = import ./modules/user {inherit pkgs;};
|
||||
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
|
||||
pkgsFor = inputs.nixpkgs.legacyPackages;
|
||||
in {
|
||||
nixosConfigurations = import ./hosts inputs;
|
||||
|
||||
devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {};
|
||||
|
||||
formatter.x86_64-linux = pkgs.alejandra;
|
||||
packages.x86_64-linux = user.packages;
|
||||
packages.aarch64-linux = user.packages;
|
||||
|
||||
packages = eachSystem (
|
||||
system: let
|
||||
user = import ./modules/user {pkgs = pkgsFor.${system};};
|
||||
in {
|
||||
inherit (user) packages;
|
||||
}
|
||||
);
|
||||
|
||||
apps.x86_64-linux = {
|
||||
default = {
|
||||
|
@ -30,6 +38,8 @@
|
|||
# Unstable nixpkgs baby!
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
{
|
||||
config = {
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/3480-C94B";
|
||||
fsType = "vfat";
|
||||
};
|
||||
# root on tmpfs
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/3dde50ca-440d-4d46-974e-efc623e53703";
|
||||
fsType = "btrfs";
|
||||
options = ["compress=zstd" "noatime"];
|
||||
};
|
||||
config.fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/3480-C94B";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/3a781f2e-290a-4609-9035-a93374459def";
|
||||
fsType = "ext4";
|
||||
options = ["noatime" "compress=zstd"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,24 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "virtio_scsi" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# 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.enp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ in {
|
|||
programs.ssh.startAgent = true;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [8997];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue