lots of formatting

This commit is contained in:
CherryKitten 2024-03-24 19:02:45 +01:00
parent a9847526df
commit 8e4c37287a
Signed by: sammy
GPG key ID: 98D8F75FB0658276
18 changed files with 51 additions and 139 deletions

View file

@ -12,12 +12,10 @@
};
};
outputs =
inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, colmena, ... }:
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, colmena, ... }:
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;
in
@ -26,8 +24,7 @@
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
devShells = forAllSystems (system:
let pkgs = import nixpkgs { system = system; }; in
{
let pkgs = import nixpkgs { system = system; }; in {
default = pkgs.mkShell {
nativeBuildInputs = [ pkgs.nix pkgs.colmena pkgs.git pkgs.home-manager pkgs.nixos-rebuild ];
shellHook = "exec $SHELL";
@ -69,6 +66,7 @@
modules = [ ./modules/nixos/common.nix ./hosts/test-vm/configuration.nix (import "${home-manager}/nixos") ];
};
} // colmenaHive.nodes;
homeConfigurations.sammy =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };

View file

@ -1,13 +1,5 @@
# 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
, ...
}: {
{ ... }: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];

View file

@ -1,12 +1,4 @@
# 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, modulesPath, ... }: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

View file

@ -1,10 +1,5 @@
{ config
, pkgs
, lib
, ...
}: {
{ ... }: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
@ -32,9 +27,6 @@
};
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"
];

View file

@ -1,11 +1,4 @@
# 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" ];

View file

@ -1,26 +1,4 @@
{ config
, lib
, pkgs
, ...
}: {
users.users.admin = {
isNormalUser = true;
extraGroups = [ "wheel" ];
password = "admin";
group = "admin";
};
users.groups.admin = { };
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation = {
memorySize = 8192;
cores = 6;
graphics = true;
};
};
{ lib, pkgs, ... }: {
services.openssh = {
enable = true;
settings.PasswordAuthentication = lib.mkForce true;

View file

@ -1,12 +1,4 @@
{ pkgs
, config
, lib
, ...
}:
let
cfg = config.cherrykitten;
in
{
{ ... }: {
options.cherrykitten = { };
config = { };

View file

@ -1,35 +1,9 @@
{ pkgs, ... }: {
imports = [ ./fish ./nvim ./tmux.nix ./starship.nix ];
home.packages = with pkgs; [
bat
lsd
gnupg
colmena
{ ... }: {
imports = [
./fish
./nvim
./tmux.nix
./starship.nix
./git.nix
];
programs = {
home-manager.enable = true;
git = {
enable = true;
extraConfig = {
init = { defaultBranch = "main"; };
core = { editor = "nvim"; };
pull.rebase = true;
};
aliases = {
a = "add";
ai = "add -p";
br = "branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate";
c = "commit";
del = "branch -D";
p = "push";
pf = "push --force-with-lease";
r = "rebase";
ri = "rebase -i";
s = "status";
sw = "switch";
};
};
};
}

23
modules/home/git.nix Normal file
View file

@ -0,0 +1,23 @@
{ ... }: {
programs.git = {
enable = true;
extraConfig = {
init = { defaultBranch = "main"; };
core = { editor = "nvim"; };
pull.rebase = true;
};
aliases = {
a = "add";
ai = "add -p";
br = "branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate";
c = "commit";
del = "branch -D";
p = "push";
pf = "push --force-with-lease";
r = "rebase";
ri = "rebase -i";
s = "status";
sw = "switch";
};
};
}

View file

@ -1,6 +1,4 @@
{ config, lib, pkgs, pkgs-unstable, ... }:
{
{ lib, pkgs, pkgs-unstable, ... }: {
programs.neovim = {
enable = true;
package = pkgs-unstable.neovim-unwrapped;
@ -22,7 +20,6 @@
extraLuaConfig =
let
plugins = with pkgs.vimPlugins; [
# LazyVim
LazyVim
bufferline-nvim
cmp-buffer

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ lib, ... }: {
programs.starship = {
enable = true;
settings = {

View file

@ -1,5 +1,4 @@
{ pkgs, config, lib, ... }: {
{ ... }: {
programs.tmux = {
enable = true;

View file

@ -1,12 +1,4 @@
{ lib
, config
, pkgs
, ...
}:
let
cfg = config.cherrykitten.common;
in
{
{ lib, pkgs, ... }: {
options.cherrykitten.common = {
test = lib.mkOption {
type = lib.types.str;

View file

@ -1,8 +1,4 @@
{ pkgs
, config
, lib
, ...
}:
{ config, lib, ... }:
let
cfg = config.cherrykitten.graphical;
in

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ ... }: {
networking.firewall.allowedTCPPorts = [ 22 ];
services.openssh = {

View file

@ -1,5 +1,4 @@
{ config, pkgs, lib, ... }:
{
{ ... }: {
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation = {

View file

@ -1,8 +1,4 @@
{ pkgs
, config
, lib
, ...
}:
{ pkgs, config, lib, ... }:
let
cfg = config.cherrykitten.users;
in