massive refactoring
This commit is contained in:
parent
2c078c583a
commit
3bc9bb904c
14
default.nix
14
default.nix
@ -1,14 +0,0 @@
|
|||||||
{ config, pkgs, lib, inputs, name, ... }:
|
|
||||||
rec {
|
|
||||||
device = name;
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
(./hardware-configuration + "/${name}.nix")
|
|
||||||
(import inputs.base16.hmModule)
|
|
||||||
(import ./modules device)
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.alukard.home.stateVersion = "20.09";
|
|
||||||
|
|
||||||
system.stateVersion = "20.09";
|
|
||||||
}
|
|
71
flake.lock
generated
71
flake.lock
generated
@ -39,11 +39,11 @@
|
|||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1606046962,
|
"lastModified": 1612646749,
|
||||||
"narHash": "sha256-244JrrVFht/VMRItDcDlrcwejqpqJInDUWA/x6mucW4=",
|
"narHash": "sha256-m2o9E4PHMJHRrp9udYfPp/onqY9flMD2dTKJuhvp7TM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a3a0f1289acac24ce2ffe0481bf8cabd3a6ccc64",
|
"rev": "6dfa9ef85cf4e23ec42f34c9e988baaf793617a1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -71,11 +71,11 @@
|
|||||||
"materia-theme": {
|
"materia-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1601330353,
|
"lastModified": 1606538708,
|
||||||
"narHash": "sha256-zOi6nwJ23UdPbIvEc4gAHk/6aFVkK1Uuy2D/65gvuOI=",
|
"narHash": "sha256-Sje1j/k+g0MXP1wQi+KSVXIt1LQPeJ5KYJwfyxgmxPw=",
|
||||||
"owner": "nana-4",
|
"owner": "nana-4",
|
||||||
"repo": "materia-theme",
|
"repo": "materia-theme",
|
||||||
"rev": "e329aaee160c82e85fe91a6467c666c7f9f2a7df",
|
"rev": "c63ca3285c4b5fcd652d1f054745251c60d4c32e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -84,6 +84,23 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1612537053,
|
||||||
|
"narHash": "sha256-3y05uB7OkEtWngIKYx+xiY+oG+1QPvRROJkKBxO1XFc=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nix",
|
||||||
|
"rev": "480426a364f09e7992230b32f2941a09fb52d729",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nix",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1593360652,
|
"lastModified": 1593360652,
|
||||||
@ -117,11 +134,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-old": {
|
"nixpkgs-old": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1606344557,
|
"lastModified": 1612568312,
|
||||||
"narHash": "sha256-IVIMVKWNNt6VODiLfINaW6sfrWPw5ZT91GQMgLUl7ZA=",
|
"narHash": "sha256-DbJ2aiZaFBYUTscEfjOqW/v1bCSE35X2g0rfmQQLEUs=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ffb3aab257e8851b558cdc6079241a7eb0c7239e",
|
"rev": "22a2b332378b99461edeaf9754dc2d6b4a210148",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -133,11 +150,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1606518375,
|
"lastModified": 1612647598,
|
||||||
"narHash": "sha256-foO4ZgJa4YnKG3limxeCT6DeLr249XkUdGJx6fORaNc=",
|
"narHash": "sha256-XAXgwTCxwvHxhvSKWSwkA0FGsRepTgoXHwHNx2ww5sg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "da8bd7747d143d81718ea4fdff971479ad027b94",
|
"rev": "d1dc3064b974503e9f90d5bceaf0a3b4b030b86d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -147,11 +164,26 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1605988311,
|
"lastModified": 1602702596,
|
||||||
"narHash": "sha256-PA+kgq46NApOAJlmBNJHs5DwsIrY+jodM0e4g7VtXyY=",
|
"narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ad0d20345219790533ebe06571f82ed6b034db31",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-20.09-small",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1612545171,
|
||||||
|
"narHash": "sha256-AZkSuO7H055eDD4KWBEDCX/R5fvw0vUMCErvQvYSEhA=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2247d824fe07f16325596acc7faa286502faffd1",
|
"rev": "536fe36e23ab0fc8b7f35c24603422eee9fc17a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -168,7 +200,8 @@
|
|||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"i3lock-fancy-rapid": "i3lock-fancy-rapid",
|
"i3lock-fancy-rapid": "i3lock-fancy-rapid",
|
||||||
"materia-theme": "materia-theme",
|
"materia-theme": "materia-theme",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nix": "nix",
|
||||||
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
||||||
"nixpkgs-old": "nixpkgs-old",
|
"nixpkgs-old": "nixpkgs-old",
|
||||||
"spotify-tui": "spotify-tui",
|
"spotify-tui": "spotify-tui",
|
||||||
@ -181,11 +214,11 @@
|
|||||||
"spotify-tui": {
|
"spotify-tui": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1606232808,
|
"lastModified": 1612427519,
|
||||||
"narHash": "sha256-Xf8wOyjceEXpCJuaQcTH586QLBwej4blndzq3u8IkbY=",
|
"narHash": "sha256-9N+0DUsCNZhw4QViJxmbTWxvFV9X6wyrzlYVjtHhJG8=",
|
||||||
"owner": "Rigellute",
|
"owner": "Rigellute",
|
||||||
"repo": "spotify-tui",
|
"repo": "spotify-tui",
|
||||||
"rev": "5bbc0848bfaa4a63b744f5cd045874d87d87c7ac",
|
"rev": "38c095884919bebc6c592d3662ddd1f9a93131f1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
62
flake.nix
62
flake.nix
@ -8,7 +8,7 @@
|
|||||||
# nix.url = github:nixos/nix/6ff9aa8df7ce8266147f74c65e2cc529a1e72ce0;
|
# nix.url = github:nixos/nix/6ff9aa8df7ce8266147f74c65e2cc529a1e72ce0;
|
||||||
home-manager.url = github:nix-community/home-manager;
|
home-manager.url = github:nix-community/home-manager;
|
||||||
base16.url = github:alukardbf/base16-nix;
|
base16.url = github:alukardbf/base16-nix;
|
||||||
# base16.url = "/shared/nixos/base16-nix";
|
# base16.url = "/media/base16";
|
||||||
base16-horizon-scheme = {
|
base16-horizon-scheme = {
|
||||||
url = github:michael-ball/base16-horizon-scheme;
|
url = github:michael-ball/base16-horizon-scheme;
|
||||||
flake = false;
|
flake = false;
|
||||||
@ -47,41 +47,45 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, self, ... }@inputs: {
|
outputs = { nixpkgs, nix, self, ... }@inputs: {
|
||||||
|
nixosModules = import ./modules;
|
||||||
|
|
||||||
|
nixosProfiles = import ./profiles;
|
||||||
# Generate system config for each of hardware configuration
|
# Generate system config for each of hardware configuration
|
||||||
nixosConfigurations = with nixpkgs.lib;
|
nixosConfigurations = with nixpkgs.lib;
|
||||||
let
|
let
|
||||||
hosts = map (fname: builtins.head (builtins.match "(.*)\\.nix" fname))
|
hosts = builtins.attrNames (builtins.readDir ./machines);
|
||||||
(builtins.attrNames (builtins.readDir ./hardware-configuration));
|
|
||||||
|
|
||||||
mkHost = name: let
|
mkHost = name: let
|
||||||
system = "x86_64-linux";
|
# pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
# inherit (inputs.nixpkgs) lib;
|
||||||
inherit (inputs.nixpkgs) lib;
|
|
||||||
|
|
||||||
specialArgsOld = {
|
# specialArgsOld = {
|
||||||
inherit inputs;
|
# inherit inputs;
|
||||||
};
|
# };
|
||||||
specialArgs = specialArgsOld // {
|
# specialArgs = specialArgsOld // {
|
||||||
inherit name;
|
# inherit name;
|
||||||
};
|
# };
|
||||||
|
|
||||||
hm-nixos-as-super = { config, ... }: {
|
# hm-nixos-as-super = { config, ... }: {
|
||||||
options.home-manager.users = lib.mkOption {
|
# options.home-manager.users = lib.mkOption {
|
||||||
type = lib.types.attrsOf (lib.types.submoduleWith {
|
# type = lib.types.attrsOf (lib.types.submoduleWith {
|
||||||
modules = [ ];
|
# modules = [ ];
|
||||||
specialArgs = specialArgsOld // {
|
# specialArgs = specialArgsOld // {
|
||||||
super = config;
|
# super = config;
|
||||||
};
|
# };
|
||||||
});
|
# });
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
modules = [
|
# modules = [
|
||||||
(import ./default.nix)
|
# (import ./default.nix)
|
||||||
inputs.home-manager.nixosModules.home-manager
|
# inputs.home-manager.nixosModules.home-manager
|
||||||
hm-nixos-as-super
|
# hm-nixos-as-super
|
||||||
];
|
# ];
|
||||||
|
|
||||||
|
system = builtins.readFile (./machines + "/${name}/system");
|
||||||
|
modules = [ (import (./machines + "/${name}")) { device = name; } ];
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
in nixosSystem { inherit system modules specialArgs; };
|
in nixosSystem { inherit system modules specialArgs; };
|
||||||
in genAttrs hosts mkHost;
|
in genAttrs hosts mkHost;
|
||||||
|
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sr_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/9affc545-6755-4b5b-b820-36ebb1119330";
|
|
||||||
fsType = "f2fs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/4D6C-D3AB";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-partuuid/5ff8b0ed-a111-4399-916a-8e49ccb3dd4d";
|
|
||||||
randomEncryption.enable = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation.virtualbox.guest.enable = true;
|
|
||||||
}
|
|
@ -1,15 +1,16 @@
|
|||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i bash -p perl
|
#! nix-shell -i bash -p perl -p gptfdisk -p parted
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
CONFIG_FOLDER="$(dirname "$(pwd)")"
|
CONFIG_FOLDER="$(dirname "$(pwd)")"
|
||||||
DEVICE_NAME=Dell-Laptop
|
DEVICE_NAME=NixOS-VM
|
||||||
MAX_JOBS=8
|
MAX_JOBS=4
|
||||||
SWAP_SIZE=8GiB
|
SWAP_SIZE=2GiB
|
||||||
NIXOS_COMMIT="1dc37370c489b610f8b91d7fdd40633163ffbafd"
|
NIXOS_COMMIT="84917aa00bf23c88e5874c683abe05edb0ba4078"
|
||||||
USE_ECNRYPTION=true
|
USE_ECNRYPTION=false
|
||||||
ZFS_ARC_MAX=4294967296 # Max ARC cache size. default = 4GiB
|
ZFS_ARC_MAX=1073741824 # Max ARC cache size. default = 4GiB
|
||||||
|
# ZFS_ARC_MAX=4294967296 # Max ARC cache size. default = 4GiB
|
||||||
ZFS_ASHIFT=12 # recommended=12 which 1<<12 (4096)
|
ZFS_ASHIFT=12 # recommended=12 which 1<<12 (4096)
|
||||||
|
|
||||||
clean_stdin() {
|
clean_stdin() {
|
||||||
@ -164,6 +165,7 @@ pprint "Create ZFS datasets"
|
|||||||
zfs create -o mountpoint=none rpool/local
|
zfs create -o mountpoint=none rpool/local
|
||||||
zfs create -o mountpoint=legacy -o com.sun:auto-snapshot=false -o atime=off -o recordsize=16K rpool/local/bittorrent
|
zfs create -o mountpoint=legacy -o com.sun:auto-snapshot=false -o atime=off -o recordsize=16K rpool/local/bittorrent
|
||||||
zfs create -o mountpoint=legacy -o com.sun:auto-snapshot:frequent=false -o com.sun:auto-snapshot:monthly=false -o atime=off rpool/local/nix
|
zfs create -o mountpoint=legacy -o com.sun:auto-snapshot:frequent=false -o com.sun:auto-snapshot:monthly=false -o atime=off rpool/local/nix
|
||||||
|
zfs create -o mountpoint=legacy -o xattr=sa -o atime=off -o recordsize=8K -o com.sun:auto-snapshot:frequent=false rpool/local/libvirt
|
||||||
zfs create -o mountpoint=none -o com.sun:auto-snapshot:frequent=false rpool/system
|
zfs create -o mountpoint=none -o com.sun:auto-snapshot:frequent=false rpool/system
|
||||||
zfs create -o mountpoint=legacy rpool/system/root
|
zfs create -o mountpoint=legacy rpool/system/root
|
||||||
zfs create -o mountpoint=legacy -o xattr=sa -o acltype=posixacl rpool/system/var
|
zfs create -o mountpoint=legacy -o xattr=sa -o acltype=posixacl rpool/system/var
|
||||||
@ -186,6 +188,10 @@ mount -t zfs rpool/system/var /mnt/var
|
|||||||
mkdir /mnt/home
|
mkdir /mnt/home
|
||||||
mount -t zfs rpool/user/home /mnt/home
|
mount -t zfs rpool/user/home /mnt/home
|
||||||
|
|
||||||
|
mkdir -p /mnt/home/alukard/.libvirt
|
||||||
|
chown -R 1000:100 /mnt/home/alukard
|
||||||
|
mount -t zfs rpool/local/libvirt /mnt/home/alukard/.libvirt
|
||||||
|
|
||||||
mkdir /mnt/bittorrent
|
mkdir /mnt/bittorrent
|
||||||
mount -t zfs rpool/local/bittorrent /mnt/bittorrent
|
mount -t zfs rpool/local/bittorrent /mnt/bittorrent
|
||||||
|
|
||||||
@ -228,9 +234,9 @@ if [[ "$SWAP" != "NONE" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
pprint "Copy minimal config to destination system"
|
pprint "Copy minimal config to destination system"
|
||||||
cp /mnt/etc/nixos/hardware-configuration.nix $CONFIG_FOLDER/hardware-configuration/$DEVICE_NAME.nix
|
cp /mnt/etc/nixos/hardware-configuration.nix $CONFIG_FOLDER/machines/$DEVICE_NAME/hardware-configuration.nix
|
||||||
# Change <not-detected> for flakes
|
# Change <not-detected> for flakes
|
||||||
sed -i 's#<nixpkgs/nixos/modules/installer/scan/not-detected.nix>#"${inputs.nixpkgs}/nixos/modules/installer/scan/not-detected.nix"#' $CONFIG_FOLDER/hardware-configuration/$DEVICE_NAME.nix
|
sed -i 's#<nixpkgs/nixos/modules/installer/scan/not-detected.nix>#"${inputs.nixpkgs}/nixos/modules/installer/scan/not-detected.nix"#' $CONFIG_FOLDER/machines/$DEVICE_NAME/hardware-configuration.nix
|
||||||
cp ./min-config.nix /mnt/etc/nixos/configuration.nix
|
cp ./min-config.nix /mnt/etc/nixos/configuration.nix
|
||||||
sed -i "s#changeme#${DEVICE_NAME}#" /mnt/etc/nixos/configuration.nix
|
sed -i "s#changeme#${DEVICE_NAME}#" /mnt/etc/nixos/configuration.nix
|
||||||
|
|
||||||
@ -240,6 +246,8 @@ echo
|
|||||||
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
nixos-install -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXOS_COMMIT.tar.gz --max-jobs $MAX_JOBS --no-root-passwd
|
nixos-install -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXOS_COMMIT.tar.gz --max-jobs $MAX_JOBS --no-root-passwd
|
||||||
mkdir -p /mnt/home/alukard/nixos-config
|
|
||||||
cp -aT $CONFIG_FOLDER /mnt/home/alukard/nixos-config
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pprint "Copy config to destination system"
|
||||||
|
mkdir -p /mnt/home/alukard/nixos-config
|
||||||
|
cp -aT $CONFIG_FOLDER /mnt/home/alukard/nixos-config
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
useSandbox = true;
|
useSandbox = true;
|
||||||
autoOptimiseStore = true;
|
# autoOptimiseStore = true;
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
@ -60,7 +60,7 @@
|
|||||||
keyMap = "us";
|
keyMap = "us";
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Volgograd";
|
time.timeZone = "Europe/Moscow";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ git ];
|
environment.systemPackages = with pkgs; [ git ];
|
||||||
|
|
||||||
|
27
machines/AMD-Workstation/default.nix
Normal file
27
machines/AMD-Workstation/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
inputs.self.nixosProfiles.desktop
|
||||||
|
];
|
||||||
|
deviceSpecific.devInfo = {
|
||||||
|
cpu = {
|
||||||
|
vendor = "amd";
|
||||||
|
clock = 3700;
|
||||||
|
cores = 6;
|
||||||
|
};
|
||||||
|
drive = {
|
||||||
|
type = "ssd";
|
||||||
|
speed = 6000;
|
||||||
|
size = 1000;
|
||||||
|
};
|
||||||
|
gpu = {
|
||||||
|
vendor = "amd";
|
||||||
|
};
|
||||||
|
bigScreen = true;
|
||||||
|
ram = 16;
|
||||||
|
};
|
||||||
|
deviceSpecific.isHost = true;
|
||||||
|
deviceSpecific.isShared = false;
|
||||||
|
deviceSpecific.isGaming = true;
|
||||||
|
deviceSpecific.enableVirtualisation = true;
|
||||||
|
}
|
1
machines/AMD-Workstation/system
Normal file
1
machines/AMD-Workstation/system
Normal file
@ -0,0 +1 @@
|
|||||||
|
x86_64-linux
|
28
machines/Dell-Laptop/default.nix
Normal file
28
machines/Dell-Laptop/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = with inputs.self.nixosModules; [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
inputs.self.nixosProfiles.desktop
|
||||||
|
];
|
||||||
|
|
||||||
|
deviceSpecific.devInfo = {
|
||||||
|
cpu = {
|
||||||
|
vendor = "intel";
|
||||||
|
clock = 3600;
|
||||||
|
cores = 4;
|
||||||
|
};
|
||||||
|
drive = {
|
||||||
|
type = "ssd";
|
||||||
|
speed = 3000;
|
||||||
|
size = 250;
|
||||||
|
};
|
||||||
|
gpu = {
|
||||||
|
vendor = "intel";
|
||||||
|
};
|
||||||
|
bigScreen = false;
|
||||||
|
ram = 16;
|
||||||
|
};
|
||||||
|
deviceSpecific.isHost = false;
|
||||||
|
deviceSpecific.isShared = false;
|
||||||
|
deviceSpecific.isGaming = true;
|
||||||
|
deviceSpecific.enableVirtualisation = false;
|
||||||
|
}
|
@ -38,6 +38,11 @@
|
|||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/alukard/.libvirt" =
|
||||||
|
{ device = "rpool/local/libvirt";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/4F6D-537A";
|
{ device = "/dev/disk/by-uuid/4F6D-537A";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
1
machines/Dell-Laptop/system
Normal file
1
machines/Dell-Laptop/system
Normal file
@ -0,0 +1 @@
|
|||||||
|
x86_64-linux
|
27
machines/NixOS-VM/default.nix
Normal file
27
machines/NixOS-VM/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
inputs.self.nixosProfiles.desktop
|
||||||
|
];
|
||||||
|
deviceSpecific.devInfo = {
|
||||||
|
cpu = {
|
||||||
|
vendor = "amd";
|
||||||
|
clock = 3700;
|
||||||
|
cores = 4;
|
||||||
|
};
|
||||||
|
drive = {
|
||||||
|
type = "ssd";
|
||||||
|
speed = 1000;
|
||||||
|
size = 30;
|
||||||
|
};
|
||||||
|
gpu = {
|
||||||
|
vendor = "vm";
|
||||||
|
};
|
||||||
|
bigScreen = true;
|
||||||
|
ram = 4;
|
||||||
|
};
|
||||||
|
deviceSpecific.isHost = false;
|
||||||
|
deviceSpecific.isShared = false;
|
||||||
|
deviceSpecific.isGaming = false;
|
||||||
|
deviceSpecific.enableVirtualisation = false;
|
||||||
|
}
|
61
machines/NixOS-VM/hardware-configuration.nix
Normal file
61
machines/NixOS-VM/hardware-configuration.nix
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "xhci_pci" "ahci" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "rpool/system/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "rpool/local/nix";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var" =
|
||||||
|
{ device = "rpool/system/var";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "rpool/user/home";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/alukard/.libvirt" =
|
||||||
|
{ device = "rpool/local/libvirt";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/bittorrent" =
|
||||||
|
{ device = "rpool/local/bittorrent";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/9D49-7087";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-partuuid/6e22eab7-2e47-4108-bd97-76e3bdc2c6c1";
|
||||||
|
randomEncryption.enable = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.virtualbox.guest.enable = true;
|
||||||
|
networking.hostId = "524df2e8";
|
||||||
|
boot.zfs.devNodes = "/dev/disk/by-partuuid/37beaf62-685a-43b2-95b2-e777a77993e1";
|
||||||
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
|
boot.kernelParams = [ "zfs.zfs_arc_max=1073741824" ];
|
||||||
|
}
|
1
machines/NixOS-VM/system
Normal file
1
machines/NixOS-VM/system
Normal file
@ -0,0 +1 @@
|
|||||||
|
x86_64-linux
|
BIN
misc/wallpaper
Normal file
BIN
misc/wallpaper
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
@ -7,7 +7,7 @@ with config.deviceSpecific;
|
|||||||
};
|
};
|
||||||
config = rec {
|
config = rec {
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
term = if isLaptop then {
|
term = if (isLaptop || isVM) then {
|
||||||
cmd = "${pkgs.kitty}/bin/kitty";
|
cmd = "${pkgs.kitty}/bin/kitty";
|
||||||
desktop = "kitty";
|
desktop = "kitty";
|
||||||
} else {
|
} else {
|
||||||
@ -63,6 +63,12 @@ with config.deviceSpecific;
|
|||||||
# desktop = "gnumeric";
|
# desktop = "gnumeric";
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
EDITOR = config.defaultApplications.editor.cmd;
|
||||||
|
VISUAL = config.defaultApplications.editor.cmd;
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.alukard.xdg.mimeApps = {
|
home-manager.users.alukard.xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications =
|
defaultApplications =
|
||||||
@ -70,20 +76,18 @@ with config.deviceSpecific;
|
|||||||
builtins.mapAttrs (name: value:
|
builtins.mapAttrs (name: value:
|
||||||
if value ? desktop then [ "${value.desktop}.desktop" ] else value) {
|
if value ? desktop then [ "${value.desktop}.desktop" ] else value) {
|
||||||
"text/html" = browser;
|
"text/html" = browser;
|
||||||
# "image/*" = { desktop = "org.kde.gwenview"; };
|
# "image/*" = { desktop = "org.gnome.eog"; };
|
||||||
"application/x-bittorrent" = torrent;
|
"application/x-bittorrent" = torrent;
|
||||||
"application/zip" = archive;
|
"application/zip" = archive;
|
||||||
"application/rar" = archive;
|
"application/rar" = archive;
|
||||||
"application/7z" = archive;
|
"application/7z" = archive;
|
||||||
"application/*tar" = archive;
|
"application/*tar" = archive;
|
||||||
"application/x-kdenlive" = archive;
|
|
||||||
"x-scheme-handler/http" = browser;
|
"x-scheme-handler/http" = browser;
|
||||||
"x-scheme-handler/https" = browser;
|
"x-scheme-handler/https" = browser;
|
||||||
"x-scheme-handler/about" = browser;
|
"x-scheme-handler/about" = browser;
|
||||||
"x-scheme-handler/unknown" = browser;
|
"x-scheme-handler/unknown" = browser;
|
||||||
# "x-scheme-handler/mailto" = mail;
|
# "x-scheme-handler/mailto" = mail;
|
||||||
"application/pdf" = pdf;
|
"application/pdf" = pdf;
|
||||||
# "application/pdf" = { desktop = "org.kde.okular"; };
|
|
||||||
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
||||||
# text_processor;
|
# text_processor;
|
||||||
# "application/msword" = text_processor;
|
# "application/msword" = text_processor;
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
let
|
let
|
||||||
thm = config.lib.base16.theme;
|
thm = config.lib.base16.theme;
|
||||||
in
|
in
|
||||||
with config.deviceSpecific;
|
|
||||||
{
|
{
|
||||||
home-manager.users.alukard = {
|
home-manager.users.alukard = {
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = !isLaptop;
|
enable = !config.deviceSpecific.isLaptop;
|
||||||
settings = {
|
settings = {
|
||||||
font = {
|
font = {
|
||||||
normal = {
|
normal = {
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
let
|
let
|
||||||
thm = config.lib.base16.theme;
|
thm = config.lib.base16.theme;
|
||||||
in
|
in
|
||||||
with config.deviceSpecific;
|
|
||||||
{
|
{
|
||||||
home-manager.users.alukard = {
|
home-manager.users.alukard = {
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = isLaptop;
|
enable = config.deviceSpecific.isLaptop;
|
||||||
font.name = "${thm.powerlineFont} ${thm.smallFontSize}";
|
font.name = "${thm.powerlineFont} ${thm.smallFontSize}";
|
||||||
# keybindings = ''
|
# keybindings = ''
|
||||||
# '';
|
# '';
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with config.deviceSpecific;
|
|
||||||
{
|
{
|
||||||
home-manager.users.alukard.programs.mpv = {
|
home-manager.users.alukard.programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
vo = "gpu";
|
vo = "gpu";
|
||||||
hwdec = if video == "nvidia" then
|
hwdec = if config.deviceSpecific.devInfo.gpu.vendor == "nvidia" then
|
||||||
"vdpau"
|
"vdpau"
|
||||||
else
|
else
|
||||||
"vaapi";
|
"vaapi";
|
||||||
ytdl-format = if isLaptop then
|
ytdl-format = if config.deviceSpecific.isLaptop then
|
||||||
"bestvideo[height<=?1080]+bestaudio/best"
|
"bestvideo[height<=?1080]+bestaudio/best"
|
||||||
else
|
else
|
||||||
"bestvideo+bestaudio/best";
|
"bestvideo+bestaudio/best";
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
with rec {
|
with config.deviceSpecific; {
|
||||||
inherit (config) device deviceSpecific;
|
|
||||||
};
|
|
||||||
with deviceSpecific; {
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
programs.java = {
|
programs.java = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = if (device == "AMD-Workstation") then pkgs.jdk13 else pkgs.jre;
|
package = if (config.device == "AMD-Workstation") then pkgs.jdk13 else pkgs.jre;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Install cdemu for some gaming purposes
|
||||||
|
# programs.cdemu = {
|
||||||
|
# enable = true;
|
||||||
|
# image-analyzer = false;
|
||||||
|
# gui = false;
|
||||||
|
# group = "cdrom";
|
||||||
|
# };
|
||||||
|
|
||||||
home-manager.users.alukard.home.packages = with pkgs; [
|
home-manager.users.alukard.home.packages = with pkgs; [
|
||||||
# cli
|
# cli
|
||||||
advance-touch
|
advance-touch
|
||||||
@ -24,7 +29,8 @@ with deviceSpecific; {
|
|||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
nix-prefetch-github
|
nix-prefetch-github
|
||||||
nomino
|
nomino
|
||||||
(p7zip.override { enableUnfree = true; })
|
# (p7zip.override { enableUnfree = true; })
|
||||||
|
p7zip
|
||||||
pciutils
|
pciutils
|
||||||
pinfo
|
pinfo
|
||||||
ripgrep
|
ripgrep
|
||||||
@ -66,6 +72,7 @@ with deviceSpecific; {
|
|||||||
zathura
|
zathura
|
||||||
# audacity # fixit
|
# audacity # fixit
|
||||||
# quodlibet
|
# quodlibet
|
||||||
|
spicetify-cli
|
||||||
] ++ lib.optionals (!isVM) [
|
] ++ lib.optionals (!isVM) [
|
||||||
# rust-stable
|
# rust-stable
|
||||||
libreoffice
|
libreoffice
|
||||||
@ -82,8 +89,10 @@ with deviceSpecific; {
|
|||||||
] ++ lib.optionals isLaptop [
|
] ++ lib.optionals isLaptop [
|
||||||
# acpi
|
# acpi
|
||||||
# blueman
|
# blueman
|
||||||
] ++ lib.optionals (device == "AMD-Workstation") [
|
] ++ lib.optionals (config.device == "AMD-Workstation") [
|
||||||
# xonar-fp
|
# xonar-fp
|
||||||
|
] ++ lib.optionals (enableVirtualisation) [
|
||||||
|
virt-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
51
modules/applications/spotify/color.ini
Normal file
51
modules/applications/spotify/color.ini
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
[CherryBlossom]
|
||||||
|
main_fg = d98ba1
|
||||||
|
secondary_fg = 816e7c
|
||||||
|
main_bg = 131c26
|
||||||
|
sidebar_and_player_bg = 131c26
|
||||||
|
|
||||||
|
#tl_selected_hover = EEEEEE
|
||||||
|
|
||||||
|
cover_overlay_and_shadow = 816e7c
|
||||||
|
indicator_fg_and_button_bg = d98ba1
|
||||||
|
pressing_fg = d98ba1
|
||||||
|
slider_bg = 131c26
|
||||||
|
sidebar_indicator_and_hover_button_bg = d98ba1
|
||||||
|
scrollbar_fg_and_selected_row_bg = 131c26
|
||||||
|
pressing_button_fg = 816e7c
|
||||||
|
pressing_button_bg = d98ba1
|
||||||
|
selected_button = 816e7c
|
||||||
|
miscellaneous_bg = 131c26
|
||||||
|
miscellaneous_hover_bg = 131c26
|
||||||
|
preserve_1 = 131c26
|
||||||
|
|
||||||
|
[Coral]
|
||||||
|
main_fg = f88379
|
||||||
|
secondary_fg = 8c92ac
|
||||||
|
main_bg = 1d1f28
|
||||||
|
sidebar_and_player_bg = 1d1f28
|
||||||
|
|
||||||
|
#tl_selected_hover = EEEEEE
|
||||||
|
|
||||||
|
cover_overlay_and_shadow = 8c92ac
|
||||||
|
indicator_fg_and_button_bg = f88379
|
||||||
|
pressing_fg = f88379
|
||||||
|
slider_bg = 1d1f28
|
||||||
|
sidebar_indicator_and_hover_button_bg = f88379
|
||||||
|
scrollbar_fg_and_selected_row_bg = 1d1f28
|
||||||
|
pressing_button_fg = 8c92ac
|
||||||
|
pressing_button_bg = f88379
|
||||||
|
selected_button = 8c92ac
|
||||||
|
miscellaneous_bg = 1d1f28
|
||||||
|
miscellaneous_hover_bg = 1d1f28
|
||||||
|
preserve_1 = 1d1f28
|
||||||
|
|
||||||
|
|
||||||
|
#Greyish Pink = #c79da9
|
||||||
|
#Purplish grey = #816e7c
|
||||||
|
#Very dark (mostly black) blue = #131c26
|
||||||
|
|
||||||
|
#NEED TO DO
|
||||||
|
#corner radius when hovering to edit playlist image
|
||||||
|
#downloaded status is fully colored
|
||||||
|
#connect to device shadow
|
7
modules/applications/spotify/default.nix
Normal file
7
modules/applications/spotify/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
xdg.configFile."spicetify/Themes/base16/color.ini".source = ./color.ini;
|
||||||
|
xdg.configFile."spicetify/Themes/base16/user.css".source = ./user.css;
|
||||||
|
};
|
||||||
|
}
|
647
modules/applications/spotify/user.css
Normal file
647
modules/applications/spotify/user.css
Normal file
@ -0,0 +1,647 @@
|
|||||||
|
:root {
|
||||||
|
--bar-height: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Round corner cover image*/
|
||||||
|
.card-image,
|
||||||
|
.card-placeholder-wrapper,
|
||||||
|
.card-image-content-wrapper,
|
||||||
|
.Card:not(.Card--artist) .Card__image,
|
||||||
|
.Card:not(.Card--artist) .Card__image-wrapper {
|
||||||
|
border-radius: 10px !important;
|
||||||
|
overflow: hidden !important
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Hide some annoying elements like profile name and pic, upgrade button and device connect bar at bottom, new playlist button*/
|
||||||
|
.profile.content-top-bar__profile-link,
|
||||||
|
.upgrade-button,
|
||||||
|
.view-player .remote-playback-bar,
|
||||||
|
.NewPlaylistButton {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*Exclude these elements from draggable property because it stops them from clickable*/
|
||||||
|
.profile-items-container,
|
||||||
|
.profile {
|
||||||
|
-webkit-app-region: no-drag !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Thinner scrollbar*/
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
height: 6px !important;
|
||||||
|
width: 6px !important;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Round corner scrollbar*/
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Hide top and bottom buttons of scrollbar */
|
||||||
|
/*who uses those, lol*/
|
||||||
|
::-webkit-scrollbar-button {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Hide cover image overlay*/
|
||||||
|
.card-overlay {
|
||||||
|
visibility: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Lift up cover when hovering on it*/
|
||||||
|
.card-image-content-wrapper,
|
||||||
|
.Card:not(.Card--artist) .Card__image-wrapper {
|
||||||
|
transition-property: transform, box-shadow !important;
|
||||||
|
transition-duration: 1s !important;
|
||||||
|
transition-timing-function: cubic-bezier(.3,0,0,1) !important;
|
||||||
|
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image-hit-area:not(.no-hover):hover .card-image-content-wrapper,
|
||||||
|
.Card:not(.Card--artist) .Card__image-hit-area-counter-scale:hover .Card__image-wrapper {
|
||||||
|
transform: translateY(-10px);
|
||||||
|
box-shadow: 0 15px 30px rgba(0,0,0,0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-image-hit-area .card-button-add,
|
||||||
|
.card-image-hit-area .card-button-play,
|
||||||
|
.card-image-hit-area .card-button-more,
|
||||||
|
.Card__image-hit-area .card-button-add,
|
||||||
|
.Card__image-hit-area .card-button-play,
|
||||||
|
.Card__image-hit-area .card-button-more,
|
||||||
|
.Card__image-hit-area .Card__play-button,
|
||||||
|
.Card__image-hit-area .Card__add-button,
|
||||||
|
.Card__image-hit-area .Card__more-button,
|
||||||
|
.Card__image-hit-area .Card__overlay {
|
||||||
|
transition-property: all !important;
|
||||||
|
transition-duration: 1s !important;
|
||||||
|
transition-timing-function: cubic-bezier(.3,0,0,1) !important;
|
||||||
|
opacity: 0 !important;
|
||||||
|
}
|
||||||
|
.card-image-hit-area:not(.no-hover):hover .card-button-add,
|
||||||
|
.card-image-hit-area:not(.no-hover):hover .card-button-play,
|
||||||
|
.card-image-hit-area:not(.no-hover):hover .card-button-more,
|
||||||
|
.Card__image-hit-area:not(.no-hover):hover .card-button-add,
|
||||||
|
.Card__image-hit-area:not(.no-hover):hover .card-button-play,
|
||||||
|
.Card__image-hit-area:not(.no-hover):hover .card-button-more {
|
||||||
|
opacity: 1 !important;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Card__image-hit-area:hover .Card__play-button,
|
||||||
|
.Card__image-hit-area:hover .Card__add-button,
|
||||||
|
.Card__image-hit-area:hover .Card__more-button,
|
||||||
|
.Card__image-hit-area:hover .Card__overlay {
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__content .glue-page-header__image-inner {
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__full-description-overlay {
|
||||||
|
box-shadow: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-placeholder-wrapper {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Spice up search input background*/
|
||||||
|
.SearchInput {
|
||||||
|
color: var(--modspotify_main_fg);
|
||||||
|
}
|
||||||
|
.SearchInput__input {
|
||||||
|
color: var(--modspotify_secondary_fg);
|
||||||
|
background-color: rgba(var(--modspotify_rgb_scrollbar_fg_and_selected_row_bg), 0.5) !important;
|
||||||
|
border-radius: 4px !important;
|
||||||
|
padding-left: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar:hover .sidebar-navbar.sidebar-scroll-element {
|
||||||
|
opacity: 1!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .player-controls-container,
|
||||||
|
.view-player .player-controls-container .controls {
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .player-controls-container .controls .button-play{
|
||||||
|
height:50px !important;
|
||||||
|
border-radius:50px !important;
|
||||||
|
background: transparent !important;
|
||||||
|
box-shadow:0 0 0 0 !important;
|
||||||
|
width:50px !important;
|
||||||
|
overflow: visible !important;
|
||||||
|
box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
|
||||||
|
transition:none 0.3s cubic-bezier(.3,0,.7,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .player-controls-container .controls .button-play:before{
|
||||||
|
font-size:18px !important;
|
||||||
|
padding-left: 16px !important;
|
||||||
|
padding-top: 9px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .player-controls-container .controls .button-play:after {
|
||||||
|
box-shadow: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .player-controls-container {
|
||||||
|
position: absolute !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .player-controls-container .controls {
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
align-items: center !important;
|
||||||
|
margin-top : 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Hide the song duration and elapsed text. I dont know where to put those so I just hide them
|
||||||
|
*/
|
||||||
|
.view-player .player-controls-container .progress-container .elapsed,
|
||||||
|
.view-player .player-controls-container .progress-container .remaining {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add round corner for Gerne and Mood cards */
|
||||||
|
.gc-image-container,
|
||||||
|
.gc-image {
|
||||||
|
border-radius: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Collage of 3 album covers is usually seen in Browse and Chart.
|
||||||
|
*/
|
||||||
|
.card-puff__image-wrapper,
|
||||||
|
.card-puff__info-container,
|
||||||
|
.card-puff__card-image {
|
||||||
|
border-radius: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-puff__image-wrapper {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-puff__card-image {
|
||||||
|
box-shadow: 5px 0 30px rgba(0,0,0,0.7);
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-puff__title-container {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-puff.pressed .card-puff__image-wrapper,
|
||||||
|
.card-puff.pressed .card-puff__info-container {
|
||||||
|
opacity: 0.7 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-puff__title {
|
||||||
|
padding: 5px 10px 5px 10px !important;
|
||||||
|
background-color: var(--modspotify_main_bg) !important;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid var(--modspotify_main_fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
We use round corner on cover so they look weird in original
|
||||||
|
form, so I move last cover to the right 20px and first one to the left 20px
|
||||||
|
*/
|
||||||
|
.card-puff__card-image:nth-child(1) {
|
||||||
|
right: 20px;
|
||||||
|
box-shadow: 0 0 0 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-puff__card-image:nth-child(3) {
|
||||||
|
left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-overlay-label {
|
||||||
|
top: 140px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
|
.glue-page-header__background-color {
|
||||||
|
background-image: none !important;
|
||||||
|
background: var(--modspotify_main_bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .glue-page-header__sticky {
|
||||||
|
padding-top: 60px !important;
|
||||||
|
} */
|
||||||
|
|
||||||
|
/*
|
||||||
|
Remove those title, cringy description and
|
||||||
|
meaningless followers number
|
||||||
|
*/
|
||||||
|
|
||||||
|
.carousel .card-info-subtitle-description,
|
||||||
|
.carousel .card-info-subtitle-metadata,
|
||||||
|
.carousel .card:not(.card-type-station).card-info-title,
|
||||||
|
.carousel .card.card-type-playlist.image-loaded .card-info-subtitle-description,
|
||||||
|
.carousel .card.card-type-playlist.image-loaded .card-info-subtitle-metadata {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
In top of Browse usually has bunch of Playlist or Album cards,
|
||||||
|
and they has .carousel as a wrapper and it hides anything that
|
||||||
|
overflows from its zone, aka our shadow and lifting animation.
|
||||||
|
*/
|
||||||
|
.carousel {
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Button with text Play
|
||||||
|
*/
|
||||||
|
.button.button-green,
|
||||||
|
.GlueButton.GlueButton--style-green {
|
||||||
|
color: var(--modspotify_main_bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Change text color in playlist
|
||||||
|
*/
|
||||||
|
.tl-explicit .label,
|
||||||
|
.tl-premium .label,
|
||||||
|
.tl-cell:not(.tl-number),
|
||||||
|
.tl-cell a:link,
|
||||||
|
.tl-highlight {
|
||||||
|
color: var(--modspotify_secondary_fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-type-album .card-info-title,
|
||||||
|
.card-type-track .card-info-title,
|
||||||
|
.card-type-collection-album .card-info-title,
|
||||||
|
.card-type-episode .card-info-title {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 900 !important;
|
||||||
|
text-align: center !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-type-album .card-info-subtitle-links,
|
||||||
|
.card-type-track .card-info-subtitle-links,
|
||||||
|
.card-type-collection-album .card-info-subtitle-links,
|
||||||
|
.card-type-episode .card-info-subtitle-links {
|
||||||
|
text-align: center !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tracklist-station-container::after {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GlueHeader__background-overlay {
|
||||||
|
background: var(--modspotify_main_bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Move navigation buttons and search field to the right and down */
|
||||||
|
.browser-navigation-top-bar {
|
||||||
|
margin-left: 40px !important;
|
||||||
|
margin-top: 15px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SearchInput__input,
|
||||||
|
.SearchInput__searchIcon,
|
||||||
|
.SearchInput__clearButton {
|
||||||
|
margin-top: 15px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-top-bar__profile-menu-button {
|
||||||
|
margin-top: 15px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body-container--windows:not(.with-buddy-list):not(.messagebar) .content-top-bar__profile {
|
||||||
|
margin-right: 110px !important;
|
||||||
|
margin-top: -5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Spice up Fullscreen mode */
|
||||||
|
#view-player .album-art .album-art__image {
|
||||||
|
border-radius: 30px !important;
|
||||||
|
box-shadow: 0 10px 70px rgba(var(--modspotify_rgb_cover_overlay_and_shadow),.5) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#view-player .album-art .album-art__image .card-image-content-wrapper,
|
||||||
|
#view-player .album-art .album-art__image .card-image-content-wrapper .card-image {
|
||||||
|
border-radius: 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Daily mixes */
|
||||||
|
.carousel .card-info-wrapper.card-info-with-description.card-info-with-metadata {
|
||||||
|
height: 50px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove section divider */
|
||||||
|
.section-divider {
|
||||||
|
border-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Adjust Position of border active tab in Nav bar at top
|
||||||
|
and add little glowing effect
|
||||||
|
*/
|
||||||
|
.nav.navbar-nav {
|
||||||
|
overflow: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav.navbar-nav a {
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav.navbar-nav a::after {
|
||||||
|
bottom: 0px !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav.navbar-nav .active a::after{
|
||||||
|
box-shadow: 0 0px 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav.navbar-nav a:focus:not(.button):active::after{
|
||||||
|
background-color: var(--modspotify_pressing_fg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notification bar */
|
||||||
|
#content-wrapper #view-message-bar {
|
||||||
|
position: absolute !important;
|
||||||
|
width: calc(100% - 160px) !important;
|
||||||
|
margin-left: 80px !important;
|
||||||
|
border-radius: 0 0 10px 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Small cover Big cover mechanism */
|
||||||
|
.now-playing.cover-size-transition.active.image-expanded .cover-image {
|
||||||
|
width: 10px !important;
|
||||||
|
height: 10px !important;
|
||||||
|
}
|
||||||
|
.now-playing.cover-size-transition.active.image-expanded .caption {
|
||||||
|
padding-left: 0px !important;
|
||||||
|
}
|
||||||
|
#view-now-playing a.image {
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#view-now-playing.expanded {
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#now-playing-image-large .cover-image {
|
||||||
|
height: 200px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Profile arrow in top left */
|
||||||
|
.content-top-bar__profile-menu-button .dropdown {
|
||||||
|
position: fixed !important;
|
||||||
|
top: 10px !important;
|
||||||
|
-webkit-app-region: no-drag !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.body-container--windows .content-top-bar__profile-menu-button .dropdown {
|
||||||
|
right: 190px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body:not(.body-container--windows) .content-top-bar__profile-menu-button .dropdown {
|
||||||
|
right: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Small tooltip */
|
||||||
|
#tooltip {
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,0.2) !important;
|
||||||
|
border-radius: 5px !important;
|
||||||
|
border: 2px solid var(--modspotify_main_fg);
|
||||||
|
padding: 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-arrow-top, .tooltip-arrow-bottom {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lyrics-lines-container,
|
||||||
|
.message-container {
|
||||||
|
color: #FFFFFF !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Home page */
|
||||||
|
.GlueCarousel__grid-wrapper::-webkit-scrollbar-thumb {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GlueCard__info-wrapper,
|
||||||
|
.Card__info-wrapper {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-horizontal-interior-wrapper .card-info-title {
|
||||||
|
text-align: start !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tl-row.selected:hover .tl-cell {
|
||||||
|
background: var(--modspotify_scrollbar_fg_and_selected_row_bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.GlueTableRow--is-selected {
|
||||||
|
background-color: var(--modspotify_scrollbar_fg_and_selected_row_bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tracklist-podcast .tl-progress .row-progress__bar {
|
||||||
|
background-color: var(--modspotify_main_fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Header__background-color{
|
||||||
|
background-color: var(--modspotify_main_bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Button--style-green,
|
||||||
|
.button.button-green, .button.button-white {
|
||||||
|
border-radius: 4px;
|
||||||
|
color: var(--modspotify_main_bg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header:not(.glue-page-header--album):not(.glue-page-header--playlist):not(.glue-page-header--artist):not(.glue-page-header--dailymix):not(.glue-page-header--user):not(.glue-page-header--show)
|
||||||
|
.glue-page-header__content-inner .glue-page-header__title-text,
|
||||||
|
.HomeHeader .Header__content-inner .Header__title-text-inner,
|
||||||
|
.MadeForYouHeader .Header__content-inner .Header__title-text-inner,
|
||||||
|
.RecentlyPlayedPage__header .Header__content-inner .Header__title-text-inner {
|
||||||
|
background-color: var(--modspotify_main_bg);
|
||||||
|
padding: 5px 20px;
|
||||||
|
border: 5px solid var(--modspotify_main_fg) !important;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 4px 12px 0 rgba(var(--modspotify_rgb_cover_overlay_and_shadow),.2);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header.glue-page-header--album .glue-page-header__content-inner .glue-page-header__title,
|
||||||
|
.glue-page-header.glue-page-header--artist .glue-page-header__content-inner .glue-page-header__title,
|
||||||
|
.glue-page-header.glue-page-header--dailymix .glue-page-header__content-inner .glue-page-header__title,
|
||||||
|
.glue-page-header.glue-page-header--playlist .glue-page-header__content-inner .glue-page-header__title {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.glue-page-header__title-text {
|
||||||
|
color: var(--modspotify_main_fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header .glue-page-header__content-inner .glue-page-header__button {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__content-inner,
|
||||||
|
.glue-page-header__data,
|
||||||
|
.glue-page-header__title,
|
||||||
|
.Header__content-inner,
|
||||||
|
.Header__data,
|
||||||
|
.Header__title,
|
||||||
|
.Header__title-text,
|
||||||
|
.Header__title-text-inner {
|
||||||
|
overflow: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Force player bar to has fixed height*/
|
||||||
|
.view-player {
|
||||||
|
height: var(--bar-height) !important;
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .now-playing {
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .now-playing .cover-image-link,
|
||||||
|
.view-player .now-playing .cover-image-link figure {
|
||||||
|
width: var(--bar-height);
|
||||||
|
height: var(--bar-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
#now-playing-image-small .cover-image {
|
||||||
|
position: fixed !important;
|
||||||
|
width: var(--bar-height);
|
||||||
|
height: var(--bar-height);
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .now-playing .cover-image-link-wrapper {
|
||||||
|
flex: 0 1 calc(var(--bar-height) + 10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-container {
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.view-player .now-playing-container .button-add {
|
||||||
|
color: var(--modspotify_main_fg) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-container .progress-bar,
|
||||||
|
.progress-container .inner {
|
||||||
|
top: 0 !important;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-container .progress-bar-wrapper {
|
||||||
|
top: 0 !important;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-container {
|
||||||
|
position: fixed !important;
|
||||||
|
width: 100% !important;
|
||||||
|
bottom: var(--bar-height) !important;
|
||||||
|
margin : 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-container .inner {
|
||||||
|
border-radius: 0 2px 2px 0 !important;
|
||||||
|
background-color: var(--modspotify_main_fg) !important;
|
||||||
|
box-shadow: 0 2px 2px 0 var(--modspotify_main_fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__p2s-details,
|
||||||
|
.glue-page-header__p2s-followers {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu {
|
||||||
|
border: 2px solid var(--modspotify_main_fg);
|
||||||
|
box-shadow: 0 4px 12px 0 rgba(var(--modspotify_rgb_cover_overlay_and_shadow),.2);
|
||||||
|
border-radius: 7px !important;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu-wrapper ::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu-wrapper {
|
||||||
|
border-right: 3px solid black;
|
||||||
|
border-image: linear-gradient(0deg, transparent , var(--modspotify_scrollbar_fg_and_selected_row_bg) 40%, var(--modspotify_scrollbar_fg_and_selected_row_bg) 60%, transparent 90%) 2 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-view-wrapper {
|
||||||
|
overflow: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Button--style-icon-stroke:after,
|
||||||
|
.Button--style-icon-stroke:hover:after,
|
||||||
|
.Button--style-icon-stroke,
|
||||||
|
.glue-page-header__button .button-icon-with-stroke,
|
||||||
|
.glue-page-header__button .button-icon-with-stroke::after {
|
||||||
|
box-shadow: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header.glue-page-header--artist .glue-page-header__label {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header.glue-page-header--artist.has-custom-image .glue-page-header__label {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__content .glue-page-header__label {
|
||||||
|
margin-left: -2px;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__label span,
|
||||||
|
.Header__label span {
|
||||||
|
background-color: var(--modspotify_main_fg);
|
||||||
|
color: var(--modspotify_main_bg);
|
||||||
|
padding: 2px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glue-page-header__label .header-verified-check {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.remotebar .view-player .player-bar-wrapper {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SidebarListItem--is-active:after,
|
||||||
|
.RootlistItem--is-active:after,
|
||||||
|
/* For Linux */ #view-navigation-bar .item.active:after {
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: linear-gradient(90deg, var(--modspotify_sidebar_indicator_and_hover_button_bg) , transparent);
|
||||||
|
opacity: 0.2;
|
||||||
|
bottom: unset;
|
||||||
|
top: 5%;
|
||||||
|
height: 90%;
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
.Header__image-inner {
|
||||||
|
box-shadow: unset;
|
||||||
|
}
|
@ -1,15 +1,17 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with config.deviceSpecific;
|
|
||||||
with config.lib.base16.theme;
|
with config.lib.base16.theme;
|
||||||
|
let
|
||||||
|
thm = config.lib.base16.theme;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.alukard = {
|
home-manager.users.alukard = {
|
||||||
programs.urxvt = {
|
programs.urxvt = {
|
||||||
enable = isLaptop;
|
enable = config.deviceSpecific.isLaptop;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
"font" = "xft:${powerlineFont}:style=Regular:size=${smallFontSize}";
|
"font" = "xft:${thm.powerlineFont}:style=Regular:size=${thm.smallFontSize}";
|
||||||
"boldFont" = "xft:${powerlineFont}:style=Bold:size=${smallFontSize}";
|
"boldFont" = "xft:${thm.powerlineFont}:style=Bold:size=${thm.smallFontSize}";
|
||||||
"italicFont" = "xft:${powerlineFont}:style=Italic:size=${smallFontSize}";
|
"italicFont" = "xft:${thm.powerlineFont}:style=Italic:size=${thm.smallFontSize}";
|
||||||
"boldItalicfont" = "xft:${powerlineFont}:style=Bold Italic:size=${smallFontSize}";
|
"boldItalicfont" = "xft:${thm.powerlineFont}:style=Bold Italic:size=${thm.smallFontSize}";
|
||||||
|
|
||||||
"letterSpace" = "0";
|
"letterSpace" = "0";
|
||||||
"lineSpace" = "0";
|
"lineSpace" = "0";
|
||||||
@ -31,31 +33,31 @@ with config.lib.base16.theme;
|
|||||||
"keysym.Control-Right" = "\\033[1;5C";
|
"keysym.Control-Right" = "\\033[1;5C";
|
||||||
"keysym.Control-Left" = "\\033[1;5D";
|
"keysym.Control-Left" = "\\033[1;5D";
|
||||||
|
|
||||||
"foreground" = "#${base05-hex}";
|
"foreground" = "#${thm.base05-hex}";
|
||||||
"background" = "#${base00-hex}";
|
"background" = "#${thm.base00-hex}";
|
||||||
"cursorColor" = "#${base05-hex}";
|
"cursorColor" = "#${thm.base05-hex}";
|
||||||
"color0" = "#${base00-hex}";
|
"color0" = "#${thm.base00-hex}";
|
||||||
"color1" = "#${base08-hex}";
|
"color1" = "#${thm.base08-hex}";
|
||||||
"color2" = "#${base0B-hex}";
|
"color2" = "#${thm.base0B-hex}";
|
||||||
"color3" = "#${base0A-hex}";
|
"color3" = "#${thm.base0A-hex}";
|
||||||
"color4" = "#${base0D-hex}";
|
"color4" = "#${thm.base0D-hex}";
|
||||||
"color5" = "#${base0E-hex}";
|
"color5" = "#${thm.base0E-hex}";
|
||||||
"color6" = "#${base0C-hex}";
|
"color6" = "#${thm.base0C-hex}";
|
||||||
"color7" = "#${base05-hex}";
|
"color7" = "#${thm.base05-hex}";
|
||||||
"color8" = "#${base03-hex}";
|
"color8" = "#${thm.base03-hex}";
|
||||||
"color9" = "#${base08-hex}";
|
"color9" = "#${thm.base08-hex}";
|
||||||
"color10" = "#${base0B-hex}";
|
"color10" = "#${thm.base0B-hex}";
|
||||||
"color11" = "#${base0A-hex}";
|
"color11" = "#${thm.base0A-hex}";
|
||||||
"color12" = "#${base0D-hex}";
|
"color12" = "#${thm.base0D-hex}";
|
||||||
"color13" = "#${base0E-hex}";
|
"color13" = "#${thm.base0E-hex}";
|
||||||
"color14" = "#${base0C-hex}";
|
"color14" = "#${thm.base0C-hex}";
|
||||||
"color15" = "#${base07-hex}";
|
"color15" = "#${thm.base07-hex}";
|
||||||
"color16" = "#${base09-hex}";
|
"color16" = "#${thm.base09-hex}";
|
||||||
"color17" = "#${base0F-hex}";
|
"color17" = "#${thm.base0F-hex}";
|
||||||
"color18" = "#${base01-hex}";
|
"color18" = "#${thm.base01-hex}";
|
||||||
"color19" = "#${base02-hex}";
|
"color19" = "#${thm.base02-hex}";
|
||||||
"color20" = "#${base04-hex}";
|
"color20" = "#${thm.base04-hex}";
|
||||||
"color21" = "#${base06-hex}";
|
"color21" = "#${thm.base06-hex}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
34
modules/boot.nix
Normal file
34
modules/boot.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ lib, pkgs, config, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = lib.mkIf (pkgs.system == "x86_64-linux") true;
|
||||||
|
# efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
kernelPackages = if config.deviceSpecific.isVM then
|
||||||
|
pkgs.linuxPackages
|
||||||
|
else
|
||||||
|
pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
supportedFilesystems = [ "ntfs" ];
|
||||||
|
|
||||||
|
blacklistedKernelModules = lib.mkIf (config.device == "Dell-Laptop") [
|
||||||
|
"psmouse"
|
||||||
|
];
|
||||||
|
|
||||||
|
initrd.kernelModules = if config.deviceSpecific.devInfo.gpu.vendor == "intel" then [ "iHD" ] else [ ];
|
||||||
|
|
||||||
|
# kernelParams = lib.mkIf (device == "Dell-Laptop") [
|
||||||
|
# "mem_sleep_default=deep"
|
||||||
|
# ];
|
||||||
|
|
||||||
|
extraModprobeConfig = lib.mkIf (config.device == "AMD-Workstation") ''
|
||||||
|
options snd slots=snd_virtuoso,snd_usb_audio
|
||||||
|
'';
|
||||||
|
|
||||||
|
consoleLogLevel = 3;
|
||||||
|
kernel.sysctl = {
|
||||||
|
"vm.swappiness" = if config.deviceSpecific.isSSD then 1 else 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,10 @@
|
|||||||
device:
|
builtins.listToAttrs (builtins.map (path: {
|
||||||
{ config, lib, ... }: {
|
name = builtins.head (let
|
||||||
imports = [
|
b = builtins.baseNameOf path;
|
||||||
|
m = builtins.match "(.*)\\.nix" b;
|
||||||
|
in if isNull m then [ b ] else m);
|
||||||
|
value = import path;
|
||||||
|
}) [
|
||||||
./applications/alacritty.nix
|
./applications/alacritty.nix
|
||||||
./applications/kitty.nix
|
./applications/kitty.nix
|
||||||
./applications/mpv.nix
|
./applications/mpv.nix
|
||||||
@ -10,8 +14,11 @@ device:
|
|||||||
./applications/vscode.nix
|
./applications/vscode.nix
|
||||||
|
|
||||||
# ./workspace/barrier.nix
|
# ./workspace/barrier.nix
|
||||||
|
./workspace/cursor.nix
|
||||||
./workspace/dunst.nix
|
./workspace/dunst.nix
|
||||||
./workspace/fonts.nix
|
./workspace/fonts.nix
|
||||||
|
./workspace/git.nix
|
||||||
|
./workspace/gpg.nix
|
||||||
./workspace/gtk.nix
|
./workspace/gtk.nix
|
||||||
./workspace/i3
|
./workspace/i3
|
||||||
./workspace/i3status-rust
|
./workspace/i3status-rust
|
||||||
@ -27,19 +34,21 @@ device:
|
|||||||
./workspace/zsh.nix
|
./workspace/zsh.nix
|
||||||
|
|
||||||
./applications.nix
|
./applications.nix
|
||||||
|
./boot.nix
|
||||||
./devices.nix
|
./devices.nix
|
||||||
./filesystems.nix
|
./filesystems.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
./packages.nix
|
./nix.nix
|
||||||
|
./overlay.nix
|
||||||
./power.nix
|
./power.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
|
./security.nix
|
||||||
./services.nix
|
./services.nix
|
||||||
./sound
|
./sound
|
||||||
./themes.nix
|
./themes.nix
|
||||||
./users.nix
|
./virtualisation.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
./xserver.nix
|
./xserver.nix
|
||||||
];
|
])
|
||||||
}
|
|
||||||
|
@ -2,77 +2,139 @@
|
|||||||
with lib;
|
with lib;
|
||||||
with types; {
|
with types; {
|
||||||
options = {
|
options = {
|
||||||
device = mkOption { type = strMatching "[A-z|0-9]*-(Laptop|Workstation|VM)"; };
|
device = mkOption { type = str; };
|
||||||
devices = mkOption { type = attrs; };
|
deviceSpecific = {
|
||||||
deviceSpecific = mkOption { type = attrs; };
|
devInfo = {
|
||||||
};
|
|
||||||
config = {
|
|
||||||
deviceSpecific = let
|
|
||||||
device = config.device;
|
|
||||||
devInfo = config.devices.${config.device};
|
|
||||||
in rec {
|
|
||||||
isLaptop = (!isNull (builtins.match ".*Laptop" device));
|
|
||||||
isVM = (!isNull (builtins.match ".*VM" device));
|
|
||||||
isHost = (device == "AMD-Workstation");
|
|
||||||
isShared = devInfo.isShared;
|
|
||||||
isSSD = devInfo.drive.type == "ssd";
|
|
||||||
smallScreen = (device == "Dell-Laptop");
|
|
||||||
cpu = devInfo.cpu.vendor;
|
|
||||||
video = devInfo.video;
|
|
||||||
ram = devInfo.ram;
|
|
||||||
enableVirtualisation = devInfo.enableVirtualisation;
|
|
||||||
isGaming = devInfo.gaming;
|
|
||||||
};
|
|
||||||
|
|
||||||
devices = {
|
|
||||||
AMD-Workstation = {
|
|
||||||
cpu = {
|
cpu = {
|
||||||
vendor = "amd";
|
arch = mkOption { type = enum [ "x86_64" "aarch64" ]; };
|
||||||
clock = 3700;
|
vendor = mkOption { type = enum [ "amd" "intel" "broadcom" ]; };
|
||||||
threads = 12;
|
clock = mkOption { type = int; };
|
||||||
|
cores = mkOption { type = int; };
|
||||||
};
|
};
|
||||||
drive = {
|
drive = {
|
||||||
type = "ssd";
|
type = mkOption { type = enum [ "hdd" "ssd" ]; };
|
||||||
size = 250;
|
speed = mkOption { type = int; };
|
||||||
|
size = mkOption { type = int; };
|
||||||
};
|
};
|
||||||
video = "amd";
|
gpu = {
|
||||||
ram = 16;
|
vendor = mkOption { type = enum [ "amd" "nvidia" "intel" "vm" ]; };
|
||||||
isShared = false;
|
|
||||||
enableVirtualisation = true;
|
|
||||||
gaming = true;
|
|
||||||
};
|
};
|
||||||
Dell-Laptop = {
|
ram = mkOption { type = int; };
|
||||||
cpu = {
|
legacy = mkOption { type = bool; default = false; };
|
||||||
vendor = "intel";
|
bigScreen = mkOption {
|
||||||
clock = 1600;
|
type = bool;
|
||||||
threads = 8;
|
default = true;
|
||||||
};
|
};
|
||||||
drive = {
|
|
||||||
type = "ssd";
|
|
||||||
size = 250;
|
|
||||||
};
|
};
|
||||||
video = "intel";
|
isLaptop = mkOption {
|
||||||
ram = 16;
|
type = bool;
|
||||||
isShared = false;
|
default =
|
||||||
enableVirtualisation = false;
|
!isNull (builtins.match ".*Laptop" config.networking.hostName);
|
||||||
gaming = true;
|
|
||||||
};
|
};
|
||||||
NixOS-VM = {
|
isVM = mkOption {
|
||||||
cpu = {
|
type = bool;
|
||||||
vendor = "amd";
|
default =
|
||||||
clock = 3700;
|
!isNull (builtins.match ".*VM" config.networking.hostName);
|
||||||
threads = 4;
|
|
||||||
};
|
};
|
||||||
drive = {
|
isHost = mkOption {
|
||||||
type = "ssd";
|
type = bool;
|
||||||
size = 20;
|
default = false;
|
||||||
};
|
};
|
||||||
video = "virtualbox";
|
isShared = mkOption {
|
||||||
ram = 4;
|
type = bool;
|
||||||
isShared = false;
|
default = false;
|
||||||
enableVirtualisation = false;
|
};
|
||||||
gaming = false;
|
isGaming = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
enableVirtualisation = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = config.deviceSpecific.isHost;
|
||||||
|
};
|
||||||
|
isSSD = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = config.deviceSpecific.devInfo.drive.type == "ssd";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# { pkgs, lib, config, ... }:
|
||||||
|
# with lib;
|
||||||
|
# with types; {
|
||||||
|
# options = {
|
||||||
|
# device = mkOption { type = strMatching "[A-z|0-9]*-(Laptop|Workstation|VM)"; };
|
||||||
|
# devices = mkOption { type = attrs; };
|
||||||
|
# deviceSpecific = mkOption { type = attrs; };
|
||||||
|
# };
|
||||||
|
# config = {
|
||||||
|
# deviceSpecific = let
|
||||||
|
# device = config.device;
|
||||||
|
# devInfo = config.devices.${config.device};
|
||||||
|
# in rec {
|
||||||
|
# isLaptop = (!isNull (builtins.match ".*Laptop" device));
|
||||||
|
# isVM = (!isNull (builtins.match ".*VM" device));
|
||||||
|
# isHost = (device == "AMD-Workstation");
|
||||||
|
# isShared = devInfo.isShared;
|
||||||
|
# isSSD = devInfo.drive.type == "ssd";
|
||||||
|
# smallScreen = (device == "Dell-Laptop");
|
||||||
|
# cpu = devInfo.cpu.vendor;
|
||||||
|
# gpu = devInfo.gpu;
|
||||||
|
# ram = devInfo.ram;
|
||||||
|
# enableVirtualisation = devInfo.enableVirtualisation;
|
||||||
|
# isGaming = devInfo.gaming;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# devices = {
|
||||||
|
# AMD-Workstation = {
|
||||||
|
# cpu = {
|
||||||
|
# vendor = "amd";
|
||||||
|
# clock = 3700;
|
||||||
|
# threads = 12;
|
||||||
|
# };
|
||||||
|
# drive = {
|
||||||
|
# type = "ssd";
|
||||||
|
# size = 250;
|
||||||
|
# };
|
||||||
|
# gpu = "amd";
|
||||||
|
# ram = 16;
|
||||||
|
# isShared = false;
|
||||||
|
# enableVirtualisation = true;
|
||||||
|
# gaming = true;
|
||||||
|
# };
|
||||||
|
# Dell-Laptop = {
|
||||||
|
# cpu = {
|
||||||
|
# vendor = "intel";
|
||||||
|
# clock = 1600;
|
||||||
|
# threads = 8;
|
||||||
|
# };
|
||||||
|
# drive = {
|
||||||
|
# type = "ssd";
|
||||||
|
# size = 250;
|
||||||
|
# };
|
||||||
|
# gpu = "intel";
|
||||||
|
# ram = 16;
|
||||||
|
# isShared = false;
|
||||||
|
# enableVirtualisation = true;
|
||||||
|
# gaming = true;
|
||||||
|
# };
|
||||||
|
# NixOS-VM = {
|
||||||
|
# cpu = {
|
||||||
|
# vendor = "amd";
|
||||||
|
# clock = 3700;
|
||||||
|
# threads = 4;
|
||||||
|
# };
|
||||||
|
# drive = {
|
||||||
|
# type = "ssd";
|
||||||
|
# size = 20;
|
||||||
|
# };
|
||||||
|
# gpu = "virtualbox";
|
||||||
|
# ram = 4;
|
||||||
|
# isShared = false;
|
||||||
|
# enableVirtualisation = false;
|
||||||
|
# gaming = false;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
@ -1,26 +1,19 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
with rec {
|
with config.deviceSpecific; {
|
||||||
inherit (config) device devices deviceSpecific;
|
|
||||||
};
|
|
||||||
with deviceSpecific; {
|
|
||||||
|
|
||||||
hardware.cpu.${devices.${device}.cpu.vendor}.updateMicrocode = true; # Update microcode
|
hardware.cpu.${devInfo.cpu.vendor}.updateMicrocode = true;
|
||||||
hardware.enableRedistributableFirmware = true; # For some unfree drivers
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
# Enable hardware video acceleration for Intel
|
# Enable hardware video acceleration for Intel
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||||
};
|
};
|
||||||
boot.initrd.kernelModules = if video == "intel" then [ "iHD" ] else [ ];
|
|
||||||
# boot.initrd.kernelModules = if video == "intel" then [ "i915" ] else [ ];
|
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
extraPackages = if video == "intel" then [
|
extraPackages = if devInfo.gpu.vendor == "intel" then [
|
||||||
# pkgs.vaapiIntel
|
|
||||||
# pkgs.vaapiVdpau
|
|
||||||
# pkgs.libvdpau-va-gl
|
|
||||||
pkgs.intel-media-driver
|
pkgs.intel-media-driver
|
||||||
] else [ ];
|
] else [ ];
|
||||||
};
|
};
|
||||||
@ -28,41 +21,8 @@ with deviceSpecific; {
|
|||||||
GST_VAAPI_ALL_DRIVERS = "1";
|
GST_VAAPI_ALL_DRIVERS = "1";
|
||||||
LIBVA_DRIVER_NAME = "iHD";
|
LIBVA_DRIVER_NAME = "iHD";
|
||||||
};
|
};
|
||||||
# --- END ---
|
environment.systemPackages = if devInfo.gpu.vendor == "amd" then
|
||||||
|
[ (pkgs.mesa.override { enableRadv = true; }) ]
|
||||||
# hardware.bluetooth.enable = isLaptop;
|
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
boot.kernelPackages = if isVM then
|
|
||||||
pkgs.linuxPackages
|
|
||||||
else
|
else
|
||||||
pkgs.linuxPackages_latest;
|
[ ];
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
|
||||||
boot.blacklistedKernelModules = lib.mkIf (device == "Dell-Laptop") [
|
|
||||||
"psmouse"
|
|
||||||
];
|
|
||||||
# boot.kernelParams = lib.mkIf (device == "Dell-Laptop") [
|
|
||||||
# "mem_sleep_default=deep"
|
|
||||||
# ];
|
|
||||||
|
|
||||||
boot.extraModprobeConfig = lib.mkIf (device == "AMD-Workstation") ''
|
|
||||||
options snd slots=snd_virtuoso,snd_usb_audio
|
|
||||||
'';
|
|
||||||
|
|
||||||
# SSD Section
|
|
||||||
boot.kernel.sysctl = {
|
|
||||||
"vm.swappiness" = if isSSD then 1 else 10;
|
|
||||||
};
|
|
||||||
services.fstrim = {
|
|
||||||
enable = isSSD;
|
|
||||||
interval = "weekly";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.fwupd.enable = (device == "Dell-Laptop");
|
|
||||||
|
|
||||||
services.udev.packages = [ pkgs.stlink ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
29
modules/nix.nix
Normal file
29
modules/nix.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ config, lib, pkgs, inputs, ... }: {
|
||||||
|
nix = rec {
|
||||||
|
nixPath = lib.mkForce [ "nixpkgs=/etc/nixpkgs" ];
|
||||||
|
binaryCaches = [ "https://cache.nixos.org" ];
|
||||||
|
|
||||||
|
registry.self.flake = inputs.self;
|
||||||
|
|
||||||
|
trustedUsers = [ "root" "alukard" "@wheel" ];
|
||||||
|
|
||||||
|
# nrBuildUsers = 16;
|
||||||
|
|
||||||
|
# optimise.automatic = lib.mkIf (config.device != "Dell-Laptop") true;
|
||||||
|
optimise.automatic = true;
|
||||||
|
|
||||||
|
# autoOptimiseStore = config.deviceSpecific.isSSD;
|
||||||
|
autoOptimiseStore = false;
|
||||||
|
|
||||||
|
package = pkgs.nixFlakes;
|
||||||
|
# package = inputs.nix.packages.x86_64-linux.nix;
|
||||||
|
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
requireSignedBinaryCaches = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc.nixpkgs.source = inputs.nixpkgs;
|
||||||
|
}
|
@ -9,13 +9,8 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
# inputs.nix.overlay
|
|
||||||
# mozilla_overlay
|
|
||||||
(self: super:
|
(self: super:
|
||||||
rec {
|
rec {
|
||||||
# nix = super.nix // {
|
|
||||||
# meta = super.nix.meta // { platforms = lib.platforms.unix; };
|
|
||||||
# };
|
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
|
||||||
youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
|
youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
|
||||||
@ -26,6 +21,12 @@ in
|
|||||||
nomino = pkgs.callPackage ./packages/nomino.nix { };
|
nomino = pkgs.callPackage ./packages/nomino.nix { };
|
||||||
bpytop = pkgs.callPackage ./packages/bpytop.nix { };
|
bpytop = pkgs.callPackage ./packages/bpytop.nix { };
|
||||||
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
|
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
|
||||||
|
bibata-cursors = pkgs.callPackage ./packages/bibata-cursors.nix { };
|
||||||
|
# nix-prefetch-github = old.nix-prefetch-github;
|
||||||
|
# utillinux = old.utillinux;
|
||||||
|
# cifs-utils = old.cifs-utils;
|
||||||
|
# mount = old.mount;
|
||||||
|
|
||||||
# vivaldi = old.vivaldi;
|
# vivaldi = old.vivaldi;
|
||||||
# material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { };
|
# material-icons = pkgs.callPackage ./packages/material-icons-inline.nix { };
|
||||||
# rust-stable = pkgs.latest.rustChannels.stable.rust.override {
|
# rust-stable = pkgs.latest.rustChannels.stable.rust.override {
|
||||||
@ -55,29 +56,4 @@ in
|
|||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
android_sdk.accept_license = true;
|
android_sdk.accept_license = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc.nixpkgs.source = inputs.nixpkgs;
|
|
||||||
|
|
||||||
nix = rec {
|
|
||||||
useSandbox = true;
|
|
||||||
|
|
||||||
autoOptimiseStore = config.deviceSpecific.isSSD;
|
|
||||||
|
|
||||||
optimise.automatic = true;
|
|
||||||
|
|
||||||
nixPath = lib.mkForce [
|
|
||||||
"nixpkgs=/etc/nixpkgs"
|
|
||||||
"nixos-config=/etc/nixos/configuration.nix"
|
|
||||||
];
|
|
||||||
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
|
|
||||||
# TODO: change?
|
|
||||||
package = pkgs.nixFlakes;
|
|
||||||
# package = inputs.nix.packages.x86_64-linux.nix;
|
|
||||||
|
|
||||||
registry.self.flake = inputs.self;
|
|
||||||
};
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, python3Packages, fetchFromGitHub }:
|
{ stdenv, python3Packages, fetchFromGitHub, pkgs }:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
name = "advance-touch";
|
name = "advance-touch";
|
||||||
@ -12,10 +12,10 @@ python3Packages.buildPythonApplication rec {
|
|||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ click ];
|
propagatedBuildInputs = with python3Packages; [ click ];
|
||||||
|
|
||||||
meta = {
|
meta = with pkgs.lib; {
|
||||||
homepage = "https://github.com/tanrax/terminal-AdvancedNewFile";
|
homepage = "https://github.com/tanrax/terminal-AdvancedNewFile";
|
||||||
description = "Add to your terminal the option to quickly create folders and files like a pro";
|
description = "Add to your terminal the option to quickly create folders and files like a pro";
|
||||||
license = stdenv.lib.licenses.unlicense;
|
license = licenses.unlicense;
|
||||||
maintainers = with stdenv.lib.maintainers; [ alukardbf ];
|
maintainers = with maintainers; [ alukardbf ];
|
||||||
};
|
};
|
||||||
}
|
}
|
28
modules/packages/bibata-cursors.nix
Normal file
28
modules/packages/bibata-cursors.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ lib, stdenv, fetchurl }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "bibata-cursors";
|
||||||
|
version = "1.0.3";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/ful1e5/Bibata_Cursor/releases/download/v${version}/Bibata.tar.gz";
|
||||||
|
sha256 = "1kywj7lvpg3d4dydh2d55gcggpwjcafvm87rqc0wsj1w0p7gy10b";
|
||||||
|
};
|
||||||
|
|
||||||
|
phases = [
|
||||||
|
"installPhase"
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p "$out/share/icons"
|
||||||
|
tar -xf $src --directory "$out/share/icons/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Material Based Cursor";
|
||||||
|
homepage = "https://github.com/ful1e5/Bibata_Cursor";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, python3Packages }:
|
{ stdenv, fetchFromGitHub, python3Packages, pkgs }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "bpytop";
|
name = "bpytop";
|
||||||
version = "1.0.7";
|
version = "1.0.7";
|
||||||
@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
|
|||||||
chmod 755 "$out/bin/bpytop"
|
chmod 755 "$out/bin/bpytop"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with pkgs.lib; {
|
||||||
homepage = "https://github.com/aristocratos/bpytop";
|
homepage = "https://github.com/aristocratos/bpytop";
|
||||||
description = "Resource monitor that shows usage and stats for processor, memory, disks, network and processes.";
|
description = "Resource monitor that shows usage and stats for processor, memory, disks, network and processes.";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with stdenv.lib.maintainers; [ alukardbf ];
|
maintainers = with maintainers; [ alukardbf ];
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, i3lock, xorg, inputs }:
|
{ stdenv, fetchFromGitHub, i3lock, xorg, inputs, pkgs }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "i3lock-fancy-rapid";
|
name = "i3lock-fancy-rapid";
|
||||||
src = inputs.i3lock-fancy-rapid;
|
src = inputs.i3lock-fancy-rapid;
|
||||||
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
cp i3lock-fancy-rapid $out/bin/i3lock-fancy-rapid
|
cp i3lock-fancy-rapid $out/bin/i3lock-fancy-rapid
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "A faster implementation of i3lock-fancy. It is blazing fast and provides a fully configurable box blur. It uses linear-time box blur and accelerates using OpenMP.";
|
description = "A faster implementation of i3lock-fancy. It is blazing fast and provides a fully configurable box blur. It uses linear-time box blur and accelerates using OpenMP.";
|
||||||
homepage = https://github.com/yvbbrjdr/i3lock-fancy-rapid;
|
homepage = https://github.com/yvbbrjdr/i3lock-fancy-rapid;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl, pkgs }:
|
||||||
let
|
let
|
||||||
icons = "https://gist.github.com/draoncc/3c20d8d4262892ccd2e227eefeafa8ef/raw/3e6e12c213fba1ec28aaa26430c3606874754c30/MaterialIcons-Regular-for-inline.ttf";
|
icons = "https://gist.github.com/draoncc/3c20d8d4262892ccd2e227eefeafa8ef/raw/3e6e12c213fba1ec28aaa26430c3606874754c30/MaterialIcons-Regular-for-inline.ttf";
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
@ -17,7 +17,7 @@ in stdenv.mkDerivation {
|
|||||||
cp $src $out/share/fonts/truetype/MaterialIcons-Regular-for-inline.ttf
|
cp $src $out/share/fonts/truetype/MaterialIcons-Regular-for-inline.ttf
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "Material Icons Font patched for inline";
|
description = "Material Icons Font patched for inline";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,47 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig }:
|
# { stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, pkgs }:
|
||||||
|
|
||||||
with rustPlatform;
|
# with rustPlatform;
|
||||||
|
|
||||||
buildRustPackage rec {
|
# buildRustPackage rec {
|
||||||
|
# pname = "nomino";
|
||||||
|
# version = "0.4.2";
|
||||||
|
|
||||||
|
# cargoSha256 = "sha256-9p/HD16yreWdjbCaUaan07fnVpPwOCiHaVemfXP6L8c=";
|
||||||
|
|
||||||
|
# src = fetchFromGitHub {
|
||||||
|
# owner = "yaa110";
|
||||||
|
# repo = "nomino";
|
||||||
|
# rev = "8f437051ea51d333aa685679f0e5902d6709d7ef";
|
||||||
|
# sha256 = "1qmy73gmmf0i9svzrw2jz7nlypfybyd1izwd1a13fgm9dn7amja3";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
|
||||||
|
# meta = with pkgs.lib; {
|
||||||
|
# description = "Batch rename utility for developers";
|
||||||
|
# homepage = "https://github.com/yaa110/nomino";
|
||||||
|
# license = licenses.mit;
|
||||||
|
# maintainers = with maintainers; [ alukardbf ];
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
{ stdenv, lib, fetchurl }:
|
||||||
|
stdenv.mkDerivation {
|
||||||
pname = "nomino";
|
pname = "nomino";
|
||||||
version = "0.4.2";
|
version = "0.4.5";
|
||||||
|
|
||||||
cargoSha256 = "sha256-9p/HD16yreWdjbCaUaan07fnVpPwOCiHaVemfXP6L8c=";
|
src = fetchurl {
|
||||||
|
url = "https://github.com/yaa110/nomino/releases/download/0.4.5/nomino-linux-64bit";
|
||||||
src = fetchFromGitHub {
|
sha256 = "03ymw74xprgxwxizlpcd5fbhv6zc7avjqw881lm74xsn3ax4m3b8";
|
||||||
owner = "yaa110";
|
|
||||||
repo = "nomino";
|
|
||||||
rev = "8f437051ea51d333aa685679f0e5902d6709d7ef";
|
|
||||||
sha256 = "1qmy73gmmf0i9svzrw2jz7nlypfybyd1izwd1a13fgm9dn7amja3";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
phases = [ "installPhase" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp $src $out/bin/nomino
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "Batch rename utility for developers";
|
description = "Batch rename utility for developers";
|
||||||
homepage = "https://github.com/yaa110/nomino";
|
homepage = "https://github.com/yaa110/nomino";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with rec {
|
with config.deviceSpecific; {
|
||||||
inherit (config) device deviceSpecific;
|
|
||||||
};
|
|
||||||
with deviceSpecific; {
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = isLaptop;
|
enable = isLaptop;
|
||||||
settings = {
|
settings = {
|
||||||
@ -25,7 +22,7 @@ with deviceSpecific; {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.undervolt = lib.mkIf (device == "Dell-Laptop") {
|
services.undervolt = lib.mkIf (config.device == "Dell-Laptop") {
|
||||||
enable = true;
|
enable = true;
|
||||||
coreOffset = -120;
|
coreOffset = -120;
|
||||||
gpuOffset = -54;
|
gpuOffset = -54;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
with config.deviceSpecific;
|
|
||||||
{
|
with config.deviceSpecific; {
|
||||||
users.groups.smbgrp.gid = 2001;
|
users.groups.smbgrp.gid = 2001;
|
||||||
# TODO: add nologin shell to this user
|
# TODO: add nologin shell to this user
|
||||||
users.users.smbuser =
|
users.users.smbuser =
|
||||||
|
@ -19,10 +19,12 @@ with config.deviceSpecific; {
|
|||||||
"adbusers"
|
"adbusers"
|
||||||
"input"
|
"input"
|
||||||
"libvirtd"
|
"libvirtd"
|
||||||
|
"kvm"
|
||||||
"vboxusers"
|
"vboxusers"
|
||||||
"smbgrp"
|
"smbgrp"
|
||||||
"cdrom"
|
"cdrom"
|
||||||
"scanner"
|
"scanner"
|
||||||
|
"lp"
|
||||||
];
|
];
|
||||||
description = "Дмитрий Холкин";
|
description = "Дмитрий Холкин";
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
@ -40,7 +42,7 @@ with config.deviceSpecific; {
|
|||||||
# nix.requireSignedBinaryCaches = false;
|
# nix.requireSignedBinaryCaches = false;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
systemd.services."user@" = { serviceConfig = { Restart = "always"; }; };
|
systemd.services."user@" = { serviceConfig = { Restart = "always"; }; };
|
||||||
services.mingetty.autologinUser = "alukard";
|
services.getty.autologinUser = "alukard";
|
||||||
|
|
||||||
# auto-login without greeters
|
# auto-login without greeters
|
||||||
# environment.loginShellInit = ''
|
# environment.loginShellInit = ''
|
@ -10,7 +10,7 @@ with config.deviceSpecific; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.earlyoom = {
|
services.earlyoom = {
|
||||||
enable = ram < 16;
|
enable = devInfo.ram < 16;
|
||||||
freeMemThreshold = 5;
|
freeMemThreshold = 5;
|
||||||
freeSwapThreshold = 100;
|
freeSwapThreshold = 100;
|
||||||
};
|
};
|
||||||
@ -28,14 +28,21 @@ with config.deviceSpecific; {
|
|||||||
enable = true;
|
enable = true;
|
||||||
drivers = [ pkgs.samsungUnifiedLinuxDriver pkgs.gutenprint ];
|
drivers = [ pkgs.samsungUnifiedLinuxDriver pkgs.gutenprint ];
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane.enable = true;
|
hardware.sane.enable = true;
|
||||||
|
services.saned.enable = true;
|
||||||
|
|
||||||
|
services.fstrim = {
|
||||||
|
enable = isSSD;
|
||||||
|
interval = "weekly";
|
||||||
|
};
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
services.fwupd.enable = (config.device == "Dell-Laptop");
|
||||||
|
|
||||||
|
services.udev.packages = [ pkgs.stlink ];
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# ipv6 = true;
|
|
||||||
nssmdns = true;
|
nssmdns = true;
|
||||||
publish = {
|
publish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -47,28 +54,4 @@ with config.deviceSpecific; {
|
|||||||
systemd.services.systemd-udev-settle.enable = false;
|
systemd.services.systemd-udev-settle.enable = false;
|
||||||
|
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
|
|
||||||
virtualisation.docker.enable = enableVirtualisation;
|
|
||||||
environment.systemPackages = lib.mkIf (enableVirtualisation) [ pkgs.docker-compose ];
|
|
||||||
|
|
||||||
virtualisation.libvirtd = {
|
|
||||||
enable = enableVirtualisation;
|
|
||||||
};
|
|
||||||
|
|
||||||
# virtualisation.anbox.enable = isGaming; # broken
|
|
||||||
|
|
||||||
# virtualisation.virtualbox.host = {
|
|
||||||
# enable = device.enableVirtualisation;
|
|
||||||
# # enableHardening = false;
|
|
||||||
# enableExtensionPack = false;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Install cdemu for some gaming purposes
|
|
||||||
# programs.cdemu = {
|
|
||||||
# enable = true;
|
|
||||||
# image-analyzer = false;
|
|
||||||
# gui = false;
|
|
||||||
# group = "cdrom";
|
|
||||||
# };
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,8 @@ with lib;
|
|||||||
microFontSize = "10";
|
microFontSize = "10";
|
||||||
minimalFontSize = "8";
|
minimalFontSize = "8";
|
||||||
|
|
||||||
iconsTheme = "Papirus-Dark";
|
iconTheme = "Papirus-Dark";
|
||||||
|
# iconPkg = pkgs.papirus-icon-theme;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
23
modules/virtualisation.nix
Normal file
23
modules/virtualisation.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
# virtualisation.docker.enable = enableVirtualisation;
|
||||||
|
# environment.systemPackages = lib.mkIf (enableVirtualisation) [ pkgs.docker-compose ];
|
||||||
|
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = config.deviceSpecific.enableVirtualisation;
|
||||||
|
qemuOvmf = true;
|
||||||
|
qemuRunAsRoot = true;
|
||||||
|
onBoot = "ignore";
|
||||||
|
onShutdown = "shutdown";
|
||||||
|
qemuPackage = pkgs.qemu;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.spiceUSBRedirection.enable = config.deviceSpecific.enableVirtualisation;
|
||||||
|
|
||||||
|
# virtualisation.anbox.enable = isGaming; # broken
|
||||||
|
|
||||||
|
# virtualisation.virtualbox.host = {
|
||||||
|
# enable = false;
|
||||||
|
# # enableHardening = false;
|
||||||
|
# enableExtensionPack = false;
|
||||||
|
# };
|
||||||
|
}
|
16
modules/workspace/cursor.nix
Normal file
16
modules/workspace/cursor.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ pkgs, lib, ... }: {
|
||||||
|
environment.sessionVariables = {
|
||||||
|
XCURSOR_PATH = lib.mkForce "/home/alukard/.icons";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
xsession.pointerCursor = {
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
name = "Bibata-Modern-Classic";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".icons/default" = {
|
||||||
|
source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -6,7 +6,7 @@ in {
|
|||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "${thm.iconsTheme}";
|
name = "${thm.iconTheme}";
|
||||||
package = pkgs.papirus-icon-theme;
|
package = pkgs.papirus-icon-theme;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -19,7 +19,7 @@ in
|
|||||||
# material-design-icons
|
# material-design-icons
|
||||||
];
|
];
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
enable = true;
|
enable = lib.mkForce true;
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = [ "${thm.fontMono} ${thm.normalFontSize}" ];
|
monospace = [ "${thm.fontMono} ${thm.normalFontSize}" ];
|
||||||
sansSerif = [ "${thm.font} ${thm.normalFontSize}" ];
|
sansSerif = [ "${thm.font} ${thm.normalFontSize}" ];
|
||||||
|
18
modules/workspace/git.nix
Normal file
18
modules/workspace/git.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userEmail = "alukard.develop@gmail.com";
|
||||||
|
userName = "Dmitriy Kholkin";
|
||||||
|
signing = {
|
||||||
|
signByDefault = true;
|
||||||
|
key = "922DA6E758A0FE4CFAB4E4B2FD266B810DF48DF2";
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
core = {
|
||||||
|
editor = "code --wait";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
11
modules/workspace/gpg.nix
Normal file
11
modules/workspace/gpg.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
home-manager.users.alukard = {
|
||||||
|
programs.gpg.enable = true;
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
pinentryFlavor = "gnome3";
|
||||||
|
sshKeys = [ "E6A6377C3D0827C36428A290199FDB3B91414AFE" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -26,7 +26,8 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nixpkgs.overlays = [(self: super: {
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
generated-gtk-theme = self.stdenv.mkDerivation rec {
|
generated-gtk-theme = self.stdenv.mkDerivation rec {
|
||||||
name = "generated-gtk-theme";
|
name = "generated-gtk-theme";
|
||||||
src = inputs.materia-theme;
|
src = inputs.materia-theme;
|
||||||
@ -42,13 +43,15 @@ in {
|
|||||||
chmod 555 -R .
|
chmod 555 -R .
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
})];
|
})
|
||||||
|
];
|
||||||
|
programs.dconf.enable = true;
|
||||||
services.dbus.packages = with pkgs; [ gnome3.dconf ];
|
services.dbus.packages = with pkgs; [ gnome3.dconf ];
|
||||||
home-manager.users.alukard = {
|
home-manager.users.alukard = {
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "${thm.iconsTheme}";
|
name = "${thm.iconTheme}";
|
||||||
package = pkgs.papirus-icon-theme;
|
package = pkgs.papirus-icon-theme;
|
||||||
};
|
};
|
||||||
theme = {
|
theme = {
|
||||||
@ -58,12 +61,18 @@ in {
|
|||||||
font = {
|
font = {
|
||||||
name = "${thm.font} ${thm.normalFontSize}";
|
name = "${thm.font} ${thm.normalFontSize}";
|
||||||
};
|
};
|
||||||
gtk3.extraConfig.gtk-cursor-theme-name = "bibata_oil";
|
gtk3 = {
|
||||||
|
extraConfig = {
|
||||||
|
gtk-cursor-theme-name = "Bibata-Modern-Classic";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home.sessionVariables.GTK_THEME = "Generated";
|
home.sessionVariables.GTK_THEME = "Generated";
|
||||||
home.sessionVariables.XDG_DATA_DIRS = [
|
home.sessionVariables.XDG_DATA_DIRS = [
|
||||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
environment.sessionVariables.XDG_CURRENT_DESKTOP = "X-Generic";
|
||||||
}
|
}
|
||||||
|
@ -83,8 +83,8 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
startup = map (a: { notification = false; } // a) [
|
startup = map (a: { notification = false; } // a) [
|
||||||
{ command = "${pkgs.feh}/bin/feh --bg-fill $HOME/.wallpaper"; }
|
{ command = "${pkgs.feh}/bin/feh --bg-fill $HOME/nixos-config/misc/wallpaper"; }
|
||||||
# { command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; }
|
{ command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; }
|
||||||
{ command = "${pkgs.tdesktop}/bin/telegram-desktop"; }
|
{ command = "${pkgs.tdesktop}/bin/telegram-desktop"; }
|
||||||
{
|
{
|
||||||
command =
|
command =
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
with rec {
|
|
||||||
inherit (config) device deviceSpecific;
|
|
||||||
};
|
|
||||||
with deviceSpecific;
|
|
||||||
let
|
let
|
||||||
scripts = import ./scripts pkgs config;
|
scripts = import ./scripts pkgs config;
|
||||||
thm = config.lib.base16.theme;
|
thm = config.lib.base16.theme;
|
||||||
@ -122,13 +118,13 @@ in {
|
|||||||
[[block]]
|
[[block]]
|
||||||
block = "net"
|
block = "net"
|
||||||
''
|
''
|
||||||
(if device == "Dell-Laptop" then ''
|
(if config.device == "Dell-Laptop" then ''
|
||||||
device = "wlo1"
|
device = "wlo1"
|
||||||
'' else "")
|
'' else "")
|
||||||
(if device == "AMD-Workstation" then ''
|
(if config.device == "AMD-Workstation" then ''
|
||||||
device = "enp9s0"
|
device = "enp9s0"
|
||||||
'' else "")
|
'' else "")
|
||||||
(if isLaptop then ''
|
(if config.deviceSpecific.isLaptop then ''
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "battery"
|
block = "battery"
|
||||||
interval = 10
|
interval = 10
|
||||||
|
@ -4,25 +4,9 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
# xdg.portal.enable = true;
|
# xdg.portal.enable = true;
|
||||||
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ];
|
|
||||||
# services.dbus.packages = [
|
# services.dbus.packages = [
|
||||||
# pkgs.plasma5.xdg-desktop-portal-kde
|
|
||||||
# pkgs.flatpak
|
|
||||||
# pkgs.firefox
|
|
||||||
# pkgs.systemd
|
# pkgs.systemd
|
||||||
# pkgs.papirus-icon-theme
|
# pkgs.papirus-icon-theme
|
||||||
# pkgs.kdeApplications.kdegraphics-thumbnailers
|
|
||||||
# pkgs.kdeFrameworks.baloo
|
|
||||||
# pkgs.kdeFrameworks.kio
|
|
||||||
# pkgs.kdeApplications.kio-extras
|
|
||||||
# pkgs.kdeApplications.dolphin-plugins
|
|
||||||
# ];
|
|
||||||
# environment.systemPackages = [
|
|
||||||
# pkgs.kdeFrameworks.baloo
|
|
||||||
# pkgs.kdeFrameworks.kio
|
|
||||||
# pkgs.kdeApplications.kio-extras
|
|
||||||
# pkgs.kdeApplications.kdegraphics-thumbnailers
|
|
||||||
# pkgs.kdeApplications.dolphin-plugins
|
|
||||||
# ];
|
# ];
|
||||||
# services.udev.packages = [
|
# services.udev.packages = [
|
||||||
# pkgs.libmtp
|
# pkgs.libmtp
|
||||||
@ -33,7 +17,6 @@ in
|
|||||||
# DESKTOP_SESSION = "kde";
|
# DESKTOP_SESSION = "kde";
|
||||||
QT_XFT = "true";
|
QT_XFT = "true";
|
||||||
QT_SELECT = "5";
|
QT_SELECT = "5";
|
||||||
# XDG_CURRENT_DESKTOP = "KDE";
|
|
||||||
KDE_SESSION_VERSION = "5";
|
KDE_SESSION_VERSION = "5";
|
||||||
QT_SCALE_FACTOR = "1";
|
QT_SCALE_FACTOR = "1";
|
||||||
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
||||||
@ -147,6 +130,6 @@ in
|
|||||||
contrast = 4;
|
contrast = 4;
|
||||||
widgetStyle = "Breeze";
|
widgetStyle = "Breeze";
|
||||||
};
|
};
|
||||||
Icons = { Theme = "${thm.iconsTheme}"; };
|
Icons = { Theme = "${thm.iconTheme}"; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
with config.deviceSpecific;
|
|
||||||
{
|
{
|
||||||
programs.light.enable = isLaptop;
|
programs.light.enable = config.deviceSpecific.isLaptop;
|
||||||
services.actkbd = {
|
services.actkbd = {
|
||||||
enable = isLaptop;
|
enable = config.deviceSpecific.isLaptop;
|
||||||
bindings = map (x:
|
bindings = map (x:
|
||||||
x // {
|
x // {
|
||||||
events = ["key"];
|
events = ["key"];
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
LANG = lib.mkForce "en_GB.UTF-8";
|
LANG = lib.mkForce "en_GB.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Volgograd";
|
time.timeZone = "Europe/Moscow";
|
||||||
|
|
||||||
location = {
|
location = {
|
||||||
provider = "manual";
|
provider = "manual";
|
||||||
@ -19,7 +19,8 @@
|
|||||||
longitude = 44.77973;
|
longitude = 44.77973;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.alukard.home.language = let
|
home-manager.users.alukard = {
|
||||||
|
home.language = let
|
||||||
en = "en_GB.UTF-8";
|
en = "en_GB.UTF-8";
|
||||||
ru = "ru_RU.UTF-8";
|
ru = "ru_RU.UTF-8";
|
||||||
in {
|
in {
|
||||||
@ -29,4 +30,5 @@
|
|||||||
time = en;
|
time = en;
|
||||||
base = en;
|
base = en;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,42 +1,20 @@
|
|||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = config.home-manager.users.alukard.home.sessionVariables // {
|
||||||
EDITOR = config.defaultApplications.editor.cmd;
|
|
||||||
VISUAL = config.defaultApplications.editor.cmd;
|
|
||||||
LESS = "-asrRix8";
|
|
||||||
NIX_AUTO_RUN = "1";
|
NIX_AUTO_RUN = "1";
|
||||||
} // config.home-manager.users.alukard.home.sessionVariables;
|
};
|
||||||
|
|
||||||
services.atd.enable = true;
|
|
||||||
|
|
||||||
home-manager.users.alukard = {
|
home-manager.users.alukard = {
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
|
|
||||||
|
home.activation."mimeapps-remove" = {
|
||||||
|
before = [ "linkGeneration" ];
|
||||||
|
after = [ ];
|
||||||
|
data = "rm -f /home/alukard/.config/mimeapps.list";
|
||||||
|
};
|
||||||
|
|
||||||
services.udiskie.enable = true;
|
services.udiskie.enable = true;
|
||||||
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userEmail = "alukard.develop@gmail.com";
|
|
||||||
userName = "Dmitriy Kholkin";
|
|
||||||
signing = {
|
|
||||||
signByDefault = true;
|
|
||||||
key = "922DA6E758A0FE4CFAB4E4B2FD266B810DF48DF2";
|
|
||||||
};
|
|
||||||
extraConfig = {
|
|
||||||
core = {
|
|
||||||
editor = "code --wait";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.gpg.enable = true;
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
pinentryFlavor = "gnome3";
|
|
||||||
sshKeys = [ "E6A6377C3D0827C36428A290199FDB3B91414AFE" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
@ -52,15 +30,10 @@
|
|||||||
|
|
||||||
news.display = "silent";
|
news.display = "silent";
|
||||||
|
|
||||||
home.keyboard = {
|
|
||||||
options = [ "grp:win_space_toogle" ];
|
|
||||||
layout = "us,ru";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".icons/default" = {
|
|
||||||
source = "${pkgs.bibata-cursors}/share/icons/Bibata_Oil";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.startServices = true;
|
systemd.user.startServices = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.alukard.home.stateVersion = "20.09";
|
||||||
|
|
||||||
|
system.stateVersion = "20.03";
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
"slope": "x1",
|
"slope": "x1",
|
||||||
"solo": "false",
|
"solo": "false",
|
||||||
"mute": "false",
|
"mute": "false",
|
||||||
"gain": "6",
|
"gain": "8",
|
||||||
"frequency": "23",
|
"frequency": "23",
|
||||||
"q": "1.13"
|
"q": "1.13"
|
||||||
},
|
},
|
||||||
@ -125,7 +125,7 @@
|
|||||||
"slope": "x1",
|
"slope": "x1",
|
||||||
"solo": "false",
|
"solo": "false",
|
||||||
"mute": "false",
|
"mute": "false",
|
||||||
"gain": "4",
|
"gain": "6",
|
||||||
"frequency": "45",
|
"frequency": "45",
|
||||||
"q": "1.51"
|
"q": "1.51"
|
||||||
},
|
},
|
||||||
@ -135,7 +135,7 @@
|
|||||||
"slope": "x1",
|
"slope": "x1",
|
||||||
"solo": "false",
|
"solo": "false",
|
||||||
"mute": "false",
|
"mute": "false",
|
||||||
"gain": "3",
|
"gain": "5",
|
||||||
"frequency": "63",
|
"frequency": "63",
|
||||||
"q": "1.88"
|
"q": "1.88"
|
||||||
},
|
},
|
||||||
@ -217,7 +217,7 @@
|
|||||||
"slope": "x1",
|
"slope": "x1",
|
||||||
"solo": "false",
|
"solo": "false",
|
||||||
"mute": "false",
|
"mute": "false",
|
||||||
"gain": "6",
|
"gain": "8",
|
||||||
"frequency": "23",
|
"frequency": "23",
|
||||||
"q": "1.13"
|
"q": "1.13"
|
||||||
},
|
},
|
||||||
@ -227,7 +227,7 @@
|
|||||||
"slope": "x1",
|
"slope": "x1",
|
||||||
"solo": "false",
|
"solo": "false",
|
||||||
"mute": "false",
|
"mute": "false",
|
||||||
"gain": "4",
|
"gain": "6",
|
||||||
"frequency": "45",
|
"frequency": "45",
|
||||||
"q": "1.51"
|
"q": "1.51"
|
||||||
},
|
},
|
||||||
@ -237,7 +237,7 @@
|
|||||||
"slope": "x1",
|
"slope": "x1",
|
||||||
"solo": "false",
|
"solo": "false",
|
||||||
"mute": "false",
|
"mute": "false",
|
||||||
"gain": "3",
|
"gain": "5",
|
||||||
"frequency": "63",
|
"frequency": "63",
|
||||||
"q": "1.88"
|
"q": "1.88"
|
||||||
},
|
},
|
||||||
@ -348,7 +348,7 @@
|
|||||||
},
|
},
|
||||||
"limiter": {
|
"limiter": {
|
||||||
"state": "true",
|
"state": "true",
|
||||||
"input-gain": "-7",
|
"input-gain": "-10",
|
||||||
"limit": "0",
|
"limit": "0",
|
||||||
"lookahead": "5",
|
"lookahead": "5",
|
||||||
"release": "50",
|
"release": "50",
|
||||||
|
@ -2,28 +2,31 @@
|
|||||||
let
|
let
|
||||||
thm = config.lib.base16.theme;
|
thm = config.lib.base16.theme;
|
||||||
in
|
in
|
||||||
with rec {
|
with config.deviceSpecific; {
|
||||||
inherit (config) deviceSpecific;
|
|
||||||
};
|
|
||||||
with deviceSpecific; {
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# TODO: Disable natural scrolling for external mouse
|
# TODO: Disable natural scrolling for external mouse
|
||||||
libinput = {
|
libinput = {
|
||||||
enable = isLaptop;
|
enable = true;
|
||||||
# sendEventsMode = "disabled-on-external-mouse";
|
mouse = {
|
||||||
|
accelProfile = "flat";
|
||||||
|
middleEmulation = false;
|
||||||
|
naturalScrolling = false;
|
||||||
|
};
|
||||||
|
touchpad = lib.mkIf isLaptop {
|
||||||
|
accelProfile = "adaptive";
|
||||||
middleEmulation = true;
|
middleEmulation = true;
|
||||||
accelProfile = lib.mkIf (!isLaptop) "flat";
|
|
||||||
naturalScrolling = true;
|
naturalScrolling = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: make settings for laptops with dGPU
|
# TODO: make settings for laptops with dGPU
|
||||||
videoDrivers = if video == "amd" then
|
videoDrivers = if devInfo.gpu.vendor == "amd" then
|
||||||
[ "amdgpu" ]
|
[ "amdgpu" ]
|
||||||
else if video == "nvidia" then
|
else if devInfo.gpu.vendor == "nvidia" then
|
||||||
[ "nvidia" ]
|
[ "nvidia" ]
|
||||||
else if video == "intel" then
|
else if devInfo.gpu.vendor == "intel" then
|
||||||
[ "intel" ]
|
[ "intel" ]
|
||||||
else
|
else
|
||||||
[ ];
|
[ ];
|
||||||
@ -71,9 +74,4 @@ with deviceSpecific; {
|
|||||||
layout = "us,ru";
|
layout = "us,ru";
|
||||||
xkbOptions = "grp:win_space_toggle";
|
xkbOptions = "grp:win_space_toggle";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = if video == "amd" then
|
|
||||||
[ (pkgs.mesa.override { enableRadv = true; }) ]
|
|
||||||
else
|
|
||||||
[ ];
|
|
||||||
}
|
}
|
||||||
|
19
profiles/base.nix
Normal file
19
profiles/base.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = with inputs.self.nixosModules; [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|
||||||
|
boot
|
||||||
|
devices
|
||||||
|
git
|
||||||
|
gpg
|
||||||
|
locale
|
||||||
|
misc
|
||||||
|
network
|
||||||
|
nix
|
||||||
|
overlay
|
||||||
|
secrets
|
||||||
|
security
|
||||||
|
ssh
|
||||||
|
zsh
|
||||||
|
];
|
||||||
|
}
|
5
profiles/default.nix
Normal file
5
profiles/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
server = ./server.nix;
|
||||||
|
desktop = ./desktop.nix;
|
||||||
|
base = ./base.nix;
|
||||||
|
}
|
38
profiles/desktop.nix
Normal file
38
profiles/desktop.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = with inputs.self.nixosModules; [
|
||||||
|
./base.nix
|
||||||
|
inputs.base16.hmModule
|
||||||
|
|
||||||
|
applications
|
||||||
|
filesystems
|
||||||
|
hardware
|
||||||
|
power
|
||||||
|
samba
|
||||||
|
services
|
||||||
|
sound
|
||||||
|
themes
|
||||||
|
virtualisation
|
||||||
|
wireguard
|
||||||
|
xserver
|
||||||
|
|
||||||
|
alacritty
|
||||||
|
kitty
|
||||||
|
mpv
|
||||||
|
packages
|
||||||
|
rofi
|
||||||
|
urxvt
|
||||||
|
vscode
|
||||||
|
|
||||||
|
cursor
|
||||||
|
dunst
|
||||||
|
fonts
|
||||||
|
gtk
|
||||||
|
i3
|
||||||
|
i3status-rust
|
||||||
|
kde
|
||||||
|
light
|
||||||
|
picom
|
||||||
|
pulseeffects
|
||||||
|
xresources
|
||||||
|
];
|
||||||
|
}
|
5
profiles/server.nix
Normal file
5
profiles/server.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./base.nix
|
||||||
|
];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user