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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"impermanence": "impermanence",
|
"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
|
outputs = inputs: let
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||||
user = import ./modules/user {inherit pkgs;};
|
user = import ./modules/user {inherit pkgs;};
|
||||||
|
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
|
||||||
|
pkgsFor = inputs.nixpkgs.legacyPackages;
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = import ./hosts inputs;
|
nixosConfigurations = import ./hosts inputs;
|
||||||
|
|
||||||
devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {};
|
devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {};
|
||||||
|
|
||||||
formatter.x86_64-linux = pkgs.alejandra;
|
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 = {
|
apps.x86_64-linux = {
|
||||||
default = {
|
default = {
|
||||||
|
@ -30,6 +38,8 @@
|
||||||
# Unstable nixpkgs baby!
|
# Unstable nixpkgs baby!
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
systems.url = "github:nix-systems/default-linux";
|
||||||
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
{
|
{
|
||||||
config = {
|
config.fileSystems = {
|
||||||
fileSystems = {
|
"/boot" = {
|
||||||
"/boot" = {
|
device = "/dev/disk/by-uuid/3480-C94B";
|
||||||
device = "/dev/disk/by-uuid/3480-C94B";
|
fsType = "vfat";
|
||||||
fsType = "vfat";
|
};
|
||||||
};
|
|
||||||
# root on tmpfs
|
"/" = {
|
||||||
"/" = {
|
device = "/dev/disk/by-uuid/3a781f2e-290a-4609-9035-a93374459def";
|
||||||
device = "/dev/disk/by-uuid/3dde50ca-440d-4d46-974e-efc623e53703";
|
fsType = "ext4";
|
||||||
fsType = "btrfs";
|
options = ["noatime" "compress=zstd"];
|
||||||
options = ["compress=zstd" "noatime"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
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.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [];
|
boot.kernelModules = [];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (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
|
# 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`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ in {
|
||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
ports = [8997];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
PermitRootLogin = "no";
|
PermitRootLogin = "no";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue