Compare commits
6 commits
5b7e15db62
...
0bbb0aa204
Author | SHA1 | Date | |
---|---|---|---|
0bbb0aa204 | |||
49298541e5 | |||
9379b9c61b | |||
8b6d55aad6 | |||
6ec141902a | |||
2de002ef1b |
53 changed files with 86 additions and 313 deletions
|
@ -11,33 +11,8 @@
|
||||||
./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 = {
|
||||||
|
@ -59,7 +34,6 @@
|
||||||
"/".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;
|
||||||
|
@ -71,27 +45,8 @@
|
||||||
|
|
||||||
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"
|
||||||
];
|
];
|
||||||
|
@ -106,43 +61,6 @@
|
||||||
|
|
||||||
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,12 +3,11 @@
|
||||||
./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
|
||||||
./stylix.nix
|
./themeing.nix
|
||||||
];
|
];
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
|
@ -14,6 +14,7 @@
|
||||||
foreground = "#ebdbb2";
|
foreground = "#ebdbb2";
|
||||||
frame_color = "#504945";
|
frame_color = "#504945";
|
||||||
frame_width = 2;
|
frame_width = 2;
|
||||||
|
font = "Atkinson Hyperlegible";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
|
@ -38,5 +38,17 @@
|
||||||
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -3,9 +3,10 @@
|
||||||
./shell
|
./shell
|
||||||
./desktop
|
./desktop
|
||||||
./hardware
|
./hardware
|
||||||
./firewall.nix
|
./de
|
||||||
./desktop-environment
|
./net
|
||||||
./input
|
./input
|
||||||
|
./media
|
||||||
./graphics.nix
|
./graphics.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,8 @@
|
||||||
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
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,69 +0,0 @@
|
||||||
{
|
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
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";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
17
modules/net/default.nix
Normal file
17
modules/net/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{...}: {
|
||||||
|
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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
27
modules/net/dispatchers/default.nix
Normal file
27
modules/net/dispatchers/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{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))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
24
modules/net/hosts.nix
Normal file
24
modules/net/hosts.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{...}: {
|
||||||
|
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,10 +1,4 @@
|
||||||
{
|
{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 (
|
||||||
|
@ -13,26 +7,6 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
# 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 = [
|
||||||
|
@ -56,37 +30,10 @@ 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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
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