update
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# Static Assets for ricing
|
# Static Assets for ricing
|
||||||
|
|
||||||
All of stuff(Wallpapers, etc.) packaged in single nix deriv.
|
All of stuff(Wallpapers, Scripts, etc.) packaged in single nix deriv.
|
||||||
|
|
||||||
## Sources
|
## Wallpaper Sources
|
||||||
|
|
||||||
* ``
|
* ``
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ stdenv.mkDerivation {
|
|||||||
name = "ricing-assets";
|
name = "ricing-assets";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/wallpapers
|
mkdir -p $out/usr/local/share/wallpapers
|
||||||
cp -r wallpapers/ $out/share/wallpapers
|
cp -r wallpapers/ $out/usr/local/share/wallpapers
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
32
assets/scripts/misskey.nix
Normal file
32
assets/scripts/misskey.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
getLatestN = writeShellApplication {
|
||||||
|
name = "misskey-getLatestN";
|
||||||
|
runtimeInputs = [
|
||||||
|
curl
|
||||||
|
jq
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
if [[ -a /tmp/${config.networking.hostName}/misskey-scripts/getLatestN.fifo ]]; then
|
||||||
|
mkdir -p /tmp/${config.networking.hostName}/misskey-scripts
|
||||||
|
mkfifo /tmp/${config.networking.hostName}/misskey-scripts/getLatestN.fifo
|
||||||
|
fi
|
||||||
|
|
||||||
|
pipeLocation=/tmp/${config.networking.hostName}/misskey-scripts/getLatestN.fifo
|
||||||
|
|
||||||
|
curl https://misskey.io/api/notes -s --request POST --header 'Content-Type: application/json' --data '{"local": true, "reply": false, "renote": false, "withFiles": false, "poll": false, "limit": $1}' > "$pipeLocation" &
|
||||||
|
|
||||||
|
echo "$(jq -M -r '.[].text' < $pipeLocation)" > $pipeLocation &
|
||||||
|
|
||||||
|
while read line; do
|
||||||
|
echo "$line"
|
||||||
|
done < $pipeLocation
|
||||||
|
wait
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "misskey-scripts";
|
||||||
|
paths = [ getLatestN ];
|
||||||
|
}
|
||||||
73
home/i3.nix
73
home/i3.nix
@@ -10,6 +10,72 @@ let
|
|||||||
EXIT = "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes' 'i3-msg exit'";
|
EXIT = "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes' 'i3-msg exit'";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
programs.i3status = {
|
||||||
|
enable = true;
|
||||||
|
general = {
|
||||||
|
output_format = "i3bar";
|
||||||
|
interval = 1;
|
||||||
|
colors = true;
|
||||||
|
color_separator = "#FFFFFF";
|
||||||
|
color_good = "#00FF00";
|
||||||
|
color_degraded = "#00FFFF";
|
||||||
|
color_bad = "#FF0000";
|
||||||
|
separator = "]["
|
||||||
|
};
|
||||||
|
modules = {
|
||||||
|
"time" = {
|
||||||
|
position = 1;
|
||||||
|
settings = {
|
||||||
|
format = "%Y %m/%d %a | %H:%M:%S";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"load" = {
|
||||||
|
position = 2;
|
||||||
|
settings = {
|
||||||
|
format = "LD %1min:%5min:%15min";
|
||||||
|
format_above_threshold = "LD H (%1min:%5min)";
|
||||||
|
max_threshold = "0.9";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"memory" = {
|
||||||
|
position = 3;
|
||||||
|
settings = {
|
||||||
|
memory_used_method = "classical";
|
||||||
|
decimals = "1";
|
||||||
|
unit = "Mi";
|
||||||
|
format = "%available (%used) / %total";
|
||||||
|
format = "Mem LOW (%available)"
|
||||||
|
threshold_degraded = "10%";
|
||||||
|
threshold_critical = "6.25%";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"disk /" = {
|
||||||
|
position = 4;
|
||||||
|
settings = {
|
||||||
|
prefix_type = "decimal";
|
||||||
|
format = "/ %percentage_used"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"volume master" = {
|
||||||
|
position = 5;
|
||||||
|
settings = {
|
||||||
|
format = "Vol: %volume";
|
||||||
|
format_muted = "Vol: Muted (%volume)";
|
||||||
|
device = "pulse:1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"wireless _first_" = {
|
||||||
|
position = 6;
|
||||||
|
settings = {
|
||||||
|
format_up = "W: (%quality @ %essid w/ %bitrate) %ip";
|
||||||
|
format_down = "W: down";
|
||||||
|
format_bitrate = "%g %cb/s";
|
||||||
|
format_quality = "%03d%s";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
@@ -17,6 +83,11 @@ in
|
|||||||
menu = MENU;
|
menu = MENU;
|
||||||
terminal = TERM;
|
terminal = TERM;
|
||||||
workspaceLayout = "tabbed";
|
workspaceLayout = "tabbed";
|
||||||
|
gamps = {
|
||||||
|
smartBorders = true;
|
||||||
|
smartGaps = true;
|
||||||
|
inner = 10;
|
||||||
|
};
|
||||||
modes = {
|
modes = {
|
||||||
resize = {
|
resize = {
|
||||||
"${UP}" = "resize shrink height 10 px or 10 ppt";
|
"${UP}" = "resize shrink height 10 px or 10 ppt";
|
||||||
@@ -76,5 +147,5 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
27
hosts/alanturing/default.nix
Normal file
27
hosts/alanturing/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../profiles/base.nix
|
||||||
|
../../profiles/desktop.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
tmux
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "alanturing";
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,22 +3,24 @@ let
|
|||||||
inherit (self) inputs;
|
inherit (self) inputs;
|
||||||
|
|
||||||
common-intel = inputs.nixos-hardware.nixosModules.common-cpu-intel;
|
common-intel = inputs.nixos-hardware.nixosModules.common-cpu-intel;
|
||||||
|
common-nvidia = inputs.nixos-hardware.nixosModules.common-gpu-nvidia-nonprime;
|
||||||
framework16 = inputs.nixos-hardware.nixosModules.framework-16-7040-amd;
|
framework16 = inputs.nixos-hardware.nixosModules.framework-16-7040-amd;
|
||||||
|
|
||||||
# mkHost - String -> Boolean -> Attr -> Attr - Create nixos system attributes
|
# mkHost - String -> Boolean -> [Attr] -> Attr - Create nixos system attribute set
|
||||||
# @param name - String - Name of the system
|
# @param name - String - Name of the system
|
||||||
# @param isDesktop - Boolean - If set true, adds xlibre overlays to modules
|
# @param useXLibre - Boolean - If set true, adds xlibre overlays to modules
|
||||||
# @param machine - Attr - Attribute from nixos-hardware nixos Module for setting machine's preset
|
# @param machine - [Attr] - Array of attribute sets from nixos-hardware nixos Module for setting machine's preset
|
||||||
mkHost = name: isDesktop: machine:
|
# @return - An attribute set that describes NixOS system configurations
|
||||||
|
|
||||||
|
mkHost = name: useXLibre: machine:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
./${name}
|
./${name}
|
||||||
../overlays
|
../overlays
|
||||||
machine
|
] ++ builtins.attrValues self.nixosModules ++ (if useXLibre then [
|
||||||
] ++ builtins.attrValues self.nixosModules ++ (if isDesktop then [
|
|
||||||
inputs.xlibre-overlay.nixosModules.overlay-xlibre-xserver
|
inputs.xlibre-overlay.nixosModules.overlay-xlibre-xserver
|
||||||
inputs.xlibre-overlay.nixosModules.overlay-all-xlibre-drivers
|
inputs.xlibre-overlay.nixosModules.overlay-all-xlibre-drivers
|
||||||
] else []);
|
] else []) ++ machine;
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
@@ -26,5 +28,7 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"virtual-bird" = mkHost "virtual-bird" true common-intel;
|
"virtual-bird" = mkHost "virtual-bird" true [ common-intel ];
|
||||||
|
"alanturing" = mkHost "alanturing" true [ common-intel common-nvidia ];
|
||||||
|
"waku" = mkHost "waku" true [ framework16 ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
networking.hostName = "virtual-bird";
|
networking.hostName = "virtual-bird";
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "25.11"; # Did you read the comment?
|
system.stateVersion = "25.11";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,18 +14,18 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/9705a174-c3ce-44f0-98eb-48d801e91cde";
|
{ device = "/dev/disk/by-label/NIXOS";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/3351-CE12";
|
{ device = "/dev/disk/by-label/EFI";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/2bf99498-58e9-429d-9636-115c8c06316a"; }
|
[ { device = "/dev/disk/by-label/SWAP"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
Reference in New Issue
Block a user