Compare commits

...

14 commits

26 changed files with 277 additions and 180 deletions

34
flake.lock generated
View file

@ -7,27 +7,27 @@
]
},
"locked": {
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"lastModified": 1733050161,
"narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"rev": "62d536255879be574ebfe9b87c4ac194febf47c5",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1729453639,
"narHash": "sha256-L19R5CXCfTU9IFs9FAaYhDiteegfhJQMiAHLfls4Pdw=",
"lastModified": 1732304879,
"narHash": "sha256-/DOW8VadE//HA6tuV2++NowYWi7Wa/FmJHXRJoTQnfQ=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "68bc646058386e2ffbd9d78d79d6558e684f6b8c",
"rev": "c84579946c03c996916be0fb6e1340f444c277af",
"type": "github"
},
"original": {
@ -38,11 +38,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1729742320,
"narHash": "sha256-u3Of8xRkN//me8PU+RucKA59/6RNy4B2jcGAF36P4jI=",
"lastModified": 1732483221,
"narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda",
"rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405",
"type": "github"
},
"original": {
@ -54,27 +54,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1729973466,
"narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=",
"lastModified": 1732350895,
"narHash": "sha256-GcOQbOgmwlsRhpLGSwZJwLbo3pu9ochMETuRSS1xpz4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cd3e8833d70618c4eea8df06f95b364b016d4950",
"rev": "0c582677378f2d9ffcb01490af2f2c678dcb29d3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"lastModified": 1732521221,
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
"type": "github"
},
"original": {

View file

@ -2,15 +2,16 @@
######
inputs = {
######
#nixpkgs-old.url = "github:NixOS/nixpkgs/nixos-24.05";
# Main nix package repository
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
# NixOS unstable channel
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -74,8 +75,9 @@
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = host_helper "crocoite" # // (host_helper example);
// host_helper "factorio";
nixosConfigurations =
host_helper "crocoite" # // (host_helper example);
// host_helper "factorio";
## Standalone home-manager configuration entrypoint
## Available through 'home-manager --flake .#your-username@your-hostname'

View file

@ -3,6 +3,8 @@
inputs,
...
}: {
networking.hostName = "crocoite"; # Define your hostname.
#MANPAGER='nvim +Man!'
# This value determines the NixOS release from which the default
@ -13,9 +15,6 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
# Allow unfree packages
#unstable.config.allowUnfree = true;
#nixpkgs.overlays = [ overlays.unstable-packages ];
nixpkgs = {
# You can add overlays here
@ -41,14 +40,18 @@
allowUnfree = true;
};
};
networking.hostName = "crocoite"; # Define your hostname.
nix.settings.experimental-features = ["nix-command" "flakes"];
nix = {
settings.experimental-features = ["nix-command" "flakes"];
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
# focused on correctness, usability, and growth
# and committed to doing right by its community.
package = pkgs.lix;
channel.enable = false;
};
# https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager,
# focused on correctness, usability, and growth
# and committed to doing right by its community.
nix.package = pkgs.lix;
imports = [
inputs.nix-flatpak.nixosModules.nix-flatpak
@ -56,36 +59,21 @@
./hardware-configuration.nix
./boot.nix
../../modules/locale.nix
../../modules/networking.nix
../../modules/boot_theming.nix
../../modules
../../modules/specific_hardware/scan_and_print.nix
../../modules/specific_hardware/fwupd.nix
../../modules/specific_hardware/bluetooth.nix
../../modules/users
../../modules/sec_auth/firejail.nix
../../modules/sec_auth/login-manager.nix
../../modules/sec_auth/users_and_permissions.nix
../../modules/sec_auth/ssh.nix
../../modules/specific_hardware
../../modules/software/software.nix
../../modules/software/virt.nix
../../modules/software/game.nix
../../modules/software/audio_video.nix
../../modules/software/obs-studio.nix
../../modules/sec_auth
../../modules/wm_and_de/hyprland.nix
../../modules/software
../../modules/software/browser
../../modules/software/nix-helper
../../modules/pkg_mgrmnt/flatpak.nix
../../modules/pkg_mgrmnt/podman.nix
../../modules/pkg_mgrmnt/store_pkg_file.nix
../../modules/wm_and_de
../../modules/software/nix-helper/index.nix
#../../modules/software/nix-helper/doc.nix
../../modules/software/nix-helper/nix-ld.nix
../../modules/pkg_mgrmnt
../../modules/software/browser/firefox.nix
../../modules/software/browser/brave.nix
];
}

View file

@ -12,7 +12,7 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];

View file

@ -1,26 +1,30 @@
# 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 + "/profiles/qemu-guest.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a6c22dab-a82a-4109-a8d0-b7ed99d56bc7";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/a6c22dab-a82a-4109-a8d0-b7ed99d56bc7";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/ca4eedce-6e52-4593-a188-a48e54074d14"; }
];
swapDevices = [
{device = "/dev/disk/by-uuid/ca4eedce-6e52-4593-a188-a48e54074d14";}
];
# 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
@ -31,4 +35,3 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

8
modules/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [
./boot_theming.nix
./environment.nix
./locale.nix
./networking.nix
];
}

View file

@ -1,12 +1,4 @@
{pkgs, ...}: {
# Define a user account. Don't forget to set a password with passwd.
users.users.ranomier = {
isNormalUser = true;
description = "Ranomier";
extraGroups = ["networkmanager" "wheel"];
#packages = with pkgs; [];
};
environment.etc = {
"xdg/user-dirs.defaults".text = ''
DESKTOP=Desktop
@ -37,21 +29,5 @@
# XDG-USER-DIR package and config
environment.systemPackages = with pkgs; [
xdg-user-dirs
apparmor-pam
apparmor-utils
apparmor-parser
apparmor-profiles
roddhjav-apparmor-rules
];
security.apparmor.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
}

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./flatpak.nix
./podman.nix
./store_pkg_file.nix
];
}

View file

@ -1,64 +1,23 @@
{lib, ...}: {
services.flatpak.enable = true;
services.flatpak.update.auto.enable = false;
services.flatpak.uninstallUnmanaged = true;
{ ... }: {
services.flatpak = {
enable = true;
update.auto = {
enable = false;
onCalendar = "weekly";
};
uninstallUnmanaged = true;
services.flatpak.remotes = lib.mkOptionDefault [
{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}
];
remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
args = "--prio=99";
}
{
name = "flathub-beta";
location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}
];
services.flatpak.packages = [
{
origin = "flathub";
appId = "com.github.tchx84.Flatseal";
} # flatpak permisssion gui
{
origin = "flathub";
appId = "com.mojang.Minecraft";
} # Lego for adults
{
origin = "flathub";
appId = "de.schmidhuberj.DieBahn";
} # Public transport connection viewer
{
origin = "flathub";
appId = "com.github.hugolabe.Wike";
} # Wikpedia, but in nice
#{ origin = "flathub"; appId = "com.jeffser.Alpaca"; } # Local chat AI
{
origin = "flathub";
appId = "io.gpt4all.gpt4all";
} # Local chat AI
{
origin = "flathub";
appId = "md.obsidian.Obsidian";
} # note taking and brain organising
# messenger
{
origin = "flathub";
appId = "org.signal.Signal";
}
{
origin = "flathub";
appId = "org.telegram.desktop";
}
{
origin = "flathub";
appId = "dev.vencord.Vesktop";
} # More usable discord for linux
{
origin = "flathub";
appId = "io.github.Soundux";
} # soundboard
#"com.obsproject.Studio" #this is another way to write it
];
};
}

View file

@ -15,6 +15,8 @@
};
};
environment.sessionVariables = {
};
# Useful other development tools
environment.systemPackages = with pkgs; [
dive # look into docker image layers

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
security.apparmor.enable = true;
# XDG-USER-DIR package and config
environment.systemPackages = with pkgs; [
apparmor-pam
apparmor-utils
apparmor-parser
apparmor-profiles
roddhjav-apparmor-rules
];
}

View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [
./apparmor.nix
./firejail.nix
./login-manager.nix
./ssh.nix
];
}

View file

@ -3,18 +3,14 @@
programs.firejail = {
enable = true;
wrappedBinaries = {
firefox = {
executable = "${pkgs.firefox}/bin/firefox";
profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
nuclear = {
executable = "${pkgs.nuclear}/bin/nuclear";
profile = "${pkgs.firejail}/etc/firejail/nuclear.profile";
extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode
"--env=GTK_THEME=Adwaita:dark"
# Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
];
};
@ -33,14 +29,33 @@
];
};
nuclear = {
executable = "${pkgs.nuclear}/bin/nuclear";
profile = "${pkgs.firejail}/etc/firejail/nuclear.profile";
firefox = {
executable = "${pkgs.firefox}/bin/firefox";
profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode
"--env=GTK_THEME=Adwaita:dark"
# Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
];
};
nyxt = {
executable = "${pkgs.nyxt}/bin/nyxt";
profile = "${pkgs.firejail}/etc/firejail/chromium-browser.profile";
extraArgs = [
# Required for U2F USB stick
"--ignore=private-dev"
# Enforce dark mode
"--env=GTK_THEME=Adwaita:dark"
# Enable system notifications
"--dbus-user.talk=org.freedesktop.Notifications"
# For screen sharing
"--dbus-user.talk=org.freedesktop.portal.*"
];
};

View file

@ -6,13 +6,13 @@
vt = 7;
settings = {
default_session = {
command = ''${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \
--time-format '%Y-%m-%dT%H:%M:%S %A' \
--remember \
--user-menu \
--theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \
--cmd Hyprland'';
command = '' ${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \
--time-format '%Y-%m-%dT%H:%M:%S %A' \
--remember \
--user-menu \
--theme 'border=lightgreen;text=lightgreen;prompt=lightgreen;time=lightgreen;action=lightgreen;button=lightgreen;input=lightgreen' \
--cmd Hyprland'';
# removed elements from theme: container
user = "greeter";
};

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./brave.nix
./firefox.nix
./nyxt.nix
];
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
nyxt
];
}

View file

@ -0,0 +1,11 @@
{ ... }: {
imports = [
./audio_video.nix
./flatpak.nix
./game.nix
./obs-studio.nix
./shell.nix
./software.nix
./virt.nix
];
}

View file

@ -0,0 +1,51 @@
{ ... }: {
services.flatpak = {
packages = [
{
origin = "flathub";
appId = "com.github.tchx84.Flatseal";
} # flatpak permisssion gui
{
origin = "flathub";
appId = "com.mojang.Minecraft";
} # Lego for adults
{
origin = "flathub";
appId = "de.schmidhuberj.DieBahn";
} # Public transport connection viewer
{
origin = "flathub";
appId = "com.github.hugolabe.Wike";
} # Wikpedia, but in nice
#{ origin = "flathub"; appId = "com.jeffser.Alpaca"; } # Local chat AI
{
origin = "flathub";
appId = "io.gpt4all.gpt4all";
} # Local chat AI
{
origin = "flathub";
appId = "md.obsidian.Obsidian";
} # note taking and brain organising
# messenger
{
origin = "flathub";
appId = "org.signal.Signal";
}
{
origin = "flathub";
appId = "org.telegram.desktop";
}
{
origin = "flathub";
appId = "dev.vencord.Vesktop";
} # More usable discord for linux
{
origin = "flathub";
appId = "io.github.Soundux";
} # soundboard
#"com.obsproject.Studio" #this is another way to write it
];
};
}

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
#./doc.nix
./index.nix
./nix-ld.nix
];
}

View file

@ -0,0 +1,4 @@
{pkgs, ...}: {
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
}

View file

@ -2,8 +2,6 @@
# also opens the TCP and UDP port from 1714 to 1764
programs.kdeconnect.enable = true;
environment.pathsToLink = ["/share/foot"];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = let
@ -43,6 +41,7 @@
htop
ncdu
wget
unstable.yt-dlp
miniserve
file
unzip
@ -50,9 +49,10 @@
ripgrep
qemu
home-manager
dfc
# move to homemanager?
mumble
unstable.mumble
amberol_wrapper
amberol
nuclear
@ -63,11 +63,13 @@
keepassxc
#minecraft
element-desktop
rustdesk
timer
];
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
dina-font

View file

@ -0,0 +1,7 @@
{ ... }: {
imports = [
./bluetooth.nix
./fwupd.nix
./scan_and_print.nix
];
}

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./ranomier.nix
];
}

View file

@ -0,0 +1,11 @@
{pkgs, ...}: {
# Define a user account. Don't forget to set a password with passwd.
users.users.ranomier = {
isNormalUser = true;
description = "Ranomier";
extraGroups = ["networkmanager" "wheel" "podman"];
shell = pkgs.zsh;
useDefaultShell = true;
#packages = with pkgs; [];
};
}

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./hyprland.nix
];
}

View file

@ -44,6 +44,8 @@
style = "kvantum";
};
environment.pathsToLink = ["/share/foot"];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
@ -56,7 +58,7 @@
pamixer
waybar
hyprpaper
kanshi
unstable.kanshi
dunst
# audio
@ -81,6 +83,6 @@
lxqt.lxqt-policykit
# file manager
gnome.nautilus
nautilus
];
}