lotsa stuff again
This commit is contained in:
parent
ed3a2803c7
commit
4a65423961
22 changed files with 149 additions and 131 deletions
42
flake.lock
generated
42
flake.lock
generated
|
@ -66,11 +66,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712014858,
|
"lastModified": 1714641030,
|
||||||
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
|
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
|
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -119,11 +119,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712386041,
|
"lastModified": 1714043624,
|
||||||
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
|
"narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
|
"rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -135,11 +135,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713344939,
|
"lastModified": 1714531828,
|
||||||
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
|
"narHash": "sha256-ILsf3bdY/hNNI/Hu5bSt2/KbmHaAVhBbNUOdGztTHEg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
|
"rev": "0638fe2715d998fa81d173aad264eb671ce2ebc1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -150,29 +150,23 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"lastModified": 1714640452,
|
||||||
"lastModified": 1711703276,
|
"narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
|
||||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
"type": "tarball",
|
||||||
"owner": "NixOS",
|
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"dir": "lib",
|
"type": "tarball",
|
||||||
"owner": "NixOS",
|
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713562564,
|
"lastModified": 1714656196,
|
||||||
"narHash": "sha256-NQpYhgoy0M89g9whRixSwsHb8RFIbwlxeYiVSDwSXJg=",
|
"narHash": "sha256-kjQkA98lMcsom6Gbhw8SYzmwrSo+2nruiTcTZp5jK7o=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "92d295f588631b0db2da509f381b4fb1e74173c5",
|
"rev": "94035b482d181af0a0f8f77823a790b256b7c3cc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -56,6 +56,25 @@
|
||||||
|
|
||||||
flake =
|
flake =
|
||||||
{
|
{
|
||||||
|
|
||||||
|
nixosModules = builtins.listToAttrs (
|
||||||
|
map
|
||||||
|
(x: {
|
||||||
|
name = x;
|
||||||
|
value = import (./modules/nixos + "/${x}");
|
||||||
|
})
|
||||||
|
(builtins.attrNames (builtins.readDir ./modules/nixos))
|
||||||
|
);
|
||||||
|
|
||||||
|
homeManagerModules = builtins.listToAttrs (
|
||||||
|
map
|
||||||
|
(name: {
|
||||||
|
inherit name;
|
||||||
|
value = import (./modules/home + "/${name}");
|
||||||
|
})
|
||||||
|
(builtins.attrNames (builtins.readDir ./modules/home))
|
||||||
|
);
|
||||||
|
|
||||||
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
||||||
|
|
||||||
homeConfigurations =
|
homeConfigurations =
|
||||||
|
@ -67,6 +86,7 @@
|
||||||
modules = [ ./users/${name}/home.nix ];
|
modules = [ ./users/${name}/home.nix ];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
flake = self;
|
||||||
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; };
|
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
13
hive.nix
13
hive.nix
|
@ -16,13 +16,19 @@ in
|
||||||
description = "All my NixoS machines";
|
description = "All my NixoS machines";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs outputs pkgs-unstable;
|
inherit inputs outputs pkgs-unstable;
|
||||||
|
flake = self;
|
||||||
nodes = colmenaHive.nodes;
|
nodes = colmenaHive.nodes;
|
||||||
};
|
};
|
||||||
nixpkgs = pkgs;
|
nixpkgs = pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = { lib, config, name, nodes, ... }: {
|
defaults = { lib, config, name, nodes, ... }: {
|
||||||
imports = [ ./hosts/${name} ./profiles/base (import ./overlays) ];
|
imports = [
|
||||||
|
./hosts/${name}
|
||||||
|
./profiles/base
|
||||||
|
(import ./overlays)
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
] ++ builtins.attrValues self.nixosModules;
|
||||||
|
|
||||||
options.cherrykitten = {
|
options.cherrykitten = {
|
||||||
primaryIPv4 = lib.mkOption {
|
primaryIPv4 = lib.mkOption {
|
||||||
|
@ -45,8 +51,13 @@ in
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
networking.domain = "cherrykitten.xyz";
|
networking.domain = "cherrykitten.xyz";
|
||||||
|
|
||||||
|
deployment = {
|
||||||
|
targetUser = lib.mkDefault "sammy";
|
||||||
|
tags = [ pkgs.stdenv.hostPlatform.system ];
|
||||||
|
};
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit inputs outputs pkgs-unstable;
|
inherit inputs outputs pkgs-unstable;
|
||||||
|
flake = self;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
imports = [
|
|
||||||
./fish
|
|
||||||
./nvim
|
|
||||||
./tmux.nix
|
|
||||||
./starship.nix
|
|
||||||
./git.nix
|
|
||||||
./foot.nix
|
|
||||||
./ssh.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,19 +1,23 @@
|
||||||
{ ... }: {
|
{ lib, ... }: {
|
||||||
programs.fish = {
|
options.cherrykitten.fish = {
|
||||||
enable = true;
|
enable = lib.mkEnableOption "Fish Shell";
|
||||||
|
} // { default = true; };
|
||||||
|
config = {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
set -g fish_key_bindings fish_vi_key_bindings
|
set -g fish_key_bindings fish_vi_key_bindings
|
||||||
|
|
||||||
set -x GPG_TTY (tty)
|
set -x GPG_TTY (tty)
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
g = "git";
|
g = "git";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
programs.foot = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
main = {
|
|
||||||
font = "monospace:size=8";
|
|
||||||
dpi-aware = "yes";
|
|
||||||
initial-window-size-pixels = "1920x1080";
|
|
||||||
};
|
|
||||||
|
|
||||||
bell.visual = "yes";
|
|
||||||
|
|
||||||
# colors taken from https://codeberg.org/dnkl/foot/src/branch/master/themes/catppuccin
|
|
||||||
cursor.color = "1A1826 D9E0EE";
|
|
||||||
colors = {
|
|
||||||
foreground = "D9E0EE";
|
|
||||||
background = "1E1D2F";
|
|
||||||
regular0 = "6E6C7E";
|
|
||||||
regular1 = "F28FAD";
|
|
||||||
regular2 = "ABE9B3";
|
|
||||||
regular3 = "FAE3B0";
|
|
||||||
regular4 = "96CDFB";
|
|
||||||
regular5 = "F5C2E7";
|
|
||||||
regular6 = "89DCEB";
|
|
||||||
regular7 = "D9E0EE";
|
|
||||||
bright0 = "988BA2";
|
|
||||||
bright1 = "F28FAD";
|
|
||||||
bright2 = "ABE9B3";
|
|
||||||
bright3 = "FAE3B0";
|
|
||||||
bright4 = "96CDFB";
|
|
||||||
bright5 = "F5C2E7";
|
|
||||||
bright6 = "89DCEB";
|
|
||||||
bright7 = "D9E0EE";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
43
modules/home/foot/default.nix
Normal file
43
modules/home/foot/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options.cherrykitten.foot = {
|
||||||
|
enable = lib.mkEnableOption "Foot Terminal Emulator";
|
||||||
|
} // { default = true; };
|
||||||
|
config = {
|
||||||
|
programs.foot = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
font = "monospace:size=8";
|
||||||
|
dpi-aware = "yes";
|
||||||
|
initial-window-size-pixels = "1920x1080";
|
||||||
|
};
|
||||||
|
|
||||||
|
bell.visual = "yes";
|
||||||
|
|
||||||
|
# colors taken from https://codeberg.org/dnkl/foot/src/branch/master/themes/catppuccin
|
||||||
|
cursor.color = "1A1826 D9E0EE";
|
||||||
|
colors = {
|
||||||
|
foreground = "D9E0EE";
|
||||||
|
background = "1E1D2F";
|
||||||
|
regular0 = "6E6C7E";
|
||||||
|
regular1 = "F28FAD";
|
||||||
|
regular2 = "ABE9B3";
|
||||||
|
regular3 = "FAE3B0";
|
||||||
|
regular4 = "96CDFB";
|
||||||
|
regular5 = "F5C2E7";
|
||||||
|
regular6 = "89DCEB";
|
||||||
|
regular7 = "D9E0EE";
|
||||||
|
bright0 = "988BA2";
|
||||||
|
bright1 = "F28FAD";
|
||||||
|
bright2 = "ABE9B3";
|
||||||
|
bright3 = "FAE3B0";
|
||||||
|
bright4 = "96CDFB";
|
||||||
|
bright5 = "F5C2E7";
|
||||||
|
bright6 = "89DCEB";
|
||||||
|
bright7 = "D9E0EE";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -42,9 +42,9 @@ in
|
||||||
".cache"
|
".cache"
|
||||||
".git"
|
".git"
|
||||||
];
|
];
|
||||||
environmentFile = "/root/keys/restic_env";
|
environmentFile = config.deployment.keys."restic_env".path;
|
||||||
repositoryFile = "/root/keys/restic_repository_file";
|
repositoryFile = config.deployment.keys."restic_repository_file".path;
|
||||||
passwordFile = "/root/keys/restic_password_file";
|
passwordFile = config.deployment.keys."restic_password_file".path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
imports = [ ./backups ];
|
|
||||||
}
|
|
|
@ -1,30 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(import ./gotosocial.nix)
|
||||||
gotosocial =
|
|
||||||
let
|
|
||||||
web-assets = prev.fetchurl {
|
|
||||||
url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v0.15.0/gotosocial_0.15.0_web-assets.tar.gz";
|
|
||||||
hash = "sha256-vrSdFIdBcfj6+sxtvv1s/Mu85I1mKxjyUYS902oLKk4=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
prev.gotosocial.overrideAttrs {
|
|
||||||
version = "0.15.0";
|
|
||||||
doCheck = false;
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "superseriousbusiness";
|
|
||||||
repo = "gotosocial";
|
|
||||||
rev = "refs/tags/v0.15.0";
|
|
||||||
hash = "sha256-z0iETddkw4C2R6ig9ZO8MTvhuWnmQ37/6q3oZ4WAzd4=";
|
|
||||||
};
|
|
||||||
postInstall = ''
|
|
||||||
tar xf ${web-assets}
|
|
||||||
mkdir -p $out/share/gotosocial
|
|
||||||
mv web $out/share/gotosocial/
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
24
overlays/gotosocial.nix
Normal file
24
overlays/gotosocial.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
final: prev: {
|
||||||
|
gotosocial =
|
||||||
|
let
|
||||||
|
web-assets = prev.fetchurl {
|
||||||
|
url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v0.15.0/gotosocial_0.15.0_web-assets.tar.gz";
|
||||||
|
hash = "sha256-vrSdFIdBcfj6+sxtvv1s/Mu85I1mKxjyUYS902oLKk4=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
prev.gotosocial.overrideAttrs {
|
||||||
|
version = "0.15.0";
|
||||||
|
doCheck = false;
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "superseriousbusiness";
|
||||||
|
repo = "gotosocial";
|
||||||
|
rev = "refs/tags/v0.15.0";
|
||||||
|
hash = "sha256-z0iETddkw4C2R6ig9ZO8MTvhuWnmQ37/6q3oZ4WAzd4=";
|
||||||
|
};
|
||||||
|
postInstall = ''
|
||||||
|
tar xf ${web-assets}
|
||||||
|
mkdir -p $out/share/gotosocial
|
||||||
|
mv web $out/share/gotosocial/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,12 +2,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
../../users/root
|
../../users/root
|
||||||
../../users/sammy
|
../../users/sammy
|
||||||
../../modules/nixos
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
];
|
];
|
||||||
|
|
||||||
deployment.tags = [ pkgs.stdenv.hostPlatform.system ];
|
|
||||||
deployment.targetUser = lib.mkDefault "sammy";
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -82,6 +78,7 @@
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
maxretry = 5;
|
maxretry = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [ libu2f-host yubikey-personalization ];
|
services.udev.packages = with pkgs; [ libu2f-host yubikey-personalization ];
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
home-manager.users.nixos = {
|
home-manager.users.nixos = {
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/home/foot.nix
|
../../modules/home/foot
|
||||||
];
|
];
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
deployment.keys."root_password_hash" = {
|
deployment.keys."root_password_hash" = {
|
||||||
keyCommand = [ "pass" "users/root/hashedPassword" ];
|
keyCommand = [ "pass" "users/root/hashedPassword" ];
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
hashedPasswordFile = lib.mkDefault "/run/keys/root_password_hash";
|
hashedPasswordFile = lib.mkDefault config.deployment.keys."root_password_hash".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.root = import ./home.nix;
|
home-manager.users.root = import ./home.nix;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ flake, ... }: {
|
||||||
imports = [ ../../modules/home ];
|
imports = (builtins.attrValues flake.homeManagerModules);
|
||||||
|
|
||||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
deployment.keys."sammy_password_hash" = {
|
deployment.keys."sammy_password_hash" = {
|
||||||
destDir = "/home/sammy/.keys";
|
destDir = "/home/sammy/.keys";
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB" ];
|
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB" ];
|
||||||
hashedPasswordFile = lib.mkDefault "/home/sammy/.keys/sammy_password_hash";
|
hashedPasswordFile = lib.mkDefault config.deployment.keys."sammy_password_hash".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.sammy = import ./home.nix;
|
home-manager.users.sammy = import ./home.nix;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ flake, ... }: {
|
||||||
imports = [ ../../modules/home ];
|
imports = (builtins.attrValues flake.homeManagerModules);
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
userName = "CherryKitten";
|
userName = "CherryKitten";
|
||||||
|
|
Loading…
Add table
Reference in a new issue