Compare commits
No commits in common. "0bbb0aa204bae158ae61b428673e2b5de14b27f2" and "5b7e15db6216f525151ec4b3fe905e1d4184f7f0" have entirely different histories.
0bbb0aa204
...
5b7e15db62
53 changed files with 313 additions and 86 deletions
|
@ -11,8 +11,33 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../common.nix
|
../../common.nix
|
||||||
../../modules
|
../../modules
|
||||||
|
#inputs.mms.module
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#nixpkgs = {
|
||||||
|
#overlays = [
|
||||||
|
#(self: super: {
|
||||||
|
#linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
|
||||||
|
#structuredExtraConfig = with lib.kernel; {
|
||||||
|
##"FB" = yes;
|
||||||
|
##"FRAMEBUFFER_CONSOLE" = yes;
|
||||||
|
##"VGA_CONSOLE" = yes;
|
||||||
|
##"VIDEO_SELECT" = yes;
|
||||||
|
#LOGO = lib.mkForce yes;
|
||||||
|
#LOGO_LINUX_CLUT224 = yes;
|
||||||
|
#};
|
||||||
|
#ignoreConfigErrors = true;
|
||||||
|
#});
|
||||||
|
#})
|
||||||
|
#];
|
||||||
|
#};
|
||||||
|
#boot.kernelPatches = [
|
||||||
|
#{
|
||||||
|
#name = "fomx";
|
||||||
|
#patch = ../other/0001-fomx.patch;
|
||||||
|
#}
|
||||||
|
#];
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||||
|
|
||||||
jade = {
|
jade = {
|
||||||
|
@ -34,6 +59,7 @@
|
||||||
"/".options = ["compress=zstd:3"];
|
"/".options = ["compress=zstd:3"];
|
||||||
"/home".options = ["compress=zstd:3"];
|
"/home".options = ["compress=zstd:3"];
|
||||||
"/nix".options = ["compress=zstd:3" "noatime"];
|
"/nix".options = ["compress=zstd:3" "noatime"];
|
||||||
|
#"/swap".options = [ "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
@ -45,8 +71,27 @@
|
||||||
|
|
||||||
networking.hostName = "potatobook-g";
|
networking.hostName = "potatobook-g";
|
||||||
|
|
||||||
|
services.autorandr = {
|
||||||
|
enable = true;
|
||||||
|
profiles = {
|
||||||
|
"default" = {
|
||||||
|
config = {
|
||||||
|
"eDP-1" = {
|
||||||
|
enable = true;
|
||||||
|
mode = "1920x1200";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# hardware.keyboard.uhk.enable = true;
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
android-tools
|
||||||
|
];
|
||||||
|
|
||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
"/share/nix-direnv"
|
"/share/nix-direnv"
|
||||||
];
|
];
|
||||||
|
@ -61,6 +106,43 @@
|
||||||
|
|
||||||
systemd.services."NetworkManager-wait-online".enable = false;
|
systemd.services."NetworkManager-wait-online".enable = false;
|
||||||
|
|
||||||
|
# services.pixiecore =
|
||||||
|
# let
|
||||||
|
# nixpkgs = builtins.getFlake "nixpkgs/nixos-unstable";
|
||||||
|
# sys = nixpkgs.lib.nixosSystem {
|
||||||
|
# system = "x86_64-linux";
|
||||||
|
# modules = [
|
||||||
|
# ({config, pkgs, lib, modulesPath, ...}: {
|
||||||
|
# imports = [
|
||||||
|
# (modulesPath + "/installer/netboot/netboot-base.nix")
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# services.getty.autologinUser = lib.mkForce "root";
|
||||||
|
# console.keyMap = "de";
|
||||||
|
|
||||||
|
# system.stateVersion = config.system.nixos.release;
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# helix nil git neofetch
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# programs = {
|
||||||
|
# zsh = {
|
||||||
|
# enable = true;
|
||||||
|
# enableCompletion = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# build = sys.config.system.build;
|
||||||
|
# in {
|
||||||
|
# enable = true;
|
||||||
|
# openFirewall = true;
|
||||||
|
# kernel = "${build.kernel}/bzImage";
|
||||||
|
# initrd = "${build.netbootRamdisk}/initrd";
|
||||||
|
# cmdLine = "init=${build.toplevel}/init loglevel=4";
|
||||||
|
# };
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
create-swapfile = {
|
create-swapfile = {
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
./shell
|
./shell
|
||||||
./desktop
|
./desktop
|
||||||
./hardware
|
./hardware
|
||||||
./de
|
./firewall.nix
|
||||||
./net
|
./desktop-environment
|
||||||
./input
|
./input
|
||||||
./media
|
|
||||||
./graphics.nix
|
./graphics.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
./audio.nix
|
./audio.nix
|
||||||
./eduroam.nix
|
./eduroam.nix
|
||||||
./home
|
./home
|
||||||
|
./media
|
||||||
./dm.nix
|
./dm.nix
|
||||||
./tlp.nix
|
./tlp.nix
|
||||||
./locale.nix
|
./locale.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./themeing.nix
|
./stylix.nix
|
||||||
];
|
];
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
|
@ -14,7 +14,6 @@
|
||||||
foreground = "#ebdbb2";
|
foreground = "#ebdbb2";
|
||||||
frame_color = "#504945";
|
frame_color = "#504945";
|
||||||
frame_width = 2;
|
frame_width = 2;
|
||||||
font = "Atkinson Hyperlegible";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
|
@ -38,17 +38,5 @@
|
||||||
dunst.enable = false;
|
dunst.enable = false;
|
||||||
wofi.enable = false;
|
wofi.enable = false;
|
||||||
};
|
};
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
cursorTheme = {
|
|
||||||
package = pkgs.phinger-cursors;
|
|
||||||
name = "phinger-cursors";
|
|
||||||
size = 30;
|
|
||||||
};
|
|
||||||
iconTheme = {
|
|
||||||
package = pkgs.gruvbox-dark-icons-gtk;
|
|
||||||
name = "gruvbox-dark-icons";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -7,8 +7,11 @@
|
||||||
with lib; {
|
with lib; {
|
||||||
imports = [
|
imports = [
|
||||||
./gaming.nix
|
./gaming.nix
|
||||||
|
# TODO: more fine grained choices, not every setup needs fspy or rawtherapee
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
|
./themeing.nix
|
||||||
|
./networking.nix
|
||||||
./social.nix
|
./social.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
69
modules/desktop/networking.nix
Normal file
69
modules/desktop/networking.nix
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
addNuShebang = path:
|
||||||
|
builtins.concatStringsSep "\n\n" [
|
||||||
|
"#!${pkgs.nushell}/bin/nu"
|
||||||
|
(builtins.readFile path)
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
config = {
|
||||||
|
networking = {
|
||||||
|
networkmanager = {
|
||||||
|
wifi.backend = "wpa_supplicant";
|
||||||
|
dispatcherScripts = [
|
||||||
|
{
|
||||||
|
type = "basic";
|
||||||
|
source = pkgs.writeText "dispatcher" (addNuShebang ../../other/scripts/dispatcher.nu);
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
hosts = {
|
||||||
|
"127.0.0.1" = [
|
||||||
|
"www.tiktok.com"
|
||||||
|
"www.twitter.com"
|
||||||
|
"www.instagram.com"
|
||||||
|
"www.facebook.com"
|
||||||
|
"www.snapchat.com"
|
||||||
|
|
||||||
|
"tiktok.com"
|
||||||
|
"twitter.com"
|
||||||
|
"instagram.com"
|
||||||
|
"facebook.com"
|
||||||
|
"snapchat.com"
|
||||||
|
|
||||||
|
"google-analytics.com"
|
||||||
|
"stats.g.doubleclick.net"
|
||||||
|
"googleadservices.com"
|
||||||
|
"googletagmanager.com"
|
||||||
|
"googletagservices.com"
|
||||||
|
"googlesyndication.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.etc = with builtins; (
|
||||||
|
listToAttrs (
|
||||||
|
map (v: {
|
||||||
|
name = "networkhooks/${v}";
|
||||||
|
value = {
|
||||||
|
text = addNuShebang ../../other/scripts/networkhooks/${v};
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(attrNames (readDir ../../other/scripts/networkhooks))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
systemd.services."NetworkManager-wait-online".enable = false;
|
||||||
|
services.mullvad-vpn.enable = true;
|
||||||
|
home-manager.users.jade = {pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
networkmanagerapplet
|
||||||
|
mullvad-vpn
|
||||||
|
macchanger
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
45
modules/desktop/themeing.nix
Normal file
45
modules/desktop/themeing.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = {
|
||||||
|
# fonts.packages = with pkgs; [
|
||||||
|
# atkinson-hyperlegible
|
||||||
|
# ];
|
||||||
|
home-manager.users.jade = {pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# gtk-engine-murrine
|
||||||
|
# gruvbox-dark-gtk
|
||||||
|
gruvbox-dark-icons-gtk
|
||||||
|
];
|
||||||
|
gtk = {
|
||||||
|
# enable = true;
|
||||||
|
cursorTheme = {
|
||||||
|
package = pkgs.phinger-cursors;
|
||||||
|
name = "phinger-cursors";
|
||||||
|
size = 30;
|
||||||
|
};
|
||||||
|
# font = {
|
||||||
|
# package = pkgs.atkinson-hyperlegible;
|
||||||
|
# name = "Atkinson Hyperlegible";
|
||||||
|
# size = 11.5;
|
||||||
|
# };
|
||||||
|
iconTheme = {
|
||||||
|
package = pkgs.gruvbox-dark-icons-gtk;
|
||||||
|
name = "gruvbox-dark-icons";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# theme = {
|
||||||
|
# package = pkgs.gruvbox-dark-gtk;
|
||||||
|
# name = "gruvbox-dark";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# qt = {
|
||||||
|
# enable = true;
|
||||||
|
# platformTheme.name = "gtk";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./firewall.nix
|
|
||||||
./hosts.nix
|
|
||||||
./dispatchers
|
|
||||||
];
|
|
||||||
networking.networkmanager.wifi.backend = "wpa_supplicant";
|
|
||||||
systemd.services."NetworkManager-wait-online".enable = false;
|
|
||||||
services.mullvad-vpn.enable = true;
|
|
||||||
home-manager.users.jade = {pkgs, ...}: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
networkmanagerapplet
|
|
||||||
mullvad-vpn
|
|
||||||
macchanger
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
{pkgs, ...}: let
|
|
||||||
addNuShebang = path:
|
|
||||||
builtins.concatStringsSep "\n\n" [
|
|
||||||
"#!${pkgs.nushell}/bin/nu"
|
|
||||||
(builtins.readFile path)
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
networking.networkmanager.dispatcherScripts = [
|
|
||||||
{
|
|
||||||
type = "basic";
|
|
||||||
source = pkgs.writeText "dispatcher" (addNuShebang ./dispatcher.nu);
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.etc = with builtins; (
|
|
||||||
listToAttrs (
|
|
||||||
map (v: {
|
|
||||||
name = "networkhooks/${v}";
|
|
||||||
value = {
|
|
||||||
text = addNuShebang ./hooks/${v};
|
|
||||||
mode = "0755";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(attrNames (readDir ./hooks))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
{...}: {
|
|
||||||
networking.hosts = {
|
|
||||||
"127.0.0.1" = [
|
|
||||||
"www.tiktok.com"
|
|
||||||
"www.twitter.com"
|
|
||||||
"www.instagram.com"
|
|
||||||
"www.facebook.com"
|
|
||||||
"www.snapchat.com"
|
|
||||||
|
|
||||||
"tiktok.com"
|
|
||||||
"twitter.com"
|
|
||||||
"instagram.com"
|
|
||||||
"facebook.com"
|
|
||||||
"snapchat.com"
|
|
||||||
|
|
||||||
"google-analytics.com"
|
|
||||||
"stats.g.doubleclick.net"
|
|
||||||
"googleadservices.com"
|
|
||||||
"googletagmanager.com"
|
|
||||||
"googletagservices.com"
|
|
||||||
"googlesyndication.com"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +1,10 @@
|
||||||
{config, ...}: let
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
# generate shell command options for kmscon fom an attrset
|
||||||
generateOptions = with builtins; (
|
generateOptions = with builtins; (
|
||||||
opts:
|
opts:
|
||||||
toString (
|
toString (
|
||||||
|
@ -7,6 +13,26 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
# generate a hexadecimal number lookup table to get integers from them
|
||||||
|
hexLookupTable = with lib; (listToAttrs (genList (i: {
|
||||||
|
name = let
|
||||||
|
r = toHexString i;
|
||||||
|
in (
|
||||||
|
# pad with 0 in front if only 1 digit
|
||||||
|
if (stringLength r) == 1
|
||||||
|
then "0${r}"
|
||||||
|
else r
|
||||||
|
);
|
||||||
|
value = toString i;
|
||||||
|
})
|
||||||
|
256));
|
||||||
|
# "parse" hex color strings and convert them to kmscon options
|
||||||
|
hexToOpt = with lib; (color:
|
||||||
|
concatStringsSep "," [
|
||||||
|
(getAttr (substring 1 2 (toUpper color)) hexLookupTable)
|
||||||
|
(getAttr (substring 3 2 (toUpper color)) hexLookupTable)
|
||||||
|
(getAttr (substring 5 2 (toUpper color)) hexLookupTable)
|
||||||
|
]);
|
||||||
in {
|
in {
|
||||||
# TODO: global colorscheme vars for everything
|
# TODO: global colorscheme vars for everything
|
||||||
console.colors = [
|
console.colors = [
|
||||||
|
@ -30,10 +56,37 @@ in {
|
||||||
|
|
||||||
services.kmscon = {
|
services.kmscon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# fonts = [
|
||||||
|
# {
|
||||||
|
# name = "Departure Mono Nerd Font";
|
||||||
|
# package = pkgs.nerd-fonts.departure-mono;
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
extraConfig = "font-size=14";
|
extraConfig = "font-size=14";
|
||||||
|
# extraOptions = "--term xterm-256color";
|
||||||
extraOptions = generateOptions {
|
extraOptions = generateOptions {
|
||||||
xkb-layout = config.services.xserver.xkb.layout;
|
xkb-layout = config.services.xserver.xkb.layout;
|
||||||
xkb-variant = config.services.xserver.xkb.variant;
|
xkb-variant = config.services.xserver.xkb.variant;
|
||||||
|
|
||||||
|
# palette = "custom";
|
||||||
|
# palette-foreground = hexToOpt "#ebdbb2";
|
||||||
|
# palette-background = hexToOpt "#282828";
|
||||||
|
# palette-black = hexToOpt "#282828";
|
||||||
|
# palette-red = hexToOpt "#cc241d";
|
||||||
|
# palette-green = hexToOpt "#98971a";
|
||||||
|
# palette-yellow = hexToOpt "#d79921";
|
||||||
|
# palette-blue = hexToOpt "#458588";
|
||||||
|
# palette-magenta = hexToOpt "#b16286";
|
||||||
|
# palette-cyan = hexToOpt "#689d6a";
|
||||||
|
# palette-light-grey = hexToOpt "#a89984";
|
||||||
|
# palette-dark-grey = hexToOpt "#928374";
|
||||||
|
# palette-light-red = hexToOpt "#fb4934";
|
||||||
|
# palette-light-green = hexToOpt "#b8bb26";
|
||||||
|
# palette-light-yellow = hexToOpt "#fabd2f";
|
||||||
|
# palette-light-blue = hexToOpt "#83a598";
|
||||||
|
# palette-light-magenta = hexToOpt "#d3869b";
|
||||||
|
# palette-light-cyan = hexToOpt "#8ec07c";
|
||||||
|
# palette-white = hexToOpt "#ebdbb2";
|
||||||
};
|
};
|
||||||
hwRender = true;
|
hwRender = true;
|
||||||
};
|
};
|
||||||
|
|
56
modules/utils.nix
Normal file
56
modules/utils.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
}: rec {
|
||||||
|
# taken from https://github.com/NixOS/nixpkgs/blob/3650808d85dccbfa3be3d785dfd3ce33a757bd2c/pkgs/build-support/trivial-builders/default.nix#L335
|
||||||
|
writeNuShellApplication = {
|
||||||
|
name,
|
||||||
|
text,
|
||||||
|
runtimeInputs ? [],
|
||||||
|
meta ? {},
|
||||||
|
checkPhase ? null,
|
||||||
|
}:
|
||||||
|
writeTextFile {
|
||||||
|
inherit name meta;
|
||||||
|
executable = true;
|
||||||
|
destination = "/bin/${name}";
|
||||||
|
allowSubstitutes = true;
|
||||||
|
preferLocalBuild = false;
|
||||||
|
text =
|
||||||
|
''
|
||||||
|
#!${pkgs.nushell}
|
||||||
|
''
|
||||||
|
+ lib.optionalString (runtimeInputs != []) ''
|
||||||
|
|
||||||
|
$env.PATH = ($env.PATH | split row (char esep) | prepend '${lib.makeBinPath runtimeInputs}');
|
||||||
|
''
|
||||||
|
+ ''
|
||||||
|
|
||||||
|
${text}
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase =
|
||||||
|
# GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)
|
||||||
|
# but we still want to use writeShellApplication on those platforms
|
||||||
|
if checkPhase == null
|
||||||
|
then ''
|
||||||
|
runHook preCheck
|
||||||
|
|
||||||
|
nu -c "nu-check -d $target"
|
||||||
|
|
||||||
|
runHook postCheck
|
||||||
|
''
|
||||||
|
else checkPhase;
|
||||||
|
};
|
||||||
|
packageNushellApplication = {
|
||||||
|
name,
|
||||||
|
path,
|
||||||
|
runtimeInputs ? [],
|
||||||
|
meta ? {},
|
||||||
|
checkPhase ? null,
|
||||||
|
}:
|
||||||
|
writeNuShellApplication {
|
||||||
|
inherit name runtimeInputs meta checkPhase;
|
||||||
|
text = builtins.readFile path;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue