lots of formatting
This commit is contained in:
parent
a9847526df
commit
8e4c37287a
18 changed files with 51 additions and 139 deletions
|
@ -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"; };
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -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")
|
||||
];
|
||||
|
|
|
@ -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"
|
||||
];
|
||||
|
|
|
@ -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" ];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.cherrykitten;
|
||||
in
|
||||
{
|
||||
{ ... }: {
|
||||
options.cherrykitten = { };
|
||||
|
||||
config = { };
|
||||
|
|
|
@ -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
23
modules/home/git.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
{ lib, ... }: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
|
||||
{ ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
|
@ -26,5 +25,5 @@
|
|||
'';
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.cherrykitten.graphical;
|
||||
in
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{ ... }: {
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
|
||||
services.openssh = {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
{ ... }: {
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.cherrykitten.users;
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue