switch to the rfc nixfmt version and reformatted repository

This commit is contained in:
cswimr 2024-12-02 19:57:19 -05:00
parent f4f53659bd
commit c6a31bb751
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
22 changed files with 402 additions and 266 deletions

View file

@ -1,16 +1,25 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# catppuccin
(catppuccin.override {
variant = "mocha";
accent ="blue";
themeList = [ "bat" "lazygit" ];
accent = "blue";
themeList = [
"bat"
"lazygit"
];
})
catppuccin-cursors
# catppuccin for kde plasma
(catppuccin-kde.override {
flavour = [ "mocha" "macchiato" "frappe" "latte" ];
flavour = [
"mocha"
"macchiato"
"frappe"
"latte"
];
accents = [ "blue" ];
winDecStyles = [ "classic" ];
})

View file

@ -5,8 +5,14 @@
{
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "@wheel" ];
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
};
};
@ -90,7 +96,11 @@
users.users.cswimr = {
isNormalUser = true;
description = "Seaswimmer";
extraGroups = [ "networkmanager" "wheel" "docker" ];
extraGroups = [
"networkmanager"
"wheel"
"docker"
];
openssh = {
authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILOka7plvb0hAwDq04mb+hs+a+P3XDhyYyvhw1L5tvlz cswimr@eclipse"

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ devenv ];
programs.direnv = {

View file

@ -1,4 +1,5 @@
{ lib, ... }: {
{ lib, ... }:
{
environment.variables = {
PATH = "$PATH:/etc/nixos/scripts";
EDITOR = "nvim";

View file

@ -1,8 +1,11 @@
{
services.flatpak = {
enable = true;
packages = [
{ flatpakref = "https://sober.vinegarhq.org/sober.flatpakref"; sha256 = "1pj8y1xhiwgbnhrr3yr3ybpfis9slrl73i0b1lc9q89vhip6ym2l"; }
];
};
services.flatpak = {
enable = true;
packages = [
{
flatpakref = "https://sober.vinegarhq.org/sober.flatpakref";
sha256 = "1pj8y1xhiwgbnhrr3yr3ybpfis9slrl73i0b1lc9q89vhip6ym2l";
}
];
};
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play

View file

@ -1,8 +1,12 @@
{
programs.git = {
config = {
init = { defaultBranch = "master"; };
safe = { directory = "/etc/nixos"; };
init = {
defaultBranch = "master";
};
safe = {
directory = "/etc/nixos";
};
url = {
"https://www.coastalcommits.com/" = {
insteadOf = [

View file

@ -1,4 +1,10 @@
{ pkgs, inputs, system, lib, ... }:
{
pkgs,
inputs,
system,
lib,
...
}:
let
kdePackages = with pkgs.kdePackages; [ plasma-browser-integration ];
packages = with pkgs; [
@ -13,9 +19,9 @@ let
libnotify
];
flakePackages = with inputs; [ zen-browser.packages.${system}.specific ];
in {
environment.systemPackages =
lib.lists.unique (kdePackages ++ packages ++ flakePackages);
in
{
environment.systemPackages = lib.lists.unique (kdePackages ++ packages ++ flakePackages);
# Enable the X11 windowing system.
# You can leave this disabled if you're only using the Wayland session.
@ -44,8 +50,7 @@ in {
enable = true;
after = [ "network.target" ];
wantedBy = [ "default.target" ];
description =
"A GUI to monitor and manage Tailscale on your Linux desktop, built using KDE Frameworks and Kirigami2.";
description = "A GUI to monitor and manage Tailscale on your Linux desktop, built using KDE Frameworks and Kirigami2.";
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.ktailctl}/bin/ktailctl";

View file

@ -1,6 +1,9 @@
{ config, ... }: {
{ config, ... }:
{
# Enable OpenGL
hardware.graphics = { enable = true; };
hardware.graphics = {
enable = true;
};
# Load nvidia driver for Xorg / Wayland
services.xserver.videoDrivers = [ "nvidia" ];

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.nixvim = {
extraPackages = with pkgs; [ fd ];
enable = true;

View file

@ -1,4 +1,10 @@
{ pkgs, lib, inputs, system, ... }:
{
pkgs,
lib,
inputs,
system,
...
}:
let
# List of packages installed in system profile. To search, run:
# $ nix search wget
@ -38,7 +44,7 @@ let
lazygit
lazydocker
bat
nixfmt
nixfmt-rfc-style
zenity
forgejo-runner # for some reason this installs forgejo-runner as act_runner
libwebp
@ -55,11 +61,14 @@ let
python311Packages.rich
];
flakePackages = with inputs; [ compose2nix.packages.${system}.default ];
in {
in
{
environment.systemPackages = lib.lists.unique (packages ++ flakePackages);
# install docker
virtualisation.docker = { enable = true; };
virtualisation.docker = {
enable = true;
};
# remove nano
programs.nano.enable = false;

View file

@ -1,17 +1,16 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
#TODO: Submit a PR to nixpkgs to add xonsh support to the Starship module
# After that, we can remove this import and the disabledModules line
disabledModules = [ "programs/starship.nix" ];
imports =
[ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ];
imports = [ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ];
# starship - a customizable prompt for any shell
programs.starship = {
enable = true;
# custom settings
settings = {
format =
"[](bg:#1e1e2e fg:#a6e3a1)$username$hostname[](fg:#a6e3a1 bg:#89b4fa)$directory[](fg:#89b4fa bg:#cba6f7)$direnv[](fg:#cba6f7 bg:#f9e2af)$git_branch$git_status[](fg:#f9e2af bg:#1e1e2e)$character";
format = "[](bg:#1e1e2e fg:#a6e3a1)$username$hostname[](fg:#a6e3a1 bg:#89b4fa)$directory[](fg:#89b4fa bg:#cba6f7)$direnv[](fg:#cba6f7 bg:#f9e2af)$git_branch$git_status[](fg:#f9e2af bg:#1e1e2e)$character";
username = {
show_always = true;
format = "[ $user@]($style)";
@ -69,97 +68,98 @@
programs.bash.completion.enable = true;
users.defaultUserShell = pkgs.xonsh;
programs.xonsh = let bashcfg = config.programs.bash;
in {
enable = true;
config = ''
$BASH_COMPLETIONS = ('${bashcfg.completion.package}/etc/profile.d/bash_completion.sh')
$UPDATE_OS_ENVIRON = True
$XONTRIB_CLP_ALIAS = 'shutil'
#xontrib load cd
xontrib load clp
xontrib load direnv
xontrib load sh
'';
package = pkgs.xonsh.override {
extraPackages = ps: [
pkgs.python311Packages.rich
# (ps.buildPythonPackage rec {
# name = "xontrib-cd";
# version = "0.3.1";
programs.xonsh =
let
bashcfg = config.programs.bash;
in
{
enable = true;
config = ''
$BASH_COMPLETIONS = ('${bashcfg.completion.package}/etc/profile.d/bash_completion.sh')
$UPDATE_OS_ENVIRON = True
$XONTRIB_CLP_ALIAS = 'shutil'
#xontrib load cd
xontrib load clp
xontrib load direnv
xontrib load sh
'';
package = pkgs.xonsh.override {
extraPackages = ps: [
pkgs.python311Packages.rich
# (ps.buildPythonPackage rec {
# name = "xontrib-cd";
# version = "0.3.1";
# src = pkgs.fetchFromGitHub {
# owner = "eugenesvk";
# repo = name;
# rev = version;
# sha256 = "XxSxjyCg7PeX1v3e2KKicvAPmNeq+qVqbW4fXTwAiic=";
# };
# src = pkgs.fetchFromGitHub {
# owner = "eugenesvk";
# repo = name;
# rev = version;
# sha256 = "XxSxjyCg7PeX1v3e2KKicvAPmNeq+qVqbW4fXTwAiic=";
# };
# meta = {
# homepage = "https://github.com/eugenesvk/xontrib-cd";
# description =
# "`cd` to any path without escaping in xonsh shell: `cd ~/[te] st`";
# license = pkgs.lib.licenses.mit;
# maintainers = [ "cswimr" ];
# };
# })
(ps.buildPythonPackage rec {
name = "xontrib-clp";
version = "0.1.7";
# meta = {
# homepage = "https://github.com/eugenesvk/xontrib-cd";
# description =
# "`cd` to any path without escaping in xonsh shell: `cd ~/[te] st`";
# license = pkgs.lib.licenses.mit;
# maintainers = [ "cswimr" ];
# };
# })
(ps.buildPythonPackage rec {
name = "xontrib-clp";
version = "0.1.7";
src = pkgs.fetchFromGitHub {
owner = "anki-code";
repo = name;
rev = version;
sha256 = "1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M=";
};
src = pkgs.fetchFromGitHub {
owner = "anki-code";
repo = name;
rev = version;
sha256 = "1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M=";
};
meta = {
homepage = "https://github.com/anki-code/xontrib-clp";
description =
"Copy output to clipboard. Cross-platform.";
license = pkgs.lib.licenses.mit;
maintainers = [ "cswimr" ];
};
})
(ps.buildPythonPackage rec {
name = "xonsh-direnv";
version = "1.6.5";
meta = {
homepage = "https://github.com/anki-code/xontrib-clp";
description = "Copy output to clipboard. Cross-platform.";
license = pkgs.lib.licenses.mit;
maintainers = [ "cswimr" ];
};
})
(ps.buildPythonPackage rec {
name = "xonsh-direnv";
version = "1.6.5";
src = pkgs.fetchFromGitHub {
owner = "74th";
repo = name;
rev = version;
sha256 = "huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
};
src = pkgs.fetchFromGitHub {
owner = "74th";
repo = name;
rev = version;
sha256 = "huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
};
meta = {
homepage = "https://github.com/74th/xonsh-direnv";
description = "xonsh extension for using direnv";
license = pkgs.lib.licenses.mit;
maintainers = [ "cswimr" ];
};
})
(ps.buildPythonPackage rec {
name = "xontrib-sh";
version = "0.3.1";
meta = {
homepage = "https://github.com/74th/xonsh-direnv";
description = "xonsh extension for using direnv";
license = pkgs.lib.licenses.mit;
maintainers = [ "cswimr" ];
};
})
(ps.buildPythonPackage rec {
name = "xontrib-sh";
version = "0.3.1";
src = pkgs.fetchFromGitHub {
owner = "anki-code";
repo = name;
rev = version;
sha256 = "KL/AxcsvjxqxvjDlf1axitgME3T+iyuW6OFb1foRzN8=";
};
src = pkgs.fetchFromGitHub {
owner = "anki-code";
repo = name;
rev = version;
sha256 = "KL/AxcsvjxqxvjDlf1axitgME3T+iyuW6OFb1foRzN8=";
};
meta = {
homepage = "https://github.com/anki-code/xontrib-sh";
description =
"Paste and run commands from bash, zsh, fish, tcsh in xonsh shell.";
license = pkgs.lib.licenses.mit;
maintainers = [ "cswimr" ];
};
})
];
meta = {
homepage = "https://github.com/anki-code/xontrib-sh";
description = "Paste and run commands from bash, zsh, fish, tcsh in xonsh shell.";
license = pkgs.lib.licenses.mit;
maintainers = [ "cswimr" ];
};
})
];
};
};
};
}

View file

@ -1,9 +1,16 @@
{
security.sudo.extraRules = [{
users = [ "cswimr" ];
commands = [{
command = "ALL";
options = [ "SETENV" "NOPASSWD" ];
}];
}];
security.sudo.extraRules = [
{
users = [ "cswimr" ];
commands = [
{
command = "ALL";
options = [
"SETENV"
"NOPASSWD"
];
}
];
}
];
}

View file

@ -5,6 +5,11 @@
# with the contents of your Tailscale auth key.
# Make sure your permissions are set correctly, e.g. 0600.
authKeyFile = "/run/secrets/tailscale";
extraUpFlags = [ "--ssh" "--accept-routes" "--accept-dns" "--operator=cswimr" ];
extraUpFlags = [
"--ssh"
"--accept-routes"
"--accept-dns"
"--operator=cswimr"
];
};
}