summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-11-21 19:06:34 -0500
committerAndrew Opalach <andrew@akon.city> 2024-11-21 19:06:34 -0500
commiteab31736ccca20ae095e6914f776f0780f82dde6 (patch)
tree0f6af7ac7a3d1a40e863e10473b0c4758e748429
parent074a3eda14a4cf2032c114e061b45166a17fcfbb (diff)
downloaddotfiles-eab31736ccca20ae095e6914f776f0780f82dde6.tar.gz
dotfiles-eab31736ccca20ae095e6914f776f0780f82dde6.tar.bz2
dotfiles-eab31736ccca20ae095e6914f776f0780f82dde6.zip
Switch to bash, misc
-rw-r--r--files/dtb/bcm2710-rpi-3-b.dtb_latestbin33367 -> 0 bytes
-rw-r--r--files/dtb/bcm2837-rpi-3-b.dtbbin32142 -> 0 bytes
-rw-r--r--files/dtb/bcm2837-rpi-3-b.dtb_mergedbin32482 -> 0 bytes
-rw-r--r--files/dtb/justboom-digi-overlay.dts41
-rw-r--r--files/nvim/init.vim2
-rw-r--r--flake.lock48
-rw-r--r--flake.nix138
-rw-r--r--hosts/moyo/container.nix53
-rw-r--r--hosts/sofue/configuration.nix27
-rw-r--r--hosts/yashinoki/configuration.nix55
-rw-r--r--hosts/yashinoki/hardware-configuration.nix3
-rw-r--r--nix/programs/bash.nix58
-rw-r--r--nix/programs/foot.nix2
-rw-r--r--nix/programs/kitty.nix9
-rw-r--r--nix/programs/nvim.nix2
-rw-r--r--nix/programs/sway.nix1
-rw-r--r--nix/programs/zsh.nix9
-rw-r--r--nix/system.nix18
-rw-r--r--nix/user.nix5
-rw-r--r--nix/utils.nix4
-rw-r--r--nix/virtualisation.nix10
-rw-r--r--nix/x86.nix3
22 files changed, 254 insertions, 234 deletions
diff --git a/files/dtb/bcm2710-rpi-3-b.dtb_latest b/files/dtb/bcm2710-rpi-3-b.dtb_latest
deleted file mode 100644
index 5846b9f..0000000
--- a/files/dtb/bcm2710-rpi-3-b.dtb_latest
+++ /dev/null
Binary files differ
diff --git a/files/dtb/bcm2837-rpi-3-b.dtb b/files/dtb/bcm2837-rpi-3-b.dtb
deleted file mode 100644
index 6240703..0000000
--- a/files/dtb/bcm2837-rpi-3-b.dtb
+++ /dev/null
Binary files differ
diff --git a/files/dtb/bcm2837-rpi-3-b.dtb_merged b/files/dtb/bcm2837-rpi-3-b.dtb_merged
deleted file mode 100644
index d7c5385..0000000
--- a/files/dtb/bcm2837-rpi-3-b.dtb_merged
+++ /dev/null
Binary files differ
diff --git a/files/dtb/justboom-digi-overlay.dts b/files/dtb/justboom-digi-overlay.dts
deleted file mode 100644
index c4c9682..0000000
--- a/files/dtb/justboom-digi-overlay.dts
+++ /dev/null
@@ -1,41 +0,0 @@
-// Definitions for JustBoom Digi
-/dts-v1/;
-/plugin/;
-
-/ {
- compatible = "brcm,bcm2835";
-
- fragment@0 {
- target = <&i2s_clk_consumer>;
- __overlay__ {
- status = "okay";
- };
- };
-
- fragment@1 {
- target = <&i2c1>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- status = "okay";
-
- wm8804@3b {
- #sound-dai-cells = <0>;
- compatible = "wlf,wm8804";
- reg = <0x3b>;
- PVDD-supply = <&vdd_3v3_reg>;
- DVDD-supply = <&vdd_3v3_reg>;
- status = "okay";
- };
- };
- };
-
- fragment@2 {
- target = <&sound>;
- __overlay__ {
- compatible = "justboom,justboom-digi";
- i2s-controller = <&i2s_clk_consumer>;
- status = "okay";
- };
- };
-};
diff --git a/files/nvim/init.vim b/files/nvim/init.vim
index 51ddbe4..70ba94d 100644
--- a/files/nvim/init.vim
+++ b/files/nvim/init.vim
@@ -236,6 +236,8 @@ vim.keymap.set('n', 'K', '<nop>', { silent = true })
vim.keymap.set('n', 'L', '<nop>', { silent = true })
-- Normal mode tab no-op.
vim.keymap.set('n', '<Tab>', '<nop>', { silent = true })
+-- Disable F1 for help.
+vim.keymap.set('n', '<F1>', '<nop>', { silent = true })
-- Disable q: for histroy.
vim.keymap.set('n', 'q:', '<nop>', { silent = true })
-- Simplify split movement.
diff --git a/flake.lock b/flake.lock
index a7a8437..5b68a9b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -10,11 +10,11 @@
]
},
"locked": {
- "lastModified": 1731866540,
- "narHash": "sha256-wAz/S5GLm+9Vp0kmUPsva3Mxp+VUnbEUZ8aBM1aEhhY=",
+ "lastModified": 1732150710,
+ "narHash": "sha256-H6ps/jlPn3kkGtrZeduLtfMnV8htI117/qUgMtUzJBM=",
"owner": "chaotic-cx",
"repo": "nyx",
- "rev": "0857914b69d90ba758e614298452636c6fdc9c7c",
+ "rev": "4621aec08aa50869a305e275c2b8a0c766f3b59b",
"type": "github"
},
"original": {
@@ -119,11 +119,11 @@
]
},
"locked": {
- "lastModified": 1731535640,
- "narHash": "sha256-2EckCJn4wxran/TsRiCOFcmVpep2m9EBKl99NBh2GnM=",
+ "lastModified": 1732025103,
+ "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "35b055009afd0107b69c286fca34d2ad98940d57",
+ "rev": "a46e702093a5c46e192243edbd977d5749e7f294",
"type": "github"
},
"original": {
@@ -139,11 +139,11 @@
]
},
"locked": {
- "lastModified": 1731887066,
- "narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=",
+ "lastModified": 1732025103,
+ "narHash": "sha256-qjEI64RKvDxRyEarY0jTzrZMa8ebezh2DEZmJJrpVdo=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a",
+ "rev": "a46e702093a5c46e192243edbd977d5749e7f294",
"type": "github"
},
"original": {
@@ -161,11 +161,11 @@
]
},
"locked": {
- "lastModified": 1731227601,
- "narHash": "sha256-aGUQ6W/Oxd9xjH9RQbnUtC61sTK2fWlKr+J7kavT/RQ=",
+ "lastModified": 1732032028,
+ "narHash": "sha256-NjyfJQQxs/a2a/KwTmXM44K7XjeJwGsf4YFtebueQzo=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
- "rev": "7691d0ac1deb6ac7482c5a22fe1a14a34ca608b0",
+ "rev": "65dc04371cf914c9af4f073638821e4787303005",
"type": "github"
},
"original": {
@@ -265,11 +265,11 @@
]
},
"locked": {
- "lastModified": 1729742964,
- "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
+ "lastModified": 1731952509,
+ "narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=",
"owner": "nix-community",
"repo": "nix-github-actions",
- "rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
+ "rev": "7b5f051df789b6b20d259924d349a9ba3319b226",
"type": "github"
},
"original": {
@@ -318,11 +318,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1731676054,
- "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
+ "lastModified": 1732014248,
+ "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
+ "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
@@ -357,11 +357,11 @@
]
},
"locked": {
- "lastModified": 1731878857,
- "narHash": "sha256-5Bg6+R6PdBSakjnuqEHrTVIPZ4PjMjHmcSBBieF2kPA=",
+ "lastModified": 1732202815,
+ "narHash": "sha256-AHyi0SUuCkhRM1ZOB6ylp8T1f9SuRtwuyRaRgeoK9xs=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
- "rev": "82cf2241ee012ff5157d72ac055db9cdc67c410b",
+ "rev": "8443e425803e753f54cfab41754cd648e39b2110",
"type": "github"
},
"original": {
@@ -388,11 +388,11 @@
},
"nur": {
"locked": {
- "lastModified": 1731891354,
- "narHash": "sha256-693/EYlG9GQK4G4HmM2/vJSnjtf1FkOnAxGMpQUf7rw=",
+ "lastModified": 1732200980,
+ "narHash": "sha256-I7iT9Pvfvwdn/HwduB0iypeZ0ZLe2S7ISeoOVu5MuWE=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "9c9b53b1e00af6fa1297e2bf3d757f2589624116",
+ "rev": "6b4e7eb30278bbf9fda14859347035fe3fc45eea",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 9bcb27f..fe0bbfb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -44,6 +44,11 @@
cp files/fonts/* $out/share/fonts/local
'';
};
+ optimizeWithFlags = (pkg: flags:
+ pkg.overrideAttrs (oldAttrs: {
+ env.NIX_CFLAGS_COMPILE = (oldAttrs.env.NIX_CFLAGS_COMPILE or "") + " ${flags}";
+ })
+ );
in {
settingsModule = { config, lib, pkgs, ... }:
with lib;
@@ -131,72 +136,71 @@
system = system;
modules = [
self.settingsModule
- ({ pkgs, config, ... }: {
- nixpkgs.overlays = [
- nur.overlay
- nixpkgs-wayland.overlay
- (self: super: { local-fonts = pkgs.stdenv.mkDerivation local-fonts; })
- (self: super: { mauri = mauri.packages.${system}.default.overrideAttrs (old: {});})
- (self: super: { umu = umu.packages.${pkgs.system}.umu.override { version = "${umu.shortRev}"; }; })
- (self: super: {
- mpv-unwrapped = super.mpv-unwrapped.override { cddaSupport = true; };
- })
- (self: super: {
- sway-unwrapped = super.sway-unwrapped.overrideAttrs (old: {
- patches = old.patches ++ [
- ./files/sway_background_covered.diff
- ];
- });
- })
- (self: super: {
- kitty = super.kitty.overrideAttrs (old: {
- patches = old.patches ++ [];
- });
- })
- (self: super: {
- vimPlugins = super.vimPlugins.extend (final: prev: {
- mini-nvim = prev.mini-nvim.overrideAttrs (old: {
- patches = [
- ./files/nvim/mini_starter_picture.diff
- ];
- });
- fzf-vim = prev.fzf-vim.overrideAttrs (old: {
- patches = [
- ./files/nvim/fzf_no_linenum.diff
- ];
- });
- });
- })
- (self: super: {
- hollywood = super.hollywood.overrideAttrs (old: {
+ ({ ... }: { nixpkgs.overlays = [
+ nur.overlay
+ nixpkgs-wayland.overlay
+ (self: super: { local-fonts = super.stdenv.mkDerivation local-fonts; })
+ (self: super: { mauri = mauri.packages.${system}.default.overrideAttrs (old: {});})
+ (self: super: { umu = umu.packages.${super.system}.umu.override { version = "${umu.shortRev}"; }; })
+ (self: super: {
+ mpv-unwrapped = super.mpv-unwrapped.override { cddaSupport = true; };
+ })
+ (self: super: {
+ kitty = (optimizeWithFlags super.kitty "-O2 -march=znver2 -mtune=znver2 -fno-semantic-interposition -flto");
+ })
+ (self: super: {
+ neovim-unwrapped = (optimizeWithFlags super.neovim-unwrapped "-O2 -march=znver2 -mtune=znver2 -fno-semantic-interposition -flto");
+ })
+ (self: super: {
+ sway-unwrapped = super.sway-unwrapped.overrideAttrs (old: {
+ patches = old.patches ++ [
+ ./files/sway_background_covered.diff
+ ];
+ });
+ })
+ (self: super: {
+ kitty = super.kitty.overrideAttrs (old: {
+ patches = old.patches ++ [];
+ });
+ })
+ (self: super: {
+ vimPlugins = super.vimPlugins.extend (final: prev: {
+ mini-nvim = prev.mini-nvim.overrideAttrs (old: {
patches = [
- ./files/hollywood_uptodate.diff
+ ./files/nvim/mini_starter_picture.diff
];
});
- })
-# (self: super: {
-# ryujinx = super.ryujinx.overrideAttrs (old: {
-# doCheck = false;
-# });
-# })
- (self: super: {
- dia = super.dia.overrideAttrs (old: {
- nativeBuildInputs = with pkgs; [
- gobject-introspection
- python3.pkgs.wrapPython
- ] ++ old.nativeBuildInputs;
- pythonPath = with pkgs.python3.pkgs; [
- pygobject3
+ fzf-vim = prev.fzf-vim.overrideAttrs (old: {
+ patches = [
+ ./files/nvim/fzf_no_linenum.diff
];
- # https://github.com/NixOS/nixpkgs/pull/273060/files#diff-b78e5b1234a71c390023923ab5e62fc67b8e7d4371bc6687b7c7de4f392d1facR56
- postFixup = ''
- buildPythonPath "$pythonPath"
- patchPythonScript $out/share/dia/python/scascale.py
- '';
});
- })
- ];
- })
+ });
+ })
+ (self: super: {
+ hollywood = super.hollywood.overrideAttrs (old: {
+ patches = [
+ ./files/hollywood_uptodate.diff
+ ];
+ });
+ })
+ (self: super: {
+ dia = super.dia.overrideAttrs (old: {
+ nativeBuildInputs = with super; [
+ gobject-introspection
+ python3.pkgs.wrapPython
+ ] ++ old.nativeBuildInputs;
+ pythonPath = with super.python3.pkgs; [
+ pygobject3
+ ];
+ # https://github.com/NixOS/nixpkgs/pull/273060/files#diff-b78e5b1234a71c390023923ab5e62fc67b8e7d4371bc6687b7c7de4f392d1facR56
+ postFixup = ''
+ buildPythonPath "$pythonPath"
+ patchPythonScript $out/share/dia/python/scascale.py
+ '';
+ });
+ })
+ ];})
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@@ -218,13 +222,13 @@
};
nixosSystem = import (nixpkgs-patched + "/nixos/lib/eval-config.nix");
in nixosSystem {
- system = "x86_64-linux";
+ system = system;
modules = [
self.settingsModule
- ({ pkgs, ... }: { nixpkgs.overlays = [
+ ({ ... }: { nixpkgs.overlays = [
nur.overlay
nixpkgs-wayland.overlay
- (self: super: { local-fonts = pkgs.stdenv.mkDerivation local-fonts; })
+ (self: super: { local-fonts = super.stdenv.mkDerivation local-fonts; })
(self: super: {
sway-unwrapped = super.sway-unwrapped.overrideAttrs (old: {
patches = old.patches ++ [];
@@ -269,9 +273,11 @@
};
nixosSystem = import (nixpkgs-patched + "/nixos/lib/eval-config.nix");
in nixosSystem {
- system = "x86_64-linux";
+ system = system;
modules = [
- ({ pkgs, ... }: { nixpkgs.overlays = [ ];})
+ ({ ... }: { nixpkgs.overlays = [
+ (self: super: { jdk23 = (optimizeWithFlags super.jdk23 "-O2 -march=znver2 -mtune=znver2 -fno-semantic-interposition -flto"); })
+ ]; })
./hosts/moyo/container.nix
];
};
diff --git a/hosts/moyo/container.nix b/hosts/moyo/container.nix
index d4e503b..d3483b5 100644
--- a/hosts/moyo/container.nix
+++ b/hosts/moyo/container.nix
@@ -1,23 +1,11 @@
-{ config, lib, pkgs, modulesPath, ... }:
-let
- inherit (import ../../nix/utils.nix) disks;
-in {
+{ config, lib, pkgs, modulesPath, ... }: {
imports = [
"${modulesPath}/virtualisation/lxc-container.nix"
../../nix/system.nix
];
- system.stateVersion = "24.05";
-
boot.isContainer = true;
- nix.settings.system-features = [ "gccarch-znver1" ];
-# nixpkgs.hostPlatform = {
-# gcc.arch = "znver1";
-# gcc.tune = "znver1";
-# system = "x86_64-linux";
-# };
-
users.users.andrew = {
isNormalUser = true;
uid = 1000;
@@ -25,10 +13,17 @@ in {
};
nix.settings.trusted-users = [ "andrew" ];
+ nix.settings.system-features = [ "gccarch-znver1" ];
+ nixpkgs.hostPlatform = {
+ #gcc.arch = "znver1";
+ #gcc.tune = "znver1";
+ system = "x86_64-linux";
+ };
+
networking = {
hostName = "the-p";
- dhcpcd.enable = false;
useDHCP = false;
+ dhcpcd.enable = false;
useHostResolvConf = false;
wireless.enable = false;
firewall = {
@@ -50,22 +45,30 @@ in {
};
};
- environment.shellAliases = {
- vi = "nvim";
- top = "htop";
- };
-
- programs.zsh.enable = true;
- environment.shells = [ pkgs.zsh ];
- environment.pathsToLink = [ "/share/zsh" ];
- users.defaultUserShell = pkgs.zsh;
+ users.defaultUserShell = pkgs.bashInteractive;
environment.systemPackages = with pkgs; [
kitty.terminfo
- neovim
screen
htop
- jdk17
+ ((vim-full.override {
+ features = "small";
+ guiSupport = "off";
+ luaSupport = false;
+ pythonSupport = false;
+ rubySupport = false;
+ cscopeSupport = false;
+ netbeansSupport = false;
+ ximSupport = false;
+ ftNixSupport = false;
+ sodiumSupport = false;
+ }).customize {
+ name = "vi";
+ vimrcConfig = { customRC = ""; };
+ })
+ jdk23
#graalvm-oracle
];
+
+ system.stateVersion = "25.05";
}
diff --git a/hosts/sofue/configuration.nix b/hosts/sofue/configuration.nix
index b80b8ac..2765eef 100644
--- a/hosts/sofue/configuration.nix
+++ b/hosts/sofue/configuration.nix
@@ -6,15 +6,17 @@ in rec {
imports = [
"${modulesPath}/virtualisation/lxc-container.nix"
../../nix/system.nix
+ ../../nix/x86.nix
../../nix/user.nix
- ../../nix/scripts.nix
../../nix/audio.nix
../../nix/bluetooth.nix
../../nix/email.nix
- ../../nix/gaming.nix
../../nix/amdgpu.nix
../../nix/mesa_git.nix
- ../../nix/programs/zsh.nix
+ ../../nix/gaming.nix
+ ../../nix/virtualisation.nix
+ ../../nix/scripts.nix
+ ../../nix/programs/bash.nix
../../nix/programs/nvim.nix
../../nix/programs/sway.nix
../../nix/programs/kitty.nix
@@ -64,18 +66,25 @@ in rec {
boot.isContainer = true;
nix.settings.system-features = [ "gccarch-znver2" ];
-# nixpkgs.hostPlatform = {
-# gcc.arch = "znver2";
-# gcc.tune = "znver2";
-# system = "x86_64-linux";
-# };
+ nixpkgs.hostPlatform = {
+ #gcc.arch = "znver2";
+ #gcc.tune = "znver2";
+ system = "x86_64-linux";
+ };
+
+ boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
+ # Only needed in containers.
+ fileSystems."/proc/sys/fs/binfmt_misc" = {
+ device = "binfmt_misc";
+ fsType = "binfmt_misc";
+ };
networking = {
hostName = "sofue";
+ wireless.enable = false;
dhcpcd.enable = false;
useDHCP = false;
useHostResolvConf = false;
- wireless.enable = false;
firewall.enable = false;
extraHosts = ''
192.168.1.192 iroha
diff --git a/hosts/yashinoki/configuration.nix b/hosts/yashinoki/configuration.nix
index 8df933e..c7a30b0 100644
--- a/hosts/yashinoki/configuration.nix
+++ b/hosts/yashinoki/configuration.nix
@@ -5,14 +5,15 @@ let
in {
imports = [
./hardware-configuration.nix
- ../../nix/scripts.nix
../../nix/user.nix
../../nix/system.nix
../../nix/audio.nix
../../nix/bluetooth.nix
../../nix/email.nix
../../nix/intel.nix
- ../../nix/programs/zsh.nix
+ ../../nix/virtualisation.nix
+ ../../nix/scripts.nix
+ ../../nix/programs/bash.nix
../../nix/programs/nvim.nix
../../nix/programs/sway.nix
../../nix/programs/kitty.nix
@@ -56,11 +57,12 @@ in {
};
nix.settings.system-features = [ "gccarch-skylake" ];
-# nixpkgs.hostPlatform = {
-# gcc.arch = "skylake";
-# gcc.tune = "skylake";
-# system = "x86_64-linux";
-# };
+ nixpkgs.hostPlatform = {
+ #gcc.arch = "skylake";
+ #gcc.tune = "skylake";
+ system = "x86_64-linux";
+ };
+ boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = [ ];
@@ -96,17 +98,19 @@ in {
networking = {
hostName = "yashinoki";
- useNetworkd = true;
- wireless = {
+ nameservers = [
+ "9.9.9.9"
+ "149.112.112.112"
+ "1.1.1.1"
+ "1.0.0.1"
+ ];
+ useDHCP = false;
+ dhcpcd.enable = false;
+ networkmanager = {
enable = true;
- userControlled.enable = true;
- fallbackToWPA2 = false;
- networks."Verizon_TMKS9N" = {
- pskRaw = "794b2c76b39a7f83d08e028e20fb980cef890424ae0b69acdf2e37c590a9fb6a";
- authProtocols = [ "WPA-PSK" "WPA-EAP" "FT-PSK" "FT-EAP" ];
- };
+ dns = "none";
+ wifi.powersave = true;
};
- nameservers = [ "9.9.9.9" "149.112.112.112" ];
firewall = {
enable = true;
allowedTCPPorts = [];
@@ -119,24 +123,7 @@ in {
173.62.191.72 boomerang
'';
};
- systemd.network = {
- enable = true;
- networks."wlp3s0" = {
- enable = true;
- name = "wlp3s0";
- dhcpV6Config.UseDNS = false;
- dhcpV4Config.UseDNS = false;
- };
- };
- services.resolved = {
- enable = true;
- dnssec = "true";
- domains = [ "~." ];
- fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
- extraConfig = ''
- DNSOverTLS=yes
- '';
- };
+ users.users.andrew.extraGroups = [ "networkmanager" ];
fileSystems."/home/andrew/c" = {
device = "192.168.1.206:/home/andrew/c";
diff --git a/hosts/yashinoki/hardware-configuration.nix b/hosts/yashinoki/hardware-configuration.nix
index 678dcb5..fe5e08d 100644
--- a/hosts/yashinoki/hardware-configuration.nix
+++ b/hosts/yashinoki/hardware-configuration.nix
@@ -33,8 +33,5 @@
[ { device = "/dev/yashinoki-vg0/swap"; }
];
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-
- powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
diff --git a/nix/programs/bash.nix b/nix/programs/bash.nix
new file mode 100644
index 0000000..3c29785
--- /dev/null
+++ b/nix/programs/bash.nix
@@ -0,0 +1,58 @@
+{ config, pkgs, ... }: {
+ users.defaultUserShell = pkgs.bashInteractive;
+ environment.sessionVariables = {
+ SHELL = "${pkgs.bashInteractive}/bin/bash";
+ };
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.bash = {
+ enable = true;
+ shellAliases = {
+ cp = "rsync -avz";
+ top = "htop";
+ bc = "bc -l";
+ pgrep = "pgrep -f";
+ make = "make -j6";
+ diff = "diff -u";
+ gdb = "gdb -q";
+ mail = "neomutt";
+ iroha = "ssh andrew@iroha";
+ moyo = "ssh andrew@moyo";
+ zasshi = "ssh andrew@zasshi";
+ denpa = "ssh moyo -t 'ssh 192.168.122.89'";
+ rod = "ssh -p 1738 rod";
+ bmrg = "ssh boomerang";
+ cmv = "$HOME/c/camu/scripts/cmv.sh";
+ cmv-add = "$HOME/c/camu/scripts/cmv_add.sh";
+ cmv-pause = "cmv-add PAUSE";
+ cmv-next = "cmv-add NEXT";
+ cmv-prev = "cmv-add PREV";
+ cmv-shuffle = "cmv-add SHUFFLE";
+ cmv-sort = "cmv-add SORT";
+ cmv-reverse = "cmv-add REVERSE";
+ cmv-clear = "cmv-add CLEAR";
+ };
+ historyControl = [ "erasedups" ];
+ historySize = 10000;
+ historyFile = "${homeDir}/.bash_history";
+ historyFileSize = 100000;
+ initExtra = ''
+ RESET="\001\017\002"
+ NORMAL="\001\033[0m\002"
+ RED="\001\033[0;31m\002"
+ YELLOW="\001\033[0;33m\002"
+ CYAN="\001\033[0;36m\002"
+ exit_code_guy()
+ {
+ if [[ $? == 0 ]]; then
+ printf "(・_・) >"
+ else
+ printf "(″ロ゛) > $RED$?"
+ fi
+ }
+ export PS1="$RESET$YELLOW\u$RED@\H$CYAN:\w\$(exit_code_guy)$NORMAL "
+ '';
+ };
+ };
+}
diff --git a/nix/programs/foot.nix b/nix/programs/foot.nix
index 52e9fe3..9cc9fa9 100644
--- a/nix/programs/foot.nix
+++ b/nix/programs/foot.nix
@@ -3,7 +3,7 @@ let
s = config.local;
in {
environment.sessionVariables = {
- TERMINAL = "footclient";
+ TERMINAL = "${pkgs.foot}/bin/footclient";
};
home-manager.users.andrew = {
programs.foot = {
diff --git a/nix/programs/kitty.nix b/nix/programs/kitty.nix
index aa6ffdf..5868b7d 100644
--- a/nix/programs/kitty.nix
+++ b/nix/programs/kitty.nix
@@ -1,24 +1,23 @@
{ config, lib, pkgs, ... }:
let
s = config.local;
- inherit (import ../../nix/utils.nix) optimizeWithFlags;
in {
environment.sessionVariables = {
- TERMINAL = "kitty -1";
+ TERMINAL = "${pkgs.kitty}/bin/kitty -1";
};
home-manager.users.andrew = {
programs.kitty = {
enable = true;
- package = (optimizeWithFlags pkgs.kitty "-O2 -march=native -mtune=native -fomit-frame-pointer");
font = {
name = s.font.name;
size = s.font.size;
};
shellIntegration = {
mode = "enabled";
- enableZshIntegration = true;
+ enableBashIntegration = true;
};
extraConfig = ''
+ shell ${pkgs.bashInteractive}/bin/bash --login
update_check_interval 0
confirm_os_window_close 0
sync_to_monitor yes
@@ -35,7 +34,7 @@ in {
cursor_shape block
cursor_blink_interval -1 linear ease-out
cursor_stop_blinking_after 20.0
- cursor_trail 15
+ cursor_trail 16
foreground #${s.scheme.foreground}
background #${s.scheme.background}
color0 #${s.scheme.color0}
diff --git a/nix/programs/nvim.nix b/nix/programs/nvim.nix
index 2e4b3f0..cdc30d9 100644
--- a/nix/programs/nvim.nix
+++ b/nix/programs/nvim.nix
@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
let
s = config.local;
- inherit (import ../../nix/utils.nix) optimizeWithFlags;
local = pkgs.vimUtils.buildVimPlugin {
pname = "local";
version = "0.2";
@@ -98,7 +97,6 @@ in {
home-manager.users.andrew = {
programs.neovim = {
enable = true;
- package = (optimizeWithFlags pkgs.neovim-unwrapped "-O2 -march=native -mtune=native -fomit-frame-pointer");
viAlias = true;
vimAlias = true;
extraConfig = ''
diff --git a/nix/programs/sway.nix b/nix/programs/sway.nix
index 38bc4ac..31bc9d0 100644
--- a/nix/programs/sway.nix
+++ b/nix/programs/sway.nix
@@ -2,6 +2,7 @@
let
s = config.local;
in {
+ services.xserver.videoDrivers = [ "modesetting" ];
programs.sway = {
enable = true;
extraPackages = with pkgs; [
diff --git a/nix/programs/zsh.nix b/nix/programs/zsh.nix
index 1e5dcd6..6071429 100644
--- a/nix/programs/zsh.nix
+++ b/nix/programs/zsh.nix
@@ -1,19 +1,18 @@
-{ config, pkgs, ... }:
-let
- inherit (import ../../nix/utils.nix) optimizeWithFlags;
-in {
+{ config, pkgs, ... }: {
programs.zsh.enable = true;
environment.shells = [ pkgs.zsh ];
environment.pathsToLink = [ "/share/zsh" ];
users.defaultUserShell = pkgs.zsh;
+ environment.sessionVariables = {
+ SHELL = "${pkgs.zsh}/bin/zsh";
+ };
home-manager.users.andrew = let
homeDir = "${config.users.users.andrew.home}";
in {
programs.zsh = {
enable = true;
- package = (optimizeWithFlags pkgs.zsh "-O2 -march=native -mtune=native -fomit-frame-pointer");
shellAliases = {
sudo = "nocorrect sudo ";
xargs = "nocorrect xargs ";
diff --git a/nix/system.nix b/nix/system.nix
index b72a7db..92535f5 100644
--- a/nix/system.nix
+++ b/nix/system.nix
@@ -2,8 +2,8 @@
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
- auto-optimise-store = true;
system-features = [ "big-parallel" "kvm" ];
+ auto-optimise-store = true;
download-buffer-size = 134217728;
};
gc.automatic = false;
@@ -74,31 +74,25 @@
nixpkgs.config.allowUnfree = true;
hardware.enableRedistributableFirmware = true;
- virtualisation.libvirtd.enable = true;
- programs.virt-manager.enable = true;
- virtualisation.spiceUSBRedirection.enable = true;
-
hardware.graphics = {
enable = true;
- enable32Bit = true;
extraPackages = with pkgs; [
libvdpau-va-gl
vaapiVdpau
];
};
- services.xserver.videoDrivers = [ "modesetting" ];
environment.systemPackages = with pkgs; [
git # flakes
+ appimage-run
i2c-tools
- lm_sensors
pciutils
- appimage-run
+ lm_sensors
+ libdrm
+ libva-utils
vulkan-loader
vulkan-validation-layers
vulkan-tools
- libdrm
- libva-utils
mesa-demos
];
@@ -111,6 +105,8 @@
magicOrExtension = ''\x7fELF....AI\x02'';
};
+ services.openssh.enable = true;
+
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales = [
diff --git a/nix/user.nix b/nix/user.nix
index 9947933..4c9a980 100644
--- a/nix/user.nix
+++ b/nix/user.nix
@@ -4,7 +4,7 @@ in {
users.users.andrew = {
isNormalUser = true;
uid = 1000;
- extraGroups = [ "wheel" "input" "audio" "video" "render" "disk" "cdrom" "libvirtd" ];
+ extraGroups = [ "wheel" "input" "audio" "video" "render" "disk" "cdrom" ];
};
nix.settings.trusted-users = [ "andrew" ];
@@ -92,8 +92,6 @@ in {
pass
zenity
zathura
- virt-manager
- spice-gtk
];
programs.screen = {
@@ -106,7 +104,6 @@ in {
};
programs.mtr.enable = true;
- services.openssh.enable = true;
services.gnome.gnome-keyring.enable = false;
programs.gnupg.agent = {
enable = true;
diff --git a/nix/utils.nix b/nix/utils.nix
index ff609a6..a0350a0 100644
--- a/nix/utils.nix
+++ b/nix/utils.nix
@@ -5,8 +5,4 @@
cdrom_options = [ "ro" "user" "noauto" "unhide" ];
ntfs_options = [ "uid=1000" "gid=100" "rw" "user" "exec" "umask=000" ];
};
- optimizeWithFlags = pkg: flag:
- pkg.overrideAttrs (attrs: {
- NIX_CFLAGS_COMPILE = (attrs.NIX_CFLAGS_COMPILE or "") + " ${flag}";
- });
}
diff --git a/nix/virtualisation.nix b/nix/virtualisation.nix
new file mode 100644
index 0000000..7e253fe
--- /dev/null
+++ b/nix/virtualisation.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }: {
+ users.users.andrew.extraGroups = [ "libvirtd" ];
+ virtualisation.libvirtd.enable = true;
+ programs.virt-manager.enable = true;
+ virtualisation.spiceUSBRedirection.enable = true;
+ environment.systemPackages = with pkgs; [
+ virt-manager
+ spice-gtk
+ ];
+}
diff --git a/nix/x86.nix b/nix/x86.nix
new file mode 100644
index 0000000..a8ebdd1
--- /dev/null
+++ b/nix/x86.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ hardware.graphics.enable32Bit = true;
+}