Skip to content

Commit

Permalink
set up sops finally
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jun 28, 2023
1 parent af51f89 commit 53ada91
Show file tree
Hide file tree
Showing 18 changed files with 179 additions and 73 deletions.
6 changes: 3 additions & 3 deletions .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
keys:
- &isabel age1g3cz9g3x8slhkff3kfp9rcwq28pjmlnfv3mcp4dh4m6qh0sesuks6decwu
- &isabel age16sj4v4y0ny784kwsrs0x9vayrwy8avj0na3tmd87jsa692dte3nsj8z8m6
creation_rules:
- key_groups:
- age:
- *isabel
- age:
- *isabel
44 changes: 8 additions & 36 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
catppuccin.url = "github:isabelroses/ctp-nix";

# Secrets
sops-nix.url = "github:Mic92/sops-nix";
sops = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};

# Hyprland packages
hyprland = {
Expand Down
1 change: 1 addition & 0 deletions home/isabel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in {
# external home-manager modules
inputs.hyprland.homeManagerModules.default
inputs.catppuccin.homeManagerModules.catppuccin
inputs.sops.homeManagerModules.sops
#inputs.bella-nur.homeManagerModules.default

# home package sets
Expand Down
2 changes: 2 additions & 0 deletions home/isabel/packages/gui/confs/editors/nvim/config/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable",
lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.coding.copilot" },
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "catppuccin" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
return {
"goolord/alpha-nvim",
opts = function(_, opts)
local logo = [[
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
[ @isabelroses ]
]]
opts.section.header.val = vim.split(logo, "\n", { trimempty = true })
end,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
return {
"akinsho/bufferline.nvim",
opts = {
options = {
-- stylua: ignore
close_command = function(n) require("mini.bufremove").delete(n, false) end,
-- stylua: ignore
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
diagnostics = "nvim_lsp",
always_show_bufferline = false,
diagnostics_indicator = function(_, _, diag)
local icons = require("lazyvim.config").icons.diagnostics
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
.. (diag.warning and icons.Warn .. diag.warning or "")
return vim.trim(ret)
end,
offsets = {
{
filetype = "neo-tree",
text = "File Explorer",
highlight = "Directory",
text_align = "center",
separator = true,
},
},
indicator = {
icon = "",
style = "icon",
},
},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return {
{
"catppuccin/nvim",
lazy = false,
name = "catppuccin",
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin",
},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
config = true,
}
12 changes: 6 additions & 6 deletions home/isabel/packages/gui/confs/editors/nvim/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
pkgs,
lib,
config,
osConfig,
inputs,
...
}:
with lib; let
cfg = config.modules.programs.nvim;
cfg = osConfig.modules.programs.default;
in {
options.modules.programs.nvim = {enable = mkEnableOption "nvim";};

config = mkIf cfg.enable {
config = mkIf (cfg.editor == "nvim") {
xdg.configFile."nvim".source = ./config;
programs.neovim = {
enable = true;
package = pkgs.neovim-unwrapped;
Expand Down Expand Up @@ -58,7 +57,8 @@ in {
nvim-colorizer-lua
nvim-ts-rainbow
gitsigns-nvim
neo-tree-nvim
#neo-tree-nvim
nvim-tree-lua
toggleterm-nvim
todo-comments-nvim
(nvim-treesitter.withPlugins (plugins:
Expand Down
3 changes: 1 addition & 2 deletions home/isabel/packages/system/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
_: {
imports = [
#seveices
./gpg.nix
./ssh.nix

./sops.nix
./xdg.nix
];
}
23 changes: 23 additions & 0 deletions home/isabel/packages/system/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
git-credentials: ENC[AES256_GCM,data:QQ7uZ2g7+vNVmHOzrW8CfZierRGl4/4zgWa7mV0rRjAlXQGBdBwJP73RS9ShwIOkF6Xee50u1Wf7mzPgVRsKfV0CDd1nksL2,iv:kOxAvYuM/6qDC+CgSf/EvBscwsUR0me2ruzWnBgydb8=,tag:PMib1XBF6PwbZckF2TEdHg==,type:str]
gh-key: ENC[AES256_GCM,data:xhugvVKUKBtWqYa+uMl1WZuXJ1voPyb6dgy2Q1VzaGeH/YopTk1bt7VpOMSxQWMK9zrB55mBe+NLw/AKEvyljHV7u09v6QTXP41qMrIZ6R7WI5T2dO3zcbvltdADQQG2/XEjnEXBzxapocMYp1EHbgNK2BH6tAO/dZfBUCmcNU/L0Wpu5hIAekjuOp7yTMSs46tHiVxxfFFsFDSyutaZWg/TyOdVfvGaG+b/v1Wd6yPH5Y51bvQeygOe/Yja2NhvZxPVbOCL8ni+EBf00poagQzHdk5bl2dPMS8L1TonomlX31YsFDnQhM8HzIcqE2NG0MzLebj4EifwS3Aua0w2Uy1wyCamsU0cIulQdVb7bBgrkOapC5cW/irsp8sCMcM/fnJLwyTRrdfuaSvVolgi6JOZW3M1w/mNL7ksT3jY75p7N9F0qWOVJWPjUsuGC5YIBmrMJLnOJNnLiDy3bQo1gfKDCX3MNv9hD7pOySa1ECaJkJRCcKdcQVySfw8H9i+Q1CJxCv3ppKLwLL9UEstyY5InunXDROZCDDAlKiOdCKo0qUA=,iv:YYDuhorS7tNFOVUNe0mJyEvdiVbFpToKXtoY2z13wtw=,tag:0+SfUlVZpJlR422Nm274aA==,type:str]
gh-key-pub: ENC[AES256_GCM,data:msiesy/1jcvf00xOA1YTJwQDPsQD8M3ozM1hcErB0vfkydlWnxt3MJl6P8mOn+3o/qayzAGegEggXTut49YL39wqabfV/EkMiVaokneDXwKBl4jpeoQuH05hDZwUk9Kgyjo+0bH1vQ==,iv:9HHOIHMIMCVYdQqNX253fwLtfi49kc+6PZBOlwwFv2Q=,tag:KY3vfvUqt0hMFP9BR6Jipw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age16sj4v4y0ny784kwsrs0x9vayrwy8avj0na3tmd87jsa692dte3nsj8z8m6
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUeU45SU1JaVhSTDlqcFc2
aTFWdzhtQjUyQkNLYk9mWE82d2dubWQ1SFU4Ci9LZHV3bDZNT2gwdXNoVCs2V2cz
RkNqeUIza0wveGRxNjZFdjVBdHRTNFUKLS0tIGN5anNzc0Z1SEF5WkNkc0R2YjdK
ak1EaVp6UWRpSjBvNFJIbytDb2dxTk0KOQMjinLLMrdkpAlmEYxSHm7NYZwCpXlI
EbeKoU5NZSRzHbKOlLe6sHK12x5jhBkDP5rAlbAmLxRJMLcqSY0+LQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-06-28T14:32:08Z"
mac: ENC[AES256_GCM,data:IRtzW5ZR8GdRuOSV91fcv6vxNqrAc9RSVb0y0oa2SyjpppsbEHWHUAhXopUCHIn6JvwyvNdBE6nGW0ln0ty3ybqiMpERsMWkYsYjT6vD9DT3pVXoQy2W4C/7F8BL7LMmiQNLL7i/NAg1MeorAnkNJjKx1QjWaQrC6KPneTowFn4=,iv:6hjlITh5MlxEneDLJNDUBiBBcMqDlbl8IvqEk8frkNc=,tag:sbiTmk8X96UcvbiFpc0liw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3
9 changes: 6 additions & 3 deletions home/isabel/packages/system/sops.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{config, ...}: {
sops = {
gnupg.home = config.programs.gpg.homedir;
defaultSopsFile = ../../../../secrets/secrets.yaml;
defaultSopsFile = ./secrets.yaml;
secrets = {
"gh-key" = {
git-credentials = {
path = "${config.home.homeDirectory}/.git-credentials"
};
gh-key = {
path = "${config.home.homeDirectory}/.ssh/keys/github/gh";
};
"gh-key-pub" = {
gh-key-pub = {
path = "${config.home.homeDirectory}/.ssh/keys/github/gh.pub";
};
};
Expand Down
22 changes: 0 additions & 22 deletions secrets/secrets.yaml

This file was deleted.

0 comments on commit 53ada91

Please sign in to comment.