[nb] Commit
This commit is contained in:
parent
331084c19a
commit
c172f2d358
@ -72,10 +72,9 @@
|
|||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
goyo-vim
|
goyo-vim
|
||||||
limelight-vim
|
limelight-vim
|
||||||
twilight-nvim
|
vim-numbertoggle
|
||||||
vim-nix
|
vim-nix
|
||||||
vimwiki
|
vimwiki
|
||||||
zen-mode-nvim
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
yt-dlp = {
|
yt-dlp = {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"init" = {
|
"river/init" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
target = "river/init";
|
|
||||||
text = ''
|
text = ''
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
|
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
|
||||||
@ -22,10 +21,11 @@
|
|||||||
riverctl spawn "wl-paste --type text --watch cliphist store"
|
riverctl spawn "wl-paste --type text --watch cliphist store"
|
||||||
riverctl spawn "wl-paste --type image --watch cliphist store"
|
riverctl spawn "wl-paste --type image --watch cliphist store"
|
||||||
riverctl spawn "mullvad-gui"
|
riverctl spawn "mullvad-gui"
|
||||||
|
riverctl spawn "nm-applet"
|
||||||
|
|
||||||
# Theme
|
# Theme
|
||||||
riverctl background-color 0x${config.colorScheme.colors.base00}
|
riverctl background-color 0x${config.colorScheme.colors.base00}
|
||||||
riverctl border-color-focused 0x${config.colorScheme.colors.base0D}
|
riverctl border-color-focused 0x${config.colorScheme.colors.base0C}
|
||||||
riverctl border-color-unfocused 0x${config.colorScheme.colors.base00}
|
riverctl border-color-unfocused 0x${config.colorScheme.colors.base00}
|
||||||
|
|
||||||
# Launch Shortcuts
|
# Launch Shortcuts
|
||||||
@ -162,6 +162,11 @@
|
|||||||
riverctl hide-cursor when-typing enabled
|
riverctl hide-cursor when-typing enabled
|
||||||
riverctl set-cursor-warp on-focus-change
|
riverctl set-cursor-warp on-focus-change
|
||||||
riverctl focus-follows-cursor always
|
riverctl focus-follows-cursor always
|
||||||
|
|
||||||
|
riverctl focus-output DP-1
|
||||||
|
riverctl send-layout-cmd rivertile "main-location right"
|
||||||
|
riverctl focus-output DP-2
|
||||||
|
riverctl send-layout-cmd rivertile "main-location left"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,111 +1,110 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
programs.waybar = {
|
xdg.configFile = {
|
||||||
enable = true;
|
"waybar/config" = {
|
||||||
settings = [
|
enable = true;
|
||||||
{
|
executable = false;
|
||||||
mainBar = {
|
text = ''
|
||||||
exclusive = false;
|
{
|
||||||
position = "top";
|
"exclusive": false,
|
||||||
height = 22;
|
"position": "bottom",
|
||||||
spacing = 16;
|
"height": 22,
|
||||||
fixed-center = false;
|
"spacing": 16,
|
||||||
};
|
"fixed-center": false,
|
||||||
modules-left = [
|
"modules-left": [
|
||||||
"user"
|
"user",
|
||||||
"cpu"
|
"cpu",
|
||||||
"memory"
|
"memory",
|
||||||
"network"
|
"network",
|
||||||
"disk#root"
|
"disk#root",
|
||||||
"disk#home"
|
"disk#home",
|
||||||
"river/mode"
|
"river/mode",
|
||||||
];
|
],
|
||||||
modules-center = [
|
"modules-center": [
|
||||||
"cava"
|
"cava",
|
||||||
];
|
],
|
||||||
modules-right = [
|
"modules-right": [
|
||||||
"tray"
|
"tray",
|
||||||
"clock"
|
"clock"
|
||||||
];
|
],
|
||||||
user = {
|
"user": {
|
||||||
format = " {work_d}:{work_H}:{work_M}:{work_S} uptime";
|
"format": " {work_d}:{work_H}:{work_M}:{work_S} uptime",
|
||||||
interval = 1;
|
"interval": 1,
|
||||||
};
|
},
|
||||||
cpu = {
|
"cpu": {
|
||||||
interval = 1;
|
"interval": 1,
|
||||||
format = "cpu {load} {icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}{icon16}{icon17}{icon18}{icon19}{icon20}{icon21}{icon22}{icon23}";
|
"format": "cpu {load} {icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}{icon16}{icon17}{icon18}{icon19}{icon20}{icon21}{icon22}{icon23}",
|
||||||
format-icons = [
|
"format-icons": [
|
||||||
"<span color='#${config.colorScheme.colors.base0A}'>▁</span>"
|
"<span color='#69ff94'>▁</span>", // green
|
||||||
"<span color='#${config.colorScheme.colors.base0D}'>▂</span>"
|
"<span color='#2aa9ff'>▂</span>", // blue
|
||||||
"<span color='#${config.colorScheme.colors.base07}'>▃</span>"
|
"<span color='#f8f8f2'>▃</span>", // white
|
||||||
"<span color='#${config.colorScheme.colors.base07}'>▄</span>"
|
"<span color='#f8f8f2'>▄</span>", // white
|
||||||
"<span color='#${config.colorScheme.colors.base0B}'>▅</span>"
|
"<span color='#ffffa5'>▅</span>", // yellow
|
||||||
"<span color='#${config.colorScheme.colors.base0B}'>▆</span>"
|
"<span color='#ffffa5'>▆</span>", // yellow
|
||||||
"<span color='#${config.colorScheme.colors.base09}'>▇</span>"
|
"<span color='#ff9977'>▇</span>", // orange
|
||||||
"<span color='#${config.colorScheme.colors.base09}'>█</span>"
|
"<span color='#dd532e'>█</span>" // red
|
||||||
];
|
]
|
||||||
};
|
},
|
||||||
memory = {
|
"memory": {
|
||||||
interval = 30;
|
"interval": 30,
|
||||||
format = "mem {used:0.1f}G / {total:0.1f}G";
|
"format": "mem {used:0.1f}G / {total:0.1f}G",
|
||||||
};
|
},
|
||||||
network = {
|
"network": {
|
||||||
interval = 10;
|
"interval": 10,
|
||||||
interface = "enp4s0";
|
"interface": "enp4s0",
|
||||||
format = "{ifname} {bandwidthUpBits} up / {bandwidthDownBits} down";
|
"format": "{ifname} {bandwidthUpBits} up / {bandwidthDownBits} down",
|
||||||
format-disconnected = "";
|
"format-disconnected": "",
|
||||||
tooltip-format = "{ipaddr}/{cidr} via {gwaddr}";
|
"tooltip-format": "{ipaddr}/{cidr} via {gwaddr}"
|
||||||
};
|
},
|
||||||
"disk#root" = {
|
"disk#root": {
|
||||||
interval = 60;
|
"interval": 60,
|
||||||
format = "{free} free on {path}";
|
"format": "{free} free on {path}",
|
||||||
path = "/";
|
"path": "/"
|
||||||
};
|
},
|
||||||
"disk#home" = {
|
"disk#home": {
|
||||||
interval = 60;
|
"interval": 60,
|
||||||
format = "{free} free on {path}";
|
"format": "{free} free on {path}",
|
||||||
path = "/home";
|
"path": "/home"
|
||||||
};
|
},
|
||||||
cava = {
|
"systemd-failed-units": {
|
||||||
cava_config = "$XDG_CONFIG_HOME/cava/config";
|
"hide-on-ok": false, // Do not hide if there is zero failed units.
|
||||||
framerate = 30;
|
"format": "✗ {nr_failed}",
|
||||||
autosens = 1;
|
"format-ok": "✓",
|
||||||
bars = 64;
|
"system": true, // Monitor failed systemwide units.
|
||||||
lower_cutoff_freq = 50;
|
"user": false // Ignore failed user units.
|
||||||
higher_cutoff_freq = 10000;
|
},
|
||||||
method = "pulse";
|
"river/mode": {
|
||||||
source = "auto";
|
},
|
||||||
stereo = true;
|
"cava": {
|
||||||
reverse = false;
|
// "cava_config": "$XDG_CONFIG_HOME/cava/cava.conf",
|
||||||
bar_delimiter = 0;
|
"framerate": 30,
|
||||||
monstercat = false;
|
"autosens": 1,
|
||||||
waves = false;
|
"bars": 64,
|
||||||
noise_reduction = 0.77;
|
"lower_cutoff_freq": 50,
|
||||||
input_delay = 1;
|
"higher_cutoff_freq": 10000,
|
||||||
format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"];
|
"method": "pulse",
|
||||||
};
|
"source": "auto",
|
||||||
tray = {
|
"stereo": true,
|
||||||
icon-size = 18;
|
"reverse": false,
|
||||||
spacing = 4;
|
"bar_delimiter": 0,
|
||||||
};
|
"monstercat": false,
|
||||||
clock = {
|
"waves": false,
|
||||||
format = "{:%H:%M:%S}";
|
"noise_reduction": 0.77,
|
||||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
"input_delay": 1,
|
||||||
format-alt = "{:%Y-%m-%d}";
|
"format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
|
||||||
interval = 1;
|
},
|
||||||
};
|
"tray": {
|
||||||
}
|
"icon-size": 18,
|
||||||
];
|
"spacing": 4
|
||||||
style = ''
|
},
|
||||||
* {
|
"clock": {
|
||||||
border: none;
|
"format": "{:%H:%M:%S}",
|
||||||
border-radius: 0;
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
font-family: Comic Mono 12;
|
"format-alt": "{:%Y-%m-%d}",
|
||||||
}
|
"interval": 1
|
||||||
window#waybar {
|
}
|
||||||
background: "#${config.colorScheme.colors.base00}";
|
}
|
||||||
foreground: "#${config.colorScheme.colors.base07}";
|
'';
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
26
hosts/base/configuration.nix
Normal file
26
hosts/base/configuration.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Base configuration.nix
|
||||||
|
{ config, lib, pkgs, inputs, user, ... }:
|
||||||
|
let
|
||||||
|
hostname="nixos";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
boot = {
|
||||||
|
loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/vda";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
# Hardware-configuration edits
|
||||||
|
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
};
|
||||||
|
networking = {
|
||||||
|
hostName = "${hostname}";
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [ 445 139 ];
|
||||||
|
allowedUDPPorts = [ 137 138 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -17,7 +17,6 @@ in
|
|||||||
efi.efiSysMountPoint = "/boot/efi";
|
efi.efiSysMountPoint = "/boot/efi";
|
||||||
timeout = 2;
|
timeout = 2;
|
||||||
};
|
};
|
||||||
tmp.cleanOnBoot = true;
|
|
||||||
};
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${hostname}";
|
hostName = "${hostname}";
|
||||||
|
@ -43,20 +43,19 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
vm = lib.nixosSystem {
|
base = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user inputs; };
|
specialArgs = { inherit user inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
../nixos/cli.nix
|
../nixos/base.nix
|
||||||
./vm/configuration.nix
|
./base/configuration.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.extraSpecialArgs = { inherit user; };
|
home-manager.extraSpecialArgs = { inherit user; };
|
||||||
home-manager.users.${user.name} = {
|
home-manager.users.${user.name} = {
|
||||||
imports = [
|
imports = [
|
||||||
../home-manager/cli.nix
|
../home-manager/base.nix
|
||||||
./vm/home.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
# NixOS VM configuration.nix
|
|
||||||
{ config, lib, pkgs, inputs, user, ... }:
|
|
||||||
let
|
|
||||||
hostname="nixos";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
boot = {
|
|
||||||
loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "/dev/vda";
|
|
||||||
useOSProber = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Hardware-configuration edits
|
|
||||||
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
|
||||||
|
|
||||||
# Clean /tmp at boot
|
|
||||||
tmp.cleanOnBoot = true;
|
|
||||||
};
|
|
||||||
networking = {
|
|
||||||
hostName = "${hostname}"; # Define your hostname.
|
|
||||||
firewall = {
|
|
||||||
# To disable the firewall altogether:
|
|
||||||
# enable = false;
|
|
||||||
allowedTCPPorts = [ 445 139 ];
|
|
||||||
allowedUDPPorts = [ 137 138 ];
|
|
||||||
};
|
|
||||||
# Proxy configuration
|
|
||||||
# proxy = {
|
|
||||||
# default = "http://user:password@proxy:port/";
|
|
||||||
# noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
users.users.${user.name} = {
|
|
||||||
extraGroups = [
|
|
||||||
];
|
|
||||||
packages = with pkgs; [
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
# Enable automatic login for the user.
|
|
||||||
getty.autologinUser = "${user.name}";
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,123 +0,0 @@
|
|||||||
# Buckwheat configuration.nix
|
|
||||||
{ config, lib, pkgs, inputs, user, ... }:
|
|
||||||
let
|
|
||||||
hostname="buckwheat";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
configurationLimit = 10;
|
|
||||||
};
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
timeout = 2;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Hardware-configuration edits
|
|
||||||
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
|
||||||
|
|
||||||
# Clean /tmp at boot
|
|
||||||
tmp.cleanOnBoot = true;
|
|
||||||
};
|
|
||||||
networking = {
|
|
||||||
hostName = "${hostname}"; # Define your hostname.
|
|
||||||
firewall = {
|
|
||||||
# To disable the firewall altogether:
|
|
||||||
# enable = false;
|
|
||||||
allowedTCPPorts = [ 445 139 ];
|
|
||||||
allowedUDPPorts = [ 137 138 ];
|
|
||||||
};
|
|
||||||
# Proxy configuration
|
|
||||||
# proxy = {
|
|
||||||
# default = "http://user:password@proxy:port/";
|
|
||||||
# noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
users.users.${user.name} = {
|
|
||||||
extraGroups = [ "davfs2" "libvirtd" "transmission" ];
|
|
||||||
packages = with pkgs; [
|
|
||||||
mixxx
|
|
||||||
virt-manager
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
davfs2 = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
mullvad-vpn = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.mullvad-vpn;
|
|
||||||
};
|
|
||||||
transmission = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
udisks2 = {
|
|
||||||
enable = true;
|
|
||||||
mountOnMedia = true;
|
|
||||||
};
|
|
||||||
# Enable automatic login for the user.
|
|
||||||
# getty.autologinUser = "${user.name}";
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
|
|
||||||
# Borg backup configuration
|
|
||||||
services.borgbackup.jobs."daily" = {
|
|
||||||
paths = [
|
|
||||||
"/home"
|
|
||||||
];
|
|
||||||
exclude = [
|
|
||||||
"/home/*/go/bin"
|
|
||||||
"/home/*/go/pkg"
|
|
||||||
];
|
|
||||||
repo = "/mnt/daily/buckwheat";
|
|
||||||
encryption = {
|
|
||||||
mode = "repokey-blake2";
|
|
||||||
passCommand = "cat /root/borgbackup/passphrase";
|
|
||||||
};
|
|
||||||
compression = "auto,lzma";
|
|
||||||
startAt = "daily";
|
|
||||||
prune.keep = {
|
|
||||||
within = "7d";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.borgbackup.jobs."weekly" = {
|
|
||||||
paths = [
|
|
||||||
"/home"
|
|
||||||
];
|
|
||||||
exclude = [
|
|
||||||
"/home/*/go/bin"
|
|
||||||
"/home/*/go/pkg"
|
|
||||||
];
|
|
||||||
repo = "/mnt/weekly/buckwheat";
|
|
||||||
encryption = {
|
|
||||||
mode = "repokey-blake2";
|
|
||||||
passCommand = "cat /root/borgbackup/passphrase";
|
|
||||||
};
|
|
||||||
compression = "auto,lzma";
|
|
||||||
startAt = "weekly";
|
|
||||||
};
|
|
||||||
#services.borgbackup.jobs."borgbase" = {
|
|
||||||
# paths = [
|
|
||||||
# "/home"
|
|
||||||
# ];
|
|
||||||
# exclude = [
|
|
||||||
# "/home/*/go/bin"
|
|
||||||
# "/home/*/go/pkg"
|
|
||||||
# ];
|
|
||||||
# repo = "<repo_hash>.repo.borgbase.com:repo";
|
|
||||||
# encryption = {
|
|
||||||
# mode = "repokey-blake2";
|
|
||||||
# passCommand = "cat /root/borgbackup/passphrase";
|
|
||||||
# };
|
|
||||||
# environment.BORG_RSH = "ssh -i /root/borgbackup/ssh_key";
|
|
||||||
# compression = "auto,lzma";
|
|
||||||
# startAt = "daily";
|
|
||||||
#};
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
# NixOS VM home.nix
|
|
||||||
{ config, lib, pkgs, inputs, user, ... }:
|
|
||||||
{
|
|
||||||
services = {
|
|
||||||
};
|
|
||||||
}
|
|
@ -18,10 +18,11 @@
|
|||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
boot = {
|
||||||
|
tmp.cleanOnBoot = true;
|
||||||
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
time.timeZone = "America/Los_Angeles";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
ssss
|
ssss
|
||||||
surfraw
|
surfraw
|
||||||
tmux-xpanes
|
tmux-xpanes
|
||||||
tut
|
toot
|
||||||
unrar
|
unrar
|
||||||
unzip
|
unzip
|
||||||
up
|
up
|
||||||
|
@ -46,6 +46,14 @@
|
|||||||
wtype
|
wtype
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
wayfire = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.wayfirePlugins; [
|
||||||
|
wcm
|
||||||
|
wf-shell
|
||||||
|
wayfire-plugins-extra
|
||||||
|
];
|
||||||
|
};
|
||||||
xwayland = {
|
xwayland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -6,3 +6,4 @@
|
|||||||
- [Handling Secrets in NixOS](https://lgug2z.com/articles/handling-secrets-in-nixos-an-overview/)
|
- [Handling Secrets in NixOS](https://lgug2z.com/articles/handling-secrets-in-nixos-an-overview/)
|
||||||
- [NixOS Secrets Management](https://onion.tube/watch?v=G5f6GC7SnhU)
|
- [NixOS Secrets Management](https://onion.tube/watch?v=G5f6GC7SnhU)
|
||||||
- https://www.youtube.com/watch?v=G5f6GC7SnhU
|
- https://www.youtube.com/watch?v=G5f6GC7SnhU
|
||||||
|
- This is needed for borg backup key
|
||||||
|
Loading…
Reference in New Issue
Block a user