feat: initial commit
This commit is contained in:
commit
54c34faa64
17 changed files with 841 additions and 0 deletions
9
.sops.yaml
Normal file
9
.sops.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
keys:
|
||||
- &user age12lvgjqzf0nczxp48r6rr0h7rpt8z8guqlsefe9f2ld2gl8tk5duqn4x2cj
|
||||
|
||||
creation_rules:
|
||||
- path_regex: secrets/.*\.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *user
|
||||
|
||||
240
flake.lock
generated
Normal file
240
flake.lock
generated
Normal file
|
|
@ -0,0 +1,240 @@
|
|||
{
|
||||
"nodes": {
|
||||
"den": {
|
||||
"locked": {
|
||||
"lastModified": 1774597022,
|
||||
"narHash": "sha256-QEYG3SBlX35TDVV/wyBonrEDEK4Mr3dtXSfnzvM0lII=",
|
||||
"owner": "vic",
|
||||
"repo": "den",
|
||||
"rev": "b7f910ab47260c91a0ae8d55fa72cd2178ba2458",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "den",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-aspects": {
|
||||
"locked": {
|
||||
"lastModified": 1773552804,
|
||||
"narHash": "sha256-a0kjpCZGnD5lt7yW6C3hzPhSf5KjnTyvX6XZ2NuhGs4=",
|
||||
"owner": "vic",
|
||||
"repo": "flake-aspects",
|
||||
"rev": "56fa8d4d4772d58eb7f9d66c28c1cd2762b60423",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "flake-aspects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774559029,
|
||||
"narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a0bb0d11514f92b639514220114ac8063c72d0a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"import-tree": {
|
||||
"locked": {
|
||||
"lastModified": 1773693634,
|
||||
"narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=",
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vic",
|
||||
"repo": "import-tree",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-flake": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774620721,
|
||||
"narHash": "sha256-QucawBaJ6Rl5JWAXAbpouXM1MsvlzwCsPGl3zOwLtzw=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "fb83d584532282f585cd02f3aa513e98b843e7e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1756556321,
|
||||
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.08",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1774616418,
|
||||
"narHash": "sha256-z+dLkAS4bqytIlOI4h2MnjBJrSP4d1Awx0n+IV5YA3Y=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "8f48f56fe19918b5cfa02e5d68a47ebaf7bf3dee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1774386573,
|
||||
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1774388614,
|
||||
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1774388614,
|
||||
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"den": "den",
|
||||
"flake-aspects": "flake-aspects",
|
||||
"home-manager": "home-manager",
|
||||
"import-tree": "import-tree",
|
||||
"niri-flake": "niri-flake",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1774303811,
|
||||
"narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1755491097,
|
||||
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.7",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1773622265,
|
||||
"narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "a879e5e0896a326adc79c474bf457b8b99011027",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
23
flake.nix
Normal file
23
flake.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
flake-aspects.url = "github:vic/flake-aspects";
|
||||
den.url = "github:vic/den";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
niri-flake.url = "github:sodiboo/niri-flake";
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
(inputs.nixpkgs.lib.evalModules {
|
||||
modules = [ (inputs.import-tree ./modules) ];
|
||||
specialArgs.inputs = inputs;
|
||||
}).config.flake;
|
||||
}
|
||||
50
modules/_hardware/desktop-hardware.nix
Normal file
50
modules/_hardware/desktop-hardware.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/530e2b6f-2a15-4204-9445-8150743e3835";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/530e2b6f-2a15-4204-9445-8150743e3835";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" =
|
||||
{ device = "/dev/disk/by-uuid/530e2b6f-2a15-4204-9445-8150743e3835";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@log" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/530e2b6f-2a15-4204-9445-8150743e3835";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B7BD-80CC";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
54
modules/_hardware/notebook-hardware.nix
Normal file
54
modules/_hardware/notebook-hardware.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "ums_realtek" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/79211c8d-bd5e-4d19-b47c-2e57a4c6253e";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/79211c8d-bd5e-4d19-b47c-2e57a4c6253e";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/79211c8d-bd5e-4d19-b47c-2e57a4c6253e";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/8981-AD7D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/43d24b75-0fe1-422c-8a8f-b89f32063d3c"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
47
modules/_home/default.nix
Normal file
47
modules/_home/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
wezterm
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Zoty";
|
||||
userEmail = "zotydev@gmail.com";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "$HOME/.zsh_history";
|
||||
};
|
||||
|
||||
setOptions = [
|
||||
"HIST_IGNORE_ALL_DUPS"
|
||||
"AUTO_CD"
|
||||
];
|
||||
initContent = ''
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
'';
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"dirhistory"
|
||||
"history"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
79
modules/_home/git.nix
Normal file
79
modules/_home/git.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
gitUsername = "Zoty";
|
||||
gitEmail = "zotydev@gmail.com";
|
||||
myPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8fKj0nQMJt9nnXbYgT4ggYuj6ieGCy6KL53frwoNHa";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ diff-so-fancy ];
|
||||
|
||||
home.file.".ssh/id_ed25519.pub".text = myPublicKey;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = gitUsername;
|
||||
email = gitEmail;
|
||||
signingKey = "/run/secrets/ssh-private-key";
|
||||
};
|
||||
core = {
|
||||
compression = 9;
|
||||
whitespace = "error";
|
||||
preloadindex = true;
|
||||
};
|
||||
advice = {
|
||||
addEmptyPathspec = false;
|
||||
pushNonFastForward = false;
|
||||
statusHints = false;
|
||||
};
|
||||
init.defaultBranch = "main";
|
||||
status = {
|
||||
branch = true;
|
||||
showStash = true;
|
||||
showUntrackedFiles = "all";
|
||||
};
|
||||
diff = {
|
||||
context = 3;
|
||||
rename = "copies";
|
||||
interHunkContext = 10;
|
||||
};
|
||||
pager = {
|
||||
diff = "diff-so-fancy | $PAGER";
|
||||
branch = false;
|
||||
tag = false;
|
||||
};
|
||||
diff-so-fancy.markEmptyLines = false;
|
||||
interactive = {
|
||||
diffFilter = "diff-so-fancy --patch";
|
||||
singlekey = true;
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
default = "current";
|
||||
followTags = true;
|
||||
};
|
||||
pull = {
|
||||
default = "current";
|
||||
rebase = true;
|
||||
};
|
||||
rebase = {
|
||||
autoStash = true;
|
||||
missingCommitsCheck = "warn";
|
||||
};
|
||||
log = {
|
||||
abbrevCommit = true;
|
||||
graphColors = "blue,yellow,cyan,magenta,green,red";
|
||||
};
|
||||
branch.sort = "-committerdate";
|
||||
tag.sort = "-taggerdate";
|
||||
commit.gpgSign = true;
|
||||
gpg.format = "ssh";
|
||||
url = {
|
||||
"git@github.com:ZotyDev/".insteadOf = "zoty:";
|
||||
"git@github.com:UnnamedEngine/".insteadOf = "unen:";
|
||||
"git@github.com:Taumaturgo/".insteadOf = "taumaturgo:";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
73
modules/_home/niri.nix
Normal file
73
modules/_home/niri.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ pkgs, ... }: {
|
||||
xdg.configFile."niri/config.kdl".text = ''
|
||||
// Modificadores: Mod = Super (tecla Windows)
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "en"
|
||||
}
|
||||
}
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
}
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 8
|
||||
border {
|
||||
width 2
|
||||
active-color "#7aa2f7"
|
||||
inactive-color "#3b4261"
|
||||
}
|
||||
}
|
||||
|
||||
prefer-no-csd
|
||||
|
||||
screenshot-path "~/Imagens/screenshots/%Y-%m-%d %H-%M-%S.png"
|
||||
|
||||
binds {
|
||||
// Aplicativos
|
||||
Mod+Return { spawn "wezterm"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Mod+Q { close-window; }
|
||||
|
||||
// Foco
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Down { focus-window-down; }
|
||||
|
||||
// Mover janelas
|
||||
Mod+Shift+Left { move-column-left; }
|
||||
Mod+Shift+Right { move-column-right; }
|
||||
Mod+Shift+Up { move-window-up; }
|
||||
Mod+Shift+Down { move-window-down; }
|
||||
|
||||
// Workspaces
|
||||
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+Shift+1 { move-window-to-workspace 1; }
|
||||
Mod+Shift+2 { move-window-to-workspace 2; }
|
||||
Mod+Shift+3 { move-window-to-workspace 3; }
|
||||
Mod+Shift+4 { move-window-to-workspace 4; }
|
||||
Mod+Shift+5 { move-window-to-workspace 5; }
|
||||
|
||||
// Sistema
|
||||
Mod+Shift+E { quit; }
|
||||
Mod+L { spawn "swaylock"; }
|
||||
|
||||
// Volume
|
||||
XF86AudioRaiseVolume { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }
|
||||
XF86AudioLowerVolume { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }
|
||||
XF86AudioMute { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||
|
||||
// Screenshot
|
||||
Print { screenshot; }
|
||||
Mod+Print { screenshot-screen; }
|
||||
}
|
||||
'';
|
||||
}
|
||||
39
modules/core.nix
Normal file
39
modules/core.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ den, ... }: {
|
||||
den.aspects.core.nixos = { pkgs, ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.xkb.layout = "us";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
wget
|
||||
neovim
|
||||
btop
|
||||
nixd
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "America/Sao_Paulo";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
}
|
||||
72
modules/den.nix
Normal file
72
modules/den.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ inputs, den, lib, ... }: {
|
||||
imports = [ inputs.den.flakeModule ];
|
||||
|
||||
den.schema.user.classes = lib.mkDefault [ "homeManager" ];
|
||||
den.default.homeManager.home.stateVersion = "25.11";
|
||||
|
||||
den.hosts.x86_64-linux.desktop = {
|
||||
users.zoty = {};
|
||||
home-manager.module = inputs.home-manager.nixosModules.home-manager;
|
||||
};
|
||||
|
||||
den.hosts.x86_64-linux.notebook = {
|
||||
users.zoty = {};
|
||||
home-manager.module = inputs.home-manager.nixosModules.home-manager;
|
||||
};
|
||||
|
||||
den.aspects.notebook = {
|
||||
includes = [
|
||||
den.provides.hostname
|
||||
den.aspects.core
|
||||
den.aspects.niri
|
||||
den.aspects.notebook-specific
|
||||
den.aspects.secrets
|
||||
];
|
||||
nixos = {
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
};
|
||||
|
||||
den.aspects.desktop = {
|
||||
includes = [
|
||||
den.provides.hostname
|
||||
den.aspects.core
|
||||
den.aspects.niri
|
||||
den.aspects.desktop-specific
|
||||
den.aspects.dev
|
||||
den.aspects.secrets
|
||||
];
|
||||
nixos = {
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
};
|
||||
|
||||
den.aspects.zoty = {
|
||||
includes = [
|
||||
den.provides.define-user
|
||||
den.provides.primary-user
|
||||
];
|
||||
nixos = { pkgs, ... }: {
|
||||
users.users.zoty = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" "audio" "input" ];
|
||||
shell = pkgs.zsh;
|
||||
hashedPasswordFile = "/run/secrets/user-password";
|
||||
};
|
||||
programs.zsh.enable = true;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
};
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
};
|
||||
homeManager = {
|
||||
imports = [
|
||||
./_home/default.nix
|
||||
./_home/niri.nix
|
||||
./_home/git.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
50
modules/desktop.nix
Normal file
50
modules/desktop.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ den, ... }: {
|
||||
den.aspects.desktop-specific.nixos = { config, pkgs, ... }: {
|
||||
imports = [ ./_hardware/desktop-hardware.nix ];
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
# Required by Wayland
|
||||
modesetting.enable = true;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
boot = {
|
||||
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
kernelParams = [ "nvidia.NVreg_PreserveVideoMemoryAllocations=1" ];
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/dev.nix
Normal file
7
modules/dev.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ den, pkgs, ... }: {
|
||||
den.aspects.dev.nixos = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
fzf
|
||||
];
|
||||
};
|
||||
}
|
||||
37
modules/niri.nix
Normal file
37
modules/niri.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ inputs, den, pkgs, ... }: {
|
||||
den.aspects.niri.nixos = { pkgs, ... }: {
|
||||
imports = [ inputs.niri-flake.nixosModules.niri ];
|
||||
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
waybar
|
||||
fuzzel
|
||||
swaylock
|
||||
swayidle
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
mako
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gnome ];
|
||||
};
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session = {
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/notebook.nix
Normal file
17
modules/notebook.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ den, ... }: {
|
||||
den.aspects.notebook-specific.nixos = { pkgs, ... }: {
|
||||
imports = [ ./_hardware/notebook-hardware.nix ];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
services.thermald.enable = true;
|
||||
powerManagement.enable = true;
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/output.nix
Normal file
6
modules/output.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ lib, ... }: {
|
||||
options.flake.nixosConfigurations = lib.mkOption {
|
||||
default = {};
|
||||
type = lib.types.lazyAttrsOf lib.types.raw;
|
||||
};
|
||||
}
|
||||
21
modules/secrets.nix
Normal file
21
modules/secrets.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ inputs, den, ... }: {
|
||||
den.aspects.secrets.nixos = { ... }: {
|
||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/secrets.yaml;
|
||||
age.keyFile = "/etc/sops/age/keys.txt";
|
||||
|
||||
secrets = {
|
||||
"user-password" = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
"ssh-private-key" = {
|
||||
path = "/run/secrets/ssh-private-key";
|
||||
owner = "zoty";
|
||||
mode = "0400";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
secrets/secrets.yaml
Normal file
17
secrets/secrets.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
user-password: ENC[AES256_GCM,data:6ucfSYZ/RHpme2xC+KutsY5k,iv:2l6JQq/eSQsU2+GvE2CpADsJ27H0NZQpfa6KAtM1MAw=,tag:N4ewTNzq72pvazRzp6l53w==,type:str]
|
||||
ssh-private-key: ENC[AES256_GCM,data:S8Nb1z+1V9PnbjosA1L8+xSg+8qYEvspr+Dw1i6MRdGK+WJ4n13LplG0xd2ShKg4EmbBu4D+b0bIhFIU6sHgUkHCgbtHr1xav9a9qDKykOPTT6ZPwg/kJMEPGDk7QoFkWoo5NT6jjdHmDJBKFlaZJKWrPeD7CVGKRwSHTZMuii7TYZ5rcHQs/xqZi8LGjHbLPGstMtpEsTsrAlFlud+262ZiVGQjv1Qgavsyi0W5ABn5GxwbQhUwoXtwb9VICjBusgzHxQNvYnGz6Kd9qomBwxD91DjspbLZQiJpTnK/moxjqnRi8TS4Rdv7dh7vSA0/G6LApaPRZaVeuAkhSDOP6+f7ZejOcVZeYvoFymneuNX+1uWRon4PbE+BE2XNk4VxGXCRBbCImbb29REDP5I8u7xQuC+pYekTUYcxDQOcFayXvjKo/+xIro4c0Dbp83lUuIMuZO2pJjIDJKMTfm0bmGicOO6X2aJZQ20H1lw1xL9OODReptN6Qx3Eexq/Qeq674TotEdEputPL6IhxZJeSA9DV9Qv2DpNJHNqXYsA+glpGpUOMI38cOkwbU02HYczk/RK87JgaZ0s15z69Bl8zC+QDdNAT0RyVF/8eb80zvY=,iv:z/47SCLFd38Adh/Qjn0BC3p/kEkDJfkp66wKfxacKDo=,tag:kQ6WOEHfd1dNm0BcgjB6vw==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age12lvgjqzf0nczxp48r6rr0h7rpt8z8guqlsefe9f2ld2gl8tk5duqn4x2cj
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyMlVlQTdGVjBRRW10S2sz
|
||||
WFQxTStTYzZGRzZwVzllQ0R5bkIyazBGYmlVCjcwZkdpY2pIN1E5aGYyZ2hXSkFB
|
||||
aUs2NEgyRFQ0R2MwTUZDaUNhL0w4MUEKLS0tIEZmTWtjQXZLenlhMU5ib3JXZ0hr
|
||||
VXpyNnhNSkRwS1lPMkMyWnF6UVdCYm8KGO1vPU/3KOYapeucE/O9+o/XRO3CpAmx
|
||||
fJ5P6iInuksvTBXhDPuN7ZHhJQalr4DTkDUmLucQOdsqHyCwh7vGuA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2026-02-24T18:19:30Z"
|
||||
mac: ENC[AES256_GCM,data:O2bOPK1gZdSf1IQNnUWlXEaALZ4m2sS9yEcUkQTfbXlwZjdh3X8ftMs5NEyUtdC9ChKTgAO7BPeg4EV60EVgiSyOCBFYWDznSCLnI2whr1qX6PaAirg/9zqIeIUOJlseruL2qDaN43C3kOoM+cxK+cftpNqDImlIlQDqdsb2djc=,iv:meEI7q+oSVFRxCVMibkIIrdRhCu9k8Ti74YrqD3qHwk=,tag:RK2z9b0bpSVSsOdvcNMpjg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue