Compare commits
3 Commits
c055d63736
...
b065a403c0
Author | SHA1 | Date |
---|---|---|
Harsh Shandilya | b065a403c0 | |
Harsh Shandilya | c4a302db8c | |
Harsh Shandilya | e9dc5926d5 |
|
@ -2,3 +2,5 @@
|
|||
97f6bb71e0774a96f74cbabc14933b2d8cd709c3
|
||||
# Fixed a bunch of packages that forced a reformat
|
||||
daa64b85dcc6d98fcb453d7201726ff0b7b3b3b5
|
||||
# Reformat with nixfmt-rfc-style
|
||||
c4a302db8c596e187755c204b6007cc328563baa
|
||||
|
|
97
default.nix
97
default.nix
|
@ -1,16 +1,9 @@
|
|||
let
|
||||
inherit
|
||||
(builtins)
|
||||
currentSystem
|
||||
fromJSON
|
||||
readFile
|
||||
;
|
||||
inherit (builtins) currentSystem fromJSON readFile;
|
||||
|
||||
# Copied from https://github.com/edolstra/flake-compat/pull/44/files
|
||||
fetchurl = {
|
||||
url,
|
||||
sha256,
|
||||
}:
|
||||
fetchurl =
|
||||
{ url, sha256 }:
|
||||
derivation {
|
||||
builder = "builtin:fetchurl";
|
||||
|
||||
|
@ -41,19 +34,19 @@ let
|
|||
];
|
||||
|
||||
# To make "nix-prefetch-url" work.
|
||||
urls = [url];
|
||||
urls = [ url ];
|
||||
};
|
||||
|
||||
getFlake = name:
|
||||
with (fromJSON (readFile ./flake.lock)).nodes.${name}.locked; {
|
||||
getFlake =
|
||||
name: with (fromJSON (readFile ./flake.lock)).nodes.${name}.locked; {
|
||||
inherit rev;
|
||||
outPath = fetchTarball {
|
||||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||
sha256 = narHash;
|
||||
};
|
||||
};
|
||||
getRawFlake = name:
|
||||
with (fromJSON (readFile ./flake.lock)).nodes.${name}.locked; {
|
||||
getRawFlake =
|
||||
name: with (fromJSON (readFile ./flake.lock)).nodes.${name}.locked; {
|
||||
inherit rev;
|
||||
outPath = fetchurl {
|
||||
inherit url;
|
||||
|
@ -61,37 +54,47 @@ let
|
|||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
system ? currentSystem,
|
||||
pkgs ? import (getFlake "nixpkgs") {localSystem = {inherit system;};},
|
||||
fenix ? getFlake "fenix",
|
||||
rust-manifest ? getRawFlake "rust-manifest",
|
||||
}: let
|
||||
callPackage = pkg: pkgs.callPackage pkg;
|
||||
in {
|
||||
adb-sync = callPackage ./packages/adb-sync {};
|
||||
adbtuifm = callPackage ./packages/adbtuifm {};
|
||||
adx = callPackage ./packages/adx {};
|
||||
clipboard-substitutor = callPackage ./packages/clipboard-substitutor {};
|
||||
diffuse-bin = callPackage ./packages/diffuse-bin {};
|
||||
gdrive = callPackage ./packages/gdrive {};
|
||||
gitice = callPackage ./packages/gitice {
|
||||
inputs = {inherit fenix rust-manifest;};
|
||||
{
|
||||
system ? currentSystem,
|
||||
pkgs ? import (getFlake "nixpkgs") {
|
||||
localSystem = {
|
||||
inherit system;
|
||||
};
|
||||
gitout = callPackage ./packages/gitout {};
|
||||
gphotos-cdp = callPackage ./packages/gphotos-cdp {};
|
||||
hcctl = callPackage ./packages/hcctl {};
|
||||
healthchecks-monitor = callPackage ./packages/healthchecks-monitor {};
|
||||
katbin = callPackage ./packages/katbin {};
|
||||
linkleaner = callPackage ./packages/linkleaner {
|
||||
inputs = {inherit fenix rust-manifest;};
|
||||
},
|
||||
fenix ? getFlake "fenix",
|
||||
rust-manifest ? getRawFlake "rust-manifest",
|
||||
}:
|
||||
let
|
||||
callPackage = pkg: pkgs.callPackage pkg;
|
||||
in
|
||||
{
|
||||
adb-sync = callPackage ./packages/adb-sync { };
|
||||
adbtuifm = callPackage ./packages/adbtuifm { };
|
||||
adx = callPackage ./packages/adx { };
|
||||
clipboard-substitutor = callPackage ./packages/clipboard-substitutor { };
|
||||
diffuse-bin = callPackage ./packages/diffuse-bin { };
|
||||
gdrive = callPackage ./packages/gdrive { };
|
||||
gitice = callPackage ./packages/gitice {
|
||||
inputs = {
|
||||
inherit fenix rust-manifest;
|
||||
};
|
||||
monocraft-nerdfonts = callPackage ./packages/monocraft-nerdfonts {};
|
||||
patreon-dl = callPackage ./packages/patreon-dl {};
|
||||
pidcat = callPackage ./packages/pidcat {};
|
||||
piv-agent = callPackage ./packages/piv-agent {};
|
||||
rnnoise-plugin-slim = callPackage ./packages/rnnoise-plugin-slim {};
|
||||
rucksack = callPackage ./packages/rucksack {};
|
||||
toml-cli = callPackage ./packages/toml-cli {};
|
||||
when = callPackage ./packages/when {};
|
||||
}
|
||||
};
|
||||
gitout = callPackage ./packages/gitout { };
|
||||
gphotos-cdp = callPackage ./packages/gphotos-cdp { };
|
||||
hcctl = callPackage ./packages/hcctl { };
|
||||
healthchecks-monitor = callPackage ./packages/healthchecks-monitor { };
|
||||
katbin = callPackage ./packages/katbin { };
|
||||
linkleaner = callPackage ./packages/linkleaner {
|
||||
inputs = {
|
||||
inherit fenix rust-manifest;
|
||||
};
|
||||
};
|
||||
monocraft-nerdfonts = callPackage ./packages/monocraft-nerdfonts { };
|
||||
patreon-dl = callPackage ./packages/patreon-dl { };
|
||||
pidcat = callPackage ./packages/pidcat { };
|
||||
piv-agent = callPackage ./packages/piv-agent { };
|
||||
rnnoise-plugin-slim = callPackage ./packages/rnnoise-plugin-slim { };
|
||||
rucksack = callPackage ./packages/rucksack { };
|
||||
toml-cli = callPackage ./packages/toml-cli { };
|
||||
when = callPackage ./packages/when { };
|
||||
}
|
||||
|
|
36
flake.nix
36
flake.nix
|
@ -1,17 +1,19 @@
|
|||
{
|
||||
outputs = inputs: let
|
||||
lib = inputs.snowfall-lib.mkLib {
|
||||
inherit inputs;
|
||||
src = ./.;
|
||||
snowfall = {
|
||||
namespace = "jarvis";
|
||||
meta = {
|
||||
name = "msfjarvis-nix-configs";
|
||||
title = "msfjarvis' Nix configurations";
|
||||
outputs =
|
||||
inputs:
|
||||
let
|
||||
lib = inputs.snowfall-lib.mkLib {
|
||||
inherit inputs;
|
||||
src = ./.;
|
||||
snowfall = {
|
||||
namespace = "jarvis";
|
||||
meta = {
|
||||
name = "msfjarvis-nix-configs";
|
||||
title = "msfjarvis' Nix configurations";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
in
|
||||
lib.mkFlake {
|
||||
inherit inputs;
|
||||
src = ./.;
|
||||
|
@ -35,9 +37,7 @@
|
|||
nixos-hardware.nixosModules.raspberry-pi-4
|
||||
srvos.nixosModules.server
|
||||
];
|
||||
systems.hosts.ryzenbox.modules = with inputs; [
|
||||
srvos.nixosModules.desktop
|
||||
];
|
||||
systems.hosts.ryzenbox.modules = with inputs; [ srvos.nixosModules.desktop ];
|
||||
systems.hosts.wailord.modules = with inputs; [
|
||||
attic.nixosModules.atticd
|
||||
disko.nixosModules.disko
|
||||
|
@ -54,7 +54,7 @@
|
|||
topology = import inputs.nix-topology {
|
||||
pkgs = channels.nixpkgs;
|
||||
modules = [
|
||||
{inherit (inputs.self) nixosConfigurations;}
|
||||
{ inherit (inputs.self) nixosConfigurations; }
|
||||
./topology.nix
|
||||
];
|
||||
};
|
||||
|
@ -62,7 +62,7 @@
|
|||
formatter = channels.nixpkgs.writeShellApplication {
|
||||
name = "format";
|
||||
runtimeInputs = with channels.nixpkgs; [
|
||||
alejandra
|
||||
nixfmt-rfc-style
|
||||
deadnix
|
||||
shfmt
|
||||
statix
|
||||
|
@ -72,12 +72,12 @@
|
|||
shfmt --write --simplify --language-dialect bash --indent 2 --case-indent --space-redirects .;
|
||||
deadnix --edit
|
||||
statix check . || statix fix .
|
||||
alejandra --quiet .
|
||||
nixfmt .
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
deploy = lib.mkDeploy {inherit (inputs) self;};
|
||||
deploy = lib.mkDeploy { inherit (inputs) self; };
|
||||
apps.x86_64-linux.default = inputs.deploy-rs.apps.x86_64-linux.default;
|
||||
apps.aarch64-linux.default = inputs.deploy-rs.apps.aarch64-linux.default;
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
}: let
|
||||
{ lib, inputs }:
|
||||
let
|
||||
inherit (inputs) deploy-rs;
|
||||
in {
|
||||
mkDeploy = {self}: let
|
||||
hosts = self.nixosConfigurations or {};
|
||||
nodes =
|
||||
builtins.mapAttrs (_: machine: {
|
||||
in
|
||||
{
|
||||
mkDeploy =
|
||||
{ self }:
|
||||
let
|
||||
hosts = self.nixosConfigurations or { };
|
||||
nodes = builtins.mapAttrs (_: machine: {
|
||||
hostname = machine.config.networking.hostName;
|
||||
fastConnection = true;
|
||||
remoteBuild = false;
|
||||
|
@ -18,7 +18,9 @@ in {
|
|||
sshUser = "root";
|
||||
path = deploy-rs.lib.${machine.pkgs.system}.activate.nixos machine;
|
||||
};
|
||||
})
|
||||
hosts;
|
||||
in {inherit nodes;};
|
||||
}) hosts;
|
||||
in
|
||||
{
|
||||
inherit nodes;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fonts = [pkgs.nerdfonts];
|
||||
fonts = [ pkgs.nerdfonts ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,10 +7,7 @@
|
|||
"gnu-sed"
|
||||
"ruby"
|
||||
];
|
||||
casks = [
|
||||
"flutter"
|
||||
];
|
||||
taps = [
|
||||
];
|
||||
casks = [ "flutter" ];
|
||||
taps = [ ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
|
@ -13,7 +14,7 @@
|
|||
|
||||
package = pkgs.nixVersions.git;
|
||||
|
||||
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
|
||||
registry = lib.mapAttrs (_: v: { flake = v; }) inputs;
|
||||
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
|
@ -24,7 +25,7 @@
|
|||
'';
|
||||
settings = {
|
||||
accept-flake-config = true;
|
||||
allowed-users = ["msfjarvis"];
|
||||
allowed-users = [ "msfjarvis" ];
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
experimental-features = lib.mkForce [
|
||||
|
@ -41,7 +42,10 @@
|
|||
log-lines = 20;
|
||||
max-jobs = "auto";
|
||||
sandbox = true;
|
||||
trusted-users = ["root" "msfjarvis"];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"msfjarvis"
|
||||
];
|
||||
warn-dirty = false;
|
||||
|
||||
trusted-substituters = [
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
programs.atuin = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
flags = ["--disable-up-arrow"];
|
||||
flags = [ "--disable-up-arrow" ];
|
||||
settings = {
|
||||
auto_sync = true;
|
||||
max_preview_height = 2;
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
initScript = if pkgs.stdenv.isDarwin then "darwin-init" else "shell-init";
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
initScript =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then "darwin-init"
|
||||
else "shell-init";
|
||||
in {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
historySize = 1000;
|
||||
historyFile = "${config.home.homeDirectory}/.bash_history";
|
||||
historyFileSize = 10000;
|
||||
historyControl = ["ignorespace" "erasedups"];
|
||||
historyControl = [
|
||||
"ignorespace"
|
||||
"erasedups"
|
||||
];
|
||||
shellOptions = [
|
||||
# Append to history file rather than replacing it.
|
||||
"histappend"
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {theme = lib.mkDefault "zenburn";};
|
||||
config = {
|
||||
theme = lib.mkDefault "zenburn";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
programs.bottom = {enable = true;};
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
}
|
||||
{ fonts.fontconfig.enable = true; }
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
programs.fzf = {
|
||||
enable = true;
|
||||
defaultCommand = "fd -tf";
|
||||
defaultOptions = ["--height 40%"];
|
||||
defaultOptions = [ "--height 40%" ];
|
||||
enableBashIntegration = true;
|
||||
fileWidgetCommand = "fd -H";
|
||||
changeDirWidgetCommand = "fd -Htd";
|
||||
historyWidgetOptions = ["--sort" "--exact"];
|
||||
historyWidgetOptions = [
|
||||
"--sort"
|
||||
"--exact"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
git_protocol = "https";
|
||||
editor = "micro";
|
||||
prompt = "enabled";
|
||||
aliases = {co = "pr checkout";};
|
||||
aliases = {
|
||||
co = "pr checkout";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
host,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
isWorkMachine = host == "Harshs-MacBook-Pro";
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
ignores = [
|
||||
|
@ -18,11 +20,9 @@ in {
|
|||
".DS_Store"
|
||||
];
|
||||
includes =
|
||||
[
|
||||
{path = "${config.home.homeDirectory}/git-repos/dotfiles/.gitconfig";}
|
||||
]
|
||||
[ { path = "${config.home.homeDirectory}/git-repos/dotfiles/.gitconfig"; } ]
|
||||
++ lib.optionals isWorkMachine [
|
||||
{path = "${config.home.homeDirectory}/git-repos/dotfiles/.gitconfig-work";}
|
||||
{ path = "${config.home.homeDirectory}/git-repos/dotfiles/.gitconfig-work"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.gpg-agent = {
|
||||
enable = !pkgs.stdenv.isDarwin;
|
||||
defaultCacheTtl = 3600;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
programs.gpg = {enable = true;};
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
programs.home-manager = {enable = true;};
|
||||
programs.home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{
|
||||
programs.jq = {enable = true;};
|
||||
programs.jq = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.logseq;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.logseq = with lib; {
|
||||
enable = mkEnableOption "Install logseq and configure git synchronization";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [logseq];
|
||||
home.packages = with pkgs; [ logseq ];
|
||||
services.git-sync = {
|
||||
enable = true;
|
||||
repositories = {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{inputs, ...}: {
|
||||
{ inputs, ... }:
|
||||
{
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.mpv;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.mpv = with lib; {
|
||||
enable = mkEnableOption "Enable MPV player";
|
||||
};
|
||||
|
@ -13,45 +15,47 @@ in {
|
|||
programs.mpv = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.wrapMpv (pkgs.mpv-unwrapped.override {
|
||||
waylandSupport = true;
|
||||
x11Support = false;
|
||||
cddaSupport = false;
|
||||
vulkanSupport = false;
|
||||
drmSupport = false;
|
||||
archiveSupport = false;
|
||||
bluraySupport = false;
|
||||
bs2bSupport = false;
|
||||
cacaSupport = false;
|
||||
cmsSupport = false;
|
||||
dvdnavSupport = false;
|
||||
dvbinSupport = false;
|
||||
jackaudioSupport = false;
|
||||
javascriptSupport = false;
|
||||
libpngSupport = false;
|
||||
openalSupport = false;
|
||||
pulseSupport = false;
|
||||
pipewireSupport = true;
|
||||
rubberbandSupport = false;
|
||||
screenSaverSupport = false;
|
||||
sdl2Support = true;
|
||||
sixelSupport = false;
|
||||
speexSupport = false;
|
||||
swiftSupport = false;
|
||||
theoraSupport = false;
|
||||
vaapiSupport = true;
|
||||
vapoursynthSupport = false;
|
||||
vdpauSupport = true;
|
||||
xineramaSupport = false;
|
||||
xvSupport = false;
|
||||
zimgSupport = false;
|
||||
}) {
|
||||
scripts = with pkgs.mpvScripts; [
|
||||
uosc
|
||||
thumbfast
|
||||
inhibit-gnome
|
||||
];
|
||||
};
|
||||
pkgs.wrapMpv
|
||||
(pkgs.mpv-unwrapped.override {
|
||||
waylandSupport = true;
|
||||
x11Support = false;
|
||||
cddaSupport = false;
|
||||
vulkanSupport = false;
|
||||
drmSupport = false;
|
||||
archiveSupport = false;
|
||||
bluraySupport = false;
|
||||
bs2bSupport = false;
|
||||
cacaSupport = false;
|
||||
cmsSupport = false;
|
||||
dvdnavSupport = false;
|
||||
dvbinSupport = false;
|
||||
jackaudioSupport = false;
|
||||
javascriptSupport = false;
|
||||
libpngSupport = false;
|
||||
openalSupport = false;
|
||||
pulseSupport = false;
|
||||
pipewireSupport = true;
|
||||
rubberbandSupport = false;
|
||||
screenSaverSupport = false;
|
||||
sdl2Support = true;
|
||||
sixelSupport = false;
|
||||
speexSupport = false;
|
||||
swiftSupport = false;
|
||||
theoraSupport = false;
|
||||
vaapiSupport = true;
|
||||
vapoursynthSupport = false;
|
||||
vdpauSupport = true;
|
||||
xineramaSupport = false;
|
||||
xvSupport = false;
|
||||
zimgSupport = false;
|
||||
})
|
||||
{
|
||||
scripts = with pkgs.mpvScripts; [
|
||||
uosc
|
||||
thumbfast
|
||||
inhibit-gnome
|
||||
];
|
||||
};
|
||||
config = {
|
||||
autofit = "100%";
|
||||
window-maximized = "yes";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
alejandra
|
||||
nixfmt-rfc-style
|
||||
aria2
|
||||
byobu
|
||||
cachix
|
||||
|
|
|
@ -3,16 +3,18 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.pass;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.pass = with lib; {
|
||||
enable = mkEnableOption "Enable password-store and related stuff";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.browserpass = {
|
||||
enable = true;
|
||||
browsers = ["firefox"];
|
||||
browsers = [ "firefox" ];
|
||||
};
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
|
@ -21,8 +23,14 @@ in {
|
|||
x11Support = false;
|
||||
waylandSupport = true;
|
||||
dmenuSupport = false;
|
||||
})
|
||||
.withExtensions (exts: with exts; [pass-genphrase pass-otp pass-update]);
|
||||
}).withExtensions
|
||||
(
|
||||
exts: with exts; [
|
||||
pass-genphrase
|
||||
pass-otp
|
||||
pass-update
|
||||
]
|
||||
);
|
||||
};
|
||||
services.git-sync = {
|
||||
enable = true;
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
system,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${system};
|
||||
cfg = config.profiles.spotify;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.spotify = with lib; {
|
||||
enable = mkEnableOption "Enable Spotify";
|
||||
};
|
||||
|
@ -16,9 +18,7 @@ in {
|
|||
enable = true;
|
||||
theme = spicePkgs.themes.dracula;
|
||||
|
||||
enabledCustomApps = with spicePkgs.apps; [
|
||||
lyrics-plus
|
||||
];
|
||||
enabledCustomApps = with spicePkgs.apps; [ lyrics-plus ];
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
fullAppDisplay
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.starship;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.starship = with lib; {
|
||||
server = mkEnableOption "Customize starship for servers";
|
||||
};
|
||||
|
@ -13,10 +11,7 @@ in {
|
|||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
settings = {
|
||||
format =
|
||||
if cfg.server
|
||||
then "$directory$git_branch$git_state$git_status➜ "
|
||||
else "$all";
|
||||
format = if cfg.server then "$directory$git_branch$git_state$git_status➜ " else "$all";
|
||||
add_newline = false;
|
||||
aws.disabled = true;
|
||||
azure.disabled = true;
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.vscode;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.vscode = with lib; {
|
||||
enable = mkEnableOption "Enable VSCode editor";
|
||||
};
|
||||
|
@ -15,23 +17,23 @@ in {
|
|||
enableUpdateCheck = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
mutableExtensionsDir = false;
|
||||
extensions =
|
||||
lib.mkDefault
|
||||
((lib.optionals pkgs.stdenv.isLinux [pkgs.vscode-extensions.rust-lang.rust-analyzer-nightly])
|
||||
++ (with pkgs.vscode-marketplace; [
|
||||
arrterian.nix-env-selector
|
||||
eamodio.gitlens
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
github.vscode-github-actions
|
||||
jnoortheen.nix-ide
|
||||
k--kato.intellij-idea-keybindings
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode-remote.remote-ssh-edit
|
||||
mtdmali.daybreak-theme
|
||||
oderwat.indent-rainbow
|
||||
tamasfe.even-better-toml
|
||||
]));
|
||||
extensions = lib.mkDefault (
|
||||
(lib.optionals pkgs.stdenv.isLinux [ pkgs.vscode-extensions.rust-lang.rust-analyzer-nightly ])
|
||||
++ (with pkgs.vscode-marketplace; [
|
||||
arrterian.nix-env-selector
|
||||
eamodio.gitlens
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
github.vscode-github-actions
|
||||
jnoortheen.nix-ide
|
||||
k--kato.intellij-idea-keybindings
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode-remote.remote-ssh-edit
|
||||
mtdmali.daybreak-theme
|
||||
oderwat.indent-rainbow
|
||||
tamasfe.even-better-toml
|
||||
])
|
||||
);
|
||||
userSettings = {
|
||||
"files.exclude" = {
|
||||
"**/.classpath" = true;
|
||||
|
@ -67,10 +69,8 @@ in {
|
|||
"[json]"."editor.defaultFormatter" = "vscode.json-language-features";
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${lib.getExe pkgs.nil}";
|
||||
"nix.formatterPath" = "${lib.getExe pkgs.alejandra}";
|
||||
"nix.serverSettings".nil.formatting.command = [
|
||||
"${lib.getExe pkgs.alejandra}"
|
||||
];
|
||||
"nix.formatterPath" = "${lib.getExe pkgs.nixfmt-rfc-style}";
|
||||
"nix.serverSettings".nil.formatting.command = [ "${lib.getExe pkgs.nixfmt-rfc-style}" ];
|
||||
"gitlens.currentLine.enabled" = false;
|
||||
"gitlens.statusBar.reduceFlicker" = false;
|
||||
"gitlens.advanced.fileHistoryFollowsRenames" = true;
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.wezterm;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.wezterm = with lib; {
|
||||
enable = mkEnableOption "Enable wezterm, a GPU-accelerated terminal emulator";
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = !pkgs.stdenv.isDarwin;
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.gitout;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.gitout = {
|
||||
enable = mkEnableOption {
|
||||
description = mdDoc "Whether to enable the gitout backup service.";
|
||||
};
|
||||
enable = mkEnableOption { description = mdDoc "Whether to enable the gitout backup service."; };
|
||||
|
||||
config-file = mkOption {
|
||||
type = types.path;
|
||||
|
@ -34,14 +34,20 @@ in {
|
|||
description = mdDoc "Group account under which gitout runs.";
|
||||
};
|
||||
|
||||
package = mkPackageOptionMD pkgs.jarvis "gitout" {};
|
||||
package = mkPackageOptionMD pkgs.jarvis "gitout" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.gitout = {
|
||||
wantedBy = ["default.target"];
|
||||
after = ["fs.service" "networking.target"];
|
||||
wants = ["fs.service" "networking.target"];
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"fs.service"
|
||||
"networking.target"
|
||||
];
|
||||
wants = [
|
||||
"fs.service"
|
||||
"networking.target"
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
|
@ -58,8 +64,8 @@ in {
|
|||
systemd.timers.gitout = {
|
||||
description = "Run gitout every hour";
|
||||
timerConfig.OnCalendar = "hourly";
|
||||
wantedBy = ["timers.target"];
|
||||
partOf = ["gitout.service"];
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "gitout.service" ];
|
||||
};
|
||||
|
||||
users.users = mkIf (cfg.user == "gitout") {
|
||||
|
@ -72,7 +78,10 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
users.groups =
|
||||
mkIf (cfg.group == "gitout") {gitout = {gid = null;};};
|
||||
users.groups = mkIf (cfg.group == "gitout") {
|
||||
gitout = {
|
||||
gid = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.gphotos-cdp;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.gphotos-cdp = {
|
||||
enable = mkEnableOption {
|
||||
description = mdDoc "Whether to enable the gphotos-cdp backup service.";
|
||||
|
@ -34,14 +36,20 @@ in {
|
|||
description = mdDoc "Group account under which gphotos-cdp runs.";
|
||||
};
|
||||
|
||||
package = mkPackageOptionMD pkgs.jarvis "gphotos-cdp" {};
|
||||
package = mkPackageOptionMD pkgs.jarvis "gphotos-cdp" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.gphotos-cdp = {
|
||||
wantedBy = ["default.target"];
|
||||
after = ["fs.service" "networking.target"];
|
||||
wants = ["fs.service" "networking.target"];
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [
|
||||
"fs.service"
|
||||
"networking.target"
|
||||
];
|
||||
wants = [
|
||||
"fs.service"
|
||||
"networking.target"
|
||||
];
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
|
@ -49,7 +57,12 @@ in {
|
|||
Restart = "on-failure";
|
||||
RestartSec = "30s";
|
||||
Type = "oneshot";
|
||||
Environment = "PATH=${makeBinPath [pkgs.coreutils pkgs.google-chrome]}";
|
||||
Environment = "PATH=${
|
||||
makeBinPath [
|
||||
pkgs.coreutils
|
||||
pkgs.google-chrome
|
||||
]
|
||||
}";
|
||||
};
|
||||
script = ''
|
||||
exec env ${getExe cfg.package} -v -dev -headless -dldir ${cfg.dldir} -session-dir ${cfg.session-dir}
|
||||
|
@ -59,8 +72,8 @@ in {
|
|||
systemd.timers.gphotos-cdp = {
|
||||
description = "Run gphotos-cdp every day";
|
||||
timerConfig.OnBootSec = "15min";
|
||||
wantedBy = ["timers.target"];
|
||||
partOf = ["gphotos-cdp.service"];
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "gphotos-cdp.service" ];
|
||||
};
|
||||
|
||||
users.users = mkIf (cfg.user == "gphotos-cdp") {
|
||||
|
@ -73,7 +86,10 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
users.groups =
|
||||
mkIf (cfg.group == "gphotos-cdp") {gphotos-cdp = {gid = null;};};
|
||||
users.groups = mkIf (cfg.group == "gphotos-cdp") {
|
||||
gphotos-cdp = {
|
||||
gid = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
{
|
||||
i18n = let
|
||||
locale = "en_US.UTF-8";
|
||||
in {
|
||||
defaultLocale = locale;
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = locale;
|
||||
LC_IDENTIFICATION = locale;
|
||||
LC_MEASUREMENT = locale;
|
||||
LC_MONETARY = locale;
|
||||
LC_NAME = locale;
|
||||
LC_NUMERIC = locale;
|
||||
LC_PAPER = locale;
|
||||
LC_TELEPHONE = locale;
|
||||
LC_TIME = locale;
|
||||
i18n =
|
||||
let
|
||||
locale = "en_US.UTF-8";
|
||||
in
|
||||
{
|
||||
defaultLocale = locale;
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = locale;
|
||||
LC_IDENTIFICATION = locale;
|
||||
LC_MEASUREMENT = locale;
|
||||
LC_MONETARY = locale;
|
||||
LC_NAME = locale;
|
||||
LC_NUMERIC = locale;
|
||||
LC_PAPER = locale;
|
||||
LC_TELEPHONE = locale;
|
||||
LC_TIME = locale;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
|
@ -30,7 +31,7 @@
|
|||
|
||||
package = pkgs.nixVersions.git;
|
||||
|
||||
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
|
||||
registry = lib.mapAttrs (_: v: { flake = v; }) inputs;
|
||||
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
|
@ -41,7 +42,7 @@
|
|||
'';
|
||||
settings = {
|
||||
accept-flake-config = true;
|
||||
allowed-users = ["@wheel"];
|
||||
allowed-users = [ "@wheel" ];
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
experimental-features = lib.mkForce [
|
||||
|
@ -59,7 +60,10 @@
|
|||
cores = 6;
|
||||
max-jobs = 12;
|
||||
sandbox = true;
|
||||
trusted-users = ["root" "@wheel"];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
use-cgroups = true;
|
||||
warn-dirty = false;
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.piv-agent;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.piv-agent = {
|
||||
enable = mkEnableOption {
|
||||
description = mdDoc "Whether to configure the piv-agent service";
|
||||
};
|
||||
package = mkPackageOptionMD pkgs.jarvis "piv-agent" {};
|
||||
enable = mkEnableOption { description = mdDoc "Whether to configure the piv-agent service"; };
|
||||
package = mkPackageOptionMD pkgs.jarvis "piv-agent" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -32,18 +32,22 @@ in {
|
|||
PrivateDevices = true;
|
||||
PrivateUsers = true;
|
||||
IPAddressDeny = "any";
|
||||
RestrictAddressFamilies = ["AF_UNIX"];
|
||||
RestrictAddressFamilies = [ "AF_UNIX" ];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
LockPersonality = true;
|
||||
CapabilityBoundingSet = [""];
|
||||
SystemCallFilter = ["@system-service" "~@privileged" "@resources"];
|
||||
CapabilityBoundingSet = [ "" ];
|
||||
SystemCallFilter = [
|
||||
"@system-service"
|
||||
"~@privileged"
|
||||
"@resources"
|
||||
];
|
||||
SystemCallErrorNumber = "EPERM";
|
||||
SystemCallArchitectures = "native";
|
||||
NoNewPrivileges = true;
|
||||
KeyringMode = "private";
|
||||
UMask = 0177;
|
||||
UMask = 177;
|
||||
RuntimeDirectory = "piv-agent";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -3,11 +3,16 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
defaultJdk = pkgs.openjdk22;
|
||||
toolchains = [pkgs.openjdk17 defaultJdk];
|
||||
in {
|
||||
toolchains = [
|
||||
pkgs.openjdk17
|
||||
defaultJdk
|
||||
];
|
||||
in
|
||||
{
|
||||
options.profiles.desktop.android-dev = with lib; {
|
||||
enable = mkEnableOption "Configure a development environment for Android apps";
|
||||
};
|
||||
|
@ -32,13 +37,12 @@ in {
|
|||
snowfallorg.users.msfjarvis.home.config = {
|
||||
programs.gradle = {
|
||||
enable = true;
|
||||
package = pkgs.callPackage (pkgs.gradleGen
|
||||
{
|
||||
version = "8.8-rc-1";
|
||||
nativeVersion = "0.22-milestone-26";
|
||||
hash = "sha256-ouHP7n/97uhgFbhbLdKkNQMsQO7cAdgXIoVVbH2P6hM=";
|
||||
defaultJava = defaultJdk;
|
||||
}) {};
|
||||
package = pkgs.callPackage (pkgs.gradleGen {
|
||||
version = "8.8-rc-1";
|
||||
nativeVersion = "0.22-milestone-26";
|
||||
hash = "sha256-ouHP7n/97uhgFbhbLdKkNQMsQO7cAdgXIoVVbH2P6hM=";
|
||||
defaultJava = defaultJdk;
|
||||
}) { };
|
||||
settings = {
|
||||
"org.gradle.caching" = true;
|
||||
"org.gradle.parallel" = true;
|
||||
|
@ -46,7 +50,9 @@ in {
|
|||
"org.gradle.home" = defaultJdk;
|
||||
"org.gradle.java.installations.auto-detect" = false;
|
||||
"org.gradle.java.installations.auto-download" = false;
|
||||
"org.gradle.java.installations.paths" = lib.concatMapStringsSep "," (x: "${x}/lib/openjdk") toolchains;
|
||||
"org.gradle.java.installations.paths" = lib.concatMapStringsSep "," (
|
||||
x: "${x}/lib/openjdk"
|
||||
) toolchains;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.desktop.cinnamon = with lib; {
|
||||
enable = mkEnableOption "Setup desktop with Cinnamon DE";
|
||||
};
|
||||
|
@ -20,21 +22,23 @@ in {
|
|||
};
|
||||
};
|
||||
programs.geary.enable = false;
|
||||
environment.cinnamon.excludePackages = with pkgs;
|
||||
with pkgs.cinnamon; [
|
||||
sound-theme-freedesktop
|
||||
nixos-artwork.wallpapers.simple-dark-gray
|
||||
mint-artwork
|
||||
mint-cursor-themes
|
||||
mint-l-icons
|
||||
mint-l-theme
|
||||
mint-themes
|
||||
mint-x-icons
|
||||
mint-y-icons
|
||||
hexchat
|
||||
];
|
||||
environment.cinnamon.excludePackages =
|
||||
with pkgs;
|
||||
with pkgs.cinnamon;
|
||||
[
|
||||
sound-theme-freedesktop
|
||||
nixos-artwork.wallpapers.simple-dark-gray
|
||||
mint-artwork
|
||||
mint-cursor-themes
|
||||
mint-l-icons
|
||||
mint-l-theme
|
||||
mint-themes
|
||||
mint-x-icons
|
||||
mint-y-icons
|
||||
hexchat
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [xclip];
|
||||
environment.systemPackages = with pkgs; [ xclip ];
|
||||
|
||||
stylix.targets.lightdm.enable = true;
|
||||
|
||||
|
|
|
@ -4,10 +4,17 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in {
|
||||
imports = [./android-dev.nix ./cinnamon.nix ./gnome3.nix ./noise-cancelation.nix];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./android-dev.nix
|
||||
./cinnamon.nix
|
||||
./gnome3.nix
|
||||
./noise-cancelation.nix
|
||||
];
|
||||
options.profiles.desktop = with lib; {
|
||||
enable = mkEnableOption "Profile for desktop machines (i.e. not servers)";
|
||||
};
|
||||
|
@ -47,7 +54,9 @@ in {
|
|||
printing.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
hardware = {bluetooth.enable = lib.mkDefault true;};
|
||||
hardware = {
|
||||
bluetooth.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
# Theming
|
||||
stylix = {
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.desktop.gnome3 = with lib; {
|
||||
enable = mkEnableOption "Setup desktop with Gnome DE";
|
||||
};
|
||||
|
@ -20,11 +22,12 @@ in {
|
|||
environment.variables.ELECTRON_OZONE_PLATFORM_HINT = "x11";
|
||||
environment.variables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.systemPackages = with pkgs; [wl-clipboard];
|
||||
environment.systemPackages = with pkgs; [ wl-clipboard ];
|
||||
# Required by the tophat extension
|
||||
services.xserver.desktopManager.gnome.sessionPath = with pkgs; [libgtop];
|
||||
services.xserver.desktopManager.gnome.sessionPath = with pkgs; [ libgtop ];
|
||||
|
||||
users.users.msfjarvis.packages = with pkgs;
|
||||
users.users.msfjarvis.packages =
|
||||
with pkgs;
|
||||
[
|
||||
# Old GNOME picture viewer, better than the current default
|
||||
gnome.eog
|
||||
|
@ -102,10 +105,7 @@ in {
|
|||
};
|
||||
"org/gnome/desktop/interface" = with config.stylix.fonts; {
|
||||
# Taken from Stylix
|
||||
color-scheme =
|
||||
if config.stylix.polarity == "dark"
|
||||
then "prefer-dark"
|
||||
else "default";
|
||||
color-scheme = if config.stylix.polarity == "dark" then "prefer-dark" else "default";
|
||||
font-name = "${sansSerif.name} ${toString sizes.applications}";
|
||||
document-font-name = "${serif.name} ${toString (sizes.applications - 1)}";
|
||||
monospace-font-name = "${monospace.name} ${toString sizes.terminal}";
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
noise-suppression-for-voice = pkgs.writeTextDir "share/pipewire/pipewire.conf.d/99-noise-cancellation.conf" ''
|
||||
context.modules = [
|
||||
|
@ -38,11 +39,12 @@
|
|||
}
|
||||
]
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.desktop.noise-cancelation = with lib; {
|
||||
enable = mkEnableOption "Enable noise cancelation in PipeWire";
|
||||
};
|
||||
config = lib.mkIf cfg.noise-cancelation.enable {
|
||||
services.pipewire.configPackages = [noise-suppression-for-voice];
|
||||
services.pipewire.configPackages = [ noise-suppression-for-voice ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.server;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.server = with lib; {
|
||||
enable = mkEnableOption "server profile";
|
||||
tailscaleExitNode = mkEnableOption "Run this machine as a Tailscale exit node";
|
||||
|
@ -16,7 +14,7 @@ in {
|
|||
# Open HTTP(S) ports
|
||||
networking = {
|
||||
networkmanager.enable = lib.mkDefault true;
|
||||
networkmanager.plugins = lib.mkForce [];
|
||||
networkmanager.plugins = lib.mkForce [ ];
|
||||
nftables.enable = true;
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
|
@ -33,10 +31,10 @@ in {
|
|||
};
|
||||
|
||||
# Enable SOPS, force it to be age-only
|
||||
sops.age.sshKeyPaths = lib.mkForce ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
sops.gnupg.sshKeyPaths = lib.mkForce [];
|
||||
sops.age.sshKeyPaths = lib.mkForce [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.gnupg.sshKeyPaths = lib.mkForce [ ];
|
||||
sops.defaultSopsFile = ./../../../../secrets/tailscale.yaml;
|
||||
sops.secrets.tsauthkey = {};
|
||||
sops.secrets.tsauthkey = { };
|
||||
|
||||
# Automatically log into my user account
|
||||
services.getty.autologinUser = lib.mkForce "msfjarvis";
|
||||
|
@ -48,15 +46,19 @@ in {
|
|||
services.tailscale-autoconnect = {
|
||||
enable = true;
|
||||
authkeyFile = "/run/secrets/tsauthkey";
|
||||
extraOptions = ["--accept-risk=lose-ssh" "--ssh"] ++ lib.optionals cfg.tailscaleExitNode ["--advertise-exit-node"];
|
||||
extraOptions = [
|
||||
"--accept-risk=lose-ssh"
|
||||
"--ssh"
|
||||
] ++ lib.optionals cfg.tailscaleExitNode [ "--advertise-exit-node" ];
|
||||
};
|
||||
|
||||
boot.kernel.sysctl =
|
||||
if cfg.tailscaleExitNode
|
||||
then {
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
"net.ipv6.conf.all.forwarding" = 1;
|
||||
}
|
||||
else {};
|
||||
if cfg.tailscaleExitNode then
|
||||
{
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
"net.ipv6.conf.all.forwarding" = 1;
|
||||
}
|
||||
else
|
||||
{ };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.qbittorrent;
|
||||
configDir = "${cfg.dataDir}/.config";
|
||||
openFilesLimit = 4096;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.qbittorrent = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -67,18 +69,18 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [pkgs.qbittorrent];
|
||||
environment.systemPackages = [ pkgs.qbittorrent ];
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [cfg.port];
|
||||
allowedUDPPorts = [cfg.port];
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
allowedUDPPorts = [ cfg.port ];
|
||||
};
|
||||
|
||||
systemd.services.qbittorrent = {
|
||||
after = ["network.target"];
|
||||
after = [ "network.target" ];
|
||||
description = "qBittorrent Daemon";
|
||||
wantedBy = ["multi-user.target"];
|
||||
path = [pkgs.qbittorrent];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.qbittorrent ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.qbittorrent}/bin/qbittorrent-nox \
|
||||
|
@ -105,7 +107,10 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
users.groups =
|
||||
mkIf (cfg.group == "qbittorrent") {qbittorrent = {gid = null;};};
|
||||
users.groups = mkIf (cfg.group == "qbittorrent") {
|
||||
qbittorrent = {
|
||||
gid = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,19 +4,21 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.rucksack;
|
||||
settingsFormat = pkgs.formats.toml {};
|
||||
settingsFile = settingsFormat.generate "rucksack.toml" {inherit (cfg) sources target file_filter;};
|
||||
in {
|
||||
settingsFormat = pkgs.formats.toml { };
|
||||
settingsFile = settingsFormat.generate "rucksack.toml" {
|
||||
inherit (cfg) sources target file_filter;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.services.rucksack = {
|
||||
enable = mkEnableOption {
|
||||
description = mdDoc "Whether to enable the rucksack daemon.";
|
||||
};
|
||||
enable = mkEnableOption { description = mdDoc "Whether to enable the rucksack daemon."; };
|
||||
|
||||
sources = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = mdDoc "Directories to watch and pull files from";
|
||||
};
|
||||
|
||||
|
@ -32,7 +34,7 @@ in {
|
|||
description = mdDoc "Shell glob to filter files against to be eligible for moving";
|
||||
};
|
||||
|
||||
package = mkPackageOptionMD pkgs.jarvis "rucksack" {};
|
||||
package = mkPackageOptionMD pkgs.jarvis "rucksack" { };
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
|
@ -49,9 +51,9 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.rucksack = {
|
||||
wantedBy = ["default.target"];
|
||||
after = ["fs.service"];
|
||||
wants = ["fs.service"];
|
||||
wantedBy = [ "default.target" ];
|
||||
after = [ "fs.service" ];
|
||||
wants = [ "fs.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
|
@ -76,7 +78,10 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
users.groups =
|
||||
mkIf (cfg.group == "rucksack") {rucksack = {gid = null;};};
|
||||
users.groups = mkIf (cfg.group == "rucksack") {
|
||||
rucksack = {
|
||||
gid = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
stylix.autoEnable = lib.mkDefault false;
|
||||
stylix.image = lib.mkDefault ./wall.png;
|
||||
stylix.base16Scheme = lib.mkDefault ./dracula.yml;
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.tailscale-autoconnect;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.services.tailscale-autoconnect = {
|
||||
enable = mkEnableOption {
|
||||
description = mdDoc "Whether to configure the Tailscale autoconnect service";
|
||||
|
@ -20,8 +22,8 @@ in {
|
|||
extraOptions = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = mdDoc "List of extra flags passed to the `tailscale` invocation";
|
||||
default = [];
|
||||
example = ["--ssh"];
|
||||
default = [ ];
|
||||
example = [ "--ssh" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -30,9 +32,15 @@ in {
|
|||
description = "Automatic connection to Tailscale";
|
||||
|
||||
# make sure tailscale is running before trying to connect to tailscale
|
||||
after = ["network-pre.target" "tailscale.service"];
|
||||
wants = ["network-pre.target" "tailscale.service"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = [
|
||||
"network-pre.target"
|
||||
"tailscale.service"
|
||||
];
|
||||
wants = [
|
||||
"network-pre.target"
|
||||
"tailscale.service"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
# set this service as a oneshot job
|
||||
serviceConfig.Type = "oneshot";
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.tailscale;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.profiles.tailscale = with lib; {
|
||||
enable = mkEnableOption "Tailscale profile";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking = {
|
||||
nameservers = ["100.100.100.100" "8.8.8.8" "1.1.1.1"];
|
||||
search = ["tiger-shark.ts.net"];
|
||||
nameservers = [
|
||||
"100.100.100.100"
|
||||
"8.8.8.8"
|
||||
"1.1.1.1"
|
||||
];
|
||||
search = [ "tiger-shark.ts.net" ];
|
||||
};
|
||||
|
||||
# Enable Tailscale and allow it to provision certificates to caddy
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{inputs, ...}: _final: prev: {
|
||||
{ inputs, ... }:
|
||||
_final: prev: {
|
||||
attic = inputs.attic.packages.${prev.system}.attic-client;
|
||||
# Force the use of the JDK we're using everywhere else
|
||||
jdk = prev.openjdk22;
|
||||
|
@ -15,12 +16,10 @@
|
|||
});
|
||||
# Silence warnings about existing files
|
||||
megatools = prev.megatools.overrideAttrs (_: {
|
||||
patches = [./megatools.patch];
|
||||
patches = [ ./megatools.patch ];
|
||||
});
|
||||
# Set default fonts
|
||||
nerdfonts = prev.nerdfonts.override {
|
||||
fonts = ["JetBrainsMono"];
|
||||
};
|
||||
nerdfonts = prev.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
|
||||
nix = prev.nixVersions.git;
|
||||
qbittorrent = prev.qbittorrent.override {guiSupport = false;};
|
||||
qbittorrent = prev.qbittorrent.override { guiSupport = false; };
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
hash = "sha256-uoIueSbhml6lHgpI6OH1Y4cNeZzzTBS+PAPHf62xJzY=";
|
||||
};
|
||||
|
||||
outputs = ["out"];
|
||||
outputs = [ "out" ];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
@ -29,7 +29,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
description = "adb-sync is a tool to synchronize files between a PC and an Android device using the ADB (Android Debug Bridge)";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "adb-sync";
|
||||
};
|
||||
})
|
||||
|
|
|
@ -16,13 +16,16 @@ buildGoModule rec {
|
|||
|
||||
vendorHash = "sha256-voVoowjM90OGWXF4REEevO8XEzT7azRYiDay4bnGBks=";
|
||||
|
||||
ldflags = ["-s" "-w"];
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A TUI File Manager for ADB";
|
||||
homepage = "https://github.com/darkhz/adbtuifm";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "adbtuifm";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,8 +29,11 @@ rustPlatform.buildRustPackage rec {
|
|||
meta = with lib; {
|
||||
description = "Rust tooling to poll Google Maven repository for updates to AndroidX artifacts";
|
||||
homepage = "https://github.com/msfjarvis/adx";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "adx";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
cargoHash = "sha256-RVuXuNg+wlI1dS2sJ2X11fk9K1IAiVPNFHZM+/lS1+U=";
|
||||
|
||||
RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix {};
|
||||
RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
|
@ -42,7 +42,16 @@ rustPlatform.buildRustPackage rec {
|
|||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [atk cairo gdk-pixbuf gtk3 gtksourceview3 harfbuzz pango zlib];
|
||||
buildInputs = [
|
||||
atk
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
gtk3
|
||||
gtksourceview3
|
||||
harfbuzz
|
||||
pango
|
||||
zlib
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -64,8 +73,7 @@ rustPlatform.buildRustPackage rec {
|
|||
];
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
mimeTypes = [
|
||||
];
|
||||
mimeTypes = [ ];
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -80,7 +88,7 @@ rustPlatform.buildRustPackage rec {
|
|||
description = "Port of @IvanMathy's Boop to GTK, a scriptable scratchpad for developers";
|
||||
homepage = "https://github.com/msfjarvis/boop-gtk";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "boop-gtk";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
|
|
@ -2,22 +2,26 @@
|
|||
rust,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
arch = rust.toRustTarget stdenv.hostPlatform;
|
||||
fetch_librusty_v8 = args:
|
||||
fetch_librusty_v8 =
|
||||
args:
|
||||
fetchurl {
|
||||
name = "librusty_v8-${args.version}";
|
||||
url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${arch}.a.gz";
|
||||
sha256 = args.shas.${stdenv.hostPlatform.system};
|
||||
meta = {inherit (args) version;};
|
||||
meta = {
|
||||
inherit (args) version;
|
||||
};
|
||||
};
|
||||
in
|
||||
fetch_librusty_v8 {
|
||||
version = "0.89.0";
|
||||
shas = {
|
||||
x86_64-linux = "sha256-XxX3x3LBiJK768gvzIsV7aKm6Yn5dLS3LINdDOUjDGU=";
|
||||
aarch64-linux = "sha256-ZetNxahe/XDp6OoGFkZS7VfOPQPbEGUkPNAaSJ0Y90M=";
|
||||
x86_64-darwin = "sha256-A047aVL2KSNWofPK2eH395iGPcdM+FjSxu5GkW9wJnI=";
|
||||
aarch64-darwin = "sha256-XN2JFL8Rs9hyTquVx6brjW15H54mhVIHqzkdEy9smqM=";
|
||||
};
|
||||
}
|
||||
fetch_librusty_v8 {
|
||||
version = "0.89.0";
|
||||
shas = {
|
||||
x86_64-linux = "sha256-XxX3x3LBiJK768gvzIsV7aKm6Yn5dLS3LINdDOUjDGU=";
|
||||
aarch64-linux = "sha256-ZetNxahe/XDp6OoGFkZS7VfOPQPbEGUkPNAaSJ0Y90M=";
|
||||
x86_64-darwin = "sha256-A047aVL2KSNWofPK2eH395iGPcdM+FjSxu5GkW9wJnI=";
|
||||
aarch64-darwin = "sha256-XN2JFL8Rs9hyTquVx6brjW15H54mhVIHqzkdEy9smqM=";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,24 +17,23 @@ rustPlatform.buildRustPackage rec {
|
|||
hash = "sha256-WSvSDZJ2SOtE68BHv7IINieVgblfWdpNrurFH7+83aI=";
|
||||
};
|
||||
|
||||
buildFeatures = lib.optionals stdenv.isLinux ["journald"];
|
||||
buildFeatures = lib.optionals stdenv.isLinux [ "journald" ];
|
||||
cargoHash = "sha256-iYSR7dXrEU0VasCzmkA0lSW6Wj5t8o3uF4oVIc8chy8=";
|
||||
|
||||
useNextest = true;
|
||||
|
||||
buildInputs =
|
||||
lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.AppKit
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
xorg.libxcb
|
||||
];
|
||||
lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ]
|
||||
++ lib.optionals stdenv.isLinux [ xorg.libxcb ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI to listen to clipboard events and perform operations on the copied text";
|
||||
homepage = "https://github.com/msfjarvis/clipboard-substitutor";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "clipboard-substitutor";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/jakewharton/diffuse";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "diffuse";
|
||||
};
|
||||
})
|
||||
|
|
|
@ -16,13 +16,16 @@ buildGoModule rec {
|
|||
|
||||
vendorHash = "sha256-WibiLYMeWR63Q8lu287jeczT0n0/lh6T8PfOH7eJh8Q=";
|
||||
|
||||
ldflags = ["-s" "-w"];
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Google Drive CLI Client";
|
||||
homepage = "https://github.com/msfjarvis/gdrive";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "gdrive";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,17 +4,18 @@
|
|||
makeRustPlatform,
|
||||
lib,
|
||||
inputs,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (inputs) fenix rust-manifest;
|
||||
inherit ((import fenix {inherit pkgs;})) fromManifestFile;
|
||||
inherit ((import fenix { inherit pkgs; })) fromManifestFile;
|
||||
|
||||
toolchain = (fromManifestFile rust-manifest).minimalToolchain;
|
||||
in
|
||||
(makeRustPlatform {
|
||||
cargo = toolchain;
|
||||
rustc = toolchain;
|
||||
})
|
||||
.buildRustPackage rec {
|
||||
(makeRustPlatform {
|
||||
cargo = toolchain;
|
||||
rustc = toolchain;
|
||||
}).buildRustPackage
|
||||
rec {
|
||||
pname = "gitice";
|
||||
version = "2.0.4";
|
||||
|
||||
|
@ -32,8 +33,11 @@ in
|
|||
meta = with lib; {
|
||||
description = "Snapshot your local git repositories for easy restoration";
|
||||
homepage = "https://github.com/msfjarvis/gitice";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "gitice";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,22 +30,18 @@ rustPlatform.buildRustPackage rec {
|
|||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
libgit2
|
||||
openssl
|
||||
zlib
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
buildInputs = [
|
||||
libgit2
|
||||
openssl
|
||||
zlib
|
||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command-line tool and Docker image to automatically backup Git repositories from GitHub or anywhere";
|
||||
homepage = "https://github.com/msfjarvis/gitout";
|
||||
changelog = "https://github.com/msfjarvis/gitout/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "gitout";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,13 +16,16 @@ buildGoModule rec {
|
|||
|
||||
vendorHash = "sha256-FzGDVMKzAjISb4P7/vBIBTbBWpyAUnR26gXcvUWnjHw=";
|
||||
|
||||
ldflags = ["-s" "-w"];
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "This program uses the Chrome DevTools Protocol to drive a Chrome session that downloads your photos stored in Google Photos";
|
||||
homepage = "https://github.com/msfjarvis/gphotos-cdp";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "gphotos-cdp";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,9 +16,7 @@ rustPlatform.buildRustPackage rec {
|
|||
hash = "sha256-A83pzY+c4kz59tHEc6hRd0Zp8Uj96KdrenD9RDWwavQ=";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
lib.optionals stdenv.isDarwin
|
||||
[darwin.apple_sdk.frameworks.Security];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
buildAndTestSubdir = "hcctl";
|
||||
|
||||
|
@ -29,8 +27,11 @@ rustPlatform.buildRustPackage rec {
|
|||
meta = with lib; {
|
||||
description = "Simple CLI tool to keep a track of your https://healthchecks.io account";
|
||||
homepage = "https://msfjarvis.dev/g/healthchecks-rs";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "hcctl";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,9 +16,7 @@ rustPlatform.buildRustPackage rec {
|
|||
hash = "sha256-A83pzY+c4kz59tHEc6hRd0Zp8Uj96KdrenD9RDWwavQ=";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
lib.optionals stdenv.isDarwin
|
||||
[darwin.apple_sdk.frameworks.Security];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
buildAndTestSubdir = "monitor";
|
||||
|
||||
|
@ -29,8 +27,11 @@ rustPlatform.buildRustPackage rec {
|
|||
meta = with lib; {
|
||||
description = "CLI tool to run shell jobs and report status to https://healthchecks.io";
|
||||
homepage = "https://msfjarvis.dev/g/healthchecks-rs";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "healthchecks-monitor";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,16 +20,17 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A CLI for katbin";
|
||||
homepage = "https://github.com/SphericalKat/katbin-cli";
|
||||
changelog = "https://github.com/SphericalKat/katbin-cli/blob/${src.rev}/CHANGELOG.md";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "katbin";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,17 +6,18 @@
|
|||
darwin,
|
||||
lib,
|
||||
inputs,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (inputs) fenix rust-manifest;
|
||||
inherit ((import fenix {inherit pkgs;})) fromManifestFile;
|
||||
inherit ((import fenix { inherit pkgs; })) fromManifestFile;
|
||||
|
||||
toolchain = (fromManifestFile rust-manifest).minimalToolchain;
|
||||
in
|
||||
(makeRustPlatform {
|
||||
cargo = toolchain;
|
||||
rustc = toolchain;
|
||||
})
|
||||
.buildRustPackage rec {
|
||||
(makeRustPlatform {
|
||||
cargo = toolchain;
|
||||
rustc = toolchain;
|
||||
}).buildRustPackage
|
||||
rec {
|
||||
pname = "linkleaner";
|
||||
version = "2.0.0";
|
||||
|
||||
|
@ -48,7 +49,7 @@ in
|
|||
homepage = "https://msfjarvis.dev/g/linkleaner/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "linkleaner";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -25,6 +25,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/IdreesInc/Monocraft";
|
||||
license = licenses.ofl;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
};
|
||||
})
|
||||
|
|
|
@ -18,15 +18,13 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
cargoHash = "sha256-cGrrv0fDD0H2tvUNyNK9u5Qyd6JUXCztDIPmcmtZ7w4=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yet another nix cli helper";
|
||||
homepage = "https://github.com/viperML/nh";
|
||||
license = licenses.eupl12;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "nh";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation {
|
|||
homepage = "https://github.com/bluskript/nix-inspect";
|
||||
changelog = "https://github.com/bluskript/nix-inspect/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "nix-inspect";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
|
|||
homepage = "https://github.com/bluskript/nix-inspect";
|
||||
changelog = "https://github.com/bluskript/nix-inspect/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "nix-inspect";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,13 +16,16 @@ buildGoModule {
|
|||
|
||||
vendorHash = "sha256-6Y8SmgH5SFvkw3YQh8SlSktJsctped8as1FCdIc4FQc=";
|
||||
|
||||
ldflags = ["-s" "-w"];
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Patreon Image Downloader";
|
||||
homepage = "https://github.com/PrivateGER/patreon-dl";
|
||||
license = licenses.unlicense;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "patreon-dl";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
# Nixpkgs breaks the `env -S` part somehow
|
||||
dontPatchShebangs = true;
|
||||
|
||||
nativeBuildInputs = [installShellFiles];
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash bash_completion.d/pidcat
|
||||
|
@ -33,7 +33,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
description = "pidcat - colored logcat script";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "pidcat";
|
||||
};
|
||||
})
|
||||
|
|
|
@ -16,19 +16,22 @@ buildGoModule rec {
|
|||
hash = "sha256-aukcnubhB8kbAl22eeFKzLPvVcYdgcEQ1gy3n6KWG00=";
|
||||
};
|
||||
|
||||
buildInputs = [pcsclite];
|
||||
buildInputs = [ pcsclite ];
|
||||
|
||||
nativeBuildInputs = [pkg-config];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
vendorHash = "sha256-1d6EKEvo4XNDXRtbdnKkqyF9y0LPPHWKu9X/wYnbmas=";
|
||||
|
||||
ldflags = ["-s" "-w"];
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An SSH and GPG agent which you can use with your PIV hardware security device (e.g. a Yubikey";
|
||||
homepage = "https://github.com/smlx/piv-agent";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "piv-agent";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,7 +29,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
"-DBUILD_AUV3_PLUGIN=OFF"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [cmake pkg-config];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
freetype
|
||||
|
@ -44,6 +47,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/werman/noise-suppression-for-voice";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
};
|
||||
})
|
||||
|
|
|
@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
|
|||
hash = "sha256-oZJGXR33SxvysrKTEz2ds0CwI3cjDYHJC7UWwOiq3g4=";
|
||||
};
|
||||
|
||||
buildFeatures = lib.optionals stdenv.isLinux ["journald"];
|
||||
buildFeatures = lib.optionals stdenv.isLinux [ "journald" ];
|
||||
cargoHash = "sha256-Aijv7Zs/wbksRJsF2uMcLjdFjnxzhFcTAvy9kJi5cVI=";
|
||||
|
||||
useNextest = true;
|
||||
|
@ -23,8 +23,11 @@ rustPlatform.buildRustPackage rec {
|
|||
meta = with lib; {
|
||||
description = "Simple CLI tool to watch directories and move their files to a single dumping ground";
|
||||
homepage = "https://github.com/msfjarvis/rucksack";
|
||||
license = with licenses; [asl20 mit];
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "rucksack";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
|
|||
homepage = "https://github.com/gnprice/toml-cli";
|
||||
changelog = "https://github.com/gnprice/toml-cli/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "toml-cli";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
|
|||
homepage = "https://github.com/mitsuhiko/when";
|
||||
changelog = "https://github.com/mitsuhiko/when/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [msfjarvis];
|
||||
maintainers = with maintainers; [ msfjarvis ];
|
||||
mainProgram = "when";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.msfjarvis = {
|
||||
name = "msfjarvis";
|
||||
home = "/Users/msfjarvis";
|
||||
|
|
|
@ -3,17 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./sd-image.nix
|
||||
];
|
||||
# Pi kernel does not build all modules so this allows some to be missing.
|
||||
nixpkgs.overlays = [
|
||||
(_: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // {allowMissing = true;});
|
||||
})
|
||||
(_: super: { makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; }); })
|
||||
];
|
||||
|
||||
topology.self.name = "Raspberry Pi";
|
||||
|
@ -38,7 +36,7 @@
|
|||
users = {
|
||||
msfjarvis = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
extraGroups = [ "wheel" ];
|
||||
hashedPassword = ''$y$j9T$g8JL/B98ogQF/ryvwHpWe.$jyKMeotGz/o8Pje.nejKzPMiYOxtn//33OzMu5bAHm2'';
|
||||
};
|
||||
root.openssh.authorizedKeys.keys = [
|
||||
|
@ -85,17 +83,15 @@
|
|||
enable = true;
|
||||
user = "root";
|
||||
group = "root";
|
||||
sources = [
|
||||
"/var/lib/qbittorrent/downloads"
|
||||
];
|
||||
sources = [ "/var/lib/qbittorrent/downloads" ];
|
||||
target = "/media/.omg";
|
||||
file_filter = "*.mp4";
|
||||
};
|
||||
|
||||
systemd.services.disable-wlan-powersave = {
|
||||
description = "Disable WiFi power save";
|
||||
after = ["sys-subsystem-net-devices-wlan0.device"];
|
||||
wantedBy = ["sys-subsystem-net-devices-wlan0.device"];
|
||||
after = [ "sys-subsystem-net-devices-wlan0.device" ];
|
||||
wantedBy = [ "sys-subsystem-net-devices-wlan0.device" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
|
||||
fileSystems."/media" = {
|
||||
device = "/dev/disk/by-uuid/1d9cbc92-8ea9-4ae7-8c8f-5f72c3d75626";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
];
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,52 +4,57 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
nixpkgs.crossSystem.system = "aarch64-linux";
|
||||
imports = [
|
||||
(modulesPath + "/installer/sd-card/sd-image.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/sd-card/sd-image.nix") ];
|
||||
|
||||
boot = {
|
||||
consoleLogLevel = lib.mkDefault 7;
|
||||
|
||||
kernelParams = ["console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0"];
|
||||
kernelParams = [
|
||||
"console=ttyS0,115200n8"
|
||||
"console=ttyAMA0,115200n8"
|
||||
"console=tty0"
|
||||
];
|
||||
};
|
||||
|
||||
sdImage = {
|
||||
populateFirmwareCommands = let
|
||||
configTxt = pkgs.writeText "config.txt" ''
|
||||
[pi3]
|
||||
kernel=u-boot-rpi3.bin
|
||||
[pi4]
|
||||
kernel=u-boot-rpi4.bin
|
||||
enable_gic=1
|
||||
armstub=armstub8-gic.bin
|
||||
# Otherwise the resolution will be weird in most cases, compared to
|
||||
# what the pi3 firmware does by default.
|
||||
disable_overscan=1
|
||||
[all]
|
||||
# Boot in 64-bit mode.
|
||||
arm_64bit=1
|
||||
# U-Boot needs this to work, regardless of whether UART is actually used or not.
|
||||
# Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still
|
||||
# a requirement in the future.
|
||||
enable_uart=1
|
||||
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
|
||||
# when attempting to show low-voltage or overtemperature warnings.
|
||||
avoid_warnings=1
|
||||
populateFirmwareCommands =
|
||||
let
|
||||
configTxt = pkgs.writeText "config.txt" ''
|
||||
[pi3]
|
||||
kernel=u-boot-rpi3.bin
|
||||
[pi4]
|
||||
kernel=u-boot-rpi4.bin
|
||||
enable_gic=1
|
||||
armstub=armstub8-gic.bin
|
||||
# Otherwise the resolution will be weird in most cases, compared to
|
||||
# what the pi3 firmware does by default.
|
||||
disable_overscan=1
|
||||
[all]
|
||||
# Boot in 64-bit mode.
|
||||
arm_64bit=1
|
||||
# U-Boot needs this to work, regardless of whether UART is actually used or not.
|
||||
# Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still
|
||||
# a requirement in the future.
|
||||
enable_uart=1
|
||||
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
|
||||
# when attempting to show low-voltage or overtemperature warnings.
|
||||
avoid_warnings=1
|
||||
'';
|
||||
in
|
||||
''
|
||||
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
|
||||
# Add the config
|
||||
cp ${configTxt} firmware/config.txt
|
||||
# Add pi3 specific files
|
||||
cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin
|
||||
# Add pi4 specific files
|
||||
cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin firmware/u-boot-rpi4.bin
|
||||
cp ${pkgs.raspberrypi-armstubs}/armstub8-gic.bin firmware/armstub8-gic.bin
|
||||
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-4-b.dtb firmware/
|
||||
'';
|
||||
in ''
|
||||
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)
|
||||
# Add the config
|
||||
cp ${configTxt} firmware/config.txt
|
||||
# Add pi3 specific files
|
||||
cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin firmware/u-boot-rpi3.bin
|
||||
# Add pi4 specific files
|
||||
cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin firmware/u-boot-rpi4.bin
|
||||
cp ${pkgs.raspberrypi-armstubs}/armstub8-gic.bin firmware/armstub8-gic.bin
|
||||
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/bcm2711-rpi-4-b.dtb firmware/
|
||||
'';
|
||||
populateRootCommands = ''
|
||||
mkdir -p ./files/boot
|
||||
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d ./files/boot
|
||||
|
|
|
@ -2,12 +2,10 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
}:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
boot = {
|
||||
# Only enable for first installation
|
||||
|
@ -32,11 +30,11 @@
|
|||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
groups.miniflux = {};
|
||||
groups.miniflux = { };
|
||||
users = {
|
||||
msfjarvis = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
extraGroups = [ "wheel" ];
|
||||
hashedPassword = ''$y$j9T$g8JL/B98ogQF/ryvwHpWe.$jyKMeotGz/o8Pje.nejKzPMiYOxtn//33OzMu5bAHm2'';
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEoNv1E/D4IzNIJeJg7Rp49Jizw8aoCLSyFLcUmD1F6K''
|
||||
|
@ -182,7 +180,7 @@
|
|||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = ["systemd"];
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
|
@ -190,26 +188,16 @@
|
|||
{
|
||||
job_name = "wailord";
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["127.0.0.1:${toString config.services.prometheus.exporters.node.port}"];
|
||||
}
|
||||
{ targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "caddy";
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["127.0.0.1:2019"];
|
||||
}
|
||||
];
|
||||
static_configs = [ { targets = [ "127.0.0.1:2019" ]; } ];
|
||||
}
|
||||
{
|
||||
job_name = "miniflux";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [config.services.miniflux.config.LISTEN_ADDR];
|
||||
}
|
||||
];
|
||||
static_configs = [ { targets = [ config.services.miniflux.config.LISTEN_ADDR ]; } ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
{modulesPath, ...}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
boot.binfmt.emulatedSystems = ["i686-linux" "x86_64-linux"];
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
|
||||
boot.initrd.kernelModules = ["nvme"];
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"xen_blkfront"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vda = {
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
}:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
topology.self.name = "Desktop";
|
||||
|
||||
|
@ -50,7 +49,10 @@
|
|||
users.users.msfjarvis = {
|
||||
isNormalUser = true;
|
||||
description = "Harsh Shandilya";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
age
|
||||
attic
|
||||
|
@ -99,7 +101,14 @@
|
|||
nix-update
|
||||
jarvis.patreon-dl
|
||||
jarvis.pidcat
|
||||
(python312.withPackages (ps: with ps; [beautifulsoup4 black requests virtualenv]))
|
||||
(python312.withPackages (
|
||||
ps: with ps; [
|
||||
beautifulsoup4
|
||||
black
|
||||
requests
|
||||
virtualenv
|
||||
]
|
||||
))
|
||||
scrcpy
|
||||
smile
|
||||
sshfs
|
||||
|
@ -112,7 +121,7 @@
|
|||
# Minecraft
|
||||
mcaselector
|
||||
(prismlauncher.override {
|
||||
jdks = [openjdk22];
|
||||
jdks = [ openjdk22 ];
|
||||
withWaylandGLFW = config.profiles.desktop.gnome3.enable;
|
||||
})
|
||||
];
|
||||
|
@ -141,25 +150,27 @@
|
|||
group = "users";
|
||||
};
|
||||
|
||||
services.rucksack = let
|
||||
inherit (config.users.users.msfjarvis) home;
|
||||
minecraft = name: "${home}/Games/PrismLauncher/instances/${name}/.minecraft/screenshots/";
|
||||
in {
|
||||
enable = true;
|
||||
sources = [
|
||||
(minecraft "1.21")
|
||||
(minecraft "ACLU SMP Modpack")
|
||||
(minecraft "Fabulously.Optimized.1.20.2")
|
||||
(minecraft "Fabulously.Optimized.MC.1.17.1")
|
||||
(minecraft "Fabulously.Optimized.MC.1.20.1")
|
||||
(minecraft "Pokemon Elysium")
|
||||
"${home}/Games/PrismLauncher/instances/Vault Hunters 3/minecraft/screenshots/"
|
||||
];
|
||||
target = "/mediahell/screenshots/";
|
||||
file_filter = "*.png";
|
||||
user = "msfjarvis";
|
||||
group = "users";
|
||||
};
|
||||
services.rucksack =
|
||||
let
|
||||
inherit (config.users.users.msfjarvis) home;
|
||||
minecraft = name: "${home}/Games/PrismLauncher/instances/${name}/.minecraft/screenshots/";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
sources = [
|
||||
(minecraft "1.21")
|
||||
(minecraft "ACLU SMP Modpack")
|
||||
(minecraft "Fabulously.Optimized.1.20.2")
|
||||
(minecraft "Fabulously.Optimized.MC.1.17.1")
|
||||
(minecraft "Fabulously.Optimized.MC.1.20.1")
|
||||
(minecraft "Pokemon Elysium")
|
||||
"${home}/Games/PrismLauncher/instances/Vault Hunters 3/minecraft/screenshots/"
|
||||
];
|
||||
target = "/mediahell/screenshots/";
|
||||
file_filter = "*.png";
|
||||
user = "msfjarvis";
|
||||
group = "users";
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
|
|
@ -6,16 +6,22 @@
|
|||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
}:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
|
@ -25,7 +31,7 @@
|
|||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
|
@ -69,7 +75,7 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
||||
}
|
||||
) { src = ./.; }).defaultNix
|
||||
|
|
|
@ -15,37 +15,44 @@
|
|||
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||
inputs.flake-compat.flake = false;
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {interactive = "";};
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ devshell.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {
|
||||
interactive = "";
|
||||
};
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
busybox
|
||||
clang_13
|
||||
cmake
|
||||
lld_13
|
||||
openssl
|
||||
pkgconfig
|
||||
zlib
|
||||
];
|
||||
};
|
||||
});
|
||||
packages = with pkgs; [
|
||||
busybox
|
||||
clang_13
|
||||
cmake
|
||||
lld_13
|
||||
openssl
|
||||
pkgconfig
|
||||
zlib
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.shellNix
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
||||
}
|
||||
) { src = ./.; }).defaultNix
|
||||
|
|
|
@ -20,48 +20,58 @@
|
|||
inputs.nix-vscode-extensions.inputs.flake-utils.follows = "flake-utils";
|
||||
inputs.nix-vscode-extensions.inputs.flake-compat.follows = "flake-compat";
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
nix-vscode-extensions,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [devshell.overlays.default nix-vscode-extensions.overlays.default];
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {interactive = "";};
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
nix-vscode-extensions,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
devshell.overlays.default
|
||||
nix-vscode-extensions.overlays.default
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {
|
||||
interactive = "";
|
||||
};
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
git
|
||||
go-outline
|
||||
go_1_21
|
||||
gopls
|
||||
gotools
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions = with pkgs.vscode-marketplace; [
|
||||
arrterian.nix-env-selector
|
||||
eamodio.gitlens
|
||||
golang.go
|
||||
jnoortheen.nix-ide
|
||||
k--kato.intellij-idea-keybindings
|
||||
mtdmali.daybreak-theme
|
||||
oderwat.indent-rainbow
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
});
|
||||
packages = with pkgs; [
|
||||
git
|
||||
go-outline
|
||||
go_1_21
|
||||
gopls
|
||||
gotools
|
||||
(vscode-with-extensions.override {
|
||||
vscodeExtensions = with pkgs.vscode-marketplace; [
|
||||
arrterian.nix-env-selector
|
||||
eamodio.gitlens
|
||||
golang.go
|
||||
jnoortheen.nix-ide
|
||||
k--kato.intellij-idea-keybindings
|
||||
mtdmali.daybreak-theme
|
||||
oderwat.indent-rainbow
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.shellNix
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
||||
}
|
||||
) { src = ./.; }).defaultNix
|
||||
|
|
|
@ -15,31 +15,36 @@
|
|||
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||
inputs.flake-compat.flake = false;
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {interactive = "";};
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ devshell.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {
|
||||
interactive = "";
|
||||
};
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
nodejs_18
|
||||
];
|
||||
};
|
||||
});
|
||||
packages = with pkgs; [ nodejs_18 ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.shellNix
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
||||
}
|
||||
) { src = ./.; }).defaultNix
|
||||
|
|
|
@ -15,31 +15,36 @@
|
|||
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||
inputs.flake-compat.flake = false;
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
in {
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {interactive = "";};
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
devshell,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ devshell.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {
|
||||
interactive = "";
|
||||
};
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
python312
|
||||
];
|
||||
};
|
||||
});
|
||||
packages = with pkgs; [ python312 ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.shellNix
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.defaultNix
|
||||
}
|
||||
) { src = ./.; }).defaultNix
|
||||
|
|
|
@ -24,74 +24,86 @@
|
|||
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||
inputs.flake-compat.flake = false;
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
advisory-db,
|
||||
crane,
|
||||
devshell,
|
||||
fenix,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
advisory-db,
|
||||
crane,
|
||||
devshell,
|
||||
fenix,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ devshell.overlays.default ];
|
||||
};
|
||||
|
||||
rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
|
||||
file = ./rust-toolchain.toml;
|
||||
sha256 = "sha256-7QfkHty6hSrgNM0fspycYkRcB82eEqYa4CoAJ9qA3tU=";
|
||||
};
|
||||
rustStable = (import fenix { inherit pkgs; }).fromToolchainFile {
|
||||
file = ./rust-toolchain.toml;
|
||||
sha256 = "sha256-7QfkHty6hSrgNM0fspycYkRcB82eEqYa4CoAJ9qA3tU=";
|
||||
};
|
||||
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;
|
||||
commonArgs = {
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
buildInputs = [];
|
||||
nativeBuildInputs = [];
|
||||
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||
};
|
||||
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // {doCheck = false;});
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;
|
||||
commonArgs = {
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
buildInputs = [ ];
|
||||
nativeBuildInputs = [ ];
|
||||
cargoClippyExtraArgs = "--all-targets -- --deny warnings";
|
||||
};
|
||||
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { doCheck = false; });
|
||||
|
||||
my-rust-package = craneLib.buildPackage (commonArgs // {doCheck = false;});
|
||||
my-rust-package-clippy = craneLib.cargoClippy (commonArgs
|
||||
// {
|
||||
inherit cargoArtifacts;
|
||||
});
|
||||
my-rust-package-fmt = craneLib.cargoFmt (commonArgs // {});
|
||||
my-rust-package-audit = craneLib.cargoAudit (commonArgs // {inherit advisory-db;});
|
||||
my-rust-package-nextest = craneLib.cargoNextest (commonArgs
|
||||
// {
|
||||
inherit cargoArtifacts;
|
||||
src = ./.;
|
||||
partitions = 1;
|
||||
partitionType = "count";
|
||||
});
|
||||
in {
|
||||
checks = {
|
||||
inherit my-rust-package my-rust-package-audit my-rust-package-clippy my-rust-package-fmt my-rust-package-nextest;
|
||||
};
|
||||
|
||||
packages.default = my-rust-package;
|
||||
|
||||
apps.default = flake-utils.lib.mkApp {drv = my-rust-package;};
|
||||
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {interactive = "";};
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
my-rust-package = craneLib.buildPackage (commonArgs // { doCheck = false; });
|
||||
my-rust-package-clippy = craneLib.cargoClippy (commonArgs // { inherit cargoArtifacts; });
|
||||
my-rust-package-fmt = craneLib.cargoFmt (commonArgs // { });
|
||||
my-rust-package-audit = craneLib.cargoAudit (commonArgs // { inherit advisory-db; });
|
||||
my-rust-package-nextest = craneLib.cargoNextest (
|
||||
commonArgs
|
||||
// {
|
||||
inherit cargoArtifacts;
|
||||
src = ./.;
|
||||
partitions = 1;
|
||||
partitionType = "count";
|
||||
}
|
||||
];
|
||||
);
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
inherit
|
||||
my-rust-package
|
||||
my-rust-package-audit
|
||||
my-rust-package-clippy
|
||||
my-rust-package-fmt
|
||||
my-rust-package-nextest
|
||||
;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
cargo-nextest
|
||||
cargo-release
|
||||
rustStable
|
||||
stdenv.cc
|
||||
];
|
||||
};
|
||||
});
|
||||
packages.default = my-rust-package;
|
||||
|
||||
apps.default = flake-utils.lib.mkApp { drv = my-rust-package; };
|
||||
|
||||
devShells.default = pkgs.devshell.mkShell {
|
||||
bash = {
|
||||
interactive = "";
|
||||
};
|
||||
|
||||
env = [
|
||||
{
|
||||
name = "DEVSHELL_NO_MOTD";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
cargo-nextest
|
||||
cargo-release
|
||||
rustStable
|
||||
stdenv.cc
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import (let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
(import (
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/nix-community/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) {src = ./.;})
|
||||
.shellNix
|
||||
}
|
||||
) { src = ./.; }).shellNix
|
||||
|
|
Loading…
Reference in New Issue