nixos config rewrite finished (i think)
This commit is contained in:
parent
a142124725
commit
99bb690c4f
48 changed files with 1046 additions and 2336 deletions
|
@ -87,4 +87,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
1509
flake.lock
1509
flake.lock
File diff suppressed because it is too large
Load diff
79
flake.nix
79
flake.nix
|
@ -4,7 +4,7 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
flake-utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
@ -21,57 +21,72 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-inspect.url = "github:bluskript/nix-inspect";
|
||||
|
||||
nix-gaming = {
|
||||
url = "github:fufexan/nix-gaming";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
niri = {
|
||||
url = "github:sodiboo/niri-flake";
|
||||
nixos-cosmic = {
|
||||
url = "github:lilyinstarlight/nixos-cosmic";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
ags.url = "github:Aylur/ags";
|
||||
|
||||
stylix.url = "github:danth/stylix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
flake-utils,
|
||||
nixos-cosmic,
|
||||
...
|
||||
} @ inputs:
|
||||
{
|
||||
nixosConfigurations.waves = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit (self) outputs;
|
||||
inherit inputs flake-utils;
|
||||
};
|
||||
} @ inputs: let
|
||||
mkApp = flake-utils.lib.mkApp;
|
||||
mkFlake = flake-utils.lib.mkFlake;
|
||||
in
|
||||
mkFlake {
|
||||
inherit self inputs nixpkgs home-manager;
|
||||
channelsConfig.allowUnfree = true;
|
||||
sharedOverlays = [
|
||||
self.overlays.additions
|
||||
self.overlays.modifications
|
||||
self.overlays.unstable-packages
|
||||
];
|
||||
|
||||
# host defaults
|
||||
hostDefaults.system = "x86_64-linux";
|
||||
hostDefaults.modules = [
|
||||
{
|
||||
nix.settings = {
|
||||
substituters = ["https://cosmic.cachix.org/"];
|
||||
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
|
||||
};
|
||||
}
|
||||
nixos-cosmic.nixosModules.default
|
||||
];
|
||||
hostDefaults.extraArgs = {inherit flake-utils;};
|
||||
hostDefaults.specialArgs = {
|
||||
inherit inputs;
|
||||
inherit (self) outputs;
|
||||
};
|
||||
|
||||
hosts.waves = {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
inputs.disko.nixosModules.default
|
||||
(import ./disko.nix {device = "/dev/disk/by-id/nvme-Samsung_SSD_980_PRO_with_Heatsink_1TB_S6WSNJ0T900943T";})
|
||||
./waves.nix
|
||||
./system/waves/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
}
|
||||
./home/valerie/home.nix
|
||||
];
|
||||
output = "nixosConfigurations";
|
||||
};
|
||||
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
|
||||
homeConfigurations."dv@waves" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {system = "x86_64-linux";};
|
||||
extraSpecialArgs = {
|
||||
inherit (self) outputs;
|
||||
inherit inputs flake-utils;
|
||||
};
|
||||
|
||||
modules = [
|
||||
inputs.niri.homeModules.niri
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
# inputs.niri.homeModules.config
|
||||
./modules/home/dv.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
// flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
@ -82,7 +97,7 @@
|
|||
apps = {
|
||||
"disko" = {
|
||||
type = "app";
|
||||
program = "${self.outputs.packages.${system}.disko}/bin/disko";
|
||||
program = "${outputs.packages.${system}.disko}/bin/disko";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -11,25 +11,25 @@ config.hide_tab_bar_if_only_one_tab = true
|
|||
-- weight = "Regular",
|
||||
-- })
|
||||
config.font = wezterm.font_with_fallback({
|
||||
-- { family = "Rec Mono Waves", weight = "Regular" },
|
||||
{ family = "JuliaMono", weight = "Regular" },
|
||||
-- "CozetteHiDpi",
|
||||
"Symbols Nerd Font",
|
||||
-- { family = "Rec Mono Waves", weight = "Regular" },
|
||||
{ family = "Monaspace Neon", weight = "Regular" },
|
||||
-- "CozetteHiDpi",
|
||||
"Symbols Nerd Font",
|
||||
})
|
||||
config.font_size = 14
|
||||
-- config.cell_width = 0.88
|
||||
config.font_size = 12
|
||||
config.cell_width = 0.95
|
||||
|
||||
config.set_environment_variables = {
|
||||
TERM = "xterm-256color",
|
||||
EDITOR = "nvim",
|
||||
VISUAL = "nvim",
|
||||
TERM = "xterm-256color",
|
||||
EDITOR = "nvim",
|
||||
VISUAL = "nvim",
|
||||
}
|
||||
|
||||
config.window_padding = {
|
||||
left = 7,
|
||||
right = 7,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
left = 7,
|
||||
right = 7,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
}
|
||||
|
||||
config.default_cursor_style = "SteadyBar"
|
||||
|
@ -38,12 +38,12 @@ config.default_cursor_style = "SteadyBar"
|
|||
config.enable_wayland = false
|
||||
|
||||
config.unix_domains = {
|
||||
{
|
||||
name = "unix",
|
||||
},
|
||||
{
|
||||
name = "unix",
|
||||
},
|
||||
}
|
||||
config.freetype_load_flags = "DEFAULT"
|
||||
config.window_background_opacity = 0.95
|
||||
config.window_background_opacity = 1.00
|
||||
config.max_fps = 144
|
||||
config.scrollback_lines = 10000
|
||||
|
12
home/modules/core/default.nix
Normal file
12
home/modules/core/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = ["secrets" "ssh"];
|
||||
};
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
];
|
||||
};
|
||||
}
|
6
home/modules/default.nix
Normal file
6
home/modules/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
./core
|
||||
./gui
|
||||
./term
|
||||
./dev
|
||||
]
|
160
home/modules/dev/default.nix
Normal file
160
home/modules/dev/default.nix
Normal file
|
@ -0,0 +1,160 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs.unstable; [
|
||||
bruno
|
||||
xclip
|
||||
just
|
||||
nixd
|
||||
alejandra
|
||||
zoxide
|
||||
neovide
|
||||
nodejs
|
||||
corepack
|
||||
cargo-watch
|
||||
rustup
|
||||
gcc
|
||||
go
|
||||
jetbrains.idea-community
|
||||
cascadia-code
|
||||
jdk17
|
||||
# lua
|
||||
lua51Packages.lua
|
||||
tree-sitter
|
||||
luarocks
|
||||
gnumake
|
||||
ast-grep
|
||||
ncdu
|
||||
gh-dash
|
||||
hurl
|
||||
jnv
|
||||
rustscan
|
||||
slides
|
||||
markdownlint-cli2
|
||||
fx
|
||||
jq
|
||||
deno
|
||||
];
|
||||
|
||||
# git
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
keyConfig = ''
|
||||
(
|
||||
move_left: Some(( code: Char('h'), modifiers: "")),
|
||||
move_right: Some(( code: Char('l'), modifiers: "")),
|
||||
move_up: Some(( code: Char('k'), modifiers: "")),
|
||||
move_down: Some(( code: Char('j'), modifiers: "")),
|
||||
|
||||
stash_open: Some(( code: Char('l'), modifiers: "")),
|
||||
open_help: Some(( code: F(1), modifiers: "")),
|
||||
|
||||
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
|
||||
)
|
||||
'';
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
lfs.enable = true;
|
||||
|
||||
userName = "deva";
|
||||
userEmail = "hi@dessa.dev";
|
||||
signing = {
|
||||
key = "CC10324DD962CB7E";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
aliases = {
|
||||
wta = "worktree add";
|
||||
wtl = "worktree list";
|
||||
wtr = "worktree remove";
|
||||
rh = "reset HEAD"; # unstages all changes
|
||||
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
||||
lgb = "--no-pager log --oneline --decorate --graph --parents --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
||||
nuke = "!git clean -xdf && git reset --hard && git pull";
|
||||
st = "status -sb";
|
||||
sync = "!git push && git pull";
|
||||
rs = "restore --staged";
|
||||
ll = "log --oneline";
|
||||
last = "log -1 HEAD --stat";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
rv = "remote -v";
|
||||
df = "diff HEAD";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
branch.autosetupmerge = "true";
|
||||
push.default = "current";
|
||||
merge.stat = "true";
|
||||
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
||||
repack.usedeltabaseoffset = "true";
|
||||
pull.ff = "only";
|
||||
rebase = {
|
||||
autoSquash = true;
|
||||
autoStash = true;
|
||||
};
|
||||
rerere = {
|
||||
enabled = true;
|
||||
autoupdate = true;
|
||||
};
|
||||
};
|
||||
ignores = [
|
||||
"*~"
|
||||
"*.swp"
|
||||
"*result*"
|
||||
"todo.md"
|
||||
"node_modules"
|
||||
];
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
pkgs.gh-copilot
|
||||
];
|
||||
gitCredentialHelper.enable = true;
|
||||
settings = {
|
||||
editor = "nvim";
|
||||
git_protocol = "ssh";
|
||||
aliases = {
|
||||
co = "pr checkout";
|
||||
rc = "repo clone";
|
||||
cp = "copilot";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# ssh
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"hi@dessa.dev" = {
|
||||
host = "gitlab.com github.com 192.168.1.203";
|
||||
identitiesOnly = true;
|
||||
identityFile = [
|
||||
"~/.ssh/id_user"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.home.homeDirectory}/.gnupg";
|
||||
settings = {
|
||||
use-agent = true;
|
||||
default-key = "CC10324DD962CB7E";
|
||||
};
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
home.sessionVariables = {
|
||||
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";
|
||||
};
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
pst = pkgs.writeShellScriptBin "pst" (builtins.readFile ./pst);
|
||||
pst = pkgs.writeShellScriptBin "pst" (builtins.readFile ../../dotfiles/pst);
|
||||
in {
|
||||
xdg.configFile."wezterm/colors/camellia-hope-dark.toml".text = builtins.readFile (pkgs.fetchFromGitHub {
|
||||
owner = "camellia-theme";
|
||||
|
@ -15,7 +15,7 @@ in {
|
|||
programs = {
|
||||
wezterm = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./wezterm.lua;
|
||||
extraConfig = builtins.readFile ../../dotfiles/wezterm.lua;
|
||||
};
|
||||
broot = {
|
||||
enable = true;
|
||||
|
@ -126,7 +126,7 @@ in {
|
|||
'';
|
||||
};
|
||||
};
|
||||
xdg.configFile."lf/icons".source = ./lf-icons;
|
||||
xdg.configFile."lf/icons".source = ../../dotfiles/lf-icons;
|
||||
programs.bat.enable = true;
|
||||
programs.eza.enable = true;
|
||||
programs.man.enable = true;
|
||||
|
@ -270,14 +270,14 @@ in {
|
|||
bindkey -M viins '^[^[' sudo-command-line
|
||||
|
||||
# prompt init
|
||||
eval "$(${pkgs.oh-my-posh}/bin/oh-my-posh init zsh --config ${./prompt.json})"
|
||||
eval "$(${pkgs.oh-my-posh}/bin/oh-my-posh init zsh --config ${../../dotfiles/prompt.json})"
|
||||
'';
|
||||
dirHashes = {
|
||||
dl = "${config.home.homeDirectory}/Downloads";
|
||||
docs = "${config.home.homeDirectory}/Documents";
|
||||
src = "${config.home.homeDirectory}/src";
|
||||
dots = "${config.home.homeDirectory}/nix";
|
||||
nix = "${config.home.homeDirectory}/nix";
|
||||
dots = "${config.home.homeDirectory}/nixos";
|
||||
nix = "${config.home.homeDirectory}/nixos";
|
||||
pics = "${config.home.homeDirectory}/Pictures";
|
||||
vids = "${config.home.homeDirectory}/Videos";
|
||||
};
|
||||
|
@ -309,6 +309,8 @@ in {
|
|||
j = "just";
|
||||
ed = "code";
|
||||
nv = "nvim";
|
||||
sv = "sudo nvim";
|
||||
meteo = "curl http://wttr.in";
|
||||
cdi = "broot";
|
||||
bd = "popd || cd ..";
|
||||
lf = "yazi";
|
55
home/valerie/home.nix
Normal file
55
home/valerie/home.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
hm = inputs.home-manager.lib.hm;
|
||||
in {
|
||||
home-manager.users.valerie = {
|
||||
# import home-manager modules
|
||||
imports = builtins.concatMap import [
|
||||
../modules
|
||||
];
|
||||
|
||||
home = {
|
||||
file.".ssh/id_user.pub".text = builtins.readFile ../../system/waves/id_user.pub;
|
||||
username = "valerie";
|
||||
homeDirectory = "/home/valerie";
|
||||
extraOutputsToInstall = ["doc" "devdoc"];
|
||||
packages =
|
||||
[
|
||||
inputs.nh.packages.x86_64-linux.default
|
||||
]
|
||||
++ (with pkgs; [
|
||||
nom
|
||||
pinta
|
||||
vesktop
|
||||
signal-desktop
|
||||
blockbench
|
||||
blender
|
||||
prismlauncher
|
||||
steam
|
||||
unstable.vscode-fhs
|
||||
]);
|
||||
sessionVariables = {
|
||||
NIX_AUTO_RUN = "1";
|
||||
FLAKE = "/home/valerie/nixos";
|
||||
};
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
nix.package = lib.mkForce pkgs.unstable.nixVersions.latest;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
manual = {
|
||||
html.enable = false;
|
||||
json.enable = false;
|
||||
manpages.enable = false;
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.ags.homeManagerModules.default];
|
||||
home.packages = with pkgs; [
|
||||
sassc
|
||||
];
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
# additional packages to add to gjs's runtime
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./git.nix
|
||||
./ssh.nix
|
||||
./gpg.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unstable.bruno
|
||||
unstable.xclip
|
||||
unstable.just
|
||||
unstable.nixd
|
||||
unstable.alejandra
|
||||
unstable.zoxide
|
||||
unstable.neovide
|
||||
unstable.nodejs
|
||||
unstable.corepack
|
||||
unstable.cargo-watch
|
||||
unstable.rustup
|
||||
unstable.gcc
|
||||
unstable.go
|
||||
unstable.jetbrains.idea-community
|
||||
unstable.cascadia-code
|
||||
unstable.jdk17
|
||||
# unstable.lua
|
||||
unstable.lua51Packages.lua
|
||||
unstable.tree-sitter
|
||||
unstable.luarocks
|
||||
unstable.gnumake
|
||||
unstable.ast-grep
|
||||
unstable.ncdu
|
||||
unstable.gh-dash
|
||||
unstable.hurl
|
||||
unstable.jnv
|
||||
unstable.rustscan
|
||||
unstable.slides
|
||||
unstable.markdownlint-cli2
|
||||
unstable.fx
|
||||
unstable.jq
|
||||
];
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
keyConfig = ''
|
||||
(
|
||||
move_left: Some(( code: Char('h'), modifiers: "")),
|
||||
move_right: Some(( code: Char('l'), modifiers: "")),
|
||||
move_up: Some(( code: Char('k'), modifiers: "")),
|
||||
move_down: Some(( code: Char('j'), modifiers: "")),
|
||||
|
||||
stash_open: Some(( code: Char('l'), modifiers: "")),
|
||||
open_help: Some(( code: F(1), modifiers: "")),
|
||||
|
||||
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
|
||||
)
|
||||
'';
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
lfs.enable = true;
|
||||
|
||||
userName = "deva";
|
||||
userEmail = "hi@dessa.dev";
|
||||
signing = {
|
||||
key = "CC10324DD962CB7E";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
aliases = {
|
||||
wta = "worktree add";
|
||||
wtl = "worktree list";
|
||||
wtr = "worktree remove";
|
||||
rh = "reset HEAD"; # unstages all changes
|
||||
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
||||
lgb = "--no-pager log --oneline --decorate --graph --parents --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --";
|
||||
nuke = "!git clean -xdf && git reset --hard && git pull";
|
||||
st = "status -sb";
|
||||
sync = "!git push && git pull";
|
||||
rs = "restore --staged";
|
||||
ll = "log --oneline";
|
||||
last = "log -1 HEAD --stat";
|
||||
cm = "commit -m";
|
||||
co = "checkout";
|
||||
rv = "remote -v";
|
||||
df = "diff HEAD";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
branch.autosetupmerge = "true";
|
||||
push.default = "current";
|
||||
merge.stat = "true";
|
||||
core.whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
|
||||
repack.usedeltabaseoffset = "true";
|
||||
pull.ff = "only";
|
||||
rebase = {
|
||||
autoSquash = true;
|
||||
autoStash = true;
|
||||
};
|
||||
rerere = {
|
||||
enabled = true;
|
||||
autoupdate = true;
|
||||
};
|
||||
};
|
||||
ignores = [
|
||||
"*~"
|
||||
"*.swp"
|
||||
"*result*"
|
||||
"todo.md"
|
||||
"node_modules"
|
||||
];
|
||||
};
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
pkgs.gh-copilot
|
||||
];
|
||||
gitCredentialHelper.enable = true;
|
||||
settings = {
|
||||
editor = "nvim";
|
||||
git_protocol = "ssh";
|
||||
aliases = {
|
||||
co = "pr checkout";
|
||||
rc = "repo clone";
|
||||
cp = "copilot";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{pkgs, config, ...}: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.home.homeDirectory}/.gnupg";
|
||||
settings = {
|
||||
use-agent = true;
|
||||
default-key = "CC10324DD962CB7E";
|
||||
};
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
home.sessionVariables = {
|
||||
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"hi@dessa.dev" = {
|
||||
host = "gitlab.com github.com 192.168.1.203";
|
||||
identitiesOnly = true;
|
||||
identityFile = [
|
||||
"~/.ssh/id_user"
|
||||
];
|
||||
};
|
||||
};
|
||||
};}
|
|
@ -1,84 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./services.nix
|
||||
./programs.nix
|
||||
./stylix.nix
|
||||
# development
|
||||
./dev
|
||||
# terminal
|
||||
./term
|
||||
# gui
|
||||
./gui-core.nix
|
||||
./ags.nix
|
||||
# ./niri.nix
|
||||
];
|
||||
|
||||
nix = {
|
||||
#package = pkgs.nix;
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
gc.automatic = true;
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
#allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
cudaSupport = true;
|
||||
};
|
||||
nixpkgs.overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
inputs.niri.overlays.niri
|
||||
];
|
||||
home = {
|
||||
file.".ssh/id_user.pub".text = builtins.readFile ../nixos/id_user.pub;
|
||||
username = "dv";
|
||||
homeDirectory = "/dv";
|
||||
extraOutputsToInstall = ["doc" "devdoc"];
|
||||
packages = [
|
||||
inputs.nh.packages.x86_64-linux.default
|
||||
pkgs.nom
|
||||
pkgs.pinta
|
||||
pkgs.vesktop
|
||||
pkgs.signal-desktop
|
||||
pkgs.blockbench
|
||||
pkgs.blender
|
||||
pkgs.prismlauncher
|
||||
pkgs.steam
|
||||
];
|
||||
sessionVariables = {
|
||||
NIX_AUTO_RUN = "1";
|
||||
FLAKE = "/dv/nixos";
|
||||
};
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
nix.package = lib.mkForce pkgs.unstable.nixVersions.latest;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
manual = {
|
||||
html.enable = false;
|
||||
json.enable = false;
|
||||
manpages.enable = false;
|
||||
};
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
#programs.nix-index.enable = true;
|
||||
#programs.nix-index.symlinkToCacheHome = true;
|
||||
#programs.nix-index-database.comma.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
}
|
|
@ -1,347 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
wayland-utils
|
||||
libsecret
|
||||
cage
|
||||
gamescope
|
||||
xwayland-satellite
|
||||
];
|
||||
programs.fuzzel.enable = true;
|
||||
programs.fuzzel.settings.main.terminal = "wezterm";
|
||||
services.mako = {
|
||||
font = "cozette 12";
|
||||
enable = true;
|
||||
};
|
||||
programs.niri.enable = true;
|
||||
programs.niri.package = pkgs.niri-stable;
|
||||
programs.niri.settings = {
|
||||
input.keyboard.xkb.layout = "no";
|
||||
input.keyboard.repeat-delay = 200;
|
||||
input.keyboard.repeat-rate = 30;
|
||||
# input.mouse.accel-speed = 1.0;
|
||||
input.mouse = {
|
||||
accel-speed = 0.0;
|
||||
accel-profile = "flat";
|
||||
};
|
||||
input.touchpad = {
|
||||
tap = true;
|
||||
dwt = true;
|
||||
click-method = "clickfinger";
|
||||
natural-scroll = true;
|
||||
};
|
||||
prefer-no-csd = true;
|
||||
layout = {
|
||||
gaps = 16;
|
||||
struts.left = 64;
|
||||
struts.right = 64;
|
||||
border.width = 4;
|
||||
};
|
||||
hotkey-overlay.skip-at-startup = true;
|
||||
debug.wait-for-frame-completion-before-queueing = true;
|
||||
window-rules = [
|
||||
{
|
||||
matches = [{app-id = "^org\.wezfurlong\.wezterm$";}];
|
||||
default-column-width = {};
|
||||
opacity = 0.95;
|
||||
}
|
||||
];
|
||||
animations.shaders.window-resize = ''
|
||||
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
|
||||
vec3 coords_next_geo = niri_curr_geo_to_next_geo * coords_curr_geo;
|
||||
|
||||
vec3 coords_stretch = niri_geo_to_tex_next * coords_curr_geo;
|
||||
vec3 coords_crop = niri_geo_to_tex_next * coords_next_geo;
|
||||
|
||||
// We can crop if the current window size is smaller than the next window
|
||||
// size. One way to tell is by comparing to 1.0 the X and Y scaling
|
||||
// coefficients in the current-to-next transformation matrix.
|
||||
bool can_crop_by_x = niri_curr_geo_to_next_geo[0][0] <= 1.0;
|
||||
bool can_crop_by_y = niri_curr_geo_to_next_geo[1][1] <= 1.0;
|
||||
|
||||
vec3 coords = coords_stretch;
|
||||
if (can_crop_by_x)
|
||||
coords.x = coords_crop.x;
|
||||
if (can_crop_by_y)
|
||||
coords.y = coords_crop.y;
|
||||
|
||||
vec4 color = texture2D(niri_tex_next, coords.st);
|
||||
|
||||
// However, when we crop, we also want to crop out anything outside the
|
||||
// current geometry. This is because the area of the shader is unspecified
|
||||
// and usually bigger than the current geometry, so if we don't fill pixels
|
||||
// outside with transparency, the texture will leak out.
|
||||
//
|
||||
// When stretching, this is not an issue because the area outside will
|
||||
// correspond to client-side decoration shadows, which are already supposed
|
||||
// to be outside.
|
||||
if (can_crop_by_x && (coords_curr_geo.x < 0.0 || 1.0 < coords_curr_geo.x))
|
||||
color = vec4(0.0);
|
||||
if (can_crop_by_y && (coords_curr_geo.y < 0.0 || 1.0 < coords_curr_geo.y))
|
||||
color = vec4(0.0);
|
||||
|
||||
return color;
|
||||
}
|
||||
'';
|
||||
binds = with config.lib.niri.actions; let
|
||||
sh = spawn "sh" "-c";
|
||||
|
||||
screenshot-area-script = pkgs.writeShellScript "screenshot-area" ''
|
||||
grim -o $(niri msg --json focused-output | jq -r .name) - | swayimg --config=info.mode=off --fullscreen - &
|
||||
SWAYIMG=$!
|
||||
niri msg action do-screen-transition -d 1200
|
||||
sleep 1.2
|
||||
grim -g "$(slurp)" - | wl-copy -t image/png
|
||||
niri msg action do-screen-transition
|
||||
kill $SWAYIMG
|
||||
'';
|
||||
|
||||
screenshot-area = spawn "${screenshot-area-script}";
|
||||
in
|
||||
lib.attrsets.mergeAttrsList [
|
||||
{
|
||||
"Mod+T".action = spawn "wezterm";
|
||||
"Mod+D".action = spawn "fuzzel";
|
||||
"Mod+J".action = focus-window-or-workspace-down;
|
||||
"Mod+K".action = focus-window-or-workspace-up;
|
||||
"Mod+Ctrl+J".action = move-window-down-or-to-workspace-down;
|
||||
"Mod+Ctrl+K".action = move-window-up-or-to-workspace-up;
|
||||
}
|
||||
];
|
||||
};
|
||||
programs.niri.config = ''
|
||||
debug {
|
||||
wait-for-frame-completion-before-queueing
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
default-column-width {}
|
||||
}
|
||||
|
||||
binds {
|
||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
// in the end. To find an XKB name for a particular key, you may use a program
|
||||
// like wev.
|
||||
//
|
||||
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
|
||||
// when running as a winit window.
|
||||
//
|
||||
// Most actions that you can bind here can also be invoked programmatically with
|
||||
// `niri msg action do-something`.
|
||||
|
||||
// Mod-Shift-/, which is usually the same as Mod-?,
|
||||
// shows a list of important hotkeys.
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+T { spawn "wezterm"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Super+Alt+L { spawn "swaylock"; }
|
||||
|
||||
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||
// Note: the entire command goes as a single argument in the end.
|
||||
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
|
||||
|
||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
|
||||
|
||||
Mod+Q { close-window; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-down; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Ctrl+Left { move-column-left; }
|
||||
Mod+Ctrl+Down { move-window-down; }
|
||||
Mod+Ctrl+Up { move-window-up; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
// Alternative commands that move across workspaces when reaching
|
||||
// the first or last window in a column.
|
||||
// Mod+J { focus-window-or-workspace-down; }
|
||||
// Mod+K { focus-window-or-workspace-up; }
|
||||
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Shift+Left { focus-monitor-left; }
|
||||
Mod+Shift+Down { focus-monitor-down; }
|
||||
Mod+Shift+Up { focus-monitor-up; }
|
||||
Mod+Shift+Right { focus-monitor-right; }
|
||||
Mod+Shift+H { focus-monitor-left; }
|
||||
Mod+Shift+J { focus-monitor-down; }
|
||||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
// You can bind mouse wheel scroll ticks using the following syntax.
|
||||
// These binds will change direction based on the natural-scroll setting.
|
||||
//
|
||||
// To avoid scrolling through workspaces really fast, you can use
|
||||
// the cooldown-ms property. The bind will be rate-limited to this value.
|
||||
// You can set a cooldown on any bind, but it's most useful for the wheel.
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
|
||||
// Usually scrolling up and down with Shift in applications results in
|
||||
// horizontal scrolling; these binds replicate that.
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
// Similarly, you can bind touchpad scroll "ticks".
|
||||
// Touchpad scrolling is continuous, so for these binds it is split into
|
||||
// discrete intervals.
|
||||
// These binds are also affected by touchpad's natural-scroll, so these
|
||||
// example binds are "inverted", since we have natural-scroll enabled for
|
||||
// touchpads by default.
|
||||
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
|
||||
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
|
||||
|
||||
// You can refer to workspaces by index. However, keep in mind that
|
||||
// niri is a dynamic workspace system, so these commands are kind of
|
||||
// "best effort". Trying to refer to a workspace index bigger than
|
||||
// the current workspace count will instead refer to the bottommost
|
||||
// (empty) workspace.
|
||||
//
|
||||
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
// will all refer to the 3rd workspace.
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
|
||||
// Switches focus between the current and the previous workspace.
|
||||
// Mod+Tab { focus-workspace-previous; }
|
||||
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
// There are also commands that consume or expel a single window to the side.
|
||||
// Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
// Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
Mod+Shift+R { reset-window-height; }
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
Mod+C { center-column; }
|
||||
|
||||
// Finer width adjustments.
|
||||
// This command can also:
|
||||
// * set width in pixels: "1000"
|
||||
// * adjust width in pixels: "-5" or "+5"
|
||||
// * set width as a percentage of screen width: "25%"
|
||||
// * adjust width as a percentage of screen width: "-10%" or "+10%"
|
||||
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
|
||||
// set-column-width "100" will make the column occupy 200 physical screen pixels.
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
// Finer height adjustments when in column with other windows.
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
// Actions to switch layouts.
|
||||
// Note: if you uncomment these, make sure you do NOT have
|
||||
// a matching layout switch hotkey configured in xkb options above.
|
||||
// Having both at once on the same hotkey will break the switching,
|
||||
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
||||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
Mod+Shift+E { quit; }
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
}
|
||||
'';
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = ["secrets" "ssh"];
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.niri.homeModules.stylix
|
||||
];
|
||||
stylix.targets.niri.enable = true;
|
||||
stylix.image = ./wallhaven-expk3o.png;
|
||||
stylix.polarity = "dark";
|
||||
stylix.base16Scheme = builtins.readFile (pkgs.fetchFromGitHub {
|
||||
owner = "camellia-theme";
|
||||
repo = "camellia";
|
||||
rev = "3b319bb337caccc311e60c3a8d357c4431b63680";
|
||||
hash = "sha256-HNdGHJ8n81HpVK9gFiRLZBBh0sz4FIUUx/ykGyoxv0c=";
|
||||
}
|
||||
+ "/ports/base16/camelliaHopeDark.yml");
|
||||
stylix.autoEnable = true;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.6 MiB |
|
@ -1,3 +0,0 @@
|
|||
{...}: {
|
||||
programs.adb.enable = true;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{pkgs, lib, ...}: {
|
||||
console = {
|
||||
earlySetup = true;
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
||||
keyMap = lib.mkForce "us";
|
||||
useXkbConfig = true; # use xkb.options in tty.
|
||||
};
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
antialias = true;
|
||||
defaultFonts = {
|
||||
emoji = ["Noto Color Emoji"];
|
||||
monospace = ["JuliaMono" "Symbols Nerd Font" "Noto Color Emoji"];
|
||||
serif = ["Noto Serif" "Noto Color Emoji"];
|
||||
sansSerif = ["Overpass" "Nunito" "Noto Color Emoji"];
|
||||
};
|
||||
hinting = {
|
||||
enable = true;
|
||||
autohint = false;
|
||||
style = "full";
|
||||
};
|
||||
subpixel = {
|
||||
lcdfilter = "default";
|
||||
rgba = "rgb";
|
||||
};
|
||||
};
|
||||
fontDir = {
|
||||
enable = true;
|
||||
decompressFonts = true;
|
||||
};
|
||||
packages = [
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-emoji
|
||||
|
||||
pkgs.material-design-icons
|
||||
(pkgs.google-fonts.override {fonts = ["Overpass" "Nunito"];})
|
||||
(pkgs.unstable.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [
|
||||
# for packages that are pkgs.*
|
||||
gnome-tour
|
||||
gnome-connections
|
||||
])
|
||||
++ (with pkgs.gnome; [
|
||||
# for packages that are pkgs.gnome.*
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
evince # document viewer
|
||||
]);
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprlock.enable = true;
|
||||
services.hypridle.enable = true;
|
||||
programs.hyprland.xwayland.enable = true;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{...}: {
|
||||
time.timeZone = "America/Indiana/Indianapolis";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [kanata];
|
||||
boot.kernelModules = ["uinput"];
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput", GROUP="input", MODE="0660"
|
||||
'';
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
system.nssModules = pkgs.lib.optional true pkgs.nssmdns;
|
||||
system.nssDatabases.hosts = pkgs.lib.optionals true (pkgs.lib.mkMerge [
|
||||
(pkgs.lib.mkBefore ["mdns4_minimal [NOTFOUND=return]"]) # before resolution
|
||||
(pkgs.lib.mkAfter ["mdns4"]) # after dns
|
||||
]);
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
# Enable nix ld
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
atk
|
||||
readline
|
||||
cairo
|
||||
cups
|
||||
curl
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
fuse3
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
icu
|
||||
libGL
|
||||
libappindicator-gtk3
|
||||
libdrm
|
||||
libglvnd
|
||||
libnotify
|
||||
libpulseaudio
|
||||
libunwind
|
||||
libusb1
|
||||
libuuid
|
||||
libxkbcommon
|
||||
libxml2
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
openssl
|
||||
pango
|
||||
pipewire
|
||||
stdenv.cc.cc
|
||||
stdenv.cc.cc.lib
|
||||
systemd
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXcomposite
|
||||
xorg.libXcursor
|
||||
xorg.libXdamage
|
||||
xorg.libXext
|
||||
xorg.libXfixes
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
xorg.libXrender
|
||||
xorg.libXtst
|
||||
xorg.libxcb
|
||||
xorg.libxkbfile
|
||||
xorg.libxshmfence
|
||||
fzf
|
||||
zlib
|
||||
libgit2
|
||||
];
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{config, ...}: {
|
||||
#nvidia
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./ssh.nix
|
||||
./sound.nix
|
||||
];
|
||||
|
||||
services.gvfs.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.printing.enable = true;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{...}: {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
|
||||
lowLatency = {
|
||||
enable = true;
|
||||
# defaults (USES nix-gaming PIPEWIRE LOW LATENCY MODULE!)
|
||||
quantum = 64;
|
||||
rate = 48000;
|
||||
};
|
||||
};
|
||||
hardware.pulseaudio.enable = false;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{...}: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = true;
|
||||
UseDns = true;
|
||||
X11Forwarding = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{...}: {services.syncthing = {
|
||||
enable = true;
|
||||
user = "dv";
|
||||
dataDir = "/dv";
|
||||
configDir = "/dv/.config/syncthing";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
devices = {
|
||||
"truenas" = {
|
||||
id = "2HEHVRP-6Z4FBIB-MULQ6Y2-XP2IW6Q-WVOVKOR-HSJBZ3O-RUN7DZI-SAM2SAA";
|
||||
autoAcceptFolders = true;
|
||||
};
|
||||
};
|
||||
folders = {
|
||||
"Explicit Sync" = {
|
||||
path = "/dv/sync";
|
||||
devices = ["truenas"];
|
||||
};
|
||||
"zettelkasten" = {
|
||||
path = "/dv/zet";
|
||||
devices = ["truenas"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};}
|
|
@ -1,33 +0,0 @@
|
|||
{pkgs,...}: {
|
||||
users.users.dv = {
|
||||
uid = 1337;
|
||||
initialPassword = "iamsonaughty.";
|
||||
home = "/dv";
|
||||
createHome = true;
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile ./id_user.pub)
|
||||
];
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"docker"
|
||||
"input"
|
||||
"libvirtd"
|
||||
"plugdev"
|
||||
"video"
|
||||
"adbusers"
|
||||
"uinput"
|
||||
];
|
||||
};
|
||||
|
||||
users.users.root = {
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [];
|
||||
openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile ./id_user.pub)
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{config, ...}: {
|
||||
virtualisation.containers.cdi.dynamic.nvidia.enable = builtins.any (driver: driver == "nvidia") config.services.xserver.videoDrivers;
|
||||
virtualisation.vmware.host.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
programs = {
|
||||
less.enable = true;
|
||||
|
||||
# default zsh config if not configured using home-manager
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
promptInit = ''
|
||||
PS1='%B%1~%b %(#.#.$): '
|
||||
'';
|
||||
};
|
||||
};
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
pkgs: pkgs.writeShellScriptBin "disko" ''
|
||||
pkgs:
|
||||
pkgs.writeShellScriptBin "disko" ''
|
||||
cat >disko.nix <<EOL
|
||||
${builtins.readFile ../disko.nix}
|
||||
EOL
|
||||
|
@ -12,3 +13,4 @@ pkgs: pkgs.writeShellScriptBin "disko" ''
|
|||
# EOL
|
||||
# '';
|
||||
# }
|
||||
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
pkgs: let
|
||||
lib = pkgs.lib;
|
||||
in pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||
pluginName = "tokyo-night-tmux";
|
||||
version = "c3bc283cceeefaa7e5896878fe20711f466ab591";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "janoamaral";
|
||||
repo = "tokyo-night-tmux";
|
||||
rev = "c3bc283cceeefaa7e5896878fe20711f466ab591";
|
||||
hash = "sha256-3rMYYzzSS2jaAMLjcQoKreE0oo4VWF9dZgDtABCUOtY=";
|
||||
};
|
||||
rtpFilePath = "tokyo-night.tmux";
|
||||
meta = {
|
||||
homepage = "https://github.com/janoamaral/tokyo-night-tmux";
|
||||
description = "tokyo night tmux theme";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
in
|
||||
pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||
pluginName = "tokyo-night-tmux";
|
||||
version = "c3bc283cceeefaa7e5896878fe20711f466ab591";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "janoamaral";
|
||||
repo = "tokyo-night-tmux";
|
||||
rev = "c3bc283cceeefaa7e5896878fe20711f466ab591";
|
||||
hash = "sha256-3rMYYzzSS2jaAMLjcQoKreE0oo4VWF9dZgDtABCUOtY=";
|
||||
};
|
||||
rtpFilePath = "tokyo-night.tmux";
|
||||
meta = {
|
||||
homepage = "https://github.com/janoamaral/tokyo-night-tmux";
|
||||
description = "tokyo night tmux theme";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19,3 +19,5 @@ to get the disko.nix file, run:
|
|||
```sh
|
||||
nix run github:devawaves/nixos#disko
|
||||
```
|
||||
|
||||
*more utilities can be found in [usage.md](./usage.md)*
|
||||
|
|
395
system/waves/configuration.nix
Normal file
395
system/waves/configuration.nix
Normal file
|
@ -0,0 +1,395 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
outputs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
inputs.nix-gaming.nixosModules.pipewireLowLatency
|
||||
];
|
||||
|
||||
# users
|
||||
users.users.valerie = {
|
||||
uid = 1337;
|
||||
initialPassword = "giggle,iamsonaughty.";
|
||||
home = "/home/valerie";
|
||||
createHome = true;
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile ./id_user.pub)
|
||||
];
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"docker"
|
||||
"input"
|
||||
"libvirtd"
|
||||
"plugdev"
|
||||
"video"
|
||||
"adbusers"
|
||||
"uinput"
|
||||
];
|
||||
};
|
||||
|
||||
users.users.root = {
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [];
|
||||
openssh.authorizedKeys.keys = [
|
||||
(builtins.readFile ./id_user.pub)
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
cudaSupport = true;
|
||||
};
|
||||
nixpkgs.overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
nix-path = config.nix.nixPath;
|
||||
# allowUnfree = true;
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
keep-derivations = true;
|
||||
keep-outputs = true;
|
||||
trusted-users = ["root" "@wheel"];
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
# Opinionated: disable channels
|
||||
channel.enable = false;
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
};
|
||||
|
||||
# system-wide pkgs
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs) python3 fuse3 floorp localsend parsec-bin kanata;
|
||||
inherit (pkgs.unstable) neovim;
|
||||
};
|
||||
|
||||
# security
|
||||
security = {
|
||||
# don't ask password for wheel group, disk is encrypted with a secure password & ssh auth with password is disabled!
|
||||
sudo.wheelNeedsPassword = false;
|
||||
# enable trusted platform module 2 support
|
||||
tpm2.enable = true;
|
||||
};
|
||||
|
||||
# boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
networking.hostName = "waves";
|
||||
networking.networkmanager.enable = true;
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
|
||||
# virtualisation
|
||||
virtualisation.containers.cdi.dynamic.nvidia.enable = builtins.any (driver: driver == "nvidia") config.services.xserver.videoDrivers;
|
||||
virtualisation.vmware.host.enable = true;
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# kanata
|
||||
boot.kernelModules = ["uinput"];
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput", GROUP="input", MODE="0660"
|
||||
'';
|
||||
|
||||
# ssh
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
UseDns = true;
|
||||
X11Forwarding = false;
|
||||
};
|
||||
};
|
||||
|
||||
# sound
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
|
||||
lowLatency = {
|
||||
enable = true;
|
||||
# defaults (USES nix-gaming PIPEWIRE LOW LATENCY MODULE!)
|
||||
quantum = 64;
|
||||
rate = 48000;
|
||||
};
|
||||
};
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
# services (in general)
|
||||
services.gvfs.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.printing.enable = true;
|
||||
|
||||
# local name resolution
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
nssmdns = true;
|
||||
};
|
||||
system.nssModules = pkgs.lib.optional true pkgs.nssmdns;
|
||||
system.nssDatabases.hosts = pkgs.lib.optionals true (pkgs.lib.mkMerge [
|
||||
(pkgs.lib.mkBefore ["mdns4_minimal [NOTFOUND=return]"]) # before resolution
|
||||
(pkgs.lib.mkAfter ["mdns4"]) # after dns
|
||||
]);
|
||||
|
||||
# syncthing
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "valerie";
|
||||
dataDir = "/home/valerie";
|
||||
configDir = "/home/valerie/.config/syncthing";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
devices = {
|
||||
"truenas" = {
|
||||
id = "2HEHVRP-6Z4FBIB-MULQ6Y2-XP2IW6Q-WVOVKOR-HSJBZ3O-RUN7DZI-SAM2SAA";
|
||||
autoAcceptFolders = true;
|
||||
};
|
||||
};
|
||||
folders = {
|
||||
"Explicit Sync" = {
|
||||
path = "/home/valerie/sync";
|
||||
devices = ["truenas"];
|
||||
};
|
||||
"zettelkasten" = {
|
||||
path = "/home/valerie/zet";
|
||||
devices = ["truenas"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# adb
|
||||
programs.adb.enable = true;
|
||||
|
||||
# console
|
||||
console = {
|
||||
earlySetup = true;
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz";
|
||||
keyMap = lib.mkForce "us";
|
||||
useXkbConfig = true; # use xkb.options in tty.
|
||||
};
|
||||
|
||||
# fonts
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
antialias = true;
|
||||
defaultFonts = {
|
||||
emoji = ["Noto Color Emoji"];
|
||||
monospace = ["Monaspace Neon" "JuliaMono" "Symbols Nerd Font" "Noto Color Emoji"];
|
||||
serif = ["Noto Serif" "Noto Color Emoji"];
|
||||
sansSerif = ["Overpass" "Nunito" "Noto Color Emoji"];
|
||||
};
|
||||
hinting = {
|
||||
enable = true;
|
||||
autohint = false;
|
||||
style = "full";
|
||||
};
|
||||
subpixel = {
|
||||
lcdfilter = "default";
|
||||
rgba = "rgb";
|
||||
};
|
||||
};
|
||||
fontDir = {
|
||||
enable = true;
|
||||
decompressFonts = true;
|
||||
};
|
||||
packages = [
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-emoji
|
||||
|
||||
pkgs.material-design-icons
|
||||
(pkgs.google-fonts.override {fonts = ["Overpass" "Nunito"];})
|
||||
(pkgs.unstable.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
|
||||
pkgs.monaspace
|
||||
];
|
||||
};
|
||||
|
||||
# nvidia
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# gui
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
environment.gnome.excludePackages =
|
||||
(with pkgs; [
|
||||
# for packages that are pkgs.*
|
||||
gnome-tour
|
||||
gnome-connections
|
||||
])
|
||||
++ (with pkgs.gnome; [
|
||||
# for packages that are pkgs.gnome.*
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
evince # document viewer
|
||||
]);
|
||||
services.displayManager.cosmic-greeter.enable = false;
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
|
||||
# i18n
|
||||
time.timeZone = "America/Indiana/Indianapolis";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
programs = {
|
||||
less.enable = true;
|
||||
|
||||
# default zsh config if not configured using home-manager
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
promptInit = ''
|
||||
PS1='%B%1~%b %(#.#.$): '
|
||||
'';
|
||||
};
|
||||
};
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
|
||||
# Enable nix ld
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
alsa-lib
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
atk
|
||||
readline
|
||||
cairo
|
||||
cups
|
||||
curl
|
||||
dbus
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
fuse3
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
icu
|
||||
libGL
|
||||
libappindicator-gtk3
|
||||
libdrm
|
||||
libglvnd
|
||||
libnotify
|
||||
libpulseaudio
|
||||
libunwind
|
||||
libusb1
|
||||
libuuid
|
||||
libxkbcommon
|
||||
libxml2
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
openssl
|
||||
pango
|
||||
pipewire
|
||||
stdenv.cc.cc
|
||||
stdenv.cc.cc.lib
|
||||
systemd
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXcomposite
|
||||
xorg.libXcursor
|
||||
xorg.libXdamage
|
||||
xorg.libXext
|
||||
xorg.libXfixes
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
xorg.libXrender
|
||||
xorg.libXtst
|
||||
xorg.libxcb
|
||||
xorg.libxkbfile
|
||||
xorg.libxshmfence
|
||||
fzf
|
||||
zlib
|
||||
libgit2
|
||||
];
|
||||
}
|
12
usage.md
Normal file
12
usage.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
Building NixOS config manually:
|
||||
```sh
|
||||
sudo nixos-rebuild --flake .#hostname switch
|
||||
```
|
||||
Upgrading the system implies updating the inputs one at a time:
|
||||
```sh
|
||||
sudo nix flake lock --update-input <input>
|
||||
```
|
||||
or all of them together:
|
||||
```sh
|
||||
nix flake update --commit-lock-file
|
||||
```
|
95
waves.nix
95
waves.nix
|
@ -1,95 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
outputs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./waves-hardware.nix
|
||||
inputs.nix-gaming.nixosModules.pipewireLowLatency
|
||||
./modules/nixos/virtualisation.nix
|
||||
./modules/nixos/kanata.nix
|
||||
./modules/nixos/services.nix
|
||||
./modules/nixos/localnameresolution.nix
|
||||
./modules/nixos/syncthing.nix
|
||||
./modules/nixos/users.nix
|
||||
./modules/nixos/adb.nix
|
||||
./modules/nixos/console.nix
|
||||
./modules/nixos/fonts.nix
|
||||
./modules/nixos/nvidia.nix
|
||||
./modules/nixos/gui.nix
|
||||
./modules/nixos/i18n.nix
|
||||
./modules/nixos/zsh.nix
|
||||
./modules/nixos/nix-ld.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
cudaSupport = true;
|
||||
};
|
||||
nixpkgs.overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
nix-path = config.nix.nixPath;
|
||||
# allowUnfree = true;
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
keep-derivations = true;
|
||||
keep-outputs = true;
|
||||
trusted-users = ["root" "@wheel"];
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
# Opinionated: disable channels
|
||||
channel.enable = false;
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
unstable.neovim
|
||||
python3
|
||||
fuse3
|
||||
floorp
|
||||
localsend
|
||||
parsec-bin
|
||||
];
|
||||
|
||||
# security
|
||||
security = {
|
||||
sudo.wheelNeedsPassword = false; # don't ask password for wheel group, disk is encrypted with a secure password & ssh auth with password is disabled!
|
||||
# enable trusted platform module 2 support
|
||||
tpm2.enable = true;
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
networking.hostName = "waves";
|
||||
networking.networkmanager.enable = true;
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
}
|
Loading…
Reference in a new issue