many things

This commit is contained in:
Daylin Morgan 2024-01-23 19:13:42 -06:00
parent 2f8408fc08
commit 64f31f3080
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
16 changed files with 166 additions and 164 deletions

View file

@ -18,7 +18,6 @@
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
"nix-eval-jobs",
"nixpkgs"
]
@ -239,7 +238,9 @@
"inputs": {
"flake-parts": "flake-parts",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_2",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
@ -259,7 +260,6 @@
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"nixpkgs-wayland",
"nix-eval-jobs",
"nixpkgs"
]
@ -280,16 +280,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1705856552,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
"lastModified": 1705883077,
"narHash": "sha256-ByzHHX3KxpU1+V0erFy8jpujTufimh6KaS/Iv3AciHk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"rev": "5f5210aa20e343b7e35f40c033000db0ef80d7b9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -313,7 +313,9 @@
"inputs": {
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nix-eval-jobs": [
"nix-eval-jobs"
],
"nixpkgs": [
"nixpkgs"
]
@ -332,26 +334,11 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1703134684,
"narHash": "sha256-SQmng1EnBFLzS7WSRyPM9HgmZP2kLJcPAz+Ug/nug6o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d6863cbcbbb80e71cecfc03356db1cda38919523",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs",
"nixpkgs-wayland": "nixpkgs-wayland",
"wezterm": "wezterm"
@ -430,7 +417,6 @@
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs-wayland",
"nix-eval-jobs",
"nixpkgs"
]

View file

@ -2,9 +2,12 @@
description = "daylinmorgan-nixcfg";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs-wayland.inputs.nix-eval-jobs.follows = "nix-eval-jobs";
nix-eval-jobs.url = "github:nix-community/nix-eval-jobs";
nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland/main";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
hyprland-contrib.url = "github:hyprwm/contrib";
@ -14,19 +17,6 @@
wezterm.inputs.nixpkgs.follows = "nixpkgs";
};
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="
];
};
outputs = inputs @ {
self,
nixpkgs,

View file

@ -11,7 +11,7 @@
nim.enable = true;
python.enable = true;
};
cli.enable =true;
cli.enable = true;
environment.systemPackages = with pkgs; [
rclone

View file

@ -6,7 +6,7 @@
}: {
imports = with inputs.self.nixosModules; [
desktop
# hyprland
# hyprland
nix-ld
virtualization

View file

@ -13,8 +13,8 @@ in rec {
nixosSystem {
system = "x86_64-linux";
modules =
[ ../modules/roles/common.nix ] ++
builtins.filter isNixFile (listFilesRecursive (../. + "/hosts/${hostname}"));
[../modules/roles/common.nix]
++ builtins.filter isNixFile (listFilesRecursive (../. + "/hosts/${hostname}"));
specialArgs = {inherit inputs;};
};

View file

@ -1,28 +1,28 @@
{config, lib,pkgs,...}:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.cli;
in
{
in {
options.cli.enable = mkEnableOption "cli";
config = mkIf cfg.enable {
programs.direnv.enable = true;
environment.systemPackages = with pkgs; [
chezmoi
zoxide
lsd
fzf
# utils
fd
bat
delta
ripgrep
programs.direnv.enable = true;
environment.systemPackages = with pkgs; [
chezmoi
zoxide
lsd
fzf
# utils
fd
bat
delta
ripgrep
btop
];
};
btop
];
};
}

View file

@ -1,5 +1,5 @@
{pkgs,...}:{
fonts.fontconfig.enable = true;
{pkgs, ...}: {
fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
];

View file

@ -4,39 +4,35 @@
config,
lib,
...
}:
let
}: let
inherit (lib) mkIf;
cfg = config.programs.hyprland;
in
{
in {
config = mkIf cfg.enable {
security.pam.services.swaylock = {};
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
# Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
swaylock
brightnessctl
security.pam.services.swaylock = {};
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.default;
# Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
swaylock
brightnessctl
# notifications
libnotify
dunst
# notifications
libnotify
dunst
# screenshots
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
grim
slurp
# screenshots
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
grim
slurp
eww-wayland
rofi-wayland
hyprpaper
eww-wayland
rofi-wayland
hyprpaper
catppuccin-cursors.mochaDark
pavucontrol
];
nixpkgs.overlays = [inputs.nixpkgs-wayland.overlay];
};
catppuccin-cursors.mochaDark
pavucontrol
];
nixpkgs.overlays = [inputs.nixpkgs-wayland.overlay];
};
}

View file

@ -1,15 +1,17 @@
{config, lib,pkgs,...}:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.languages.misc;
in
{
in {
options.languages.misc.enable = mkEnableOption "go + rustup";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
go
rustup
];
};
environment.systemPackages = with pkgs; [
go
rustup
];
};
}

View file

@ -1,23 +1,27 @@
{nixpkgs,config, lib,pkgs,...}:
let
{
nixpkgs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.languages.nim;
in
{
in {
options.languages.nim.enable = mkEnableOption "nim";
config = mkIf cfg.enable {
nixpkgs.overlays = [
(import ../../overlays/nim {})
(import ../../overlays/nimlsp {})
(import ../../overlays/nimble {})
(import ../../overlays/nim-atlas {})
];
nixpkgs.overlays = [
#(import ../../overlays/nim {})
(import ../../overlays/nimlsp {})
(import ../../overlays/nimble {})
(import ../../overlays/nim-atlas {})
];
environment.systemPackages = with pkgs; [
nim-atlas
nim
nimble
nimlsp
];
};
environment.systemPackages = with pkgs; [
nim-atlas
nim
nimble
nimlsp
];
};
}

View file

@ -1,14 +1,17 @@
{config, lib,pkgs,...}:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.languages.node;
in
{
in {
options.languages.node.enable = mkEnableOption "node";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
nodejs
nodePackages.pnpm
];
};
environment.systemPackages = with pkgs; [
nodejs
nodePackages.pnpm
];
};
}

View file

@ -1,27 +1,28 @@
{config, lib,pkgs,...}:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.languages.python;
in
{
in {
options.languages.python.enable = mkEnableOption "python";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
(pkgs.writeShellScriptBin "python" ''
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
exec ${pkgs.python3}/bin/python "$@"
'')
environment.systemPackages = with pkgs; [
# https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
(pkgs.writeShellScriptBin "python" ''
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
exec ${pkgs.python3}/bin/python "$@"
'')
(pkgs.writeShellScriptBin "python3" ''
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
exec ${pkgs.python3}/bin/python "$@"
'')
(pkgs.writeShellScriptBin "python3" ''
export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
exec ${pkgs.python3}/bin/python "$@"
'')
(python3.withPackages (ps: with ps; [pip]))
micromamba
];
};
(python3.withPackages (ps: with ps; [pip]))
micromamba
];
};
}

View file

@ -1,13 +1,16 @@
{config, lib,pkgs,...}:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.languages.tex;
in
{
in {
options.languages.tex.enable = mkEnableOption "tex";
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
texlive.combined.scheme-full
];
};
environment.systemPackages = with pkgs; [
texlive.combined.scheme-full
];
};
}

View file

@ -16,14 +16,28 @@
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
options = "--delete-older-than 7d";
};
environment.systemPackages = with pkgs; [
nix-output-monitor
alejandra
];
nix.settings = {
trusted-users = ["daylin"];
nix.settings = {
trusted-users = ["@wheel"];
accept-flake-config = true;
# nixConfig = {
substituters = [
"https://hyprland.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://daylin.cachix.org"
];
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

@ -7,7 +7,6 @@
./lock
];
# Enable the X11 windowing system.
services.xserver = {
enable = true;

View file

@ -1,5 +1,9 @@
{config, lib,pkgs,...}:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.services.vpn;
in {