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 =
|
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, colmena, ... }:
|
||||||
inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, colmena, ... }:
|
|
||||||
let
|
let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
systems = [ "aarch64-linux" "i686-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
systems = [ "aarch64-linux" "i686-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
||||||
forEachSystem = f: lib.genAttrs systems (system: f);
|
|
||||||
forAllSystems = lib.genAttrs systems;
|
forAllSystems = lib.genAttrs systems;
|
||||||
lib = nixpkgs.lib // home-manager.lib;
|
lib = nixpkgs.lib // home-manager.lib;
|
||||||
in
|
in
|
||||||
|
@ -26,8 +24,7 @@
|
||||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
||||||
|
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { system = system; }; in
|
let pkgs = import nixpkgs { system = system; }; in {
|
||||||
{
|
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
nativeBuildInputs = [ pkgs.nix pkgs.colmena pkgs.git pkgs.home-manager pkgs.nixos-rebuild ];
|
nativeBuildInputs = [ pkgs.nix pkgs.colmena pkgs.git pkgs.home-manager pkgs.nixos-rebuild ];
|
||||||
shellHook = "exec $SHELL";
|
shellHook = "exec $SHELL";
|
||||||
|
@ -69,6 +66,7 @@
|
||||||
modules = [ ./modules/nixos/common.nix ./hosts/test-vm/configuration.nix (import "${home-manager}/nixos") ];
|
modules = [ ./modules/nixos/common.nix ./hosts/test-vm/configuration.nix (import "${home-manager}/nixos") ];
|
||||||
};
|
};
|
||||||
} // colmenaHive.nodes;
|
} // colmenaHive.nodes;
|
||||||
|
|
||||||
homeConfigurations.sammy =
|
homeConfigurations.sammy =
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
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 = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
{ config, lib, modulesPath, ... }: {
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config
|
|
||||||
, lib
|
|
||||||
, pkgs
|
|
||||||
, modulesPath
|
|
||||||
, ...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
{ config
|
{ ... }: {
|
||||||
, pkgs
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -32,9 +27,6 @@
|
||||||
};
|
};
|
||||||
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";
|
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB"
|
"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.availableKernelModules = [ "ahci" "nvme" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
{ config
|
{ lib, pkgs, ... }: {
|
||||||
, 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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = lib.mkForce true;
|
settings.PasswordAuthentication = lib.mkForce true;
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
{ pkgs
|
{ ... }: {
|
||||||
, config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.cherrykitten;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.cherrykitten = { };
|
options.cherrykitten = { };
|
||||||
|
|
||||||
config = { };
|
config = { };
|
||||||
|
|
|
@ -1,35 +1,9 @@
|
||||||
{ pkgs, ... }: {
|
{ ... }: {
|
||||||
imports = [ ./fish ./nvim ./tmux.nix ./starship.nix ];
|
imports = [
|
||||||
home.packages = with pkgs; [
|
./fish
|
||||||
bat
|
./nvim
|
||||||
lsd
|
./tmux.nix
|
||||||
gnupg
|
./starship.nix
|
||||||
colmena
|
./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 = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs-unstable.neovim-unwrapped;
|
package = pkgs-unstable.neovim-unwrapped;
|
||||||
|
@ -22,7 +20,6 @@
|
||||||
extraLuaConfig =
|
extraLuaConfig =
|
||||||
let
|
let
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
# LazyVim
|
|
||||||
LazyVim
|
LazyVim
|
||||||
bufferline-nvim
|
bufferline-nvim
|
||||||
cmp-buffer
|
cmp-buffer
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ lib, ... }: {
|
||||||
{
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, config, lib, ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
{ lib
|
{ lib, pkgs, ... }: {
|
||||||
, config
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.cherrykitten.common;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.cherrykitten.common = {
|
options.cherrykitten.common = {
|
||||||
test = lib.mkOption {
|
test = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{ pkgs
|
{ config, lib, ... }:
|
||||||
, config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cfg = config.cherrykitten.graphical;
|
cfg = config.cherrykitten.graphical;
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }: {
|
{ ... }: {
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ ... }: {
|
||||||
{
|
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
# following configuration is added only when building VM with build-vm
|
# following configuration is added only when building VM with build-vm
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{ pkgs
|
{ pkgs, config, lib, ... }:
|
||||||
, config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cfg = config.cherrykitten.users;
|
cfg = config.cherrykitten.users;
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue