Start small #15

Closed
pegasust wants to merge 1 commits from bare into master
4 changed files with 143 additions and 30 deletions

View File

@ -4,15 +4,16 @@
"inputs": { "inputs": {
"darwin": "darwin", "darwin": "darwin",
"nixpkgs": [ "nixpkgs": [
"ragenix",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1677969766, "lastModified": 1682101079,
"narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=", "narHash": "sha256-MdAhtjrLKnk2uiqun1FWABbKpLH090oeqCSiWemtuck=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e", "rev": "2994d002dcff5353ca1ac48ec584c7f6589fe447",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,9 +62,40 @@
"type": "github" "type": "github"
} }
}, },
"crane_2": {
"inputs": {
"flake-compat": "flake-compat_6",
"flake-utils": [
"ragenix",
"flake-utils"
],
"nixpkgs": [
"ragenix",
"nixpkgs"
],
"rust-overlay": [
"ragenix",
"rust-overlay"
]
},
"locked": {
"lastModified": 1681680516,
"narHash": "sha256-EB8Adaeg4zgcYDJn9sR6UMjN/OHdIiMMK19+3LmmXQY=",
"owner": "ipetkov",
"repo": "crane",
"rev": "54b63c8eae4c50172cb50b612946ff1d2bc1c75c",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"ragenix",
"agenix", "agenix",
"nixpkgs" "nixpkgs"
] ]
@ -160,6 +192,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_6": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1678901627, "lastModified": 1678901627,
@ -266,6 +314,24 @@
} }
}, },
"flake-utils_8": { "flake-utils_8": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_9": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
@ -755,9 +821,32 @@
"type": "github" "type": "github"
} }
}, },
"root": { "ragenix": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"crane": "crane_2",
"flake-utils": "flake-utils_8",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_4"
},
"locked": {
"lastModified": 1682237245,
"narHash": "sha256-xbBR7LNK+d5Yi/D6FXQGc1R6u2VV2nwr/Df5iaEbOEQ=",
"owner": "yaxitech",
"repo": "ragenix",
"rev": "281f68c3d477904f79ff1cd5807a8c226cd80a50",
"type": "github"
},
"original": {
"owner": "yaxitech",
"repo": "ragenix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
@ -769,7 +858,8 @@
"nixgl": "nixgl", "nixgl": "nixgl",
"nixlib": "nixlib_2", "nixlib": "nixlib_2",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"rust-overlay": "rust-overlay_4" "ragenix": "ragenix",
"rust-overlay": "rust-overlay_5"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -845,7 +935,32 @@
}, },
"rust-overlay_4": { "rust-overlay_4": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_8", "flake-utils": [
"ragenix",
"flake-utils"
],
"nixpkgs": [
"ragenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1682129965,
"narHash": "sha256-1KRPIorEL6pLpJR04FwAqqnt4Tzcm4MqD84yhlD+XSk=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "2c417c0460b788328220120c698630947547ee83",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_5": {
"inputs": {
"flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
@ -862,6 +977,21 @@
"type": "github" "type": "github"
} }
}, },
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1676283394, "lastModified": 1676283394,

View File

@ -9,8 +9,8 @@
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
# continously merged & rebased lightweight .lib. Basically a huge extension to c_. # continously merged & rebased lightweight .lib. Basically a huge extension to c_.
nixlib.url = "github:nix-community/nixpkgs.lib"; nixlib.url = "github:nix-community/nixpkgs.lib";
agenix = { ragenix = {
url = "github:ryantm/agenix"; url = "github:yaxitech/ragenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = { home-manager = {
@ -43,7 +43,7 @@
outputs = outputs =
{ nixpkgs { nixpkgs
, agenix , ragenix
, home-manager , home-manager
, flake-utils , flake-utils
, nixgl , nixgl
@ -110,7 +110,7 @@
inherit (users) homeConfigurations; inherit (users) homeConfigurations;
inherit lib proj_root; inherit lib proj_root;
devShells = forEachSystem (system: devShells = forEachSystem (system:
{default = (import ./dev-shell.nix final_inputs.${system});} { default = (import ./dev-shell.nix final_inputs.${system}); }
); );
templates = forEachSystem (system: import ./templates final_inputs.${system}); templates = forEachSystem (system: import ./templates final_inputs.${system});
secrets = { secrets = {

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
# This file installs dependencies needed for the Neovim plugins
echo "Please run this in sudo mode for sudo apt* commands"
# Pip and Python3
if [ ! python3 --version ] ; then
PYTHON_3=${PYTHON_3:-"python3.10"}
apt install $PYTHON_3
$PYTHON_3 -m ensurepip --upgrade
$PYTHON_3 -m pip install --upgrade pip
fi
# Neovim vim-plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

View File

@ -9,7 +9,7 @@ in
enable = lib.mkEnableOption "keepass"; enable = lib.mkEnableOption "keepass";
use_gui = lib.mkOption { use_gui = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
description = "wheter to enable keepass GUI (the original one)"; description = "Whether to enable keepass GUI (the original one)";
default = false; default = false;
example = "true"; example = "true";
}; };
@ -47,12 +47,13 @@ in
] ++ (if cfg.use_gui or config.base.graphics._enable then [ ] ++ (if cfg.use_gui or config.base.graphics._enable then [
pkgs.keepass # Personal secret management pkgs.keepass # Personal secret management
] else [ ]); ] else [ ]);
# TODO: an alternative is to symlink safely-stored password onto here
home.file.".kp/config.ini".text = lib.generators.toINI { } (trimNull { home.file.".kp/config.ini".text = lib.generators.toINI { } (trimNull {
default = { default = {
KEEPASSDB = cfg.path; KEEPASSDB = cfg.path;
KEEPASSDB_KEYFILE = cfg.keyfile_path; KEEPASSDB_KEYFILE = cfg.keyfile_path;
STORE_ENCRYPTED_PASSWORD = cfg.store_encrypted_password; STORE_ENCRYPTED_PASSWORD = cfg.store_encrypted_password;
KEEPASSDB_PASSWORD = null; # No good way yet to store the password KEEPASSDB_PASSWORD = null; # TODO: There is no way to store via file. This field expects plain-text
KEEPASSDB_TIMEOUT = cfg.copy_timeout_secs; KEEPASSDB_TIMEOUT = cfg.copy_timeout_secs;
}; };
}); });