more refactorings

This commit is contained in:
Daylin Morgan 2024-01-23 15:50:42 -06:00
parent 0cedd85f4f
commit b05149e46d
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
7 changed files with 38 additions and 29 deletions

View file

@ -17,10 +17,12 @@
nixConfig = {
extra-substituters = [
"https://hyprland.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://daylin.cachix.org"
];
extra-trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
];
};

View file

@ -4,17 +4,19 @@
...
}: {
imports = with inputs.self.nixosModules; [
common
docker
# langs
nim
python
];
languages = {
nim.enable = true;
python.enable = true;
};
cli.enable =true;
environment.systemPackages = with pkgs; [
rclone
];
# https://francis.begyn.be/blog/nixos-restic-backups
# TODO: parameterize to use on algiz AND othalan ...
services.restic.backups.gdrive = {
@ -33,7 +35,6 @@
shell = pkgs.zsh;
isNormalUser = true;
extraGroups = ["wheel" "docker"];
useDefaultShell = true;
initialPassword = "nix";
};
git = {

View file

@ -6,13 +6,14 @@
}: {
imports = with inputs.self.nixosModules; [
desktop
hyprland
# hyprland
nix-ld
virtualization
restic
];
programs.hyprland.enable = true;
services.vpn.enable = true;
@ -23,7 +24,7 @@
tex.enable = true;
node.enable = true;
};
cli.enable = true;
services.restic.backups.gdrive = {
user = "daylin";
@ -43,7 +44,6 @@
enableSSHSupport = true;
};
programs.zsh.enable = true;
users.users.daylin = {
isNormalUser = true;
shell = pkgs.zsh;

View file

@ -1,8 +1,13 @@
{config, lib,pkgs,...}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.cli;
in
{
inputs,
pkgs,
...
}: {
options.cli.enable = mkEnableOption "cli";
config = mkIf cfg.enable {
programs.direnv.enable = true;
environment.systemPackages = with pkgs; [
chezmoi
@ -17,5 +22,7 @@
ripgrep
btop
];
};
}

View file

@ -1,14 +1,23 @@
{
inputs,
pkgs,
config,
lib,
...
}: {
}:
let
inherit (lib) mkIf;
cfg = config.programs.hyprland;
in
{
config = mkIf cfg.enable {
fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
];
security.pam.services.swaylock = {};
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
# Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1";
@ -33,18 +42,6 @@
pavucontrol
];
nixpkgs.overlays = [inputs.nixpkgs-wayland.overlay];
# wayland extras
nix.settings = {
# add binary caches
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
substituters = [
"https://cache.nixos.org"
"https://nixpkgs-wayland.cachix.org"
"https://hyprland.cachix.org"
];
};
};
}

View file

@ -6,6 +6,7 @@ in
{
options.languages.misc.enable = mkEnableOption "go + rustup";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
go
rustup

View file

@ -8,5 +8,6 @@
gui
vscode
vpn
hyprland
];
}