so many nya nya changes
This commit is contained in:
parent
4d9ede5faa
commit
d4ba3267fa
6 changed files with 129 additions and 40 deletions
38
flake.nix
38
flake.nix
|
@ -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;
|
||||
|
|
50
hosts/maine-coon/configuration.nix
Normal file
50
hosts/maine-coon/configuration.nix
Normal 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?
|
||||
}
|
27
hosts/maine-coon/hardware-configuration.nix
Normal file
27
hosts/maine-coon/hardware-configuration.nix
Normal 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 = [];
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../modules/common
|
||||
../../modules/graphical
|
||||
|
@ -9,12 +13,12 @@
|
|||
|
||||
users.users.admin = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
extraGroups = ["wheel"];
|
||||
password = "admin";
|
||||
group = "admin";
|
||||
};
|
||||
|
||||
users.groups.admin = { };
|
||||
users.groups.admin = {};
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
|
@ -30,7 +34,7 @@
|
|||
settings.PasswordAuthentication = lib.mkForce true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
networking.firewall.allowedTCPPorts = [22];
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
@ -23,7 +22,7 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
|
@ -44,10 +43,10 @@ in
|
|||
nerdfonts
|
||||
];
|
||||
fontconfig = {
|
||||
defaultFonts.emoji = [ "Noto Emoji" ];
|
||||
defaultFonts.serif = [ "Monaspace Xenon" "FiraCode Nerd Font" "Hack Nerd Font" "NotoSans Nerd Font" ];
|
||||
defaultFonts.sansSerif = [ "Monaspace Xenon" "FiraCode Nerd Font" "Hack Nerd Font" "NotoSerif Nerd Font" ];
|
||||
defaultFonts.monospace = [ "Monaspace Xenon" "FiraCode Nerd Font" "Hack Nerd Font" ];
|
||||
defaultFonts.emoji = ["Noto Emoji"];
|
||||
defaultFonts.serif = ["Monaspace Xenon" "FiraCode Nerd Font" "Hack Nerd Font" "NotoSans Nerd Font"];
|
||||
defaultFonts.sansSerif = ["Monaspace Xenon" "FiraCode Nerd Font" "Hack Nerd Font" "NotoSerif Nerd Font"];
|
||||
defaultFonts.monospace = ["Monaspace Xenon" "FiraCode Nerd Font" "Hack Nerd Font"];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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");
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue