new stable
This commit is contained in:
parent
9bc6a41617
commit
f317b141f7
21 changed files with 179 additions and 61 deletions
16
system/modules/auto-upgrade.nix
Normal file
16
system/modules/auto-upgrade.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
# Scheduled auto upgrade system (this is only for system upgrades,
|
||||
# if you want to upgrade cargo\npm\pip global packages, docker containers or different part of the system
|
||||
# or get really full system upgrade, use `topgrade` CLI utility manually instead.
|
||||
# I recommend running `topgrade` once a week or at least once a month)
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
operation = "switch"; # If you don't want to apply updates immediately, only after rebooting, use `boot` option in this case
|
||||
flake = "/etc/nixos";
|
||||
flags = [ "--update-input" "nixpkgs" "--update-input" "rust-overlay" "--commit-lock-file" ];
|
||||
dates = "weekly";
|
||||
# channel = "https://nixos.org/channels/nixos-unstable";
|
||||
};
|
||||
}
|
||||
|
|
@ -12,7 +12,6 @@
|
|||
./networking.nix
|
||||
./nixsettings.nix
|
||||
./packages.nix
|
||||
./polkit.nix
|
||||
./programs.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
|
|
@ -24,5 +23,9 @@
|
|||
./dn-ca.nix
|
||||
./environment.nix
|
||||
./virtualization.nix
|
||||
./display-manager.nix
|
||||
./gc.nix
|
||||
./polkit.nix
|
||||
# ./auto-upgrade.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
25
system/modules/display-manager.nix
Normal file
25
system/modules/display-manager.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
greetd = {
|
||||
enable = false;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --time-format '%I:%M %p | %a • %h | %F' --cmd Hyprland";
|
||||
user = "danny";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
sddm.wayland.enable = true;
|
||||
sddm.enable = true;
|
||||
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
greetd.tuigreet
|
||||
];
|
||||
}
|
||||
|
|
@ -14,9 +14,7 @@ in
|
|||
{
|
||||
environment.systemPackages = [ offload ];
|
||||
environment.variables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
GSETTINGS_SCHEMA_DIR = "${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}/glib-2.0/schemas";
|
||||
XCURSOR_SIZE = "24";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
|
||||
# nerd-fonts.caskaydia-cove
|
||||
(nerdfonts.override { fonts = [ "CascadiaCode" ]; })
|
||||
];
|
||||
|
||||
|
|
|
|||
16
system/modules/gc.nix
Normal file
16
system/modules/gc.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
# Optimize storage and automatic scheduled GC running
|
||||
# If you want to run GC manually, use commands:
|
||||
# `nix-store --optimize` for finding and eliminating redundant copies of identical store paths
|
||||
# `nix-store --gc` for optimizing the nix store and removing unreferenced and obsolete store paths
|
||||
# `nix-collect-garbage -d` for deleting old generations of user profiles
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.optimise.automatic = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +1,24 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{ pkgs, inputs, system, ... }:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${system}.hyprland;
|
||||
withUWSM = true;
|
||||
xwayland = { enable = true; };
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
xwayland.enable = true;
|
||||
portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
|
||||
# portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pyprland
|
||||
# hyprlock
|
||||
hyprcursor
|
||||
hyprsunset
|
||||
hyprpaper
|
||||
hyprpicker
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@
|
|||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
rime-data
|
||||
fcitx5-gtk
|
||||
fcitx5-rime
|
||||
fcitx5-mozc # Japanese
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-rime # Bopomofo
|
||||
rime-data
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
enable = true;
|
||||
wlr.enable = false;
|
||||
xdgOpenUsePortal = false;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
|
|
|||
19
system/modules/rust-toolchain.toml
Normal file
19
system/modules/rust-toolchain.toml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[toolchain]
|
||||
channel = "nightly"
|
||||
components = [
|
||||
"rust-src",
|
||||
"rust-analyzer",
|
||||
"rustc-codegen-cranelift",
|
||||
"miri",
|
||||
"llvm-tools",
|
||||
"rust-docs-json",
|
||||
]
|
||||
targets = [
|
||||
"wasm32-unknown-unknown",
|
||||
"wasm32-wasi",
|
||||
"x86_64-pc-windows-gnu",
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"x86_64-unknown-linux-musl",
|
||||
]
|
||||
profile = "default"
|
||||
30
system/modules/rust.nix
Normal file
30
system/modules/rust.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Apply the overlay to the package set
|
||||
# nixpkgs.overlays = [
|
||||
# inputs.rust-overlay.overlays.default
|
||||
# ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# (rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
||||
taplo #toml formatter & lsp
|
||||
cargo-watch
|
||||
cargo-deny
|
||||
cargo-audit
|
||||
cargo-update
|
||||
cargo-edit
|
||||
cargo-outdated
|
||||
cargo-license
|
||||
cargo-tarpaulin
|
||||
cargo-cross
|
||||
cargo-zigbuild
|
||||
cargo-nextest
|
||||
cargo-spellcheck
|
||||
cargo-modules
|
||||
cargo-bloat
|
||||
cargo-unused-features
|
||||
bacon
|
||||
evcxr #rust repl
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
security.pam.services.swaylock = { };
|
||||
security.pam.services.swaylock.fprintAuth = false;
|
||||
security.pam.services.sddm.enableGnomeKeyring = true;
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
security.pam.u2f = {
|
||||
enable = true;
|
||||
settings.cue = true;
|
||||
control = "sufficient";
|
||||
};
|
||||
|
||||
security.pam.services = {
|
||||
greetd.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
# hyprlock.u2fAuth = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,11 +31,6 @@
|
|||
xkb.layout = "us";
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
sddm.wayland.enable = true;
|
||||
sddm.enable = true;
|
||||
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
|
||||
};
|
||||
|
||||
# USB auto mount
|
||||
gvfs.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue