modified nix files tailored for nixos, must make modular to merge into master

This commit is contained in:
Wyatt J. Miller 2024-09-09 09:27:52 -04:00
parent 414420f3ce
commit fc8c44c026
9 changed files with 82 additions and 45 deletions

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1722082646,
"narHash": "sha256-od8dBWVP/ngg0cuoyEl/w9D+TCNDj6Kh4tr151Aax7w=",
"lastModified": 1725628909,
"narHash": "sha256-xI0OSqPHcs/c/utJsU0Zvcp1VhejMI9mgwr68uHHlPs=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "0413754b3cdb879ba14f6e96915e5fdf06c6aab6",
"rev": "76559183801030451e200c90a1627c1d82bb4910",
"type": "github"
},
"original": {
@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1720042825,
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"lastModified": 1725703823,
"narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba",
"type": "github"
},
"original": {
@ -59,11 +59,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1725407940,
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"lastModified": 1725693463,
"narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"rev": "68e7dce0a6532e876980764167ad158174402c6f",
"type": "github"
},
"original": {
@ -75,11 +75,11 @@
},
"nixpkgs-darwin": {
"locked": {
"lastModified": 1725498621,
"narHash": "sha256-m12se55InZz03onhRji85deKJp4i0jrw980aDdxT0IM=",
"lastModified": 1725784148,
"narHash": "sha256-kZQbAtu+HSIU186Y4sXL+YJNnVpAo6sb+qowxv8MwaQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0409a1b650bb50c225485f2ca21c325eb33f45c7",
"rev": "075d83b556ad70f12f82bbd54eb019f5657dd371",
"type": "github"
},
"original": {

View File

@ -59,6 +59,7 @@
hostname = "cloud";
};
modules = [
nix-flatpak.nixosModules.nix-flatpak
./modules/nixos/hardware-configuration.nix
./modules/nix-core.nix
./modules/nixos/configuration.nix
@ -70,7 +71,6 @@
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = extraSpecialArgs;
home-manager.users.${userName}.imports = [
nix-flatpak.homeManagerModules.nix-flatpak
./home
];
}

View File

@ -21,6 +21,7 @@
fh
aria2
yt-dlp
imv
# misc
cowsay
@ -45,13 +46,13 @@
statix
# productivity
iterm2
# iterm2
discord
obsidian
vscode
weechat
# iamb
ollama
# ollama
# games?
# prismlauncher

View File

@ -1,12 +1,6 @@
{...}: {
services.flatpak = {
remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}
];
enable = true;
packages = [
"com.github.tchx84.Flatseal"
"com.slack.Slack"

View File

@ -69,4 +69,19 @@
fi
'';
};
programs.bash = {
enable = true;
initExtra = ''
if [[ -z "$BASH_EXECUTION_STRING" ]]; then
if [[ -n "$ZSH_VERSION" ]]; then
LOGIN_OPTION="--login"
else
LOGIN_OPTION=""
fi
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
}

View File

@ -1,6 +1,6 @@
{pkgs, ...}: let
{lib, pkgs, ...}: let
dirs = {
defaults = ./defaults;
defaults = ../defaults;
};
in {
wayland.windowManager.sway = {
@ -13,8 +13,9 @@ in {
gtk = true;
};
};
programs.wofi.enable = pkgs.stdenv.isLinux;
xdg.configFile."sway/config".source = lib.mkForce (dirs.defaults + /sway/config);
xdg.configFile."waybar/config".source = lib.mkForce (dirs.defaults + /waybar/config);
programs.rofi.enable = pkgs.stdenv.isLinux;
programs.mako.enable = pkgs.stdenv.isLinux;
# programs.cliphist.enable = pkgs.stdenv.isLinux;
programs.waybar = {

View File

@ -6,12 +6,12 @@
} @ args: {
# Set up networking configuration
networking.hostName = hostname;
networking.computerName = hostname;
# networking.computerName = hostname;
# networking.firewall.enable = true; # VERY important, do not touch
# networking.firewall.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = [];
# networking.networkmanager.enable = pkgs.stdenv.isLinux; # Linux tool for managing network connections
system.defaults.smb.NetBIOSName = hostname;
# system.defaults.smb.NetBIOSName = hostname;
# Set up user accounts
# Don't forget to set a password with passwd!
@ -21,7 +21,10 @@
then "/Users/${userName}"
else "/home/${userName}";
description = userName;
group = "wyatt";
isNormalUser = true;
};
users.groups.wyatt = {};
nix.settings.trusted-users = [userName];
}

View File

@ -9,7 +9,7 @@
nixpkgs.config.allowUnfree = true;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# services.nix-daemon.enable = true;
# Use this instead of services.nix-daemon.enable if you
# don't wan't the daemon service to be managed for you.
# nix.useDaemon = true;

View File

@ -6,11 +6,6 @@
userName,
...
}: {
# Bring in the hardware configuration
imports = [
/etc/nixos/hardware-configuration.nix
];
# Enable flakes for NixOS
nix.settings.experimental-features = ["nix-command" "flakes"];
@ -34,17 +29,17 @@
# For systems with AMD graphics, this enables Vulkan on 32-bit applications
# For 64-bit application, however, Vulkan is enabled by default
hardware.graphics.driSupport32Bit = true;
# hardware.graphics.driSupport32Bit = true;
# For systems with AMD graphics, enable AMDVLK
hardware.hardware = {
extraPackages = with pkgs; [
amdvlk
];
extraPackages32 = with pkgs; [
driversi686Linux
];
};
#hardware.graphics = {
# extraPackages = with pkgs; [
# amdvlk
# ];
# extraPackages32 = with pkgs; [
# driversi686Linux
# ];
#};
# Enable Bluetooth if present
hardware.bluetooth.enable = true;
@ -74,6 +69,7 @@
playerctl
light
brightnessctl
firefox
wttrbar
cliphist
];
@ -120,9 +116,12 @@
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers = true;
localNetworkGameTransfers.openFirewall = true;
};
# Enable gamescope (compositor) when needed
programs.gamescope.enable = true;
# Add username to groups "wheel" and "video" - more may be added here later
users.users.${userName}.extraGroups = ["wheel" "video"];
@ -144,5 +143,29 @@
networking.networkmanager.enable = true; # Linux tool for managing network connections
# Enable Flatpak (app containerization)
services.flatpak.enable = true;
# services.flatpak.enable = true;
services.flatpak = {
enable = true;
remotes = [{
name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}];
packages = [
"com.github.tchx84.Flatseal"
"com.slack.Slack"
"dev.goats.xivlauncher"
"info.beyondallreason.bar"
"io.dbeaver.DBeaverCommunity"
"io.openrct2.OpenRCT2"
"md.obsidian.Obsidian"
"org.prismlauncher.PrismLauncher"
"sh.cider.Cider"
];
update = {
auto = {
enable = true;
onCalendar = "weekly";
};
};
};
}