so many nya nya changes

This commit is contained in:
CherryKitten 2024-03-24 19:02:24 +01:00
parent 4d9ede5faa
commit d4ba3267fa
Signed by: sammy
GPG key ID: 98D8F75FB0658276
6 changed files with 129 additions and 40 deletions

View file

@ -17,19 +17,6 @@
}:
let
system = "x86_64-linux";
mkHost = hostname: {
imports = [
./hosts/${hostname}/configuration.nix
./modules/common
(import "${home-manager}/nixos")
];
deployment = {
targetUser = "root";
targetHost = hostname;
allowLocalDeployment = true;
};
};
in
{
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
@ -41,7 +28,30 @@
};
};
bengal = mkHost "bengal";
bengal = { name, nodes, pkgs, ... }: {
imports = [
./hosts/${name}/configuration.nix
./modules/common
(import "${home-manager}/nixos")
];
deployment = {
targetUser = "sammy";
allowLocalDeployment = true;
};
};
maine-coon = { name, nodes, pkgs, ... }: {
imports = [
./hosts/${name}/configuration.nix
./modules/common
(import "${home-manager}/nixos")
];
deployment = {
targetHost = "maine-coon";
allowLocalDeployment = true;
};
};
};
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
inherit system;

View file

@ -0,0 +1,50 @@
{
config,
pkgs,
lib,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
networking.hostName = "maine-coon";
boot.loader.grub.device = "/dev/nvme0n1";
networking.useDHCP = false;
networking.interfaces."enp0s31f6".ipv4.addresses = [
{
address = "159.69.71.253";
prefixLength = 26;
}
];
networking.interfaces."enp0s31f6".ipv6.addresses = [
{
address = "2a01:4f8:231:16dc::1";
prefixLength = 64;
}
];
networking.defaultGateway = "159.69.71.193";
networking.defaultGateway6 = {
address = "fe80::1";
interface = "enp0s31f6";
};
networking.nameservers = ["8.8.8.8"];
# Initial empty root password for easy login:
services.openssh.permitRootLogin = lib.mkForce "prohibit-password";
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB"
];
services.openssh.enable = true;
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -0,0 +1,27 @@
# 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,
pkgs,
...
}: {
boot.initrd.availableKernelModules = ["ahci" "nvme"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/nvme0n1p2";
fsType = "btrfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/69ed72d0-20c2-440e-a036-7de658766ee0";
fsType = "ext2";
};
swapDevices = [];
}

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}: {
imports = [
../../modules/common
../../modules/graphical

View file

@ -1,12 +1,11 @@
{ lib
, config
, pkgs
, ...
}:
let
cfg = config.cherrykitten.common;
in
{
lib,
config,
pkgs,
...
}: let
cfg = config.cherrykitten.common;
in {
imports = [
../users
./security.nix

View file

@ -1,12 +1,11 @@
{ pkgs
, config
, lib
, ...
}:
let
cfg = config.cherrykitten.graphical;
in
{
pkgs,
config,
lib,
...
}: let
cfg = config.cherrykitten.graphical;
in {
options.cherrykitten.graphical = {
enable = lib.mkEnableOption (lib.mdDoc "graphical stuffs");
};