Compare commits

...

3 commits

Author SHA1 Message Date
fa1d506357 flake.lock: Update
All checks were successful
/ test (push) Successful in 3m6s
Flake lock file updates:

• Updated input 'dream2nix':
    'github:nix-community/dream2nix/0c6b5c8ab796f6dfb2aef1133f5b7bb25ce57cb9' (2024-07-10)
  → 'github:nix-community/dream2nix/0859b0dfdfe39e6e6479c8991f81336c13471255' (2024-07-11)
• Updated input 'homeManager':
    'github:nix-community/home-manager/c085b984ff2808bf322f375b10fea5a415a9c43d' (2024-07-10)
  → 'github:nix-community/home-manager/90ae324e2c56af10f20549ab72014804a3064c7f' (2024-07-11)
• Updated input 'lix':
    'git+https://git@git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=014410cbf0bda9c0fcdaf5f894120883cdc805ce' (2024-07-10)
  → 'git+https://git@git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=4b109ec1a8fc4550150f56f0f46f2f41d844bda8' (2024-07-11)
• Updated input 'lix-module':
    'git+https://git.lix.systems/lix-project/nixos-module?ref=refs/heads/main&rev=5d9d94089fb1ca96222a34bfe245ef5c5ebefd37' (2024-06-25)
  → 'git+https://git.lix.systems/lix-project/nixos-module?ref=refs/heads/main&rev=d70318fb946a0e720dfdd1fb10b0645c14e2a02a' (2024-07-11)
• Updated input 'nixDarwin':
    'github:LnL7/nix-darwin/cf297a8d248db6a455b60133f6c0029c04ebe50e' (2024-07-10)
  → 'github:LnL7/nix-darwin/5ce8503cf402cf76b203eba4b7e402bea8e44abc' (2024-07-13)
• Updated input 'nixosHardware':
    'github:NixOS/nixos-hardware/a111ce6b537df12a39874aa9672caa87f8677eda' (2024-07-09)
  → 'github:NixOS/nixos-hardware/c5013aa7ce2c7ec90acee5d965d950c8348db751' (2024-07-11)
• Updated input 'nixpkgsStable':
    'github:NixOS/nixpkgs/7144d6241f02d171d25fba3edeaf15e0f2592105' (2024-07-02)
  → 'github:NixOS/nixpkgs/205fd4226592cc83fd4c0885a3e4c9c400efabb5' (2024-07-09)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/750dfb555b5abdab4d3266b3f9a05dec6d205c04' (2024-07-10)
  → 'github:numtide/treefmt-nix/5b002f8a53ed04c1a4177e7b00809d57bd2c696f' (2024-07-12)
2024-07-13 13:24:02 +00:00
b111910e64
Fix hostname
All checks were successful
/ test (push) Successful in 8m34s
2024-07-13 14:51:18 +02:00
cc2bae9274
Fix
Some checks failed
/ test (push) Failing after 29s
2024-07-11 17:34:03 +02:00
4 changed files with 55 additions and 35 deletions

52
flake.lock generated
View file

@ -124,11 +124,11 @@
"pyproject-nix": "pyproject-nix"
},
"locked": {
"lastModified": 1720605900,
"narHash": "sha256-/BTAC3gj1Ot7o/PINsHS2EGEtGUadI12WZlhowKn18c=",
"lastModified": 1720713418,
"narHash": "sha256-6Sdzq2JhHW28GLXcCBConJSxz24bKQXWL7Z3JTOlU0A=",
"owner": "nix-community",
"repo": "dream2nix",
"rev": "0c6b5c8ab796f6dfb2aef1133f5b7bb25ce57cb9",
"rev": "0859b0dfdfe39e6e6479c8991f81336c13471255",
"type": "github"
},
"original": {
@ -818,11 +818,11 @@
]
},
"locked": {
"lastModified": 1720646128,
"narHash": "sha256-BivO5yIQukDlJL+1875Sqf3GuOPxZDdA48dYDi3PkL8=",
"lastModified": 1720734513,
"narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c085b984ff2808bf322f375b10fea5a415a9c43d",
"rev": "90ae324e2c56af10f20549ab72014804a3064c7f",
"type": "github"
},
"original": {
@ -872,11 +872,11 @@
"lix": {
"flake": false,
"locked": {
"lastModified": 1720633647,
"narHash": "sha256-CjWvti4wFhRmIHpLduohKAVmU9+wI/PAOhQppCWziK8=",
"lastModified": 1720733512,
"narHash": "sha256-vq9CLDvqSSvH4L7YhDa0ihTOrAry4jntKiuoNb5n98M=",
"ref": "refs/heads/main",
"rev": "014410cbf0bda9c0fcdaf5f894120883cdc805ce",
"revCount": 15944,
"rev": "4b109ec1a8fc4550150f56f0f46f2f41d844bda8",
"revCount": 15950,
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
},
@ -897,11 +897,11 @@
]
},
"locked": {
"lastModified": 1719353937,
"narHash": "sha256-86NBqDxAP20ET/UoKX0WvSItblNQ97czXb2q7lkMrwk=",
"lastModified": 1720695775,
"narHash": "sha256-8Oqzl9QPjEe/n8y0R2tC6+2v/H6xBgABHXOJwxmnBg0=",
"ref": "refs/heads/main",
"rev": "5d9d94089fb1ca96222a34bfe245ef5c5ebefd37",
"revCount": 92,
"rev": "d70318fb946a0e720dfdd1fb10b0645c14e2a02a",
"revCount": 94,
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
},
@ -1001,11 +1001,11 @@
]
},
"locked": {
"lastModified": 1720599442,
"narHash": "sha256-jdm+sKVbBXoyrxcHbVaV0htlpq2iFR+eJw3Xe/DPcDo=",
"lastModified": 1720845312,
"narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "cf297a8d248db6a455b60133f6c0029c04ebe50e",
"rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc",
"type": "github"
},
"original": {
@ -1060,11 +1060,11 @@
},
"nixosHardware": {
"locked": {
"lastModified": 1720515935,
"narHash": "sha256-8b+fzR4W2hI5axwB+4nBwoA15awPKkck4ghhCt8v39M=",
"lastModified": 1720737798,
"narHash": "sha256-G/OtEAts7ZUvW5lrGMXSb8HqRp2Jr9I7reBuvCOL54w=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "a111ce6b537df12a39874aa9672caa87f8677eda",
"rev": "c5013aa7ce2c7ec90acee5d965d950c8348db751",
"type": "github"
},
"original": {
@ -1245,11 +1245,11 @@
},
"nixpkgsStable": {
"locked": {
"lastModified": 1719957072,
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
"lastModified": 1720535198,
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
"type": "github"
},
"original": {
@ -1820,11 +1820,11 @@
]
},
"locked": {
"lastModified": 1720645794,
"narHash": "sha256-vAeYp+WH7i/DlBM5xNt9QeWiOiqzzf5abO8DYGkbUxg=",
"lastModified": 1720818892,
"narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "750dfb555b5abdab4d3266b3f9a05dec6d205c04",
"rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f",
"type": "github"
},
"original": {

View file

@ -2,18 +2,18 @@
config,
lib,
pkgs,
fleetFlake,
...
}: let
sshdTmpDirectory = "${config.user.home}/sshd-tmp";
sshdDirectory = "${config.user.home}/sshd";
pathToPubKey = "/mnt/sdcard/Download/picard_host_key.pub";
port = 8022;
in {
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = "23.11";
system.stateVersion = "24.05";
# Set up nix for flakes
nix.extraOptions = ''
@ -23,9 +23,25 @@ in {
# Set your time zone
time.timeZone = "Europe/Rome";
build.activation.sshd = ''
home-manager.config = {pkgs, ...}: {
home.stateVersion = "24.05";
_module.args = {
hostname = "janeway";
age.secrets = {};
};
imports = [../../hmModules/shell];
};
build.activation.sshd = let
keys = (builtins.import ../../lib).keys;
inherit (keys) hosts users;
in ''
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
$DRY_RUN_CMD cat ${pathToPubKey} > "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${hosts.picard} > "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${hosts.sisko} >> "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${hosts.kirk} >> "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${users.ccr-ssh} >> "${config.user.home}/.ssh/authorized_keys"
$DRY_RUN_CMD echo ${users.ccr-gpg} >> "${config.user.home}/.ssh/authorized_keys"
if [[ ! -d "${sshdDirectory}" ]]; then
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
@ -41,16 +57,18 @@ in {
fi
'';
environment.packages = [
pkgs.vim
environment.packages = let
inherit (fleetFlake.inputs.ccrEmacs.packages.aarch64-linux) ccrEmacs;
in [
pkgs.bottom
pkgs.helix
pkgs.stress
pkgs.openssh
pkgs.git
pkgs.btop
ccrEmacs
(pkgs.writeScriptBin "sshd-start" ''
#!${pkgs.runtimeShell}
echo "Starting sshd in non-daemonized way on port ${toString port}"
${pkgs.openssh}/bin/sshd -f "${sshdDirectory}/sshd_config" -D
'')

View file

@ -291,6 +291,7 @@ in {
internal = true;
default = hostname: config:
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = inputs.nixpkgsUnstable.legacyPackages.aarch64-linux;
modules = [
({
lib,
@ -298,6 +299,7 @@ in {
...
}: {
nixpkgs.overlays = config.overlays;
_module.args.fleetFlake = self;
})
"${self.outPath}/hosts/${hostname}"
];

View file

@ -29,7 +29,7 @@
"tcp://kirk.fleet"
];
};
onplus8t = {
oneplus8t = {
id = "76BJ2ZE-FPFDWUZ-3UZIENZ-TS6YBGG-EZSF6UE-GLHRBQ2-KTHTRMI-3JWNRAT";
addresses = [
"tcp://oneplus8t.fleet"
@ -45,7 +45,7 @@
kirk = "/home/${config.ccr.username}/org";
}
.${config.networking.hostName};
devices = ["picard" "sisko" "kirk" "onplus6t"];
devices = ["picard" "sisko" "kirk" "oneplus8t"];
};
sync = {
path =