diff options
author | sefidel <contact@sefidel.net> | 2021-12-31 21:36:32 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2021-12-31 21:42:28 +0900 |
commit | 4dae1769aaf420643f99685c420197239f6b8755 (patch) | |
tree | 0a177f703b12147950d6d1a5bb66a24d5ae05b5a | |
parent | 729d0b0dec6453bc69571c0e142e77170fa30fad (diff) | |
download | nixrc-4dae1769aaf420643f99685c420197239f6b8755.tar.gz nixrc-4dae1769aaf420643f99685c420197239f6b8755.zip |
*: fix minor designs
-rw-r--r-- | flake.lock | 57 | ||||
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | home/modules/profiles/base/config/sway.nix | 2 | ||||
-rw-r--r-- | home/modules/profiles/base/config/waybar-style.nix | 2 | ||||
-rw-r--r-- | home/modules/profiles/base/default.nix | 6 | ||||
-rw-r--r-- | nixos/configurations/alpha.nix | 60 | ||||
-rw-r--r-- | nixos/configurations/hardware/alpha.nix | 2 | ||||
-rw-r--r-- | packages/default.nix | 2 | ||||
-rw-r--r-- | packages/phocus/default.nix | 59 |
9 files changed, 167 insertions, 24 deletions
diff --git a/flake.lock b/flake.lock index c55eb21..9c8f491 100644 --- a/flake.lock +++ b/flake.lock @@ -69,11 +69,11 @@ }, "master": { "locked": { - "lastModified": 1640783455, - "narHash": "sha256-hkkRVYA1QXUbccq8sciQgSh/SUmj11rmOgYBrYLPb/E=", + "lastModified": 1640911924, + "narHash": "sha256-uAw4f/OEAeqVNr1QetSEuhurPR5GW7+0wG9pGhvPFnk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bacc31ff571ece62147f3ba70cb6d8d8f483a949", + "rev": "b826950a06fa8b9e539bfcc3637e939cfd3057fc", "type": "github" }, "original": { @@ -92,11 +92,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1640731457, - "narHash": "sha256-LbS/hubtWlTbc6cMrgoteWNwQ9BzYmMdeKuC03KLl4A=", + "lastModified": 1640899210, + "narHash": "sha256-11x2xVOrT0kUkTOfrkeWJGMJJ9EHVpSFsw4whoima4Y=", "owner": "neovim", "repo": "neovim", - "rev": "c46f7caad0bef587d189de2310435f48f9bd9ad8", + "rev": "991e872d800dbd983d57e4768734cefb13503ee7", "type": "github" }, "original": { @@ -106,13 +106,28 @@ "type": "github" } }, + "nix-colors": { + "locked": { + "lastModified": 1640790541, + "narHash": "sha256-9s8SYx3hpz/d1oHzbVBoUl4cgGIzOifSxx3+x9Gir24=", + "owner": "Misterio77", + "repo": "nix-colors", + "rev": "98e4275faa0f3a4b51bf14476be39947397a5ba0", + "type": "github" + }, + "original": { + "owner": "Misterio77", + "repo": "nix-colors", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1640642730, - "narHash": "sha256-+CEqjEird1aRaIlx4G1Cpc7XH+NVmy/mQvteiICsycU=", + "lastModified": 1640861606, + "narHash": "sha256-AQ+84X0wbu8TqijaVcfAgldnV8AIFkbzXlyILuqub8o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7efd936e4fbe267dbb3c1b572a4a381282ac2bac", + "rev": "c1792db42df222b0ec570bd774488f48aa0c91b1", "type": "github" }, "original": { @@ -145,13 +160,31 @@ "url": "https://git.sr.ht/~boppy/nixpkgs-extra" } }, + "phocus": { + "flake": false, + "locked": { + "lastModified": 1620191988, + "narHash": "sha256-jetVGSSMlzuR0WJD5ExEC71gNGK06QWY2wRFSyhDz80=", + "ref": "master", + "rev": "cd013dedeeb94cccc534d9e6e50249ef965707bc", + "revCount": 130, + "type": "git", + "url": "https://git.sr.ht/~boppy/phocus" + }, + "original": { + "type": "git", + "url": "https://git.sr.ht/~boppy/phocus" + } + }, "root": { "inputs": { "home-manager": "home-manager", "master": "master", "neovim": "neovim", + "nix-colors": "nix-colors", "nixpkgs": "nixpkgs", "nixpkgs-extra": "nixpkgs-extra", + "phocus": "phocus", "sops-nix": "sops-nix", "wallpapers": "wallpapers" } @@ -163,11 +196,11 @@ ] }, "locked": { - "lastModified": 1638821683, - "narHash": "sha256-oyqALhGijy2ZQxFSACrcC+Z8MzYLiomKCr9FQXVZ47U=", + "lastModified": 1640804118, + "narHash": "sha256-4qHIQbiFmb+qXKt0nOY09XO/KdSMTrlHdhRK7St4zzU=", "owner": "Mic92", "repo": "sops-nix", - "rev": "afe00100b16648c1d79e62926caacac561df93a5", + "rev": "1514ac9fd54363a24c513de43dd0b963e2d17cb7", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1abccf3..8e08556 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,7 @@ nixpkgs-extra.url = "git+https://git.sr.ht/~boppy/nixpkgs-extra?ref=main"; nixpkgs-extra.inputs.nixpkgs.follows = "nixpkgs"; + phocus = { url = "git+https://git.sr.ht/~boppy/phocus"; flake = false; }; wallpapers = { url = "git+https://git.sr.ht/~boppy/wall?ref=main"; flake = false; }; }; diff --git a/home/modules/profiles/base/config/sway.nix b/home/modules/profiles/base/config/sway.nix index bc8d42c..ead4bfe 100644 --- a/home/modules/profiles/base/config/sway.nix +++ b/home/modules/profiles/base/config/sway.nix @@ -14,7 +14,7 @@ # set terminal - set $term footclient + set $term foot bindsym $mod+Return exec $term # set menu diff --git a/home/modules/profiles/base/config/waybar-style.nix b/home/modules/profiles/base/config/waybar-style.nix index ae9041e..ccb88b2 100644 --- a/home/modules/profiles/base/config/waybar-style.nix +++ b/home/modules/profiles/base/config/waybar-style.nix @@ -13,7 +13,7 @@ } #workspaces button { - padding: 0 4px; + padding: 0 8px; background: #84a0c6; color: #18191f; border-bottom: 3px solid rgba (255, 255, 255, .2); diff --git a/home/modules/profiles/base/default.nix b/home/modules/profiles/base/default.nix index 20ddb77..96522ef 100644 --- a/home/modules/profiles/base/default.nix +++ b/home/modules/profiles/base/default.nix @@ -2,7 +2,7 @@ let cfg = config.profiles.base; - inherit (self.packages.x86_64-linux) neovim iosevka-pure-bin sf-mono-liga-bin wallpapers; + inherit (self.packages.x86_64-linux) neovim iosevka-pure-bin sf-mono-liga-bin phocus wallpapers; in { options.profiles.base.enable = lib.mkEnableOption @@ -18,6 +18,8 @@ in gtk.enable = true; gtk.iconTheme.package = pkgs.papirus-icon-theme; gtk.iconTheme.name = "Papirus-Dark"; + gtk.theme.package = phocus; + gtk.theme.name = "phocus"; home.keyboard.layout = "us"; home.packages = [ @@ -60,7 +62,7 @@ in foot = { enable = true; - server.enable = true; + settings = import ./config/foot.nix; }; diff --git a/nixos/configurations/alpha.nix b/nixos/configurations/alpha.nix index 1e84872..67a8416 100644 --- a/nixos/configurations/alpha.nix +++ b/nixos/configurations/alpha.nix @@ -3,16 +3,46 @@ { imports = []; - security.chromiumSuidSandbox.enable = true; + security = { + acme.acceptTerms = true; + protectKernelImage = true; + rtkit.enable = true; + chromiumSuidSandbox.enable = true; + sudo.wheelNeedsPassword = false; + }; boot.kernelPackages = pkgs.linuxPackages_xanmod; + boot.kernelParams = [ + "nmi_watchdog=0" + "systemd.watchdog-device/dev/watchdog" + ]; + boot.kernel.sysctl = { + "net.ipv4.conf.default.log_martians" = 1; + "net.ipv4.conf.all.log_martians" = 1; + "net.ipv4.tcp_mtu_probing" = 1; + "net.ipv4.tcp_syncookies" = 1; + "net.ipv4.tcp_congestion_control" = "bbr2"; + "net.ipv4.conf.default.rp_filter" = 1; + "net.ipv4.conf.all.rp_filter" = 1; + "net.ipv4.conf.all.accept_source_route" = 0; + "net.ipv4.conf.all.send_redirects" = 0; + "net.ipv4.conf.default.send_redirects" = 0; + "net.ipv4.conf.all.accept_redirects" = 0; + "net.ipv4.conf.default.accept_redirects" = 0; + "net.ipv4.conf.all.secure_redirects" = 0; + "net.ipv4.conf.default.secure_redirects" = 0; + "net.ipv6.conf.all.accept_source_route" = 0; + "net.ipv6.conf.all.accept_redirects" = 0; + "net.ipv6.conf.default.accept_redirects" = 0; + "net.ipv4.tcp_rfc1337" = 1; + }; # GRUB bootloader boot.loader.efi.canTouchEfiVariables = true; boot.loader.grub = { enable = true; version = 2; - efiSupport = true; + efiSupport = true; configurationLimit = 10; device = "nodev"; useOSProber = true; @@ -27,8 +57,6 @@ ''; }; - boot.plymouth.enable = true; - networking.networkmanager.enable = true; networking.useDHCP = false; networking.firewall.enable = true; @@ -46,9 +74,11 @@ services.openssh.enable = true; sound.enable = true; - hardware.pulseaudio = { + services.pipewire = { enable = true; - package = pkgs.pulseaudioFull; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; }; hardware.bluetooth.enable = true; @@ -56,9 +86,16 @@ services.greetd = { enable = true; - settings.default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; + settings.default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -c sway"; }; + # https://github.com/apognu/tuigreet/issues/17 + systemd.services.greetd.unitConfig.After = lib.mkOverride 0 [ "multi-user.target" ]; + + services.journald.extraConfig = lib.mkForce ""; + + systemd.extraConfig = "RebootWatchdogSec=5"; + programs = { sway = { enable = true; @@ -90,6 +127,15 @@ hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ]; + xdg.portal = { + enable = true; + gtkUsePortal = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-wlr + ]; + }; + virtualisation.libvirtd.enable = true; users.users = { diff --git a/nixos/configurations/hardware/alpha.nix b/nixos/configurations/hardware/alpha.nix index e8d3e17..409d7b1 100644 --- a/nixos/configurations/hardware/alpha.nix +++ b/nixos/configurations/hardware/alpha.nix @@ -15,7 +15,7 @@ in { boot.initrd.availableKernelModules = [ "xhci-pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ "kvm-amd" "tcp_bbr" ]; boot.extraModulePackages = [ ]; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/packages/default.nix b/packages/default.nix index d2f8dc9..dac720b 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,5 +1,6 @@ { self, neovim, ... } @ inputs: let + pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; extra = inputs.nixpkgs-extra.packages.x86_64-linux; in { @@ -8,5 +9,6 @@ in "iosevka-pure-bin" = extra.iosevka-pure-bin; "sf-mono-bin" = extra.sf-mono-bin; "sf-mono-liga-bin" = extra.sf-mono-liga-bin; + "phocus" = pkgs.callPackage ./phocus { src = inputs.phocus; }; "wallpapers" = inputs.wallpapers; } diff --git a/packages/phocus/default.nix b/packages/phocus/default.nix new file mode 100644 index 0000000..a1a9014 --- /dev/null +++ b/packages/phocus/default.nix @@ -0,0 +1,59 @@ +{ lib, stdenvNoCC, sass, src }: + +let + colors = { + base00 = "18191f"; + base01 = "17171b"; + base02 = "c9cdd7"; + base03 = "6b7089"; + base04 = "090a10"; + base05 = "c6c8d1"; + base06 = "d0d2db"; + base07 = "27282e"; + base08 = "e27878"; + base09 = "e2a478"; + base0A = "e9b189"; + base0B = "b4be82"; + base0C = "89b8c2"; + base0D = "84a0c6"; + base0E = "a093c7"; + base0F = "a0a0d3"; + }; +in +stdenvNoCC.mkDerivation rec { + pname = "phocus"; + version = "unstable-2021-05-05"; + + inherit src; + + patchPhase = with colors; '' + runHook prePatch + substituteInPlace scss/gtk-3.0/_colors.scss \ + --replace 16161c ${base01} \ + --replace 232530 ${base00} \ + --replace 2e303e ${base02} \ + --replace e95678 ${base08} \ + --replace f09383 ${base0A} \ + --replace fab795 ${base0A} \ + --replace 29d398 ${base0B} \ + --replace 1eb980 ${base0B} \ + --replace 26bbd9 ${base0D} \ + --replace ee64ae ${base0E} \ + --replace ec6a88 ${base08} \ + --replace fdf0ed ${base05} \ + --replace aabbcc ${base0B} \ + --replace ccbbaa ${base08} + runHook postPatch + ''; + + nativeBuildInputs = [ sass ]; + + installFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; + + meta = with lib; { + description = "phocus with nightlamp (iceberg variant) theme"; + homepage = "https://git.sr.ht/~boppy/phocus"; + license = [ licenses.mit ]; + maintainers = with maintainers; [ boppyt ]; + }; +} |