simple environment
This commit is contained in:
parent
b2ff2711c4
commit
f22c44e436
35
config/apps/alacritty.nix
Normal file
35
config/apps/alacritty.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{...}:
|
||||||
|
let
|
||||||
|
gruvbox-dark = import ../data/gruvbox-dark.nix {};
|
||||||
|
|
||||||
|
in {
|
||||||
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font.normal.family = "monospace";
|
||||||
|
window = {
|
||||||
|
dynamic_title = true;
|
||||||
|
title = "Alacritty";
|
||||||
|
};
|
||||||
|
|
||||||
|
# gruvbox dark theme
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
inherit (gruvbox-dark) background foreground;
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit (gruvbox-dark) normal bright;
|
||||||
|
};
|
||||||
|
|
||||||
|
keyboard = {
|
||||||
|
bindings = [
|
||||||
|
{
|
||||||
|
key = "Return";
|
||||||
|
mods = "Shift|Control";
|
||||||
|
action = "SpawnNewInstance";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
config/apps/default.nix
Normal file
7
config/apps/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./firefox.nix
|
||||||
|
./sway.nix
|
||||||
|
./alacritty.nix
|
||||||
|
];
|
||||||
|
}
|
32
config/apps/firefox.nix
Normal file
32
config/apps/firefox.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{inputs, pkgs, ...}: let
|
||||||
|
user = import ../data/user.nix {};
|
||||||
|
in{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
profiles = {
|
||||||
|
default = {
|
||||||
|
isDefault = true;
|
||||||
|
|
||||||
|
search = {
|
||||||
|
default = "ddg";
|
||||||
|
force = true;
|
||||||
|
privateDefault = "ddg";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
"browser.aboutConfig.showWarning" = false;
|
||||||
|
"browser.toolbars.bookmarks.visibility" = "never";
|
||||||
|
"dom.webgpu.enabled" = true;
|
||||||
|
"gfx.webrender.all" = true;
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
"identity.sync.tokenserver.uri" = "https://nirgendswo.com:8001/1.0/sync/1.5";
|
||||||
|
"services.sync.username" = user.email;
|
||||||
|
};
|
||||||
|
|
||||||
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
|
ublock-origin bitwarden rust-search-extension betterttv
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
140
config/apps/sway.nix
Normal file
140
config/apps/sway.nix
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
{pkgs, lib, ...}:
|
||||||
|
let
|
||||||
|
base = import ./../options.nix;
|
||||||
|
|
||||||
|
mod = "Mod4";
|
||||||
|
left = "h";
|
||||||
|
right = "l";
|
||||||
|
up = "k";
|
||||||
|
down = "j";
|
||||||
|
|
||||||
|
in {
|
||||||
|
wayland = {
|
||||||
|
windowManager = {
|
||||||
|
sway = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
|
||||||
|
config = {
|
||||||
|
modifier = "${mod}";
|
||||||
|
|
||||||
|
gaps = {
|
||||||
|
inner = 8;
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
border = 3;
|
||||||
|
titlebar = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
"type:pointer" = {
|
||||||
|
pointer_accel = "-1";
|
||||||
|
};
|
||||||
|
|
||||||
|
"type:keyboard" = {
|
||||||
|
xkb_layout = "gb,dk";
|
||||||
|
xkb_options =
|
||||||
|
"caps:escape,grp:menu_toggle,grp:rctrl_toggle";
|
||||||
|
repeat_delay = "250";
|
||||||
|
repeat_rate = "25";
|
||||||
|
};
|
||||||
|
|
||||||
|
"type:touchpad" = {
|
||||||
|
natural_scroll = "enabled";
|
||||||
|
tap = "enabled";
|
||||||
|
tap_button_map = "lrm";
|
||||||
|
pointer_accel = "0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = with pkgs; {
|
||||||
|
"Print" = "exec screenshot";
|
||||||
|
"${mod}+Print" = "exec screenshot --area";
|
||||||
|
"${mod}+Shift+Print" = "exec screenshot --current-window";
|
||||||
|
|
||||||
|
"XF86AudioRaiseVolume" = "exec ${wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||||
|
"XF86AudioLowerVolume" = "exec ${wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||||
|
"XF86AudioMute" = "exec ${wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
"XF86AudioMicMute" = "exec ${wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||||
|
|
||||||
|
"XF86AudioPlay" = "mpc toggle";
|
||||||
|
"XF86AudioNext" = "mpc next";
|
||||||
|
"XF86AudioPrev" = "mpc prev";
|
||||||
|
|
||||||
|
"XF86MonBrightnessUp" = "exec ${brightnessctl}/bin/brightnessctl set +10%";
|
||||||
|
"XF86MonBrightnessDown" = "exec ${brightnessctl}/bin/brightnessctl set 10%-";
|
||||||
|
|
||||||
|
"${mod}+Shift+Return" = "exec ${alacritty}/bin/alacritty";
|
||||||
|
"${mod}+q" = "kill";
|
||||||
|
"${mod}+p" = "exec ${pkgs.rofi}/bin/rofi -combi-modes window,drun,run -modes combi,ssh -show combi -show-icons";
|
||||||
|
"${mod}+Shift+e" = "exec ${pkgs.emacs}/bin/emacsclient -c -a ''";
|
||||||
|
"${mod}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox";
|
||||||
|
"${mod}+Shift+c" = "reload";
|
||||||
|
"${mod}+Shift+q" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||||
|
|
||||||
|
"${mod}+${left}" = "focus left";
|
||||||
|
"${mod}+${right}" = "focus right";
|
||||||
|
"${mod}+${up}" = "focus up";
|
||||||
|
"${mod}+${down}" = "focus down";
|
||||||
|
|
||||||
|
"${mod}+Shift+${left}" = "move left";
|
||||||
|
"${mod}+Shift+${right}" = "move right";
|
||||||
|
"${mod}+Shift+${up}" = "move up";
|
||||||
|
"${mod}+Shift+${down}" = "move down";
|
||||||
|
|
||||||
|
"${mod}+Ctrl+${left}" = "move workspace to output left";
|
||||||
|
"${mod}+Ctrl+${right}" = "move workspace to output right";
|
||||||
|
|
||||||
|
"${mod}+b" = "splith";
|
||||||
|
"${mod}+v" = "splitv";
|
||||||
|
|
||||||
|
"${mod}+s" = "layout stacking";
|
||||||
|
"${mod}+w" = "layout tabbed";
|
||||||
|
"${mod}+e" = "layout toggle split";
|
||||||
|
|
||||||
|
"${mod}+Shift+space" = "layout toggle floating";
|
||||||
|
"${mod}+space" = "focus mode_toggle";
|
||||||
|
"${mod}+Shift+f" = "fullscreen";
|
||||||
|
|
||||||
|
} // lib.attrsets.mergeAttrsList (map
|
||||||
|
(n: let workspace = toString n; in {
|
||||||
|
"${mod}+${workspace}" = "workspace ${workspace}";
|
||||||
|
"${mod}+Shift+${workspace}" = "move container to workspace ${workspace}";
|
||||||
|
})
|
||||||
|
[1 2 3 4 5 6 7 8 9 0]
|
||||||
|
);
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
focused = {
|
||||||
|
background = "#A7C080";
|
||||||
|
text = "#272E33";
|
||||||
|
indicator = "#A7C080";
|
||||||
|
border = "#A7C080";
|
||||||
|
childBorder = "#A7C080";
|
||||||
|
};
|
||||||
|
unfocused = {
|
||||||
|
background = "#9DA9A0";
|
||||||
|
text = "#272E33";
|
||||||
|
indicator = "#9DA9A0";
|
||||||
|
border = "#9DA9A0";
|
||||||
|
childBorder = "#9DA9A0";
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
background = "#E67E80";
|
||||||
|
text = "#272E33";
|
||||||
|
indicator = "#E67E80";
|
||||||
|
border = "#E67E80";
|
||||||
|
childBorder = "#E67E80";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
};
|
||||||
|
}
|
26
config/data/gruvbox-dark.nix
Normal file
26
config/data/gruvbox-dark.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{...}: {
|
||||||
|
background = "#282828";
|
||||||
|
foreground = "#ebdbb2";
|
||||||
|
|
||||||
|
normal = {
|
||||||
|
black = "#282828";
|
||||||
|
red = "#cc241d";
|
||||||
|
green = "#98971a";
|
||||||
|
yellow = "#d79921";
|
||||||
|
blue = "#458588";
|
||||||
|
magenta = "#b16286";
|
||||||
|
cyan = "#689d6a";
|
||||||
|
white = "#a89984";
|
||||||
|
};
|
||||||
|
|
||||||
|
bright = {
|
||||||
|
black = "#928374";
|
||||||
|
red = "#fb4934";
|
||||||
|
green = "#b8bb26";
|
||||||
|
yellow = "#fabd2f";
|
||||||
|
blue = "#83a598";
|
||||||
|
magenta = "#d3869b";
|
||||||
|
cyan = "#8ec07c";
|
||||||
|
white = "#ebdbb2";
|
||||||
|
};
|
||||||
|
}
|
26
config/data/gruvbox-light.nix
Normal file
26
config/data/gruvbox-light.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{...}: {
|
||||||
|
background = "#fbf1c7";
|
||||||
|
foreground = "#3c3836";
|
||||||
|
|
||||||
|
normal = {
|
||||||
|
black = "#fbf1c7";
|
||||||
|
red = "#cc241d";
|
||||||
|
green = "#98971a";
|
||||||
|
yellow = "#d79921";
|
||||||
|
blue = "#458588";
|
||||||
|
magenta = "#b16286";
|
||||||
|
cyan = "#689d6a";
|
||||||
|
white = "#7c6f64";
|
||||||
|
};
|
||||||
|
|
||||||
|
bright = {
|
||||||
|
black = "#928374";
|
||||||
|
red = "#9d0006";
|
||||||
|
green = "#79740e";
|
||||||
|
yellow = "#b57614";
|
||||||
|
blue = "#076678";
|
||||||
|
magenta = "#8f3f71";
|
||||||
|
cyan = "#427b58";
|
||||||
|
white = "#3c3836";
|
||||||
|
};
|
||||||
|
}
|
3
config/data/user.nix
Normal file
3
config/data/user.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{...}: {
|
||||||
|
email = "janis@nirgendwo.xyz";
|
||||||
|
}
|
|
@ -5,18 +5,30 @@
|
||||||
# i.e. nixos-24.11
|
# i.e. nixos-24.11
|
||||||
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
|
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs"; # Use the same nixpkgs as the system
|
inputs.nixpkgs.follows = "nixpkgs"; # Use the same nixpkgs as the system
|
||||||
};
|
};
|
||||||
|
disko = {
|
||||||
|
url = "github:nix-community/disko";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nur.url = "github:nix-community/nur";
|
||||||
|
# firefox-addons = {
|
||||||
|
# url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs"; # Use the same nixpkgs as the system
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||||
{
|
let
|
||||||
|
system = "x86_64-linux"; # Default system architecture
|
||||||
|
in {
|
||||||
# NOTE: 'nixos' is the default hostname
|
# NOTE: 'nixos' is the default hostname
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixos = nixpkgs.lib.nixosSystem {
|
nixos = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux"; # Change this to your system architecture if needed
|
inherit system;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
@ -24,11 +36,23 @@
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true; # Use global packages in home-manager
|
home-manager.useGlobalPkgs = true; # Use global packages in home-manager
|
||||||
home-manager.useUserPackages = true; # Use user packages in home-manager
|
home-manager.useUserPackages = true; # Use user packages in home-manager
|
||||||
|
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit home-manager;
|
inherit inputs home-manager;
|
||||||
|
};
|
||||||
|
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true; # Allow unfree packages globally
|
||||||
|
overlays = [
|
||||||
|
inputs.nur.overlays.default
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,5 +2,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./system.nix
|
./system.nix
|
||||||
|
./plymouth.nix
|
||||||
|
./fonts.nix
|
||||||
|
./login.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
33
config/nixos/fonts.nix
Normal file
33
config/nixos/fonts.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
fonts = {
|
||||||
|
enableDefaultPackages = true;
|
||||||
|
packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
noto-fonts-emoji
|
||||||
|
liberation_ttf
|
||||||
|
roboto
|
||||||
|
roboto-mono
|
||||||
|
twitter-color-emoji
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.fira-mono
|
||||||
|
unicode-emoji
|
||||||
|
fira-sans
|
||||||
|
font-awesome
|
||||||
|
fira-mono
|
||||||
|
fira-code
|
||||||
|
material-icons
|
||||||
|
source-sans
|
||||||
|
source-code-pro
|
||||||
|
pkgs.nur.repos.redpz.sf-mono
|
||||||
|
];
|
||||||
|
fontconfig = {
|
||||||
|
defaultFonts = {
|
||||||
|
monospace = ["SF Mono" "Fira Mono" "Noto Mono"];
|
||||||
|
serif = ["Liberation Serif" "Noto Serif"];
|
||||||
|
sansSerif = ["Liberation Sans" "Noto Sans" "Roboto"];
|
||||||
|
emoji = ["Twitter Color Emoji" "Noto Emoji"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
16
config/nixos/login.nix
Normal file
16
config/nixos/login.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# This file is part of the NixOS configuration for the login service.
|
||||||
|
{pkgs, ...}: {
|
||||||
|
environment.systemPackages = [ pkgs.sddm-chili-theme ];
|
||||||
|
services = {
|
||||||
|
displayManager = {
|
||||||
|
enable = true;
|
||||||
|
sddm = {
|
||||||
|
enableHidpi = true;
|
||||||
|
enable = true;
|
||||||
|
theme = "chili";
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
sessionPackages = with pkgs; [sway];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
25
config/nixos/plymouth.nix
Normal file
25
config/nixos/plymouth.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
boot = {
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = "rings";
|
||||||
|
themePackages = with pkgs; [
|
||||||
|
(adi1090x-plymouth-themes.override {
|
||||||
|
selected_themes = [ "rings" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
consoleLogLevel = 3;
|
||||||
|
initrd.verbose = false;
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
"rd.systemd.show_status=auto"
|
||||||
|
];
|
||||||
|
|
||||||
|
loader.timeout = 0;
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,8 +4,6 @@ let
|
||||||
in {
|
in {
|
||||||
system.stateVersion = "${base.stateVersion}";
|
system.stateVersion = "${base.stateVersion}";
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true; # Allow unfree packages, if necessary.
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
|
|
|
@ -2,6 +2,10 @@ inputs @ { pkgs, lib, ...}: let
|
||||||
# NixOS version
|
# NixOS version
|
||||||
# Function to create the home-manager configuration for the account
|
# Function to create the home-manager configuration for the account
|
||||||
aliceUserFn = {pkgs, ...}: {
|
aliceUserFn = {pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
../apps
|
||||||
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
htop
|
htop
|
||||||
|
@ -16,6 +20,10 @@ inputs @ { pkgs, lib, ...}: let
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
la = "ls -la";
|
la = "ls -la";
|
||||||
git-tree = "git log --graph --oneline --all";
|
git-tree = "git log --graph --oneline --all";
|
||||||
|
c = "clear";
|
||||||
|
q = "exit";
|
||||||
|
ssh = "TERM=xterm-256color ssh";
|
||||||
|
emacs = "emacs -nw"; # Use emacs in terminal mode.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@ in {
|
||||||
initialPassword = user.defaultPassword;
|
initialPassword = user.defaultPassword;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {...}: {
|
||||||
imports = [ user.userModule ];
|
imports = [ user.userModule ];
|
||||||
|
|
||||||
# programs.home-manager.enable = true;
|
# programs.home-manager.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue