test
48
flake.lock
@ -423,6 +423,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1718349360,
|
||||
"narHash": "sha256-SuPne4BMqh9/IkKIAG47Cu5qfmntAaqlHdX1yuFoDO0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "ae5c8dcc4d0182d07d75df2dc97112de822cb9d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717786204,
|
||||
@ -530,6 +546,35 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1718310343,
|
||||
"narHash": "sha256-jD2XqvofA5hdROv8OSTss/vjJi164Mjavgh2yJf2ej4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "ca312c14ad9abbb8736b9f9fd6fa8b8f60b2f1b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nur",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nurpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1718310343,
|
||||
"narHash": "sha256-jD2XqvofA5hdROv8OSTss/vjJi164Mjavgh2yJf2ej4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "ca312c14ad9abbb8736b9f9fd6fa8b8f60b2f1b2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ny": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -547,8 +592,11 @@
|
||||
"apple-fonts": "apple-fonts",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"nurpkgs": "nurpkgs",
|
||||
"sops-nix": "sops-nix",
|
||||
"spicetify-nix": "spicetify-nix"
|
||||
}
|
||||
|
34
flake.nix
@ -1,5 +1,6 @@
|
||||
{
|
||||
description = "Nixy - Hadi's NixOS configuration";
|
||||
description =
|
||||
"My NixOs dotfiles - Home-manager, hyprland, nixvim, sops, kitty, wofi, waybar, lf, dunst, qutebrowser, tmux, ...";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
@ -18,18 +19,20 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
nurpkgs.url = "github:nix-community/NUR";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ nixpkgs, home-manager, sops-nix, hyprland, spicetify-nix, ... }: {
|
||||
outputs = inputs@{ nixpkgs, home-manager, sops-nix, hyprland, spicetify-nix
|
||||
, nur, nixos-hardware, ... }: {
|
||||
nixosConfigurations = {
|
||||
|
||||
nixy = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ nur.overlay ]; }
|
||||
./hosts/laptop/configuration.nix
|
||||
./hosts/laptop/fonts.nix
|
||||
./hosts/laptop/tuigreet.nix
|
||||
nixos-hardware.nixosModules.omen-16-n0005ne
|
||||
{ _module.args = { inherit inputs; }; }
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
@ -47,27 +50,6 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
heaven = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/server/configuration.nix
|
||||
{ _module.args = { inherit inputs; }; }
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users."hadi" = import ./home/server.nix; # CHANGE ME
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit sops-nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,50 +0,0 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
update_check_interval = 0;
|
||||
font_family = config.theme.font-mono;
|
||||
font_size = 13;
|
||||
cursor_shape = "Underline";
|
||||
cursor_underline_thickness = 1;
|
||||
window_padding_width = 10;
|
||||
url_style = "curly";
|
||||
confirm_os_window_close = "0";
|
||||
remember_window_size = "no";
|
||||
disable_ligatures = "never";
|
||||
shell = "${pkgs.tmux}/bin/tmux";
|
||||
initial_window_width = 1200;
|
||||
initial_window_height = 600;
|
||||
|
||||
background = "#" + config.theme.colors.bg;
|
||||
url_color = "#" + config.theme.colors.primary-fg;
|
||||
|
||||
color0 = "#" + config.theme.colors.color0;
|
||||
color8 = "#" + config.theme.colors.color8;
|
||||
color1 = "#" + config.theme.colors.color1;
|
||||
color9 = "#" + config.theme.colors.color9;
|
||||
color2 = "#" + config.theme.colors.color2;
|
||||
color10 = "#" + config.theme.colors.color10;
|
||||
color3 = "#" + config.theme.colors.color3;
|
||||
color11 = "#" + config.theme.colors.color11;
|
||||
color4 = "#" + config.theme.colors.color4;
|
||||
color12 = "#" + config.theme.colors.color12;
|
||||
color5 = "#" + config.theme.colors.color5;
|
||||
color13 = "#" + config.theme.colors.color13;
|
||||
color6 = "#" + config.theme.colors.color6;
|
||||
color14 = "#" + config.theme.colors.color14;
|
||||
color7 = "#" + config.theme.colors.color7;
|
||||
color15 = "#" + config.theme.colors.color15;
|
||||
|
||||
cursor = "#" + config.theme.colors.fg;
|
||||
cursor_text_color = "#" + config.theme.colors.bg;
|
||||
|
||||
selection_foreground = "#" + config.theme.colors.primary-fg;
|
||||
selection_background = "#" + config.theme.colors.primary-bg;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./kitty
|
||||
./lf
|
||||
./neofetch
|
||||
./nvim/laptop.nix
|
||||
./qutebrowser
|
||||
./spicetify
|
||||
./wofi
|
||||
./cava
|
||||
./tmux
|
||||
./lazygit
|
||||
];
|
||||
}
|
@ -1,298 +0,0 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
bookmarks = ''
|
||||
Apps: [
|
||||
{text: "TrueNAS", url: "https://heaven", icon: ""},
|
||||
{text: "Nextcloud", url: "https://cloud.anotherhadi.com/", icon: ""},
|
||||
{text: "Vaultwarden", url: "https://vault.anotherhadi.com/", icon: ""},
|
||||
{text: "Vaultwarden", url: "https://vault.anotherhadi.com/", icon: ""},
|
||||
{text: "Jellyfin", url: "https://media.anotherhadi.com", icon: ""},
|
||||
],
|
||||
Media: [
|
||||
{text: "Overseerr", url: "https://heaven:30023", icon: "O"},
|
||||
{text: "Radarr", url: "https://heaven:30025", icon: "R"},
|
||||
{text: "Sonarr", url: "https://heaven:30027", icon: "S"},
|
||||
{text: "Bazarr", url: "https://heaven:30046", icon: "B"},
|
||||
{text: "Prowlarr", url: "https://heaven:30050", icon: "P"},
|
||||
],
|
||||
Admin: [
|
||||
{text: "Vaultwarden", url: "https://vault.anotherhadi.com/admin", icon: ""},
|
||||
{text: "Cloudflare One", url: "https://one.dash.cloudflare.com/", icon: ""},
|
||||
{text: "Cloudflare", url: "https://cloudflare.com/", icon: ""},
|
||||
{text: "Tailscale", url: "https://login.tailscale.com/admin/machines", icon: ""},
|
||||
{text: "PiHole", url: "http://heaven:20720/admin", icon: ""},
|
||||
{text: "Unifi", url: "https://heaven:30072", icon: ""},
|
||||
],
|
||||
'';
|
||||
in {
|
||||
|
||||
xdg.configFile."serverpage/index.html".text = ''
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Homepage</title>
|
||||
<style>
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: '${config.theme.font}', sans-serif;
|
||||
}
|
||||
|
||||
.w-screen {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.max-w-7xl {
|
||||
max-width: 80rem;
|
||||
}
|
||||
|
||||
.mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.justify-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.py-12 {
|
||||
padding-top: 3rem;
|
||||
padding-bottom: 3rem;
|
||||
}
|
||||
|
||||
.px-2 {
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.text-5xl {
|
||||
font-size: 3rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mb-4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-grow {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.gap-5 {
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.gap-05 {
|
||||
gap: 0.125rem;
|
||||
}
|
||||
|
||||
.justify-start {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.items-start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.hover\:opacity-60:hover {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.pb-10 {
|
||||
padding-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.p-10 {
|
||||
padding: 2.5rem;
|
||||
}
|
||||
|
||||
.text-xl {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.text-lg {
|
||||
font-size: 1.125rem;
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.text-sm {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.text-4xl {
|
||||
font-size: 2.25rem;
|
||||
line-height: 2.5rem;
|
||||
}
|
||||
|
||||
.px-5 {
|
||||
padding-left: 1.25rem;
|
||||
padding-right: 1.25rem;
|
||||
}
|
||||
|
||||
.py-2 {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a, a:visited, a:hover, a:active {
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="w-screen" style="background-color: #${config.theme.colors.bg}; color: #${config.theme.colors.fg};">
|
||||
<div class="max-w-7xl mx-auto p-10">
|
||||
<div class="w-full flex justify-between" id="date-time">
|
||||
<p class="text-xl"></p>
|
||||
<p class="text-xl"></p>
|
||||
</div>
|
||||
<div class="w-full py-12 px-2" id="greeting">
|
||||
<h1 class="text-5xl font-bold mb-4" style="color: #${config.theme.colors.primary-bg};"></h1>
|
||||
</div>
|
||||
<div id="link-list" class="flex gap-5 flex-col justify-start items-start"></div>
|
||||
</div>
|
||||
<script defer>
|
||||
const linkLists = {
|
||||
${bookmarks}
|
||||
};
|
||||
|
||||
function getDomainFromUrl(url) {
|
||||
let domain = url.replace(/(^\w+:|^)\/\//, "");
|
||||
domain = domain.split('/')[0];
|
||||
return domain;
|
||||
}
|
||||
|
||||
const linkListContainer = document.getElementById('link-list');
|
||||
|
||||
for (const key in linkLists) {
|
||||
if (Object.hasOwnProperty.call(linkLists, key)) {
|
||||
const linkList = linkLists[key];
|
||||
const title = document.createElement('h2');
|
||||
title.textContent = key.charAt(0).toUpperCase() + key.slice(1);
|
||||
title.className = "text-3xl font-bold"
|
||||
linkListContainer.appendChild(title);
|
||||
|
||||
const list = document.createElement('div');
|
||||
list.className = 'flex flex-wrap gap-5 justify-start';
|
||||
linkList.forEach(link => {
|
||||
const anchor = document.createElement('a');
|
||||
anchor.href = link.url;
|
||||
anchor.className = "px-5 py-2 hover:opacity-60 flex-grow"
|
||||
|
||||
const div = document.createElement('div');
|
||||
div.className = 'flex flex-row gap-5 items-center';
|
||||
|
||||
let icon = document.createElement('p');
|
||||
icon.textContent = link.icon || "";
|
||||
icon.className = "text-4xl";
|
||||
div.appendChild(icon);
|
||||
|
||||
const divNameUrl = document.createElement('div');
|
||||
divNameUrl.className = 'flex flex-col gap-05';
|
||||
|
||||
const name = document.createElement('p');
|
||||
name.textContent = link.text;
|
||||
name.className = 'text-lg font-medium';
|
||||
|
||||
const url = document.createElement('p');
|
||||
url.textContent = link.url;
|
||||
url.className = 'text-sm';
|
||||
url.style = "color: #${config.theme.colors.alt-fg};"
|
||||
|
||||
divNameUrl.appendChild(name);
|
||||
divNameUrl.appendChild(url);
|
||||
div.appendChild(divNameUrl);
|
||||
anchor.appendChild(div);
|
||||
list.appendChild(anchor);
|
||||
});
|
||||
|
||||
linkListContainer.appendChild(list);
|
||||
const spacer = document.createElement('div');
|
||||
spacer.className = "pb-10"
|
||||
linkListContainer.appendChild(spacer);
|
||||
}
|
||||
}
|
||||
|
||||
function updateDateTime() {
|
||||
const dateTimeContainer = document.getElementById('date-time');
|
||||
const currentDate = new Date();
|
||||
const dateOptions = {weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'};
|
||||
const timeOptions = {hour: '2-digit', minute: '2-digit'};
|
||||
const formattedDate = currentDate.toLocaleDateString('en-US', dateOptions);
|
||||
const formattedTime = currentDate.toLocaleTimeString('en-US', timeOptions);
|
||||
const dateParagraph = dateTimeContainer.querySelector('p:nth-child(1)');
|
||||
const timeParagraph = dateTimeContainer.querySelector('p:nth-child(2)');
|
||||
dateParagraph.textContent = formattedDate;
|
||||
timeParagraph.textContent = formattedTime;
|
||||
}
|
||||
|
||||
updateDateTime();
|
||||
setInterval(updateDateTime, 60000);
|
||||
|
||||
function updateGreeting() {
|
||||
const greetingContainer = document.getElementById('greeting');
|
||||
const currentDate = new Date();
|
||||
const currentHour = currentDate.getHours();
|
||||
let greetingText;
|
||||
|
||||
if (currentHour < 2) {
|
||||
greetingText = "Good night! ";
|
||||
} else if (currentHour < 5) {
|
||||
greetingText = "Hello, night owl! ";
|
||||
} else if (currentHour < 12) {
|
||||
greetingText = "Good morning! ";
|
||||
} else if (currentHour < 17) {
|
||||
greetingText = "Good afternoon! ️";
|
||||
} else if (currentHour < 20) {
|
||||
greetingText = "Good evening! ";
|
||||
} else {
|
||||
greetingText = "Good night! ";
|
||||
}
|
||||
|
||||
const greetingHeader = greetingContainer.querySelector('h1');
|
||||
greetingHeader.textContent = greetingText;
|
||||
}
|
||||
|
||||
updateGreeting();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
'';
|
||||
}
|
@ -1 +0,0 @@
|
||||
{ imports = [ ./lf ./neofetch ]; }
|
@ -1,40 +0,0 @@
|
||||
{ pkgs, config, lib, spicetify-nix, ... }:
|
||||
let spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
|
||||
in {
|
||||
|
||||
imports = [ spicetify-nix.homeManagerModules.default ];
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [ "spotify" ];
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
theme = spicePkgs.themes.text;
|
||||
colorScheme = "custom";
|
||||
|
||||
customColorScheme = {
|
||||
text = "${config.theme.colors.fg}";
|
||||
subtext = "${config.theme.colors.alt-fg}";
|
||||
sidebar-text = "${config.theme.colors.alt-fg}";
|
||||
main = "${config.theme.colors.bg}";
|
||||
sidebar = "${config.theme.colors.bg}";
|
||||
background = "${config.theme.colors.bg}";
|
||||
player = "${config.theme.colors.bg}";
|
||||
card = "${config.theme.colors.bg}";
|
||||
shadow = "000000";
|
||||
selected-row = "${config.theme.colors.alt-bg}";
|
||||
button = "${config.theme.colors.primary-bg}";
|
||||
button-active = "${config.theme.colors.primary-bg}";
|
||||
button-disabled = "${config.theme.colors.alt-bg}";
|
||||
tab-active = "${config.theme.colors.primary-bg}";
|
||||
misc = "${config.theme.colors.alt-fg}";
|
||||
};
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
playlistIcons
|
||||
lastfm
|
||||
historyShortcut
|
||||
hidePodcasts
|
||||
fullAppDisplay
|
||||
shuffle
|
||||
];
|
||||
};
|
||||
}
|
@ -1,25 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
let variable = import ../variables.nix;
|
||||
in {
|
||||
{ pkgs, config, ... }: {
|
||||
|
||||
imports = [
|
||||
../hosts/laptop/variables.nix
|
||||
./system/laptop.nix
|
||||
./scripts/laptop.nix
|
||||
./apps/laptop.nix
|
||||
./themes/nixy.nix
|
||||
./themes/config/load_wallpapers.nix
|
||||
./programs/laptop.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = variable.username;
|
||||
homeDirectory = variable.homeDirectory;
|
||||
inherit (config.var) username;
|
||||
inherit (config.var) homeDirectory;
|
||||
|
||||
packages = with pkgs; [
|
||||
swappy
|
||||
imv
|
||||
discord
|
||||
# obsidian # BROKEN
|
||||
btop
|
||||
obsidian
|
||||
xfce.thunar
|
||||
bitwarden
|
||||
vlc
|
||||
@ -32,8 +28,6 @@ in {
|
||||
jq
|
||||
|
||||
# Utils
|
||||
sops # Secrets
|
||||
age # Secrets
|
||||
fd
|
||||
bc
|
||||
gcc
|
||||
@ -43,9 +37,9 @@ in {
|
||||
xdg_utils
|
||||
wget
|
||||
curl
|
||||
neovide
|
||||
wf-recorder
|
||||
glow
|
||||
nwg-displays
|
||||
|
||||
# Just cool
|
||||
peaclock
|
||||
@ -55,11 +49,19 @@ in {
|
||||
|
||||
# Backup
|
||||
vscode
|
||||
firefox
|
||||
tor-browser
|
||||
firefox
|
||||
neovide
|
||||
];
|
||||
|
||||
stateVersion = variable.stateVersion;
|
||||
file."wallpapers" = {
|
||||
recursive = true;
|
||||
source = ./wallpapers;
|
||||
};
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
}
|
||||
|
9
home/programs/btop/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "Default";
|
||||
theme_background = false;
|
||||
};
|
||||
};
|
||||
}
|
@ -5,8 +5,8 @@
|
||||
general.framerate = 60;
|
||||
smoothing.noise_reduction = 88;
|
||||
color = {
|
||||
background = "'#${config.theme.colors.bg}'";
|
||||
foreground = "'#${config.theme.colors.primary-bg}'";
|
||||
background = "'#${config.var.theme.colors.bg}'";
|
||||
foreground = "'#${config.var.theme.colors.accent}'";
|
||||
};
|
||||
};
|
||||
};
|
48
home/programs/kitty/default.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ config, pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrollback_lines = 10000;
|
||||
initial_window_width = 1200;
|
||||
initial_window_height = 600;
|
||||
update_check_interval = 0;
|
||||
enable_audio_bell = false;
|
||||
confirm_os_window_close = "0";
|
||||
remember_window_size = "no";
|
||||
disable_ligatures = "never";
|
||||
shell = "${pkgs.tmux}/bin/tmux";
|
||||
url_style = "curly";
|
||||
cursor_shape = "Underline";
|
||||
cursor_underline_thickness = 1;
|
||||
window_padding_width = config.var.theme.gaps-out;
|
||||
|
||||
# Font
|
||||
font_family = config.var.theme.font-mono;
|
||||
font_size = 13;
|
||||
|
||||
# Colors
|
||||
background = "#" + config.var.theme.colors.bg;
|
||||
url_color = "#" + config.var.theme.colors.accent;
|
||||
color0 = "#" + config.var.theme.colors.c0;
|
||||
color8 = "#" + config.var.theme.colors.c8;
|
||||
color1 = "#" + config.var.theme.colors.c1;
|
||||
color9 = "#" + config.var.theme.colors.c9;
|
||||
color2 = "#" + config.var.theme.colors.c2;
|
||||
color10 = "#" + config.var.theme.colors.c10;
|
||||
color3 = "#" + config.var.theme.colors.c3;
|
||||
color11 = "#" + config.var.theme.colors.c11;
|
||||
color4 = "#" + config.var.theme.colors.c4;
|
||||
color12 = "#" + config.var.theme.colors.c12;
|
||||
color5 = "#" + config.var.theme.colors.c5;
|
||||
color13 = "#" + config.var.theme.colors.c13;
|
||||
color6 = "#" + config.var.theme.colors.c6;
|
||||
color14 = "#" + config.var.theme.colors.c14;
|
||||
color7 = "#" + config.var.theme.colors.c7;
|
||||
color15 = "#" + config.var.theme.colors.c15;
|
||||
cursor = "#" + config.var.theme.colors.fg;
|
||||
cursor_text_color = "#" + config.var.theme.colors.bg;
|
||||
selection_foreground = "#" + config.var.theme.colors.accentFg;
|
||||
selection_background = "#" + config.var.theme.colors.accent;
|
||||
};
|
||||
};
|
||||
}
|
4
home/programs/laptop.nix
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
imports =
|
||||
[ ./btop ./kitty ./nvim/laptop.nix ./qutebrowser ./spicetify ./cava ];
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
{ config, ... }: {
|
||||
|
||||
programs.nixvim.highlight = {
|
||||
AlphaHeaderColor.fg = "#${config.theme.colors.primary-bg}";
|
||||
AlphaTextColor.fg = "#${config.theme.colors.fg}";
|
||||
AlphaShortcutColor.fg = "#${config.theme.colors.alt-fg}";
|
||||
AlphaHeaderColor.fg = "#${config.var.theme.colors.accent}";
|
||||
AlphaTextColor.fg = "#${config.var.theme.colors.fg}";
|
||||
AlphaShortcutColor.fg = "#${config.var.theme.colors.fgalt}";
|
||||
};
|
||||
|
||||
programs.nixvim.plugins.alpha = {
|
@ -2,7 +2,7 @@
|
||||
programs.nixvim.plugins.obsidian = {
|
||||
enable = true;
|
||||
settings = {
|
||||
dir = "~/Nextcloud/obsidian";
|
||||
dir = "~/nextcloud/Notes";
|
||||
disable_frontmatter = true;
|
||||
};
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
{ config, ... }: {
|
||||
|
||||
imports = [ ./duckduckgo-colorscheme.nix ./homepage ./serverpage ];
|
||||
imports = [ ./duckduckgo-colorscheme.nix ./homepage ];
|
||||
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
@ -18,8 +18,8 @@
|
||||
};
|
||||
|
||||
quickmarks = {
|
||||
home = "${config.home.homeDirectory}/.config/startpage/index.html";
|
||||
server = "${config.home.homeDirectory}/.config/serverpage/index.html";
|
||||
home = "${config.var.homeDirectory}/.config/startpage/index.html";
|
||||
server = "${config.var.homeDirectory}/.config/serverpage/index.html";
|
||||
mynixos = "https://mynixos.com";
|
||||
github = "https://github.com";
|
||||
outlook = "https://outlook.office.com/mail/";
|
||||
@ -39,92 +39,92 @@
|
||||
settings = {
|
||||
url = {
|
||||
default_page =
|
||||
"${config.home.homeDirectory}/.config/startpage/index.html";
|
||||
"${config.var.homeDirectory}/.config/startpage/index.html";
|
||||
start_pages =
|
||||
[ "${config.home.homeDirectory}/.config/startpage/index.html" ];
|
||||
[ "${config.var.homeDirectory}/.config/startpage/index.html" ];
|
||||
};
|
||||
|
||||
colors = {
|
||||
tabs = {
|
||||
odd.bg = "#${config.theme.colors.bg}";
|
||||
odd.fg = "#${config.theme.colors.fg}";
|
||||
even.bg = "#${config.theme.colors.bg}";
|
||||
even.fg = "#${config.theme.colors.fg}";
|
||||
odd.bg = "#${config.var.theme.colors.bg}";
|
||||
odd.fg = "#${config.var.theme.colors.fg}";
|
||||
even.bg = "#${config.var.theme.colors.bg}";
|
||||
even.fg = "#${config.var.theme.colors.fg}";
|
||||
selected = {
|
||||
odd = {
|
||||
bg = "#${config.theme.colors.primary-bg}";
|
||||
fg = "#${config.theme.colors.primary-fg}";
|
||||
bg = "#${config.var.theme.colors.accent}";
|
||||
fg = "#${config.var.theme.colors.accentFg}";
|
||||
};
|
||||
even = {
|
||||
bg = "#${config.theme.colors.primary-bg}";
|
||||
fg = "#${config.theme.colors.primary-fg}";
|
||||
bg = "#${config.var.theme.colors.accent}";
|
||||
fg = "#${config.var.theme.colors.accentFg}";
|
||||
};
|
||||
};
|
||||
indicator = {
|
||||
error = "#${config.theme.colors.color1}";
|
||||
start = "#${config.theme.colors.alt-bg}";
|
||||
stop = "#${config.theme.colors.alt-bg}";
|
||||
error = "#${config.var.theme.colors.c1}";
|
||||
start = "#${config.var.theme.colors.bgalt}";
|
||||
stop = "#${config.var.theme.colors.bgalt}";
|
||||
};
|
||||
};
|
||||
|
||||
hints = {
|
||||
bg = "#${config.theme.colors.alt-bg}";
|
||||
fg = "#${config.theme.colors.alt-fg}";
|
||||
match.fg = "#${config.theme.colors.bg}";
|
||||
bg = "#${config.var.theme.colors.bgalt}";
|
||||
fg = "#${config.var.theme.colors.fgalt}";
|
||||
match.fg = "#${config.var.theme.colors.bg}";
|
||||
};
|
||||
|
||||
completion = {
|
||||
category = {
|
||||
bg = "#${config.theme.colors.bg}";
|
||||
fg = "#${config.theme.colors.fg}";
|
||||
bg = "#${config.var.theme.colors.bg}";
|
||||
fg = "#${config.var.theme.colors.fg}";
|
||||
border = {
|
||||
top = "#${config.theme.colors.bg}";
|
||||
bottom = "#${config.theme.colors.bg}";
|
||||
top = "#${config.var.theme.colors.bg}";
|
||||
bottom = "#${config.var.theme.colors.bg}";
|
||||
};
|
||||
};
|
||||
|
||||
odd.bg = "#${config.theme.colors.bg}";
|
||||
even.bg = "#${config.theme.colors.bg}";
|
||||
odd.bg = "#${config.var.theme.colors.bg}";
|
||||
even.bg = "#${config.var.theme.colors.bg}";
|
||||
|
||||
fg = [ "#FFFFFF" "#FFFFFF" "#FFFFFF" ];
|
||||
|
||||
match.fg = "#${config.theme.colors.primary-bg}";
|
||||
match.fg = "#${config.var.theme.colors.accent}";
|
||||
|
||||
item.selected = {
|
||||
bg = "#${config.theme.colors.primary-bg}";
|
||||
border.top = "#${config.theme.colors.primary-bg}";
|
||||
border.bottom = "#${config.theme.colors.primary-bg}";
|
||||
fg = "#${config.theme.colors.primary-fg}";
|
||||
match.fg = "#${config.theme.colors.primary-fg}";
|
||||
bg = "#${config.var.theme.colors.accent}";
|
||||
border.top = "#${config.var.theme.colors.accent}";
|
||||
border.bottom = "#${config.var.theme.colors.accent}";
|
||||
fg = "#${config.var.theme.colors.accentFg}";
|
||||
match.fg = "#${config.var.theme.colors.accentFg}";
|
||||
};
|
||||
};
|
||||
|
||||
statusbar = {
|
||||
normal.bg = "#${config.theme.colors.bg}";
|
||||
normal.fg = "#${config.theme.colors.fg}";
|
||||
private.bg = "#${config.theme.colors.bg}";
|
||||
private.fg = "#${config.theme.colors.fg}";
|
||||
insert.bg = "#${config.theme.colors.primary-bg}";
|
||||
insert.fg = "#${config.theme.colors.primary-fg}";
|
||||
normal.bg = "#${config.var.theme.colors.bg}";
|
||||
normal.fg = "#${config.var.theme.colors.fg}";
|
||||
private.bg = "#${config.var.theme.colors.bg}";
|
||||
private.fg = "#${config.var.theme.colors.fg}";
|
||||
insert.bg = "#${config.var.theme.colors.accent}";
|
||||
insert.fg = "#${config.var.theme.colors.accentFg}";
|
||||
command = {
|
||||
bg = "#${config.theme.colors.alt-bg}";
|
||||
fg = "#${config.theme.colors.alt-fg}";
|
||||
private.bg = "#${config.theme.colors.alt-bg}";
|
||||
private.fg = "#${config.theme.colors.alt-fg}";
|
||||
bg = "#${config.var.theme.colors.bgalt}";
|
||||
fg = "#${config.var.theme.colors.fgalt}";
|
||||
private.bg = "#${config.var.theme.colors.bgalt}";
|
||||
private.fg = "#${config.var.theme.colors.fgalt}";
|
||||
};
|
||||
};
|
||||
|
||||
messages = {
|
||||
info = {
|
||||
bg = "#${config.theme.colors.alt-bg}";
|
||||
fg = "#${config.theme.colors.alt-fg}";
|
||||
border = "#${config.theme.colors.alt-bg}";
|
||||
bg = "#${config.var.theme.colors.bgalt}";
|
||||
fg = "#${config.var.theme.colors.fgalt}";
|
||||
border = "#${config.var.theme.colors.bgalt}";
|
||||
};
|
||||
|
||||
error = {
|
||||
bg = "#${config.theme.colors.color1}";
|
||||
fg = "#${config.theme.colors.alt-fg}";
|
||||
border = "#${config.theme.colors.color1}";
|
||||
bg = "#${config.var.theme.colors.c1}";
|
||||
fg = "#${config.var.theme.colors.fgalt}";
|
||||
border = "#${config.var.theme.colors.c1}";
|
||||
};
|
||||
};
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
"dark"; # Enable dark mode for websites that support it
|
||||
};
|
||||
|
||||
fonts = { default_family = "${config.theme.font}"; };
|
||||
fonts = { default_family = "${config.var.theme.font}"; };
|
||||
|
||||
completion = {
|
||||
height = "30%";
|
||||
@ -184,9 +184,8 @@
|
||||
|
||||
keyBindings = {
|
||||
normal = {
|
||||
"gh" = "open ${config.home.homeDirectory}/.config/startpage/index.html";
|
||||
"gs" =
|
||||
"open ${config.home.homeDirectory}/.config/serverpage/index.html";
|
||||
"gh" = "open ${config.var.homeDirectory}/.config/startpage/index.html";
|
||||
"gs" = "open ${config.var.homeDirectory}/.config/serverpage/index.html";
|
||||
|
||||
" p" = "tab-move -";
|
||||
" n" = "tab-move +";
|
@ -4,7 +4,7 @@
|
||||
// Go to DuckDuckGo settings page, open the console, paste the code and hit enter.
|
||||
// based on https://ddg.codingcodax.dev/
|
||||
// Cookies string for your theme
|
||||
const cookie = '7=${config.theme.colors.bg}; j=${config.theme.colors.bg}; 9=${config.theme.colors.fg}; aa=${config.theme.colors.alt-fg}; 8=${config.theme.colors.color7}; x=${config.theme.colors.primary-bg}; 21=${config.theme.colors.alt-bg};';
|
||||
const cookie = '7=${config.var.theme.colors.bg}; j=${config.var.theme.colors.bg}; 9=${config.var.theme.colors.fg}; aa=${config.var.theme.colors.fgalt}; 8=${config.var.theme.colors.c7}; x=${config.var.theme.colors.accent}; 21=${config.var.theme.colors.bgalt};';
|
||||
|
||||
// Converts cookie string into formatted JSON
|
||||
const cookieToJSON = (cookieRaw) => {
|
@ -40,7 +40,7 @@ in {
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: '${config.theme.font}', sans-serif;
|
||||
font-family: '${config.var.theme.font}', sans-serif;
|
||||
}
|
||||
|
||||
.w-screen {
|
||||
@ -175,14 +175,14 @@ in {
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="w-screen" style="background-color: #${config.theme.colors.bg}; color: #${config.theme.colors.fg};">
|
||||
<body class="w-screen" style="background-color: #${config.var.theme.colors.bg}; color: #${config.var.theme.colors.fg};">
|
||||
<div class="max-w-7xl mx-auto p-10">
|
||||
<div class="w-full flex justify-between" id="date-time">
|
||||
<p class="text-xl"></p>
|
||||
<p class="text-xl"></p>
|
||||
</div>
|
||||
<div class="w-full py-12 px-2" id="greeting">
|
||||
<h1 class="text-5xl font-bold mb-4" style="color: #${config.theme.colors.primary-bg};"></h1>
|
||||
<h1 class="text-5xl font-bold mb-4" style="color: #${config.var.theme.colors.accent};"></h1>
|
||||
</div>
|
||||
<div id="link-list" class="flex gap-5 flex-col justify-start items-start"></div>
|
||||
</div>
|
||||
@ -232,7 +232,7 @@ in {
|
||||
const url = document.createElement('p');
|
||||
url.textContent = link.url;
|
||||
url.className = 'text-sm';
|
||||
url.style = "color: #${config.theme.colors.alt-fg};"
|
||||
url.style = "color: #${config.var.theme.colors.fgalt};"
|
||||
|
||||
divNameUrl.appendChild(name);
|
||||
divNameUrl.appendChild(url);
|
40
home/programs/spicetify/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ pkgs, config, lib, spicetify-nix, ... }:
|
||||
let spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
|
||||
in {
|
||||
|
||||
imports = [ spicetify-nix.homeManagerModules.default ];
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [ "spotify" ];
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
theme = spicePkgs.themes.text;
|
||||
colorScheme = "custom";
|
||||
|
||||
customColorScheme = {
|
||||
text = "${config.var.theme.colors.fg}";
|
||||
subtext = "${config.var.theme.colors.fgalt}";
|
||||
sidebar-text = "${config.var.theme.colors.fgalt}";
|
||||
main = "${config.var.theme.colors.bg}";
|
||||
sidebar = "${config.var.theme.colors.bg}";
|
||||
background = "${config.var.theme.colors.bg}";
|
||||
player = "${config.var.theme.colors.bg}";
|
||||
card = "${config.var.theme.colors.bg}";
|
||||
shadow = "000000";
|
||||
selected-row = "${config.var.theme.colors.bgalt}";
|
||||
button = "${config.var.theme.colors.accent}";
|
||||
button-active = "${config.var.theme.colors.accent}";
|
||||
button-disabled = "${config.var.theme.colors.bgalt}";
|
||||
tab-active = "${config.var.theme.colors.accent}";
|
||||
misc = "${config.var.theme.colors.fgalt}";
|
||||
};
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
playlistIcons
|
||||
lastfm
|
||||
historyShortcut
|
||||
hidePodcasts
|
||||
fullAppDisplay
|
||||
shuffle
|
||||
];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, config, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
increments = "5";
|
||||
|
@ -1,39 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
homedir = config.home.homeDirectory;
|
||||
|
||||
heaven-rebuild = pkgs.writeShellScriptBin "heaven-rebuild" ''
|
||||
sudo nixos-rebuild switch --flake ${homedir}/.config/nixos#heaven
|
||||
'';
|
||||
|
||||
heaven-upgrade = pkgs.writeShellScriptBin "heaven-upgrade" ''
|
||||
sudo nixos-rebuild switch --upgrade --flake ${homedir}/.config/nixos#heaven
|
||||
'';
|
||||
|
||||
heaven-update = pkgs.writeShellScriptBin "heaven-update" ''
|
||||
cd ${homedir}/.config/nixos && sudo nix flake update
|
||||
'';
|
||||
|
||||
heaven-gc = pkgs.writeShellScriptBin "heaven-gc" ''
|
||||
cd ${homedir}/.config/nixos && sudo nix-collect-garbage -d
|
||||
'';
|
||||
|
||||
heaven-cb = pkgs.writeShellScriptBin "heaven-cb" ''
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
'';
|
||||
|
||||
remote-rebuild = pkgs.writeShellScriptBin "remote-rebuild" ''
|
||||
ssh -t heaven "cd ~/.config/nixos && git pull && heaven-rebuild"
|
||||
'';
|
||||
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
heaven-rebuild
|
||||
heaven-upgrade
|
||||
heaven-update
|
||||
heaven-gc
|
||||
heaven-cb
|
||||
remote-rebuild
|
||||
];
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./nixy
|
||||
./nerdfetch
|
||||
./sounds
|
||||
./brightness
|
||||
./caffeine
|
||||
|
@ -23,14 +23,6 @@ let
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
'';
|
||||
|
||||
heaven-push = pkgs.writeShellScriptBin "heaven-push" ''
|
||||
cd ~/dev/heaven && git add . && git commit -m ''${1:-Update} && git push
|
||||
'';
|
||||
|
||||
remote-rebuild = pkgs.writeShellScriptBin "remote-rebuild" ''
|
||||
ssh -t heaven "cd ~/.config/nixos && git pull && heaven-rebuild"
|
||||
'';
|
||||
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
nixy-rebuild
|
||||
@ -38,8 +30,5 @@ in {
|
||||
nixy-update
|
||||
nixy-gc
|
||||
nixy-cb
|
||||
|
||||
heaven-push
|
||||
remote-rebuild
|
||||
];
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
{ imports = [ ./heaven ./nixy ./nerdfetch ./compress ]; }
|
@ -1,8 +1,6 @@
|
||||
# File runned at startup by Hyprland
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
variable = import ../../../variables.nix;
|
||||
|
||||
nextcloud-watch = pkgs.writeShellScriptBin "nextcloud-watch" ''
|
||||
# Start nextcloud if I'm on my local network
|
||||
while true;do
|
||||
@ -31,11 +29,9 @@ let
|
||||
startup = pkgs.writeShellScriptBin "startup" ''
|
||||
# Because HM enabling services suck.
|
||||
|
||||
[[ ${
|
||||
toString variable.enableSops
|
||||
} == "1" ]] && systemctl --user start sops-nix
|
||||
[[ ${toString config.var.sops} == "1" ]] && systemctl --user start sops-nix
|
||||
|
||||
[[ ${toString variable.enableNextcloud} == "1" ]] && nextcloud-watch &
|
||||
[[ ${toString config.var.nextcloud} == "1" ]] && nextcloud-watch &
|
||||
|
||||
notify-system &
|
||||
${pkgs.waybar}/bin/waybar &
|
||||
|
@ -1,41 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
let variable = import ../variables.nix;
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./system/server.nix
|
||||
./scripts/server.nix
|
||||
./apps/server.nix
|
||||
./themes/wip.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = variable.username;
|
||||
homeDirectory = variable.homeDirectory;
|
||||
|
||||
packages = with pkgs; [
|
||||
btop
|
||||
|
||||
# Dev
|
||||
go
|
||||
cargo
|
||||
nodejs
|
||||
python3
|
||||
jq
|
||||
|
||||
# Utils
|
||||
sops # Secrets
|
||||
age # Secrets
|
||||
fd
|
||||
bc
|
||||
gcc
|
||||
zip
|
||||
unzip
|
||||
wget
|
||||
curl
|
||||
];
|
||||
|
||||
stateVersion = variable.server.stateVersion;
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
}
|
@ -34,17 +34,17 @@
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
always_run_script = true;
|
||||
corner_radius = config.theme.rounding;
|
||||
corner_radius = config.var.theme.rounding;
|
||||
follow = "mouse";
|
||||
font = config.theme.font;
|
||||
font = config.var.theme.font;
|
||||
format = "<b>%s</b>\\n%b";
|
||||
progress_bar_corner_radius = config.theme.rounding - 10;
|
||||
progress_bar_corner_radius = config.var.theme.rounding - 10;
|
||||
#format = ''
|
||||
# <span foreground='#${config.theme.colors.primary-bg}'><b>%s %p</b></span>
|
||||
# <span foreground='#${config.var.theme.colors.accent}'><b>%s %p</b></span>
|
||||
# %b'';
|
||||
frame_color = "#" + config.theme.colors.bg;
|
||||
highlight = "#" + config.theme.colors.primary-bg;
|
||||
foreground = "#" + config.theme.colors.fg;
|
||||
frame_color = "#" + config.var.theme.colors.bg;
|
||||
highlight = "#" + config.var.theme.colors.accent;
|
||||
foreground = "#" + config.var.theme.colors.fg;
|
||||
frame_width = 1;
|
||||
offset = "0x10";
|
||||
horizontal_padding = 10;
|
||||
@ -67,16 +67,16 @@
|
||||
fullscreen_delay_everything = { fullscreen = "delay"; };
|
||||
|
||||
urgency_critical = {
|
||||
background = "#" + config.theme.colors.color1;
|
||||
foreground = "#" + config.theme.colors.color0;
|
||||
background = "#" + config.var.theme.colors.c1;
|
||||
foreground = "#" + config.var.theme.colors.c0;
|
||||
};
|
||||
urgency_low = {
|
||||
background = "#" + config.theme.colors.alt-bg;
|
||||
foreground = "#" + config.theme.colors.alt-fg;
|
||||
background = "#" + config.var.theme.colors.bgalt;
|
||||
foreground = "#" + config.var.theme.colors.fgalt;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#" + config.theme.colors.alt-bg;
|
||||
foreground = "#" + config.theme.colors.alt-fg;
|
||||
background = "#" + config.var.theme.colors.bgalt;
|
||||
foreground = "#" + config.var.theme.colors.fgalt;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,9 +1,8 @@
|
||||
let variable = import ../../../variables.nix;
|
||||
in {
|
||||
{ config, ... }: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = variable.git.username;
|
||||
userEmail = variable.git.email;
|
||||
userName = config.var.git.username;
|
||||
userEmail = config.var.git.email;
|
||||
ignores = [
|
||||
".cache/"
|
||||
".DS_Store"
|
||||
|
@ -1,6 +1,4 @@
|
||||
{ pkgs, config, hyprland, ... }:
|
||||
let variable = import ../../../variables.nix;
|
||||
in {
|
||||
{ pkgs, config, hyprland, ... }: {
|
||||
|
||||
imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ];
|
||||
|
||||
@ -41,8 +39,15 @@ in {
|
||||
"${pkgs.bitwarden}/bin/bitwarden"
|
||||
];
|
||||
|
||||
monitor =
|
||||
[ "eDP-2,highres,0x0,1" "DP-8,highrr,2560x0,1" ",prefered,auto,1" ];
|
||||
monitor = [
|
||||
"eDP-2,highres,0x0,1"
|
||||
# "DP-9,highrr,2560x0,1"
|
||||
# ",prefered,auto,1"
|
||||
#"desc:,2560x1440@240.0,0x0,1.0"
|
||||
#"desc:,2560x1440@60.0,645x4362,1.0"
|
||||
"desc:AOC U34G2G1 0x00000E06,3440x1440@59.97,2560x0,1.0"
|
||||
",disable"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
|
||||
@ -101,6 +106,7 @@ in {
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"QT_QPA_PLATFORM=wayland,xcb"
|
||||
@ -113,17 +119,17 @@ in {
|
||||
|
||||
general = {
|
||||
resize_on_border = true;
|
||||
gaps_in = config.theme.gaps-in;
|
||||
gaps_out = config.theme.gaps-out;
|
||||
border_size = config.theme.border-size;
|
||||
"col.active_border" = "rgba(${config.theme.colors.primary-bg}ff)";
|
||||
gaps_in = config.var.theme.gaps-in;
|
||||
gaps_out = config.var.theme.gaps-out;
|
||||
border_size = config.var.theme.border-size;
|
||||
"col.active_border" = "rgba(${config.var.theme.colors.accent}ff)";
|
||||
"col.inactive_border" = "rgba(00000055)";
|
||||
border_part_of_window = true;
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = config.theme.rounding;
|
||||
rounding = config.var.theme.rounding;
|
||||
drop_shadow = true;
|
||||
shadow_range = 20;
|
||||
shadow_render_power = 3;
|
||||
@ -143,7 +149,7 @@ in {
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = variable.keyboardLayout;
|
||||
kb_layout = config.var.keyboardLayout;
|
||||
|
||||
kb_options = "caps:escape";
|
||||
follow_mouse = 1;
|
||||
@ -251,7 +257,7 @@ in {
|
||||
};
|
||||
|
||||
font = {
|
||||
name = config.theme.font;
|
||||
name = config.var.theme.font;
|
||||
size = 11;
|
||||
};
|
||||
};
|
||||
|
@ -5,8 +5,8 @@
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
background {
|
||||
monitor =
|
||||
path = $HOME/.config/wallpapers/${config.theme.wallpaper}
|
||||
color = rgb(${config.theme.colors.bg})
|
||||
path = $HOME/.config/wallpapers/${config.var.theme.wallpaper}
|
||||
color = rgb(${config.var.theme.colors.bg})
|
||||
|
||||
blur_size = 4
|
||||
blur_passes = 3
|
||||
@ -24,9 +24,9 @@
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.64 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgb(${config.theme.colors.primary-bg})
|
||||
inner_color = rgb(${config.theme.colors.bg})
|
||||
font_color = rgb(${config.theme.colors.fg})
|
||||
outer_color = rgb(${config.var.theme.colors.accent})
|
||||
inner_color = rgb(${config.var.theme.colors.bg})
|
||||
font_color = rgb(${config.var.theme.colors.fg})
|
||||
fade_on_empty = true
|
||||
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty.
|
||||
hide_input = false
|
||||
@ -39,9 +39,9 @@
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
color = rgb(${config.var.theme.colors.fg})
|
||||
font_size = 64
|
||||
font_family = ${config.theme.font}
|
||||
font_family = ${config.var.theme.font}
|
||||
position = 0, 16
|
||||
halign = center
|
||||
valign = center
|
||||
@ -51,9 +51,9 @@
|
||||
label {
|
||||
monitor =
|
||||
text = Hey <span text_transform="capitalize" size="larger">$USER</span>
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
color = rgb(${config.var.theme.colors.fg})
|
||||
font_size = 20
|
||||
font_family = ${config.theme.font}
|
||||
font_family = ${config.var.theme.font}
|
||||
position = 0, 0
|
||||
halign = center
|
||||
valign = center
|
||||
@ -64,9 +64,9 @@
|
||||
label {
|
||||
monitor =
|
||||
text = Type to unlock!
|
||||
color = rgb(${config.theme.colors.fg})
|
||||
color = rgb(${config.var.theme.colors.fg})
|
||||
font_size = 16
|
||||
font_family = ${config.theme.font}
|
||||
font_family = ${config.var.theme.font}
|
||||
position = 0, 30
|
||||
halign = center
|
||||
valign = bottom
|
||||
|
@ -2,8 +2,8 @@
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
preload = ~/.config/wallpapers/${config.theme.wallpaper}
|
||||
wallpaper = ,~/.config/wallpapers/${config.theme.wallpaper}
|
||||
preload = ~/wallpapers/${config.var.theme.wallpaper}
|
||||
wallpaper = ,~/wallpapers/${config.var.theme.wallpaper}
|
||||
ipc=true
|
||||
splash=false
|
||||
'';
|
||||
|
@ -1,4 +1,12 @@
|
||||
{
|
||||
imports =
|
||||
[ ./git ./dunst ./hyprland ./shell ./sops/laptop.nix ./waybar ./wlogout ];
|
||||
imports = [
|
||||
./git
|
||||
./dunst
|
||||
./hyprland
|
||||
./shell
|
||||
./sops/laptop.nix
|
||||
./waybar
|
||||
./wlogout
|
||||
./wofi
|
||||
];
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
{ imports = [ ./git ./shell ./sops/server.nix ]; }
|
@ -4,5 +4,9 @@
|
||||
./zsh.nix
|
||||
./starship.nix
|
||||
./zoxide.nix
|
||||
./tmux.nix
|
||||
./lazygit.nix
|
||||
./fetch
|
||||
./lf
|
||||
];
|
||||
}
|
||||
|
1
home/system/shell/fetch/default.nix
Normal file
@ -0,0 +1 @@
|
||||
{ imports = [ ./neofetch ./nerdfetch ]; }
|
@ -109,9 +109,9 @@
|
||||
song_format="%artist% - %album% - %title%"
|
||||
song_shorthand="off"
|
||||
mpc_args=()
|
||||
colors=(${toString config.theme.colors.primary-ansi-16-number} 1 ${
|
||||
toString config.theme.colors.primary-ansi-16-number
|
||||
} ${toString config.theme.colors.primary-ansi-16-number} 7)
|
||||
colors=(${toString config.var.theme.colors.accentNumber} 1 ${
|
||||
toString config.var.theme.colors.accentNumber
|
||||
} ${toString config.var.theme.colors.accentNumber} 7)
|
||||
bold="on"
|
||||
underline_enabled="on"
|
||||
underline_char="-"
|
@ -1,4 +1,3 @@
|
||||
# Nerdfetch: https://github.com/ThatOneCalculator/NerdFetch
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
nerdfetch = pkgs.writeShellScriptBin "nerdfetch" ''
|
||||
@ -346,9 +345,9 @@ let
|
||||
|
||||
## USER VARIABLES -- YOU CAN CHANGE THESE
|
||||
|
||||
lc="$reset$bold''$${config.theme.colors.primary-ansi-16}" # labels
|
||||
nc="$reset$bold''$${config.theme.colors.primary-ansi-16}" # labels
|
||||
hn="$reset$bold''$${config.theme.colors.primary-ansi-16}" # labels
|
||||
lc="$reset$bold''$${config.var.theme.colors.accentName}" # labels
|
||||
nc="$reset$bold''$${config.var.theme.colors.accentName}" # labels
|
||||
hn="$reset$bold''$${config.var.theme.colors.accentName}" # labels
|
||||
ic="$reset$white" # info
|
||||
c0="$reset$grey" # first color
|
||||
c1="$reset$white" # second color
|
||||
@ -367,4 +366,4 @@ let
|
||||
"""
|
||||
'';
|
||||
|
||||
in { home.packages = with pkgs; [ nerdfetch ]; }
|
||||
in { home.packages = [ nerdfetch ]; }
|
@ -3,12 +3,12 @@
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
colors = {
|
||||
"fg+" = config.theme.colors.primary-ansi-16;
|
||||
"fg+" = config.var.theme.colors.accentName;
|
||||
"bg+" = "-1";
|
||||
"fg" = "white";
|
||||
"bg" = "-1";
|
||||
"prompt" = "grey";
|
||||
"pointer" = config.theme.colors.primary-ansi-16;
|
||||
"pointer" = config.var.theme.colors.accentName;
|
||||
};
|
||||
defaultOptions = [
|
||||
"--margin=1"
|
||||
|
@ -4,7 +4,7 @@
|
||||
settings = {
|
||||
gui.theme = {
|
||||
ligthTheme = false;
|
||||
activeBorderColor = [ "${config.theme.colors.primary-ansi-16}" "bold" ];
|
||||
activeBorderColor = [ "${config.var.theme.colors.accentName}" "bold" ];
|
||||
inactiveBorderColor = [ "black" ];
|
||||
selectedLineBgColor = [ "default" ];
|
||||
};
|
@ -10,10 +10,10 @@
|
||||
"$git_status"
|
||||
"$character"
|
||||
];
|
||||
directory = { style = "#${config.theme.colors.primary-bg}"; };
|
||||
directory = { style = "#${config.var.theme.colors.accent}"; };
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](#${config.theme.colors.primary-bg})";
|
||||
success_symbol = "[❯](#${config.var.theme.colors.accent})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](cyan)";
|
||||
};
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
initExtraFirst = ''
|
||||
bindkey -e
|
||||
${if config.theme.neofetch == "neofetch" then
|
||||
${if config.var.theme.fetch == "neofetch" then
|
||||
pkgs.neofetch + "/bin/neofetch"
|
||||
else if config.theme.neofetch == "nerdfetch" then
|
||||
else if config.var.theme.fetch == "nerdfetch" then
|
||||
"nerdfetch"
|
||||
else
|
||||
""}
|
||||
|
@ -1,16 +1,15 @@
|
||||
{ sops-nix, ... }: {
|
||||
{ pkgs, sops-nix, ... }: {
|
||||
imports = [ sops-nix.homeManagerModules.sops ];
|
||||
|
||||
home.packages = with pkgs; [ sops age ];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ../../../secrets/secrets.yaml;
|
||||
defaultSopsFile = ../../../secrets/laptop.yaml;
|
||||
secrets = {
|
||||
sshconfig = { path = "/home/hadi/.ssh/config"; };
|
||||
oxk = { path = "/home/hadi/.ssh/oxserver"; };
|
||||
gk = { path = "/home/hadi/.ssh/github"; };
|
||||
glk = { path = "/home/hadi/.ssh/gitlab"; };
|
||||
silicon = { path = "/home/hadi/.ssh/silicon"; };
|
||||
heaven = { path = "/home/hadi/.ssh/heaven"; };
|
||||
github-key = { path = "/home/hadi/.ssh/github"; };
|
||||
gitlab-key = { path = "/home/hadi/.ssh/gitlab"; };
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
{ sops-nix, ... }: {
|
||||
imports = [ sops-nix.homeManagerModules.sops ];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ../../../secrets/secrets.yaml;
|
||||
secrets = {
|
||||
gts = { path = "/home/hadi/.ssh/github"; };
|
||||
sshconfigheaven = { path = "/home/hadi/.ssh/config"; };
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
}
|
@ -12,12 +12,18 @@
|
||||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 0;
|
||||
"margin-top" =
|
||||
if config.theme.waybar.float then config.theme.gaps-out else 0;
|
||||
"margin-left" =
|
||||
if config.theme.waybar.float then config.theme.gaps-out else 0;
|
||||
"margin-right" =
|
||||
if config.theme.waybar.float then config.theme.gaps-out else 0;
|
||||
"margin-top" = if config.var.theme.waybar.float then
|
||||
config.var.theme.gaps-out
|
||||
else
|
||||
0;
|
||||
"margin-left" = if config.var.theme.waybar.float then
|
||||
config.var.theme.gaps-out
|
||||
else
|
||||
0;
|
||||
"margin-right" = if config.var.theme.waybar.float then
|
||||
config.var.theme.gaps-out
|
||||
else
|
||||
0;
|
||||
height = 44;
|
||||
modules-left = [ "custom/logo" "hyprland/window" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
@ -125,23 +131,23 @@
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: "${config.theme.font}";
|
||||
color: #${config.theme.colors.fg};
|
||||
font-family: "${config.var.theme.font}";
|
||||
color: #${config.var.theme.colors.fg};
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: ${
|
||||
if config.theme.waybar.transparent then
|
||||
if config.var.theme.waybar.transparent then
|
||||
"rgba(0, 0, 0, 0)"
|
||||
else
|
||||
"#${config.theme.colors.bg}"
|
||||
"#${config.var.theme.colors.bg}"
|
||||
};
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
border-radius: ${
|
||||
if config.theme.waybar.float then
|
||||
toString config.theme.rounding
|
||||
if config.var.theme.waybar.float then
|
||||
toString config.var.theme.rounding
|
||||
else
|
||||
"0"
|
||||
}px;
|
||||
@ -150,12 +156,12 @@
|
||||
|
||||
.modules-left, .modules-center, .modules-right {
|
||||
border-radius: ${
|
||||
if config.theme.waybar.float then
|
||||
toString config.theme.rounding
|
||||
if config.var.theme.waybar.float then
|
||||
toString config.var.theme.rounding
|
||||
else
|
||||
"0"
|
||||
}px;
|
||||
background-color: #${config.theme.colors.bg};
|
||||
background-color: #${config.var.theme.colors.bg};
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
@ -174,13 +180,13 @@
|
||||
padding: 6px 18px;
|
||||
margin: 6px 3px;
|
||||
border-radius: 4px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.var.theme.colors.accentFg};
|
||||
background-color: #${config.var.theme.colors.accent};
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
@ -190,11 +196,11 @@
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #${config.theme.colors.color1};
|
||||
background-color: #${config.var.theme.colors.c1};
|
||||
}
|
||||
|
||||
#window > * {
|
||||
font-family: "${config.theme.font-mono}";
|
||||
font-family: "${config.var.theme.font-mono}";
|
||||
}
|
||||
|
||||
#memory,
|
||||
@ -209,19 +215,19 @@
|
||||
border-radius: 9px;
|
||||
margin: 6px 3px;
|
||||
padding: 6px 12px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
}
|
||||
|
||||
#tray menu {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
padding-right: 7px;
|
||||
font-size: 15px;
|
||||
color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.var.theme.colors.accent};
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
@ -244,28 +250,28 @@
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
animation: none;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.var.theme.colors.accent};
|
||||
color: #${config.var.theme.colors.accentFg};
|
||||
}
|
||||
|
||||
|
||||
tooltip {
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
}
|
||||
|
||||
tooltip label {
|
||||
padding: 5px;
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: "${config.theme.font}";
|
||||
font-family: "${config.var.theme.font}";
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
@ -53,23 +53,23 @@
|
||||
}
|
||||
|
||||
button {
|
||||
color: #${config.theme.colors.fg};
|
||||
color: #${config.var.theme.colors.fg};
|
||||
font-size:20px;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
|
||||
border: 3px solid #${config.theme.colors.bg};
|
||||
background-color: #${config.theme.colors.bg};
|
||||
border: 3px solid #${config.var.theme.colors.bg};
|
||||
background-color: #${config.var.theme.colors.bg};
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
border: 3px solid #${config.theme.colors.primary-bg};
|
||||
color: #${config.var.theme.colors.accentFg};
|
||||
background-color: #${config.var.theme.colors.accent};
|
||||
border: 3px solid #${config.var.theme.colors.accent};
|
||||
}
|
||||
|
||||
/*
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
#lock,#logout,#suspend,#hibernate,#shutdown,#reboot {
|
||||
margin: 10px;
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
border-radius: ${toString config.var.theme.rounding}px;
|
||||
}
|
||||
|
||||
#lock {
|
||||
|
@ -35,15 +35,15 @@
|
||||
/** ********** Fonts ********** **/
|
||||
|
||||
* {
|
||||
font-family: "${config.theme.font}";
|
||||
font-family: "${config.var.theme.font}";
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: #${config.theme.colors.alt-bg};
|
||||
color: #${config.theme.colors.alt-fg};
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
background-color: #${config.var.theme.colors.bgalt};
|
||||
color: #${config.var.theme.colors.fgalt};
|
||||
border-radius: ${toString config.var.theme.rounding}px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
@ -51,8 +51,8 @@
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: #${config.theme.colors.bg};
|
||||
border: 0px solid #${config.theme.colors.primary-bg};
|
||||
background-color: #${config.var.theme.colors.bg};
|
||||
border: 0px solid #${config.var.theme.colors.accent};
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
@ -67,11 +67,11 @@
|
||||
}
|
||||
|
||||
#text {
|
||||
color: #${config.theme.colors.color7};
|
||||
color: #${config.var.theme.colors.c7};
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: #${config.theme.colors.fg};
|
||||
color: #${config.var.theme.colors.fg};
|
||||
}
|
||||
|
||||
#entry {
|
||||
@ -79,8 +79,8 @@
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.var.theme.colors.accent};
|
||||
color: #${config.var.theme.colors.accentFg};
|
||||
}
|
||||
|
||||
#unselected {}
|
||||
@ -89,7 +89,7 @@
|
||||
|
||||
#input,
|
||||
#entry:selected {
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
border-radius: ${toString config.var.theme.rounding}px;
|
||||
}
|
||||
'';
|
||||
};
|
@ -1,38 +0,0 @@
|
||||
{ config, ... }: {
|
||||
config.theme.colors.primary-ansi-16-number =
|
||||
if config.theme.colors.primary-ansi-16 == "black" then
|
||||
0
|
||||
else if config.theme.colors.primary-ansi-16 == "red" then
|
||||
1
|
||||
else if config.theme.colors.primary-ansi-16 == "green" then
|
||||
2
|
||||
else if config.theme.colors.primary-ansi-16 == "yellow" then
|
||||
3
|
||||
else if config.theme.colors.primary-ansi-16 == "blue" then
|
||||
4
|
||||
else if config.theme.colors.primary-ansi-16 == "magenta" then
|
||||
5
|
||||
else if config.theme.colors.primary-ansi-16 == "cyan" then
|
||||
6
|
||||
else if config.theme.colors.primary-ansi-16 == "white" then
|
||||
7
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-white" then
|
||||
8
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-black" then
|
||||
9
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-red" then
|
||||
10
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-green" then
|
||||
11
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-yellow" then
|
||||
12
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-blue" then
|
||||
13
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-magenta" then
|
||||
14
|
||||
else if config.theme.colors.primary-ansi-16 == "bright-cyan" then
|
||||
15
|
||||
else
|
||||
0;
|
||||
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
xdg.configFile."wallpapers" = {
|
||||
recursive = true;
|
||||
source = ../wallpapers;
|
||||
};
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
{ lib, ... }:
|
||||
with lib; {
|
||||
options.theme = {
|
||||
|
||||
waybar = {
|
||||
transparent = mkOption {
|
||||
type = types.bool;
|
||||
description = "Does waybar have a transparent background?";
|
||||
};
|
||||
|
||||
float = mkOption {
|
||||
type = types.bool;
|
||||
description = "Floating mode for waybar (gap)";
|
||||
};
|
||||
};
|
||||
|
||||
animation-speed = mkOption {
|
||||
type = types.str;
|
||||
description = "Options: slow/medium/fast";
|
||||
};
|
||||
|
||||
neofetch = mkOption {
|
||||
type = types.str;
|
||||
description = "Options: neofetch/nerdfetch/none";
|
||||
};
|
||||
|
||||
wallpaper = mkOption {
|
||||
type = types.str;
|
||||
description = "Name of the wallpaper (from the wallpapers directory)";
|
||||
};
|
||||
|
||||
font = mkOption {
|
||||
type = types.str;
|
||||
description = "Default font";
|
||||
};
|
||||
|
||||
font-mono = mkOption {
|
||||
type = types.str;
|
||||
description = "Default mono font";
|
||||
};
|
||||
|
||||
rounding = mkOption {
|
||||
type = types.int;
|
||||
description = "Borders rounding";
|
||||
};
|
||||
|
||||
gaps-in = mkOption {
|
||||
type = types.int;
|
||||
description = "Gaps in";
|
||||
};
|
||||
|
||||
gaps-out = mkOption {
|
||||
type = types.int;
|
||||
description = "Gaps out";
|
||||
};
|
||||
|
||||
border-size = mkOption {
|
||||
type = types.int;
|
||||
description = "Border size";
|
||||
};
|
||||
|
||||
colors = let
|
||||
mkColorOption = name: {
|
||||
inherit name;
|
||||
value = mkOption {
|
||||
type = types.strMatching "[a-fA-F0-9]{6}";
|
||||
description = "Color ${name}.";
|
||||
};
|
||||
};
|
||||
in listToAttrs (map mkColorOption [
|
||||
"bg"
|
||||
"fg"
|
||||
"alt-bg"
|
||||
"alt-fg"
|
||||
"primary-bg"
|
||||
"primary-fg"
|
||||
"secondary-bg"
|
||||
"secondary-fg"
|
||||
"color0"
|
||||
"color1"
|
||||
"color2"
|
||||
"color3"
|
||||
"color4"
|
||||
"color5"
|
||||
"color6"
|
||||
"color7"
|
||||
"color8"
|
||||
"color9"
|
||||
"color10"
|
||||
"color11"
|
||||
"color12"
|
||||
"color13"
|
||||
"color14"
|
||||
"color15"
|
||||
]) // {
|
||||
primary-ansi-16 = mkOption {
|
||||
type = types.str;
|
||||
description =
|
||||
"Name of the primary color - ansi 16 colors (black, red, green, yellow, blue, magenta, cyan, white, bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white)";
|
||||
};
|
||||
|
||||
primary-ansi-16-number = mkOption {
|
||||
type = types.int;
|
||||
description = "Set the primary color - ansi 16 colors (0-15)";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
{
|
||||
imports = [ ./config/template.nix ./config/load_colors.nix ];
|
||||
|
||||
theme = {
|
||||
wallpaper = "default.png";
|
||||
|
||||
font-mono = "FiraCode Nerd Font Mono";
|
||||
font = "SFProDisplay Nerd Font";
|
||||
|
||||
rounding = 12;
|
||||
gaps-in = 10;
|
||||
gaps-out = 20;
|
||||
border-size = 3;
|
||||
|
||||
neofetch = "nerdfetch";
|
||||
|
||||
waybar = {
|
||||
transparent = true;
|
||||
float = true;
|
||||
};
|
||||
|
||||
colors = {
|
||||
bg = "040409";
|
||||
fg = "FCFCFC";
|
||||
alt-bg = "101012";
|
||||
alt-fg = "ECECEC";
|
||||
|
||||
primary-ansi-16 = "red";
|
||||
primary-bg = "a158ff";
|
||||
primary-fg = "000000";
|
||||
|
||||
secondary-bg = "4928B8";
|
||||
secondary-fg = "000000";
|
||||
|
||||
# Black
|
||||
color0 = "000000";
|
||||
# Red
|
||||
color1 = "f7768e";
|
||||
# Green
|
||||
color2 = "73daca";
|
||||
# Yellow
|
||||
color3 = "e0af68";
|
||||
# Blue
|
||||
color4 = "7aa2f7";
|
||||
# Magenta
|
||||
color5 = "a158ff";
|
||||
# Cyan
|
||||
color6 = "7dcfff";
|
||||
# White
|
||||
color7 = "E4E5E7";
|
||||
|
||||
# Bright
|
||||
color8 = "515878";
|
||||
color9 = "f7869e";
|
||||
color10 = "83eada";
|
||||
color11 = "f0bf78";
|
||||
color12 = "8ab2f7";
|
||||
color13 = "A988F8";
|
||||
color14 = "8ddfff";
|
||||
color15 = "f4f5f7";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
{
|
||||
imports = [ ./config/template.nix ./config/load_colors.nix ];
|
||||
|
||||
theme = {
|
||||
wallpaper = "default.png";
|
||||
|
||||
font-mono = "FiraCode Nerd Font Mono";
|
||||
font = "SFProDisplay Nerd Font";
|
||||
|
||||
rounding = 12;
|
||||
gaps-in = 10;
|
||||
gaps-out = 20;
|
||||
border-size = 3;
|
||||
|
||||
neofetch = "nerdfetch";
|
||||
|
||||
waybar = {
|
||||
transparent = true;
|
||||
float = true;
|
||||
};
|
||||
|
||||
colors = {
|
||||
bg = "040409";
|
||||
fg = "FCFCFC";
|
||||
alt-bg = "101012";
|
||||
alt-fg = "ECECEC";
|
||||
|
||||
primary-ansi-16 = "magenta";
|
||||
primary-bg = "a158ff";
|
||||
primary-fg = "000000";
|
||||
|
||||
secondary-bg = "4928B8";
|
||||
secondary-fg = "000000";
|
||||
|
||||
# Black
|
||||
color0 = "000000";
|
||||
# Red
|
||||
color1 = "f7768e";
|
||||
# Green
|
||||
color2 = "73daca";
|
||||
# Yellow
|
||||
color3 = "e0af68";
|
||||
# Blue
|
||||
color4 = "7aa2f7";
|
||||
# Magenta
|
||||
color5 = "a158ff";
|
||||
# Cyan
|
||||
color6 = "7dcfff";
|
||||
# White
|
||||
color7 = "E4E5E7";
|
||||
|
||||
# Bright
|
||||
color8 = "515878";
|
||||
color9 = "f7869e";
|
||||
color10 = "83eada";
|
||||
color11 = "f0bf78";
|
||||
color12 = "8ab2f7";
|
||||
color13 = "A988F8";
|
||||
color14 = "8ddfff";
|
||||
color15 = "f4f5f7";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Before Width: | Height: | Size: 3.6 MiB |
@ -1,64 +0,0 @@
|
||||
{
|
||||
imports = [ ./config/template.nix ./config/load_colors.nix ];
|
||||
|
||||
theme = {
|
||||
wallpaper = "Fuji-Light.png";
|
||||
|
||||
font-mono = "FiraCode Nerd Font Mono";
|
||||
font = "SFProDisplay Nerd Font";
|
||||
|
||||
rounding = 8;
|
||||
gaps-in = 6;
|
||||
gaps-out = 12;
|
||||
border-size = 2;
|
||||
|
||||
neofetch = "nerdfetch";
|
||||
|
||||
waybar = {
|
||||
transparent = false;
|
||||
float = false;
|
||||
};
|
||||
|
||||
colors = {
|
||||
bg = "040409";
|
||||
fg = "FCFCFC";
|
||||
alt-bg = "101012";
|
||||
alt-fg = "ECECEC";
|
||||
|
||||
primary-ansi-16 = "cyan";
|
||||
primary-bg = "bbcde5";
|
||||
primary-fg = "000000";
|
||||
|
||||
secondary-bg = "4928B8";
|
||||
secondary-fg = "000000";
|
||||
|
||||
# Black
|
||||
color0 = "000000";
|
||||
# Red
|
||||
color1 = "f7768e";
|
||||
# Green
|
||||
color2 = "73daca";
|
||||
# Yellow
|
||||
color3 = "e0af68";
|
||||
# Blue
|
||||
color4 = "7aa2f7";
|
||||
# Magenta
|
||||
color5 = "9978F8";
|
||||
# Cyan
|
||||
color6 = "bbcde5";
|
||||
# White
|
||||
color7 = "E4E5E7";
|
||||
|
||||
# Bright
|
||||
color8 = "515878";
|
||||
color9 = "f7869e";
|
||||
color10 = "83eada";
|
||||
color11 = "f0bf78";
|
||||
color12 = "8ab2f7";
|
||||
color13 = "A988F8";
|
||||
color14 = "ccdef6";
|
||||
color15 = "f4f5f7";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
Before Width: | Height: | Size: 7.1 MiB After Width: | Height: | Size: 7.1 MiB |
BIN
home/wallpapers/Lofi-Computer.png
Normal file
After Width: | Height: | Size: 4.1 MiB |
Before Width: | Height: | Size: 13 MiB After Width: | Height: | Size: 13 MiB |
Before Width: | Height: | Size: 826 KiB After Width: | Height: | Size: 826 KiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 12 MiB After Width: | Height: | Size: 12 MiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 288 KiB |
Before Width: | Height: | Size: 641 KiB After Width: | Height: | Size: 641 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 8.6 MiB After Width: | Height: | Size: 8.6 MiB |
@ -1,18 +1,14 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
variable = import ../../variables.nix;
|
||||
baseImports = [ ./hardware-configuration.nix ];
|
||||
|
||||
extraImports = [
|
||||
(if variable.enableNvidia then ./nvidia.nix else null)
|
||||
(if variable.enablePrime then ./prime.nix else null)
|
||||
{ pkgs, config, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../shared/fonts.nix
|
||||
# ../shared/nvidia.nix
|
||||
# ../shared/prime.nix
|
||||
../shared/testnvidia.nix
|
||||
../shared/tuigreet.nix
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
filteredImports = builtins.filter (x: x != null) extraImports;
|
||||
|
||||
in {
|
||||
imports = baseImports ++ filteredImports;
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
@ -21,42 +17,48 @@ in {
|
||||
consoleMode = "auto";
|
||||
};
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelPackages =
|
||||
pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
||||
};
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.hostName = config.var.hostname;
|
||||
|
||||
networking.hostName = variable.hostName;
|
||||
|
||||
time.timeZone = variable.timeZone;
|
||||
i18n.defaultLocale = variable.defaultLocale;
|
||||
# Timezone and locale
|
||||
time.timeZone = config.var.timeZone;
|
||||
i18n.defaultLocale = config.var.defaultLocale;
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = variable.extraLocale;
|
||||
LC_IDENTIFICATION = variable.extraLocale;
|
||||
LC_MEASUREMENT = variable.extraLocale;
|
||||
LC_MONETARY = variable.extraLocale;
|
||||
LC_NAME = variable.extraLocale;
|
||||
LC_NUMERIC = variable.extraLocale;
|
||||
LC_PAPER = variable.extraLocale;
|
||||
LC_TELEPHONE = variable.extraLocale;
|
||||
LC_TIME = variable.extraLocale;
|
||||
LC_ADDRESS = config.var.extraLocale;
|
||||
LC_IDENTIFICATION = config.var.extraLocale;
|
||||
LC_MEASUREMENT = config.var.extraLocale;
|
||||
LC_MONETARY = config.var.extraLocale;
|
||||
LC_NAME = config.var.extraLocale;
|
||||
LC_NUMERIC = config.var.extraLocale;
|
||||
LC_PAPER = config.var.extraLocale;
|
||||
LC_TELEPHONE = config.var.extraLocale;
|
||||
LC_TIME = config.var.extraLocale;
|
||||
};
|
||||
|
||||
users.users.${variable.username} = {
|
||||
# Users
|
||||
users.users.${config.var.username} = {
|
||||
isNormalUser = true;
|
||||
description = "${variable.username} account";
|
||||
description = "${config.var.username} account";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
xkb.layout = variable.keyboardLayout;
|
||||
enable = true;
|
||||
xkb.layout = config.var.keyboardLayout;
|
||||
xkb.variant = "";
|
||||
};
|
||||
blueman.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
console.keyMap = variable.keyboardLayout;
|
||||
console.keyMap = config.var.keyboardLayout;
|
||||
|
||||
# Shell
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
loginShellInit = ''
|
||||
@ -65,24 +67,6 @@ in {
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
# faster rebuilding
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
man.enable = true;
|
||||
dev.enable = false;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
"nix-2.16.2"
|
||||
]; # TODO: Remove this if not needed anymore
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
@ -118,8 +102,12 @@ in {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
gc = if variable.enableAutoGarbageCollector then {
|
||||
gc = if config.var.autoGarbageCollector then {
|
||||
automatic = true;
|
||||
persistent = true;
|
||||
dates = "weekly";
|
||||
@ -128,22 +116,37 @@ in {
|
||||
{ };
|
||||
};
|
||||
|
||||
system.autoUpgrade = if variable.enableAutoUpgrade then {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
|
||||
|
||||
system.autoUpgrade = if config.var.autoUpgrade then {
|
||||
enable = true;
|
||||
dates = "04:00";
|
||||
flake = "${config.users.users.${variable.username}.home}/.config/nixos";
|
||||
flake = "${config.users.users.${config.var.username}.home}/.config/nixos";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
} else
|
||||
{ };
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys =
|
||||
[ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Faster rebuilding
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
man.enable = true;
|
||||
dev.enable = false;
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
system.stateVersion = variable.stateVersion;
|
||||
# Don't touch this
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
hardware.nvidia.prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
|
||||
# sync.enable = true;
|
||||
|
||||
amdgpuBusId = "PCI:5:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = "/etc/tailscalepwd";
|
||||
};
|
||||
}
|
79
hosts/laptop/variables.nix
Normal file
@ -0,0 +1,79 @@
|
||||
{ config, ... }: {
|
||||
imports = [ ../shared/variables-config.nix ];
|
||||
|
||||
config.var = {
|
||||
hostname = "nixy";
|
||||
username = "hadi";
|
||||
homeDirectory = "/home/" + config.var.username;
|
||||
|
||||
keyboardLayout = "fr";
|
||||
|
||||
timeZone = "Europe/Paris";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocale = "fr_FR.UTF-8";
|
||||
|
||||
git = {
|
||||
username = "Hadi";
|
||||
email = "112569860+anotherhadi@users.noreply.github.com";
|
||||
};
|
||||
|
||||
stateVersion = "24.05";
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = false;
|
||||
sops = true;
|
||||
nextcloud = true;
|
||||
nvidia = true;
|
||||
nvidiaPrime = true;
|
||||
|
||||
theme = {
|
||||
wallpaper = "Lofi-Computer.png";
|
||||
|
||||
font-mono = "FiraCode Nerd Font Mono";
|
||||
font = "SFProDisplay Nerd Font";
|
||||
|
||||
rounding = 15;
|
||||
gaps-in = 12;
|
||||
gaps-out = config.var.theme.gaps-in * 2;
|
||||
border-size = 4;
|
||||
|
||||
fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "none"
|
||||
|
||||
waybar = {
|
||||
transparent = true;
|
||||
float = true;
|
||||
};
|
||||
|
||||
colors = {
|
||||
c0 = "2F2F2F"; # black
|
||||
c1 = "f7768e"; # red
|
||||
c2 = "73daca"; # green
|
||||
c3 = "e0af68"; # yellow
|
||||
c4 = "4973CB"; # blue
|
||||
c5 = "A594FD"; # magenta
|
||||
c6 = "7dcfff"; # cyan
|
||||
c7 = "FFFFFF"; # white
|
||||
c8 = "3F3F3F"; # bright black
|
||||
c9 = "f7869e"; # bright red
|
||||
c10 = "83eada"; # bright green
|
||||
c11 = "f0bf78"; # bright yellow
|
||||
c12 = "8ab2f7"; # bright blue
|
||||
c13 = "A988F8"; # bright magenta
|
||||
c14 = "8ddfff"; # bright cyan
|
||||
c15 = "f4f5f7"; # bright white
|
||||
|
||||
bg = "040404";
|
||||
fg = config.var.theme.colors.c7;
|
||||
bgalt = "131313";
|
||||
fgalt = config.var.theme.colors.c15;
|
||||
|
||||
accent = config.var.theme.colors.c4;
|
||||
accentFg = config.var.theme.colors.c0;
|
||||
|
||||
# Should make those automtic
|
||||
accentName = "blue";
|
||||
accentNumber = "4";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ cloudflared ];
|
||||
services.cloudflared = {
|
||||
enable = true;
|
||||
tunnels = {
|
||||
"55ac0504-4ba0-4ea7-bf38-6d04ca7e45c3" = {
|
||||
credentialsFile = "/etc/cloudflaredpwd";
|
||||
default = "http_status:404";
|
||||
ingress = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
let variable = import ../../variables.nix;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./openssh.nix
|
||||
./nextcloud.nix
|
||||
./firewall.nix
|
||||
./nginx.nix
|
||||
./cloudflared.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
tmp.cleanOnBoot = true;
|
||||
};
|
||||
|
||||
networking.hostName = variable.server.hostName;
|
||||
|
||||
time.timeZone = variable.timeZone;
|
||||
i18n.defaultLocale = variable.defaultLocale;
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = variable.extraLocale;
|
||||
LC_IDENTIFICATION = variable.extraLocale;
|
||||
LC_MEASUREMENT = variable.extraLocale;
|
||||
LC_MONETARY = variable.extraLocale;
|
||||
LC_NAME = variable.extraLocale;
|
||||
LC_NUMERIC = variable.extraLocale;
|
||||
LC_PAPER = variable.extraLocale;
|
||||
LC_TELEPHONE = variable.extraLocale;
|
||||
LC_TIME = variable.extraLocale;
|
||||
};
|
||||
|
||||
users.users.${variable.username} = {
|
||||
isNormalUser = true;
|
||||
description = "${variable.username} account";
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVDICWA/+W3Qqgoxw6pIwPAjRmTYKWnsEPD/cRTNgzP hadi@heaven"
|
||||
];
|
||||
};
|
||||
|
||||
console.keyMap = variable.keyboardLayout;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
gc = if variable.server.enableAutoGarbageCollector then {
|
||||
automatic = true;
|
||||
persistent = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
} else
|
||||
{ };
|
||||
};
|
||||
|
||||
system.autoUpgrade = if variable.server.enableAutoUpgrade then {
|
||||
enable = true;
|
||||
dates = "04:00";
|
||||
flake = "${config.users.users.${variable.username}.home}/.config/nixos";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
} else
|
||||
{ };
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys =
|
||||
[ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
system.stateVersion = variable.server.stateVersion;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
maxretry = 3;
|
||||
ignoreIP = [ "127.0.0.0/8" "10.0.0.0/8" "192.168.0.0/16" ];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 22 ];
|
||||
};
|
||||
}
|