Adds agenix (doesn't work); Added waybar

This commit is contained in:
xqtc161 2024-02-25 14:51:19 +01:00
parent 5106f2ecca
commit ec371772e5
12 changed files with 338 additions and 55 deletions

View file

@ -0,0 +1,6 @@
{ config, lib, inputs, pkgs, ... }:
{
# environment.systemPackages = with pkgs; [
# inputs.agenix.packages.x86_64-linux.default
# ];
}

View file

@ -1,17 +1,60 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1707830867,
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
"owner": "ryantm",
"repo": "agenix",
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1708452844,
"narHash": "sha256-zlmcdVoD/7M15OrEJFjJ19s84cudaOd66DTyso0ERic=",
"lastModified": 1708661057,
"narHash": "sha256-2hKraBQB0n4znHHuT2f7TJ0DognzNFpnFPdKZjpnrSs=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "a32606b39b9b56062efdef8f001d1e88f7647f59",
"rev": "19101fae468c9773b99925eae619ebb24fc247da",
"type": "gitlab"
},
"original": {
@ -89,7 +132,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1705309234,
@ -107,7 +150,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
@ -148,15 +191,36 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1708451036,
"narHash": "sha256-tgZ38NummEdnXvxj4D0StHBzXgceAw8CptytHljH790=",
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "517601b37c6d495274454f63c5a483c8e3ca6be1",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1708591310,
"narHash": "sha256-8mQGVs8JccWTnORgoLOTh9zvf6Np+x2JzhIc+LDcJ9s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0e0e9669547e45ea6cca2de4044c1a384fd0fe55",
"type": "github"
},
"original": {
@ -166,7 +230,7 @@
"type": "github"
}
},
"home-manager_2": {
"home-manager_3": {
"inputs": {
"nixpkgs": [
"nixvim",
@ -174,11 +238,11 @@
]
},
"locked": {
"lastModified": 1707919853,
"narHash": "sha256-qxmBGDzutuJ/tsX4gp+Mr7fjxOZBbeT9ixhS5o4iFOw=",
"lastModified": 1708558280,
"narHash": "sha256-w1ns8evB6N9VTrAojcdXLWenROtd77g3vyClrqeFdG8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "043ba285c6dc20f36441d48525402bcb9743c498",
"rev": "0b69d574162cfa6eb7919d5614a48d0185550891",
"type": "github"
},
"original": {
@ -195,11 +259,11 @@
]
},
"locked": {
"lastModified": 1707707289,
"narHash": "sha256-YuDt/eSTXMEHv8jS8BEZJgqCcG8Tr3cyqaZjJFXZHsw=",
"lastModified": 1708231718,
"narHash": "sha256-IZdieFWvhBkxoOFMDejqLUYqD94WN6k0YSpw0DFy+4g=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "44f50a5ecaab72a61d5fd8e5c5717bc4bf9c25dd",
"rev": "0e6857fa1d632637488666c08e7b02c08e3178f8",
"type": "github"
},
"original": {
@ -210,11 +274,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1708091350,
"narHash": "sha256-o28BJYi68qqvHipT7V2jkWxDiMS1LF9nxUsou+eFUPQ=",
"lastModified": 1708594753,
"narHash": "sha256-c/gH7iXS/IYH9NrFOT+aJqTq+iEBkvAkpWuUHGU3+f0=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "106d3fec43bcea19cb2e061ca02531d54b542ce3",
"rev": "3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958",
"type": "github"
},
"original": {
@ -225,6 +289,38 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-master": {
"locked": {
"lastModified": 1708720103,
"narHash": "sha256-aSjM8KMdNHTnaIcptpO3EZoq63VT/b4jYPc9VxIzo34=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "899fe5550bd324dd8356c1ef652faf892cefb88e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1627814220,
"narHash": "sha256-P+MDgdZw2CBk9X1ZZaUgHgN+32pTfLFf3XVIBOXirI4=",
@ -240,29 +336,13 @@
"type": "github"
}
},
"nixpkgs-master": {
"nixpkgs_3": {
"locked": {
"lastModified": 1708458541,
"narHash": "sha256-dNGhnQHasVEFIwC727MSdEIZA89VN9K1olQC2o/1Z0k=",
"lastModified": 1708475490,
"narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57d41a34f2e7e9b8b612f47bb249355d7fc55e0b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1708296515,
"narHash": "sha256-FyF489fYNAUy7b6dkYV6rGPyzp+4tThhr80KNAaF/yY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b98a4e1746acceb92c509bc496ef3d0e5ad8d4aa",
"rev": "0e74ca98a74bc7270d28838369593635a5db3260",
"type": "github"
},
"original": {
@ -276,7 +356,7 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"home-manager": "home-manager_2",
"home-manager": "home-manager_3",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
@ -284,11 +364,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1708419783,
"narHash": "sha256-Ro2X1i01wGUo4ggtutwd3yEgCGRphYMBvzzdaQZuBb8=",
"lastModified": 1708614940,
"narHash": "sha256-36muWApzetaV4WAEeqKsWxW4k2l0u3E841RI4sHPiz0=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "9d30e87455b2bdb18f5c55ec30ec0268c1f29f98",
"rev": "060a05138ca1a46fc0a0f79ef27f080cac57a59e",
"type": "github"
},
"original": {
@ -312,11 +392,11 @@
]
},
"locked": {
"lastModified": 1707297608,
"narHash": "sha256-ADjo/5VySGlvtCW3qR+vdFF4xM9kJFlRDqcC9ZGI8EA=",
"lastModified": 1708018599,
"narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "0db2e67ee49910adfa13010e7f012149660af7f0",
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
"type": "github"
},
"original": {
@ -327,11 +407,12 @@
},
"root": {
"inputs": {
"agenix": "agenix",
"firefox-addons": "firefox-addons",
"flake-utils": "flake-utils_2",
"home-manager": "home-manager",
"home-manager": "home-manager_2",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nixpkgs-master": "nixpkgs-master",
"nixvim": "nixvim"
}
@ -365,6 +446,21 @@
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -8,6 +8,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
};
inputs.agenix.url = "github:ryantm/agenix";
inputs.firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";
inputs.nixvim = {
@ -17,7 +18,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {self, nixpkgs, nixpkgs-master, firefox-addons, home-manager, nixos-hardware, nixvim, ...}: let
outputs = inputs @ {self, nixpkgs, nixpkgs-master, firefox-addons, home-manager, agenix, nixos-hardware, nixvim, ...}: let
lib = nixpkgs.lib;
util = (import ./overlays/util.nix {} {}).util;
system = "x86_64-linux";

View file

@ -18,7 +18,7 @@ monitor=,preferred,auto,1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = swww init & mako &
exec-once = waybar & swww init & mako &
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

View file

@ -0,0 +1,119 @@
/*
*
* Catppuccin Mocha palette
* Maintainer: rubyowo
*
*/
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@define-color text #cdd6f4;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244;
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
* {
border: none;
font-family: Hack Nerd Font Mono, Roboto, Arial, sans-serif;
font-size: 15px;
color: #ffffff;
border-radius: 20px;
}
window {
/*font-weight: bold;*/
}
window#waybar {
background: rgba(0, 0, 0, 0);
}
/*-----module groups----*/
.modules-right {
background-color: @mantle;
margin: 2px 10px 0 0;
}
.modules-center {
background-color: @crust;
margin: 2px 10px 0 0;
}
.modules-left {
margin: 2px 0 0 5px;
background-color: @crust;
}
/*-----modules indv----*/
#workspaces button {
padding: 1px 5px;
background-color: transparent;
}
#workspaces button:hover {
box-shadow: inherit;
background-color: @pink;
}
#workspaces button.active {
color: @base;
background-color: @flamingo;
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#network,
#pulseaudio,
#tray,
#idle_inhibitor {
padding: 0 10px;
}
/*
#mode {
color: #cc3436;
font-weight: bold;
}
#idle_inhibitor.activated {
color: #2dcc36;
}
#pulseaudio.muted {
color: #cc3436;
}
#battery.charging {
color: #2dcc36;
}
#battery.warning:not(.charging) {
color: #e6e600;
}
#battery.critical:not(.charging) {
color: #cc3436;
}
#temperature.critical {
color: #cc3436;
}*/
/*-----Colors----*/
/*
*rgba(0,85,102,1),#005566 --> Indigo(dye)
*rgba(0,43,51,1),#002B33 --> Dark Green
*rgba(0,153,153,1),#009999 --> Persian Green
*
define-color rosewater #f5e0dc;*/

View file

@ -4,6 +4,7 @@
imports = [
./modules/nixvim.nix
./modules/firefox.nix
./modules/ssh.nix
];
home.username = "xqtc";
home.homeDirectory = "/home/xqtc";
@ -122,6 +123,39 @@ $character'';
#enableNvidiaPatches = true;
extraConfig = builtins.readFile ./config-files/hyprland.conf;
};
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
modules-left = [ "hyprland/workspaces" ];
#modules-center = [ "hyprland/window" ];
modules-right = [ "wlr/taskbar" "network" "battery" "clock" ];
"network" = {
"format-wifi"= "NET: {essid} ({signalStrength}%) ";
"format-ethernet" = "{ifname} ";
"format-disconnected" = "";
"max-length" = 50;
};
"battery" = {
"bat" = "BAT1";
"interval" = 60;
"states" = {
"warning" = 30;
"critical" = 15;
};
"format" = " BAT: {capacity}%";
#"format-icons" = ''["", "", "", "", ""]'';
"max-length" = 25;
};
};
};
style = builtins.readFile ./config-files/waybar-mocha.css;
};
services.mako = {
enable = true;
font = "Hack Nerd Font 15";
@ -158,13 +192,12 @@ $character'';
discord
telegram-desktop
webex
#schildichat-desktop
element-desktop
qbittorrent
nicotine-plus
neovide
jetbrains.rust-rover
yubioath-flutter

18
home/modules/ssh.nix Normal file
View file

@ -0,0 +1,18 @@
{ inputs, lib, config, pkgs, ...}:
{
age.identityPaths = [ "${config.home.homeDirectory}/.ssh/agenix" ]; # Use this key to decrypt
home.packages = [
inputs.agenix.packages.x86_64-linux.default # Install CLI tool to encrypt
];
age.secrets.xqtc_id_ed25519 = {
file = ../secrets/xqtc_id_ed25519.age;
path = "${config.home.homeDirectory}/.ssh/id_ed25519";
mode = "600";
};
age.secrets.xqtc_id_ed25519_pub = {
file = ../secrets/xqtc_id_ed25519_pub.age;
path = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
mode = "640";
};
}

7
home/secrets/secrets.nix Normal file
View file

@ -0,0 +1,7 @@
let
xqtc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFecbWOhXR4z1wrrI5onn4SFGtu/lfsOblreuRWcbLug";
in
{
"xqtc_id_ed25519.age".publicKeys = [ xqtc ];
"xqtc_id_ed25519_pub.age".publicKeys = [ xqtc ];
}

Binary file not shown.

Binary file not shown.

View file

@ -4,7 +4,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
#../../common
../../common
#../antivirus.nix
../../modules/home-manager.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480

View file

@ -5,6 +5,9 @@
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.users.xqtc = {...}: {imports = [ ../home inputs.nixvim.homeManagerModules.nixvim ]; };
home-manager.users.xqtc = {...}: {imports = [
../home
inputs.nixvim.homeManagerModules.nixvim
inputs.agenix.homeManagerModules.default ]; };
};
}