nyaaaa
This commit is contained in:
parent
9233d64ef3
commit
001f641a7f
16 changed files with 236 additions and 226 deletions
44
flake.nix
44
flake.nix
|
@ -9,18 +9,29 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
...
|
||||
}: let
|
||||
outputs =
|
||||
inputs @ { self
|
||||
, nixpkgs
|
||||
, nixpkgs-unstable
|
||||
, home-manager
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
forEachSystem = f: lib.genAttrs systems (system: f);
|
||||
forAllSystems = lib.genAttrs systems;
|
||||
lib = nixpkgs.lib // home-manager.lib;
|
||||
mkHost = {
|
||||
hostname,
|
||||
user ? "sammy",
|
||||
mkHost =
|
||||
{ hostname
|
||||
, user ? "sammy"
|
||||
,
|
||||
}: {
|
||||
imports = [
|
||||
./hosts/${hostname}/configuration.nix
|
||||
|
@ -33,22 +44,23 @@
|
|||
allowLocalDeployment = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit lib;
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
||||
colmena = {
|
||||
meta = {
|
||||
description = "All my NixoS machines";
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [];
|
||||
overlays = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
bengal = mkHost {hostname = "bengal";};
|
||||
bengal = mkHost { hostname = "bengal"; };
|
||||
|
||||
maine-coon = mkHost {hostname = "maine-coon";};
|
||||
maine-coon = mkHost { hostname = "maine-coon"; };
|
||||
};
|
||||
nixosConfigurations.test = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
# 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,
|
||||
modulesPath,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, modulesPath
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/7a713df7-7027-4ae6-b1a3-839dda62dcbc";
|
||||
|
@ -29,7 +28,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/8cca600e-735e-4486-92e3-01ff6c0b7599";}];
|
||||
swapDevices = [{ device = "/dev/disk/by-uuid/8cca600e-735e-4486-92e3-01ff6c0b7599"; }];
|
||||
|
||||
# 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
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
|
@ -31,7 +30,7 @@
|
|||
address = "fe80::1";
|
||||
interface = "enp0s31f6";
|
||||
};
|
||||
networking.nameservers = ["8.8.8.8"];
|
||||
networking.nameservers = [ "8.8.8.8" ];
|
||||
|
||||
# Initial empty root password for easy login:
|
||||
services.openssh.permitRootLogin = lib.mkForce "prohibit-password";
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
# 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,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
boot.initrd.availableKernelModules = ["ahci" "nvme"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ "ahci" "nvme" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/nvme0n1p2";
|
||||
|
@ -22,5 +21,5 @@
|
|||
fsType = "ext2";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
}
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
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
|
||||
|
@ -27,7 +26,7 @@
|
|||
settings.PasswordAuthentication = lib.mkForce true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [22];
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
];
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.cherrykitten;
|
||||
in {
|
||||
options.cherrykitten = {};
|
||||
in
|
||||
{
|
||||
options.cherrykitten = { };
|
||||
|
||||
config = {};
|
||||
config = { };
|
||||
}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
imports = [./fish ./nvim];
|
||||
imports = [ ./fish ./nvim ];
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
lsd
|
||||
|
@ -19,8 +18,8 @@
|
|||
git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
init = {defaultBranch = "main";};
|
||||
core = {editor = "nvim";};
|
||||
init = { defaultBranch = "main"; };
|
||||
core = { editor = "nvim"; };
|
||||
pull.rebase = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
{ config
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}: {
|
||||
programs.neovim = let
|
||||
programs.neovim =
|
||||
let
|
||||
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
||||
viAlias = true;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.cherrykitten.common;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.cherrykitten.common = {
|
||||
test = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
@ -21,7 +22,7 @@ in {
|
|||
];
|
||||
|
||||
config = {
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
@ -45,10 +46,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,11 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.cherrykitten.graphical;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.cherrykitten.graphical = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "graphical stuffs");
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
networking.firewall.allowedTCPPorts = [22];
|
||||
{ pkgs, ... }: {
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
services.udev.packages = with pkgs; [libu2f-host yubikey-personalization];
|
||||
{ pkgs, ... }: {
|
||||
services.udev.packages = with pkgs; [ libu2f-host yubikey-personalization ];
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.cherrykitten.users;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.cherrykitten.users = {
|
||||
sammy.enable = lib.mkEnableOption "sammy" // {default = true;};
|
||||
sammy.enable = lib.mkEnableOption "sammy" // { default = true; };
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users.sammy = lib.mkIf cfg.sammy.enable {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||
shell = pkgs.fish;
|
||||
ignoreShellProgramCheck = true;
|
||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB"];
|
||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB" ];
|
||||
};
|
||||
|
||||
home-manager.users.sammy = lib.mkIf cfg.sammy.enable (import ./sammy.nix);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{...}: {
|
||||
imports = [../home];
|
||||
{ ... }: {
|
||||
imports = [ ../home ];
|
||||
|
||||
programs.git = {
|
||||
userName = "CherryKitten";
|
||||
|
|
Loading…
Reference in a new issue