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 = { nixConfig = {
extra-substituters = [ extra-substituters = [
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://daylin.cachix.org" "https://daylin.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=" "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k="
]; ];
}; };

View file

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

View file

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

View file

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

View file

@ -1,14 +1,23 @@
{ {
inputs, inputs,
pkgs, pkgs,
config,
lib,
... ...
}: { }:
let
inherit (lib) mkIf;
cfg = config.programs.hyprland;
in
{
config = mkIf cfg.enable {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];}) (nerdfonts.override {fonts = ["FiraCode"];})
]; ];
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};
programs.hyprland.enable = true;
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default; programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
# Optional, hint electron apps to use wayland: # Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
@ -33,18 +42,6 @@
pavucontrol pavucontrol
]; ];
nixpkgs.overlays = [inputs.nixpkgs-wayland.overlay]; 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"; options.languages.misc.enable = mkEnableOption "go + rustup";
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
go go
rustup rustup

View file

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