update
This commit is contained in:
parent
da147cd997
commit
105af0fac2
@ -4,10 +4,11 @@ rec {
|
||||
|
||||
imports = [
|
||||
(./hardware-configuration + "/${name}.nix")
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(import inputs.base16.hmModule)
|
||||
(import ./modules device)
|
||||
];
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
home-manager.users.alukard.home.stateVersion = "20.09";
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
}
|
||||
|
94
flake.lock
generated
94
flake.lock
generated
@ -39,16 +39,15 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1591751635,
|
||||
"narHash": "sha256-KgGtyFlkI/fsp+j8VEgJ/ynY9B91aX35Xp04HlDLRTo=",
|
||||
"owner": "rycee",
|
||||
"lastModified": 1600992519,
|
||||
"narHash": "sha256-Y9wlciB/g1QUquVpTZXQq23I5r8qJ4nZArfczTYBo24=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b3fee796fcd5531693d9b84ece76ad6836bb1cfa",
|
||||
"rev": "abfb4cde51856dbee909f373b59cd941f51c2170",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"ref": "bqv-flakes",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@ -69,31 +68,14 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lowdown-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1598296217,
|
||||
"narHash": "sha256-ha7lyNY1d8m+osmDpPc9f/bfZ3ZC1IVIXwfyklSWg8I=",
|
||||
"owner": "edolstra",
|
||||
"repo": "lowdown",
|
||||
"rev": "c7a4e715af1e233080842db82d15b261cb74cb28",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"ref": "no-structs-in-anonymous-unions",
|
||||
"repo": "lowdown",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"materia-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1596129804,
|
||||
"narHash": "sha256-Vtyja8A6SfeRA78XK1e89hwWYY0kQm1VkY7/EagDXl8=",
|
||||
"lastModified": 1600267825,
|
||||
"narHash": "sha256-5Fit4XWacj21KqX5XpurwIxxZNlegvy0F+0Xq53qXWE=",
|
||||
"owner": "nana-4",
|
||||
"repo": "materia-theme",
|
||||
"rev": "6f7e51a97fc7ff3ddbb7908cff505a8c1919b6a2",
|
||||
"rev": "f85cac721b892d052724c72c2f5fb42df0e00264",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -102,24 +84,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix": {
|
||||
"inputs": {
|
||||
"lowdown-src": "lowdown-src",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1599125415,
|
||||
"narHash": "sha256-f5Dx9hfO06239HILkfD3qntrj2EZt8kNAF9NHeAJyoI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "8a945d6ddb0676b454458e6fe0e9ea6f8b4b5659",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nix",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1593360652,
|
||||
@ -169,11 +133,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1591748508,
|
||||
"narHash": "sha256-GdYYaYsSBgYUhbDT1JJQ7vEgo8FWeW/AW7/qqJuCvRA=",
|
||||
"lastModified": 1600997075,
|
||||
"narHash": "sha256-S3Bdk2fmx3kD/wzWL4FYadRYPMHY96lhFleOyWoasNI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d8c4410687390f9b8f92dbe6ff39fd8fc2b17c6",
|
||||
"rev": "e247ea75622a94766aaca655d460ec2e175abc29",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -183,26 +147,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1591633336,
|
||||
"narHash": "sha256-oVXv4xAnDJB03LvZGbC72vSVlIbbJr8tpjEW5o/Fdek=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "70717a337f7ae4e486ba71a500367cad697e5f09",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-20.03-small",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1597943282,
|
||||
"narHash": "sha256-G/VQBlqO7YeFOSvn29RqdvABZxmQBtiRYVA6kjqWZ6o=",
|
||||
"lastModified": 1600573085,
|
||||
"narHash": "sha256-w5SGosyuTbFCBoUzgy2gyVcxYxRUvZ6SgHsRIPkZXgI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38",
|
||||
"rev": "1179840f9a88b8a548f4b11d1a03aa25a790c379",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -219,8 +168,7 @@
|
||||
"home-manager": "home-manager",
|
||||
"i3lock-fancy-rapid": "i3lock-fancy-rapid",
|
||||
"materia-theme": "materia-theme",
|
||||
"nix": "nix",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
||||
"nixpkgs-old": "nixpkgs-old",
|
||||
"spotify-tui": "spotify-tui",
|
||||
@ -232,11 +180,11 @@
|
||||
"spotify-tui": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1598962613,
|
||||
"narHash": "sha256-jBxXTP014PrLLPPN6O/Lb1nS5uizPgG3GI7gLPDtPk4=",
|
||||
"lastModified": 1600893283,
|
||||
"narHash": "sha256-viwU9nPY6pmwOWcwGbkiE+wvEru/EZJXUDR5SklWeoY=",
|
||||
"owner": "Rigellute",
|
||||
"repo": "spotify-tui",
|
||||
"rev": "81e357e21826e2b61278175ccd68077febbdc6df",
|
||||
"rev": "0e8f3723ad3b91725d04b460ae6b511ac6ffac1c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -264,11 +212,11 @@
|
||||
"zsh-nix-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1593533321,
|
||||
"narHash": "sha256-r4B4EjZrOrJrJb4GVkJA7X7GfXCbcqkW549uwTno1vg=",
|
||||
"lastModified": 1600944392,
|
||||
"narHash": "sha256-C+6zHE0xDX2RndaR4T1b0hJ4xcf4bhBiADIc0amXw4M=",
|
||||
"owner": "chisui",
|
||||
"repo": "zsh-nix-shell",
|
||||
"rev": "6ae30544a284301026d4ee1c437b44f5d1a9952e",
|
||||
"rev": "5dc081265cdd0d03631e9dc20b5e656530ae3af2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
42
flake.nix
42
flake.nix
@ -5,7 +5,7 @@
|
||||
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
|
||||
nixpkgs-old.url = github:nixos/nixpkgs/840c782d507d60aaa49aa9e3f6d0b0e780912742;
|
||||
# nix.url = github:nixos/nix/6ff9aa8df7ce8266147f74c65e2cc529a1e72ce0;
|
||||
home-manager.url = github:rycee/home-manager/bqv-flakes;
|
||||
home-manager.url = github:nix-community/home-manager;
|
||||
base16.url = github:alukardbf/base16-nix;
|
||||
# base16.url = "/shared/nixos/base16-nix";
|
||||
base16-horizon-scheme = {
|
||||
@ -42,25 +42,49 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, nix, self, ... }@inputs: {
|
||||
outputs = { nixpkgs, self, ... }@inputs: {
|
||||
# Generate system config for each of hardware configuration
|
||||
nixosConfigurations = with nixpkgs.lib;
|
||||
let
|
||||
hosts = map (fname: builtins.head (builtins.match "(.*)\\.nix" fname))
|
||||
(builtins.attrNames (builtins.readDir ./hardware-configuration));
|
||||
mkHost = name:
|
||||
nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ (import ./default.nix) ];
|
||||
specialArgs = { inherit inputs name; };
|
||||
|
||||
mkHost = name: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
|
||||
specialArgsOld = {
|
||||
inherit inputs;
|
||||
};
|
||||
specialArgs = specialArgsOld // {
|
||||
inherit name;
|
||||
};
|
||||
|
||||
hm-nixos-as-super = { config, ... }: {
|
||||
options.home-manager.users = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submoduleWith {
|
||||
modules = [ ];
|
||||
specialArgs = specialArgsOld // {
|
||||
super = config;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
modules = [
|
||||
(import ./default.nix)
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
hm-nixos-as-super
|
||||
];
|
||||
in nixosSystem { inherit system modules specialArgs; };
|
||||
in genAttrs hosts mkHost;
|
||||
|
||||
legacyPackages.x86_64-linux =
|
||||
(builtins.head (builtins.attrValues self.nixosConfigurations)).pkgs;
|
||||
|
||||
|
||||
devShell.x86_64-linux = let
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
pkgs = self.legacyPackages.x86_64-linux;
|
||||
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: $(basename $0) {switch|boot|test}"
|
||||
|
@ -55,4 +55,5 @@
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-partuuid/af053f01-4e3d-4163-af49-bfea01bb3dfe";
|
||||
boot.zfs.devNodes = "/dev/mapper/cryptroot";
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.kernelParams = [ "zfs.zfs_arc_max=4294967296" ];
|
||||
}
|
||||
|
@ -7,7 +7,8 @@ CONFIG_FOLDER="$(dirname "$(pwd)")"
|
||||
DEVICE_NAME=Dell-Laptop
|
||||
MAX_JOBS=8
|
||||
NIXOS_COMMIT="c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38"
|
||||
ASHIFT=12 # recommended=12 which 1<<12 (4096)
|
||||
ZFS_ARC_MAX=4294967296 # Max ARC cache size. default = 4GiB
|
||||
ZFS_ASHIFT=12 # recommended=12 which 1<<12 (4096)
|
||||
|
||||
clean_stdin() {
|
||||
while read -r -t 0; do read -r; done
|
||||
@ -128,7 +129,7 @@ if [[ "$SWAP" != "NONE" ]]; then
|
||||
fi
|
||||
|
||||
pprint "Create ZFS pool on $ZFS"
|
||||
zpool create -f -m none -o ashift=$ASHIFT -O compression=lz4 -O normalization=formD -O atime=on -O relatime=on -O dedup=off -R /mnt rpool "$ZFS"
|
||||
zpool create -f -m none -o ashift=$ZFS_ASHIFT -O compression=lz4 -O normalization=formD -O atime=on -O relatime=on -O dedup=off -R /mnt rpool "$ZFS"
|
||||
|
||||
pprint "Create ZFS datasets"
|
||||
|
||||
@ -178,6 +179,7 @@ cat <<CONFIG > "$HARDWARE_CONFIG"
|
||||
boot.initrd.luks.devices."$LUKS_DEVICE_NAME".device = "/dev/disk/by-partuuid/$LINUX_DISK_UUID";
|
||||
boot.zfs.devNodes = "$ZFS";
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.kernelParams = [ "zfs.zfs_arc_max=$ZFS_ARC_MAX" ];
|
||||
CONFIG
|
||||
|
||||
pprint "Append ZFS configuration to hardware-configuration.nix"
|
||||
|
BIN
misc/Passwords.kdbx
Normal file → Executable file
BIN
misc/Passwords.kdbx
Normal file → Executable file
Binary file not shown.
@ -55,7 +55,7 @@ with deviceSpecific; {
|
||||
spotifywm
|
||||
system-config-printer
|
||||
tdesktop
|
||||
(old.vivaldi.override { proprietaryCodecs = true; })
|
||||
(vivaldi.override { proprietaryCodecs = true; })
|
||||
vscode
|
||||
xarchiver
|
||||
xfce4-14.thunar
|
||||
|
@ -19,6 +19,7 @@ with types; {
|
||||
smallScreen = (device == "Dell-Laptop");
|
||||
cpu = devInfo.cpu.vendor;
|
||||
video = devInfo.video;
|
||||
ram = devInfo.ram;
|
||||
enableVirtualisation = devInfo.enableVirtualisation;
|
||||
isGaming = devInfo.gaming;
|
||||
};
|
||||
|
@ -9,31 +9,25 @@ let
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
inputs.nix.overlay
|
||||
# inputs.nix.overlay
|
||||
# mozilla_overlay
|
||||
(self: super:
|
||||
rec {
|
||||
# nix = super.nix // {
|
||||
# meta = super.nix.meta // { platforms = lib.platforms.unix; };
|
||||
# };
|
||||
inherit inputs;
|
||||
inherit old;
|
||||
|
||||
youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
|
||||
|
||||
wg-conf = pkgs.callPackage ./packages/wg-conf.nix { };
|
||||
|
||||
i3lock-fancy-rapid = pkgs.callPackage ./packages/i3lock-fancy-rapid.nix { };
|
||||
|
||||
xonar-fp = pkgs.callPackage ./packages/xonar-fp.nix { };
|
||||
|
||||
advance-touch = pkgs.callPackage ./packages/advance-touch.nix { };
|
||||
|
||||
nomino = pkgs.callPackage ./packages/nomino.nix { };
|
||||
|
||||
bpytop = pkgs.callPackage ./packages/bpytop.nix { };
|
||||
|
||||
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
|
||||
|
||||
# vivaldi = old.vivaldi;
|
||||
# material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { };
|
||||
|
||||
# rust-stable = pkgs.latest.rustChannels.stable.rust.override {
|
||||
# extensions = [
|
||||
# "rls-preview"
|
||||
@ -41,26 +35,13 @@ in
|
||||
# "rustfmt-preview"
|
||||
# ];
|
||||
# };
|
||||
|
||||
wpgtk = super.wpgtk.overrideAttrs (old: rec {
|
||||
propagatedBuildInputs = with pkgs; [
|
||||
python2 python27Packages.pygtk
|
||||
python3Packages.pygobject3 python3Packages.pillow python3Packages.pywal
|
||||
];
|
||||
});
|
||||
|
||||
#TODO: Remove after nixpkgs will update to v1.14.0
|
||||
f2fs-tools = super.f2fs-tools.overrideAttrs (old: rec {
|
||||
version = "1.14.0";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "06ss05n87i1c3149qb3n7j1qp2scv3g2adx0v6ljkl59ab9b5saj";
|
||||
};
|
||||
});
|
||||
|
||||
spotifyd = super.spotifyd.override { withPulseAudio = true; };
|
||||
|
||||
# wpgtk = super.wpgtk.overrideAttrs (old: rec {
|
||||
# propagatedBuildInputs = with pkgs; [
|
||||
# python2 python27Packages.pygtk
|
||||
# python3Packages.pygobject3 python3Packages.pillow python3Packages.pywal
|
||||
# ];
|
||||
# });
|
||||
# spotifyd = super.spotifyd.override { withPulseAudio = true; };
|
||||
# spotify-tui = naersk.buildPackage {
|
||||
# name = "spotify-tui";
|
||||
# src = pkgs.imports.spotify-tui;
|
||||
|
@ -10,7 +10,7 @@ with config.deviceSpecific; {
|
||||
};
|
||||
|
||||
services.earlyoom = {
|
||||
enable = device.ram < 16;
|
||||
enable = ram < 16;
|
||||
freeMemThreshold = 5;
|
||||
freeSwapThreshold = 100;
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ iconfont, ... }: ''
|
||||
#!/usr/bin/env bash
|
||||
echo '<span font="${iconfont} Solid"></span>' `df -BM / | tail -1 | awk '{printf "%.2fGiB / %.2fGiB", $3/1024, $2/1024}'`
|
||||
echo '<span font="${iconfont} Solid"></span>' `zfs list -o space | head -2 | tail -1 | awk '{printf "%s / %s", $3, $2}'`
|
||||
''
|
||||
|
@ -3,15 +3,26 @@
|
||||
home-manager.users.alukard = {
|
||||
services.picom = {
|
||||
enable = true;
|
||||
backend = "glx";
|
||||
activeOpacity = "0.95";
|
||||
inactiveOpacity = "0.95";
|
||||
opacityRule = [
|
||||
# Disable opacity for fullscreen window
|
||||
"100:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'"
|
||||
"100:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'"
|
||||
"100:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'"
|
||||
"100:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'"
|
||||
"100:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'"
|
||||
# Other rules
|
||||
"100:class_i ?= 'vivaldi-stable'"
|
||||
"100:class_g = 'mpv'"
|
||||
"90:class_g = 'URxvt' && focused"
|
||||
"70:class_g = 'URxvt' && !focused"
|
||||
];
|
||||
blur = true;
|
||||
blurExclude = [
|
||||
"class_g = 'i3-frame'"
|
||||
];
|
||||
shadow = false;
|
||||
vSync = true;
|
||||
experimentalBackends = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user